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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 __ j(greater_equal, &loop_header, Label::kNear); | 663 __ j(greater_equal, &loop_header, Label::kNear); |
664 } | 664 } |
665 | 665 |
666 // TODO(rmcilroy): List of things not currently dealt with here but done in | 666 // TODO(rmcilroy): List of things not currently dealt with here but done in |
667 // fullcodegen's prologue: | 667 // fullcodegen's prologue: |
668 // - Support profiler (specifically profiling_counter). | 668 // - Support profiler (specifically profiling_counter). |
669 // - Call ProfileEntryHookStub when isolate has a function_entry_hook. | 669 // - Call ProfileEntryHookStub when isolate has a function_entry_hook. |
670 // - Allow simulator stop operations if FLAG_stop_at is set. | 670 // - Allow simulator stop operations if FLAG_stop_at is set. |
671 // - Code aging of the BytecodeArray object. | 671 // - Code aging of the BytecodeArray object. |
672 | 672 |
673 // Perform stack guard check. | |
674 { | |
675 Label ok; | |
676 __ CompareRoot(rsp, Heap::kStackLimitRootIndex); | |
677 __ j(above_equal, &ok, Label::kNear); | |
678 __ Push(kInterpreterBytecodeArrayRegister); | |
679 __ CallRuntime(Runtime::kStackGuard); | |
680 __ Pop(kInterpreterBytecodeArrayRegister); | |
681 __ bind(&ok); | |
682 } | |
683 | |
684 // Load accumulator, register file, bytecode offset, dispatch table into | 673 // Load accumulator, register file, bytecode offset, dispatch table into |
685 // registers. | 674 // registers. |
686 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); | 675 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); |
687 __ movp(kInterpreterRegisterFileRegister, rbp); | 676 __ movp(kInterpreterRegisterFileRegister, rbp); |
688 __ addp(kInterpreterRegisterFileRegister, | 677 __ addp(kInterpreterRegisterFileRegister, |
689 Immediate(InterpreterFrameConstants::kRegisterFilePointerFromFp)); | 678 Immediate(InterpreterFrameConstants::kRegisterFilePointerFromFp)); |
690 __ movp(kInterpreterBytecodeOffsetRegister, | 679 __ movp(kInterpreterBytecodeOffsetRegister, |
691 Immediate(BytecodeArray::kHeaderSize - kHeapObjectTag)); | 680 Immediate(BytecodeArray::kHeaderSize - kHeapObjectTag)); |
692 __ LoadRoot(kInterpreterDispatchTableRegister, | 681 __ LoadRoot(kInterpreterDispatchTableRegister, |
693 Heap::kInterpreterTableRootIndex); | 682 Heap::kInterpreterTableRootIndex); |
(...skipping 2171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2865 __ ret(0); | 2854 __ ret(0); |
2866 } | 2855 } |
2867 | 2856 |
2868 | 2857 |
2869 #undef __ | 2858 #undef __ |
2870 | 2859 |
2871 } // namespace internal | 2860 } // namespace internal |
2872 } // namespace v8 | 2861 } // namespace v8 |
2873 | 2862 |
2874 #endif // V8_TARGET_ARCH_X64 | 2863 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |