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

Unified Diff: src/crankshaft/x87/lithium-codegen-x87.cc

Issue 1960993002: [X87] [Ignition] Fix V8 x87 code generation bugs when Ingition was enabled. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: format the comments Created 4 years, 7 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 | src/x87/builtins-x87.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/x87/lithium-codegen-x87.cc
diff --git a/src/crankshaft/x87/lithium-codegen-x87.cc b/src/crankshaft/x87/lithium-codegen-x87.cc
index 88cfc65ab6a787adf719c4cf8feedafd1fb818e3..f6c97ff18c66fecb49d03d2be0805eccf2698ea9 100644
--- a/src/crankshaft/x87/lithium-codegen-x87.cc
+++ b/src/crankshaft/x87/lithium-codegen-x87.cc
@@ -201,6 +201,13 @@ void LCodeGen::GenerateOsrPrologue() {
osr_pc_offset_ = masm()->pc_offset();
+ // Interpreter is the first tier compiler now. It will run the code generated
+ // by TurboFan compiler which will always put "1" on x87 FPU stack.
+ // This behavior will affect crankshaft's x87 FPU stack depth check under
+ // debug mode.
+ // Need to reset the FPU stack here for this scenario.
+ __ fninit();
+
// Adjust the frame size, subsuming the unoptimized frame into the
// optimized frame.
int slots = GetStackSlotCount() - graph()->osr()->UnoptimizedFrameSlots();
« no previous file with comments | « no previous file | src/x87/builtins-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698