OLD | NEW |
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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 DCHECK(rax_is_tagged == kRaxIsUntaggedInt); | 599 DCHECK(rax_is_tagged == kRaxIsUntaggedInt); |
600 __ movp(rdx, rax); | 600 __ movp(rdx, rax); |
601 __ shlq(rdx, Immediate(kPointerSizeLog2)); | 601 __ shlq(rdx, Immediate(kPointerSizeLog2)); |
602 } | 602 } |
603 // Check if the arguments will overflow the stack. | 603 // Check if the arguments will overflow the stack. |
604 __ cmpp(rcx, rdx); | 604 __ cmpp(rcx, rdx); |
605 __ j(greater, &okay); // Signed comparison. | 605 __ j(greater, &okay); // Signed comparison. |
606 | 606 |
607 // Out of stack space. | 607 // Out of stack space. |
608 __ Push(Operand(rbp, calleeOffset)); | 608 __ Push(Operand(rbp, calleeOffset)); |
| 609 if (rax_is_tagged == kRaxIsUntaggedInt) { |
| 610 __ Integer32ToSmi(rax, rax); |
| 611 } |
609 __ Push(rax); | 612 __ Push(rax); |
610 __ InvokeBuiltin(Builtins::STACK_OVERFLOW, CALL_FUNCTION); | 613 __ InvokeBuiltin(Builtins::STACK_OVERFLOW, CALL_FUNCTION); |
611 | 614 |
612 __ bind(&okay); | 615 __ bind(&okay); |
613 } | 616 } |
614 | 617 |
615 | 618 |
616 static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm, | 619 static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm, |
617 bool is_construct) { | 620 bool is_construct) { |
618 ProfileEntryHookStub::MaybeCallEntryHook(masm); | 621 ProfileEntryHookStub::MaybeCallEntryHook(masm); |
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1748 __ bind(&ok); | 1751 __ bind(&ok); |
1749 __ ret(0); | 1752 __ ret(0); |
1750 } | 1753 } |
1751 | 1754 |
1752 | 1755 |
1753 #undef __ | 1756 #undef __ |
1754 | 1757 |
1755 } } // namespace v8::internal | 1758 } } // namespace v8::internal |
1756 | 1759 |
1757 #endif // V8_TARGET_ARCH_X64 | 1760 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |