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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 185 |
186 info()->set_prologue_offset(masm_->pc_offset()); | 186 info()->set_prologue_offset(masm_->pc_offset()); |
187 if (NeedsEagerFrame()) { | 187 if (NeedsEagerFrame()) { |
188 DCHECK(!frame_is_built_); | 188 DCHECK(!frame_is_built_); |
189 frame_is_built_ = true; | 189 frame_is_built_ = true; |
190 if (info()->IsStub()) { | 190 if (info()->IsStub()) { |
191 __ StubPrologue(); | 191 __ StubPrologue(); |
192 } else { | 192 } else { |
193 __ Prologue(info()->IsCodePreAgingActive()); | 193 __ Prologue(info()->IsCodePreAgingActive()); |
194 } | 194 } |
195 info()->AddNoFrameRange(0, masm_->pc_offset()); | |
196 } | 195 } |
197 | 196 |
198 if (info()->IsOptimizing() && | 197 if (info()->IsOptimizing() && |
199 dynamic_frame_alignment_ && | 198 dynamic_frame_alignment_ && |
200 FLAG_debug_code) { | 199 FLAG_debug_code) { |
201 __ test(esp, Immediate(kPointerSize)); | 200 __ test(esp, Immediate(kPointerSize)); |
202 __ Assert(zero, kFrameIsExpectedToBeAligned); | 201 __ Assert(zero, kFrameIsExpectedToBeAligned); |
203 } | 202 } |
204 | 203 |
205 // Reserve space for the stack slots needed by the code. | 204 // Reserve space for the stack slots needed by the code. |
(...skipping 2488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2694 __ push(eax); | 2693 __ push(eax); |
2695 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 2694 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
2696 __ CallRuntime(Runtime::kTraceExit, 1); | 2695 __ CallRuntime(Runtime::kTraceExit, 1); |
2697 } | 2696 } |
2698 if (info()->saves_caller_doubles()) RestoreCallerDoubles(); | 2697 if (info()->saves_caller_doubles()) RestoreCallerDoubles(); |
2699 if (dynamic_frame_alignment_) { | 2698 if (dynamic_frame_alignment_) { |
2700 // Fetch the state of the dynamic frame alignment. | 2699 // Fetch the state of the dynamic frame alignment. |
2701 __ mov(edx, Operand(ebp, | 2700 __ mov(edx, Operand(ebp, |
2702 JavaScriptFrameConstants::kDynamicAlignmentStateOffset)); | 2701 JavaScriptFrameConstants::kDynamicAlignmentStateOffset)); |
2703 } | 2702 } |
2704 int no_frame_start = -1; | |
2705 if (NeedsEagerFrame()) { | 2703 if (NeedsEagerFrame()) { |
2706 __ mov(esp, ebp); | 2704 __ mov(esp, ebp); |
2707 __ pop(ebp); | 2705 __ pop(ebp); |
2708 no_frame_start = masm_->pc_offset(); | |
2709 } | 2706 } |
2710 if (dynamic_frame_alignment_) { | 2707 if (dynamic_frame_alignment_) { |
2711 Label no_padding; | 2708 Label no_padding; |
2712 __ cmp(edx, Immediate(kNoAlignmentPadding)); | 2709 __ cmp(edx, Immediate(kNoAlignmentPadding)); |
2713 __ j(equal, &no_padding, Label::kNear); | 2710 __ j(equal, &no_padding, Label::kNear); |
2714 | 2711 |
2715 EmitReturn(instr, true); | 2712 EmitReturn(instr, true); |
2716 __ bind(&no_padding); | 2713 __ bind(&no_padding); |
2717 } | 2714 } |
2718 | 2715 |
2719 EmitReturn(instr, false); | 2716 EmitReturn(instr, false); |
2720 if (no_frame_start != -1) { | |
2721 info()->AddNoFrameRange(no_frame_start, masm_->pc_offset()); | |
2722 } | |
2723 } | 2717 } |
2724 | 2718 |
2725 | 2719 |
2726 template <class T> | 2720 template <class T> |
2727 void LCodeGen::EmitVectorLoadICRegisters(T* instr) { | 2721 void LCodeGen::EmitVectorLoadICRegisters(T* instr) { |
2728 Register vector_register = ToRegister(instr->temp_vector()); | 2722 Register vector_register = ToRegister(instr->temp_vector()); |
2729 Register slot_register = LoadWithVectorDescriptor::SlotRegister(); | 2723 Register slot_register = LoadWithVectorDescriptor::SlotRegister(); |
2730 DCHECK(vector_register.is(LoadWithVectorDescriptor::VectorRegister())); | 2724 DCHECK(vector_register.is(LoadWithVectorDescriptor::VectorRegister())); |
2731 DCHECK(slot_register.is(eax)); | 2725 DCHECK(slot_register.is(eax)); |
2732 | 2726 |
(...skipping 2990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5723 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5717 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5724 } | 5718 } |
5725 | 5719 |
5726 | 5720 |
5727 #undef __ | 5721 #undef __ |
5728 | 5722 |
5729 } // namespace internal | 5723 } // namespace internal |
5730 } // namespace v8 | 5724 } // namespace v8 |
5731 | 5725 |
5732 #endif // V8_TARGET_ARCH_IA32 | 5726 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |