diff options
author | Stefan Weil <sw@weilnetz.de> | 2013-09-12 21:13:13 +0200 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2013-12-02 21:31:11 -0600 |
commit | a2c9dc504a28d07284d87a4ef10ad66f6f864b42 (patch) | |
tree | 686c127e5fd2d66d9a48cc0da3a5b5aa0922c7da /tcg | |
parent | 927fab3e061eba4feaaaa0c7409b431f4340197d (diff) | |
download | qemu-a2c9dc504a28d07284d87a4ef10ad66f6f864b42.tar.gz |
misc: Use new rotate functions
Signed-off-by: Stefan Weil <sw@weilnetz.de>
(cherry picked from commit 3df2b8fde949be86d8a78923c992fdd698d4ea4c)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'tcg')
-rw-r--r-- | tcg/optimize.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tcg/optimize.c b/tcg/optimize.c index b35868afbc..adb52581c9 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -236,20 +236,16 @@ static TCGArg do_constant_folding_2(TCGOpcode op, TCGArg x, TCGArg y) return (int64_t)x >> (int64_t)y; case INDEX_op_rotr_i32: - x = ((uint32_t)x << (32 - y)) | ((uint32_t)x >> y); - return x; + return ror32(x, y); case INDEX_op_rotr_i64: - x = ((uint64_t)x << (64 - y)) | ((uint64_t)x >> y); - return x; + return ror64(x, y); case INDEX_op_rotl_i32: - x = ((uint32_t)x << y) | ((uint32_t)x >> (32 - y)); - return x; + return rol32(x, y); case INDEX_op_rotl_i64: - x = ((uint64_t)x << y) | ((uint64_t)x >> (64 - y)); - return x; + return rol64(x, y); CASE_OP_32_64(not): return ~x; |