emit_x64: Correct behaviour of PackedOperation for immediate argument

x64 MOVD_xmm does not support an immediate oparg
This commit is contained in:
MerryMage 2016-08-18 18:17:17 +01:00
parent b2de47954b
commit 1a3f3ac435

View file

@ -1106,13 +1106,13 @@ static void EmitPackedOperation(BlockOfCode* code, RegAlloc& reg_alloc, IR::Inst
IR::Value b = inst->GetArg(1);
X64Reg result = reg_alloc.UseDefRegister(a, inst, any_gpr);
OpArg op_arg = reg_alloc.UseOpArg(b, any_gpr);
X64Reg arg = reg_alloc.UseRegister(b, any_gpr);
X64Reg xmm_scratch_a = reg_alloc.ScratchRegister(any_xmm);
X64Reg xmm_scratch_b = reg_alloc.ScratchRegister(any_xmm);
code->MOVD_xmm(xmm_scratch_a, R(result));
code->MOVD_xmm(xmm_scratch_b, op_arg);
code->MOVD_xmm(xmm_scratch_b, R(arg));
(code->*fn)(xmm_scratch_a, R(xmm_scratch_b));