emit_x64: Correct mutation of immutable in FPThreeOp{32,64}

operand (args[1]) was erroneously declared as non-scratch.
operand's value could be modified if FTZ was enabled.
This commit is contained in:
MerryMage 2017-04-01 09:53:29 +01:00
parent 05e97058c3
commit 4c5de3905b

View file

@ -2235,7 +2235,7 @@ static void FPThreeOp32(BlockOfCode* code, RegAlloc& reg_alloc, IR::Block& block
auto args = reg_alloc.GetArgumentInfo(inst);
Xbyak::Xmm result = reg_alloc.UseScratchXmm(args[0]);
Xbyak::Xmm operand = reg_alloc.UseXmm(args[1]);
Xbyak::Xmm operand = reg_alloc.UseScratchXmm(args[1]);
Xbyak::Reg32 gpr_scratch = reg_alloc.ScratchGpr().cvt32();
if (block.Location().FPSCR().FTZ()) {
@ -2257,7 +2257,7 @@ static void FPThreeOp64(BlockOfCode* code, RegAlloc& reg_alloc, IR::Block& block
auto args = reg_alloc.GetArgumentInfo(inst);
Xbyak::Xmm result = reg_alloc.UseScratchXmm(args[0]);
Xbyak::Xmm operand = reg_alloc.UseXmm(args[1]);
Xbyak::Xmm operand = reg_alloc.UseScratchXmm(args[1]);
Xbyak::Reg64 gpr_scratch = reg_alloc.ScratchGpr();
if (block.Location().FPSCR().FTZ()) {