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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/x87/code-generator-x87.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/code-stubs-x87.cc
diff --git a/src/x87/code-stubs-x87.cc b/src/x87/code-stubs-x87.cc
index c855916c7631ba7439e56c02760a17d5bbb26ccf..0261c895202aff01710362595ba4673eb74b7ac5 100644
--- a/src/x87/code-stubs-x87.cc
+++ b/src/x87/code-stubs-x87.cc
@@ -1688,6 +1688,16 @@ void CEntryStub::Generate(MacroAssembler* masm) {
// Compute the handler entry address and jump to it.
__ mov(edi, Operand::StaticVariable(pending_handler_code_address));
__ mov(edx, Operand::StaticVariable(pending_handler_offset_address));
+ // Check whether it's a turbofanned exception handler code before jump to it.
+ Label not_turbo;
+ __ push(eax);
+ __ mov(eax, Operand(edi, Code::kKindSpecificFlags1Offset - kHeapObjectTag));
+ __ and_(eax, Immediate(1 << Code::kIsTurbofannedBit));
+ __ j(zero, &not_turbo);
+ __ fninit();
+ __ fld1();
+ __ bind(&not_turbo);
+ __ pop(eax);
__ lea(edi, FieldOperand(edi, edx, times_1, Code::kHeaderSize));
__ jmp(edi);
}
« 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