aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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();