Remove bogus check for TOP register in deoptimizer.
authorulan@chromium.org <ulan@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 19 Feb 2013 12:37:19 +0000 (12:37 +0000)
committerulan@chromium.org <ulan@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 19 Feb 2013 12:37:19 +0000 (12:37 +0000)
R=danno@chromium.org
BUG=176943

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13690 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/ia32/deoptimizer-ia32.cc

index 9743b65..94b429b 100644 (file)
@@ -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) {