Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Unified Diff: src/ia32/deoptimizer-ia32.cc

Issue 11962015: Check that FPU TOP register is zero and clear all exceptions instead of using fninit, (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/deoptimizer-ia32.cc
diff --git a/src/ia32/deoptimizer-ia32.cc b/src/ia32/deoptimizer-ia32.cc
index 72a8592df643e51a617d3d2a708558791cf5b6bc..029dbfbe29b31a19ded56260220a8e339dbadd06 100644
--- a/src/ia32/deoptimizer-ia32.cc
+++ b/src/ia32/deoptimizer-ia32.cc
@@ -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) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698