aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-11-14 05:26:46 +0000
committerj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-11-14 05:26:46 +0000
commit271a916e8a4188b0ec94bafff18aa93de0047820 (patch)
tree9f92fa384ac5e78f8452f0cf31b0a7f3273fa295
parent3e4587d5d1b8ccb28de9be2fbab724dc1cc89359 (diff)
Fix invalid PowerPC 64 rldimi optimized case.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3638 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--target-ppc/translate.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index 550e1abf14..67b7613abe 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -1606,17 +1606,15 @@ GEN_PPC64_R2(rldcr, 0x1E, 0x09);
static always_inline void gen_rldimi (DisasContext *ctx, int mbn, int shn)
{
uint64_t mask;
- uint32_t sh, mb;
+ uint32_t sh, mb, me;
sh = SH(ctx->opcode) | (shn << 5);
mb = MB(ctx->opcode) | (mbn << 5);
+ me = 63 - sh;
if (likely(sh == 0)) {
if (likely(mb == 0)) {
gen_op_load_gpr_T0(rS(ctx->opcode));
goto do_store;
- } else if (likely(mb == 63)) {
- gen_op_load_gpr_T0(rA(ctx->opcode));
- goto do_store;
}
gen_op_load_gpr_T0(rS(ctx->opcode));
gen_op_load_gpr_T1(rA(ctx->opcode));
@@ -1626,7 +1624,7 @@ static always_inline void gen_rldimi (DisasContext *ctx, int mbn, int shn)
gen_op_load_gpr_T1(rA(ctx->opcode));
gen_op_rotli64_T0(sh);
do_mask:
- mask = MASK(mb, 63 - sh);
+ mask = MASK(mb, me);
gen_andi_T0_64(ctx, mask);
gen_andi_T1_64(ctx, ~mask);
gen_op_or();