mirror of
https://github.com/qemu/qemu.git
synced 2024-11-24 19:33:39 +08:00
Fix invalid PowerPC 64 rldimi optimized case.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3638 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
3e4587d5d1
commit
271a916e8a
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user