diff --git a/src/ia32/deoptimizer-ia32.cc b/src/ia32/deoptimizer-ia32.cc index 9743b65f0b..94b429ba47 100644 --- a/src/ia32/deoptimizer-ia32.cc +++ b/src/ia32/deoptimizer-ia32.cc @@ -1214,15 +1214,10 @@ void Deoptimizer::EntryGenerator::Generate() { } } - // 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."); + // Clear FPU all exceptions. + // TODO(ulan): Find out why the TOP register is not zero here in some cases, + // and check that the generated code never deoptimizes with unbalanced stack. __ fnclex(); - __ pop(eax); // Remove the bailout id and the double registers from the stack. if (type() == EAGER) {