Commit 30cf31ea authored by zhengxing.li's avatar zhengxing.li Committed by Commit bot

X87: [TurboFan] Fixed the kX87BitcastFI and kX87BitcastIF code generation bugs.

  The original kX87BitcastFI and kX87BitcastIF of x87 code generation in TurboFan have bugs and caused all Run_Wasm_F32CopySign test cases failed.

  This CL will fix them.

BUG=

Review URL: https://codereview.chromium.org/1565183003

Cr-Commit-Position: refs/heads/master@{#33166}
parent 0427d9ff
......@@ -1200,24 +1200,19 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
break;
}
case kX87BitcastFI: {
__ fstp(0);
__ mov(i.OutputRegister(), MemOperand(esp, 0));
__ lea(esp, Operand(esp, kFloatSize));
break;
}
case kX87BitcastIF: {
__ fstp(0);
if (instr->InputAt(0)->IsRegister()) {
__ lea(esp, Operand(esp, -kFloatSize));
__ mov(MemOperand(esp, 0), i.InputRegister(0));
__ fstp(0);
__ fld_s(MemOperand(esp, 0));
__ lea(esp, Operand(esp, kFloatSize));
} else {
__ lea(esp, Operand(esp, -kDoubleSize));
__ mov(MemOperand(esp, 0), i.InputRegister(0));
__ fstp(0);
__ fld_d(MemOperand(esp, 0));
__ lea(esp, Operand(esp, kDoubleSize));
__ fld_s(i.InputOperand(0));
}
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment