emit_x64_data_processing: operand in EmitExtractRegister is not modified

This commit is contained in:
MerryMage 2021-05-30 22:18:21 +01:00
parent 36c3b289a0
commit 9815502fee

View file

@ -235,7 +235,7 @@ static void EmitExtractRegister(BlockOfCode& code, EmitContext& ctx, IR::Inst* i
auto args = ctx.reg_alloc.GetArgumentInfo(inst); auto args = ctx.reg_alloc.GetArgumentInfo(inst);
const Xbyak::Reg result = ctx.reg_alloc.UseScratchGpr(args[0]).changeBit(bit_size); const Xbyak::Reg result = ctx.reg_alloc.UseScratchGpr(args[0]).changeBit(bit_size);
const Xbyak::Reg operand = ctx.reg_alloc.UseScratchGpr(args[1]).changeBit(bit_size); const Xbyak::Reg operand = ctx.reg_alloc.UseGpr(args[1]).changeBit(bit_size);
const u8 lsb = args[2].GetImmediateU8(); const u8 lsb = args[2].GetImmediateU8();
code.shrd(result, operand, lsb); code.shrd(result, operand, lsb);