| 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_X87 | 5 #if V8_TARGET_ARCH_X87 |
| 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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 __ j(greater_equal, &loop_header); | 594 __ j(greater_equal, &loop_header); |
| 595 } | 595 } |
| 596 | 596 |
| 597 // TODO(rmcilroy): List of things not currently dealt with here but done in | 597 // TODO(rmcilroy): List of things not currently dealt with here but done in |
| 598 // fullcodegen's prologue: | 598 // fullcodegen's prologue: |
| 599 // - Support profiler (specifically profiling_counter). | 599 // - Support profiler (specifically profiling_counter). |
| 600 // - Call ProfileEntryHookStub when isolate has a function_entry_hook. | 600 // - Call ProfileEntryHookStub when isolate has a function_entry_hook. |
| 601 // - Allow simulator stop operations if FLAG_stop_at is set. | 601 // - Allow simulator stop operations if FLAG_stop_at is set. |
| 602 // - Code aging of the BytecodeArray object. | 602 // - Code aging of the BytecodeArray object. |
| 603 | 603 |
| 604 // Perform stack guard check. | |
| 605 { | |
| 606 Label ok; | |
| 607 ExternalReference stack_limit = | |
| 608 ExternalReference::address_of_stack_limit(masm->isolate()); | |
| 609 __ cmp(esp, Operand::StaticVariable(stack_limit)); | |
| 610 __ j(above_equal, &ok); | |
| 611 __ push(kInterpreterBytecodeArrayRegister); | |
| 612 __ CallRuntime(Runtime::kStackGuard); | |
| 613 __ pop(kInterpreterBytecodeArrayRegister); | |
| 614 __ bind(&ok); | |
| 615 } | |
| 616 | |
| 617 // Load accumulator, register file, bytecode offset, dispatch table into | 604 // Load accumulator, register file, bytecode offset, dispatch table into |
| 618 // registers. | 605 // registers. |
| 619 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); | 606 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); |
| 620 __ mov(kInterpreterRegisterFileRegister, ebp); | 607 __ mov(kInterpreterRegisterFileRegister, ebp); |
| 621 __ add(kInterpreterRegisterFileRegister, | 608 __ add(kInterpreterRegisterFileRegister, |
| 622 Immediate(InterpreterFrameConstants::kRegisterFilePointerFromFp)); | 609 Immediate(InterpreterFrameConstants::kRegisterFilePointerFromFp)); |
| 623 __ mov(kInterpreterBytecodeOffsetRegister, | 610 __ mov(kInterpreterBytecodeOffsetRegister, |
| 624 Immediate(BytecodeArray::kHeaderSize - kHeapObjectTag)); | 611 Immediate(BytecodeArray::kHeaderSize - kHeapObjectTag)); |
| 625 // Since the dispatch table root might be set after builtins are generated, | 612 // Since the dispatch table root might be set after builtins are generated, |
| 626 // load directly from the roots table. | 613 // load directly from the roots table. |
| (...skipping 2189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2816 | 2803 |
| 2817 __ bind(&ok); | 2804 __ bind(&ok); |
| 2818 __ ret(0); | 2805 __ ret(0); |
| 2819 } | 2806 } |
| 2820 | 2807 |
| 2821 #undef __ | 2808 #undef __ |
| 2822 } // namespace internal | 2809 } // namespace internal |
| 2823 } // namespace v8 | 2810 } // namespace v8 |
| 2824 | 2811 |
| 2825 #endif // V8_TARGET_ARCH_X87 | 2812 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |