Commit 07c60c2d authored by ulan@chromium.org's avatar ulan@chromium.org

Check that FPU TOP register is zero and clear all exceptions instead of using fninit,

which causes performance regression on Windows.

BUG=168370
R=danno@chromium.org

Review URL: https://chromiumcodereview.appspot.com/11962015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13401 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent a8d59243
......@@ -1148,7 +1148,16 @@ void Deoptimizer::EntryGenerator::Generate() {
__ movdbl(Operand(ebx, dst_offset), xmm0);
}
}
__ fninit();
// Check that the TOP register is zero and clear all exceptions.
const int kTopMask = 0x3800;
__ push(eax);
__ fwait();
__ fnstsw_ax();
__ test(eax, Immediate(kTopMask));
__ Check(zero, "FPU TOP is not zero in deoptimizer.");
__ fnclex();
__ pop(eax);
// Remove the bailout id and the double registers from the stack.
if (type() == EAGER) {
......
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