Commit fd936fac authored by zhengxing.li's avatar zhengxing.li Committed by Commit bot

[X87] [TurboFan] Fix kX87Float64ToUint32 code generation bug.

  The CL #35176 (https://codereview.chromium.org/1843983002) exposed one hidden bug in x87 turbofan code generation for kX87Float64ToUint32.

  The current kX87Float64ToUint32 code generation will destroy the input value in X87 FPU stack which will be used by the following code.

  This CL fixed this bug.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#35507}
parent 6336cc6b
......@@ -1412,11 +1412,12 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
__ fld_d(i.InputOperand(0));
}
__ fild_s(Operand(esp, 0));
__ fadd(1);
__ fstp(0);
__ fld(1);
__ faddp();
__ TruncateX87TOSToI(i.OutputRegister(0));
__ add(esp, Immediate(kInt32Size));
__ add(i.OutputRegister(), Immediate(0x80000000));
__ fstp(0);
if (!instr->InputAt(0)->IsDoubleRegister()) {
__ fstp(0);
}
......
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