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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/x87/builtins-x87.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/crankshaft/x87/lithium-codegen-x87.h" 7 #include "src/crankshaft/x87/lithium-codegen-x87.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 } 194 }
195 195
196 196
197 void LCodeGen::GenerateOsrPrologue() { 197 void LCodeGen::GenerateOsrPrologue() {
198 // Generate the OSR entry prologue at the first unknown OSR value, or if there 198 // Generate the OSR entry prologue at the first unknown OSR value, or if there
199 // are none, at the OSR entrypoint instruction. 199 // are none, at the OSR entrypoint instruction.
200 if (osr_pc_offset_ >= 0) return; 200 if (osr_pc_offset_ >= 0) return;
201 201
202 osr_pc_offset_ = masm()->pc_offset(); 202 osr_pc_offset_ = masm()->pc_offset();
203 203
204 // Interpreter is the first tier compiler now. It will run the code generated
205 // by TurboFan compiler which will always put "1" on x87 FPU stack.
206 // This behavior will affect crankshaft's x87 FPU stack depth check under
207 // debug mode.
208 // Need to reset the FPU stack here for this scenario.
209 __ fninit();
210
204 // Adjust the frame size, subsuming the unoptimized frame into the 211 // Adjust the frame size, subsuming the unoptimized frame into the
205 // optimized frame. 212 // optimized frame.
206 int slots = GetStackSlotCount() - graph()->osr()->UnoptimizedFrameSlots(); 213 int slots = GetStackSlotCount() - graph()->osr()->UnoptimizedFrameSlots();
207 DCHECK(slots >= 0); 214 DCHECK(slots >= 0);
208 __ sub(esp, Immediate(slots * kPointerSize)); 215 __ sub(esp, Immediate(slots * kPointerSize));
209 } 216 }
210 217
211 218
212 void LCodeGen::GenerateBodyInstructionPre(LInstruction* instr) { 219 void LCodeGen::GenerateBodyInstructionPre(LInstruction* instr) {
213 if (instr->IsCall()) { 220 if (instr->IsCall()) {
(...skipping 5619 matching lines...) Expand 10 before | Expand all | Expand 10 after
5833 __ bind(deferred->exit()); 5840 __ bind(deferred->exit());
5834 __ bind(&done); 5841 __ bind(&done);
5835 } 5842 }
5836 5843
5837 #undef __ 5844 #undef __
5838 5845
5839 } // namespace internal 5846 } // namespace internal
5840 } // namespace v8 5847 } // namespace v8
5841 5848
5842 #endif // V8_TARGET_ARCH_X87 5849 #endif // V8_TARGET_ARCH_X87
OLDNEW
« 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