aboutsummaryrefslogtreecommitdiff
path: root/tci.c
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2013-09-12 21:13:13 +0200
committerStefan Weil <sw@weilnetz.de>2013-09-25 21:23:05 +0200
commit3df2b8fde949be86d8a78923c992fdd698d4ea4c (patch)
tree09c4db80712626acaed595506233559a2d4ebd2d /tci.c
parent6aa25b4a7bb10c48c3054f268d5be98e42ea42c0 (diff)
misc: Use new rotate functions
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Diffstat (limited to 'tci.c')
-rw-r--r--tci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tci.c b/tci.c
index cc5aefd532..0202ed97d1 100644
--- a/tci.c
+++ b/tci.c
@@ -688,13 +688,13 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
t0 = *tb_ptr++;
t1 = tci_read_ri32(&tb_ptr);
t2 = tci_read_ri32(&tb_ptr);
- tci_write_reg32(t0, (t1 << t2) | (t1 >> (32 - t2)));
+ tci_write_reg32(t0, rol32(t1, t2));
break;
case INDEX_op_rotr_i32:
t0 = *tb_ptr++;
t1 = tci_read_ri32(&tb_ptr);
t2 = tci_read_ri32(&tb_ptr);
- tci_write_reg32(t0, (t1 >> t2) | (t1 << (32 - t2)));
+ tci_write_reg32(t0, ror32(t1, t2));
break;
#endif
#if TCG_TARGET_HAS_deposit_i32
@@ -955,13 +955,13 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
t0 = *tb_ptr++;
t1 = tci_read_ri64(&tb_ptr);
t2 = tci_read_ri64(&tb_ptr);
- tci_write_reg64(t0, (t1 << t2) | (t1 >> (64 - t2)));
+ tci_write_reg64(t0, rol64(t1, t2));
break;
case INDEX_op_rotr_i64:
t0 = *tb_ptr++;
t1 = tci_read_ri64(&tb_ptr);
t2 = tci_read_ri64(&tb_ptr);
- tci_write_reg64(t0, (t1 >> t2) | (t1 << (64 - t2)));
+ tci_write_reg64(t0, ror64(t1, t2));
break;
#endif
#if TCG_TARGET_HAS_deposit_i64