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

Side by Side Diff: src/x87/code-stubs-x87.cc

Issue 1702383005: x87: fix x87 FPU stack depth check fail issue in TurboFan's exception handler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove the redundant test instruction as the and instruction will set the ZF flag Created 4 years, 10 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 | « src/compiler/x87/code-generator-x87.cc ('k') | no next file » | 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/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1670 matching lines...) Expand 10 before | Expand all | Expand 10 after
1681 // the context will be set to (esi == 0) for non-JS frames. 1681 // the context will be set to (esi == 0) for non-JS frames.
1682 Label skip; 1682 Label skip;
1683 __ test(esi, esi); 1683 __ test(esi, esi);
1684 __ j(zero, &skip, Label::kNear); 1684 __ j(zero, &skip, Label::kNear);
1685 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), esi); 1685 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), esi);
1686 __ bind(&skip); 1686 __ bind(&skip);
1687 1687
1688 // Compute the handler entry address and jump to it. 1688 // Compute the handler entry address and jump to it.
1689 __ mov(edi, Operand::StaticVariable(pending_handler_code_address)); 1689 __ mov(edi, Operand::StaticVariable(pending_handler_code_address));
1690 __ mov(edx, Operand::StaticVariable(pending_handler_offset_address)); 1690 __ mov(edx, Operand::StaticVariable(pending_handler_offset_address));
1691 // Check whether it's a turbofanned exception handler code before jump to it.
1692 Label not_turbo;
1693 __ push(eax);
1694 __ mov(eax, Operand(edi, Code::kKindSpecificFlags1Offset - kHeapObjectTag));
1695 __ and_(eax, Immediate(1 << Code::kIsTurbofannedBit));
1696 __ j(zero, &not_turbo);
1697 __ fninit();
1698 __ fld1();
1699 __ bind(&not_turbo);
1700 __ pop(eax);
1691 __ lea(edi, FieldOperand(edi, edx, times_1, Code::kHeaderSize)); 1701 __ lea(edi, FieldOperand(edi, edx, times_1, Code::kHeaderSize));
1692 __ jmp(edi); 1702 __ jmp(edi);
1693 } 1703 }
1694 1704
1695 1705
1696 void JSEntryStub::Generate(MacroAssembler* masm) { 1706 void JSEntryStub::Generate(MacroAssembler* masm) {
1697 Label invoke, handler_entry, exit; 1707 Label invoke, handler_entry, exit;
1698 Label not_outermost_js, not_outermost_js_2; 1708 Label not_outermost_js, not_outermost_js_2;
1699 1709
1700 ProfileEntryHookStub::MaybeCallEntryHook(masm); 1710 ProfileEntryHookStub::MaybeCallEntryHook(masm);
(...skipping 3739 matching lines...) Expand 10 before | Expand all | Expand 10 after
5440 return_value_operand, NULL); 5450 return_value_operand, NULL);
5441 } 5451 }
5442 5452
5443 5453
5444 #undef __ 5454 #undef __
5445 5455
5446 } // namespace internal 5456 } // namespace internal
5447 } // namespace v8 5457 } // namespace v8
5448 5458
5449 #endif // V8_TARGET_ARCH_X87 5459 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/compiler/x87/code-generator-x87.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698