OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 #define __ ACCESS_MASM(masm) | 92 #define __ ACCESS_MASM(masm) |
93 | 93 |
94 | 94 |
95 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm, | 95 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm, |
96 ExternalReference miss) { | 96 ExternalReference miss) { |
97 // Update the static counter each time a new code stub is generated. | 97 // Update the static counter each time a new code stub is generated. |
98 isolate()->counters()->code_stubs()->Increment(); | 98 isolate()->counters()->code_stubs()->Increment(); |
99 | 99 |
100 CallInterfaceDescriptor descriptor = GetCallInterfaceDescriptor(); | 100 CallInterfaceDescriptor descriptor = GetCallInterfaceDescriptor(); |
101 int param_count = descriptor.GetEnvironmentParameterCount(); | 101 int param_count = descriptor.GetRegisterParameterCount(); |
102 { | 102 { |
103 // Call the runtime system in a fresh internal frame. | 103 // Call the runtime system in a fresh internal frame. |
104 FrameScope scope(masm, StackFrame::INTERNAL); | 104 FrameScope scope(masm, StackFrame::INTERNAL); |
105 DCHECK(param_count == 0 || | 105 DCHECK(param_count == 0 || |
106 rax.is(descriptor.GetEnvironmentParameterRegister(param_count - 1))); | 106 rax.is(descriptor.GetRegisterParameter(param_count - 1))); |
107 // Push arguments | 107 // Push arguments |
108 for (int i = 0; i < param_count; ++i) { | 108 for (int i = 0; i < param_count; ++i) { |
109 __ Push(descriptor.GetEnvironmentParameterRegister(i)); | 109 __ Push(descriptor.GetRegisterParameter(i)); |
110 } | 110 } |
111 __ CallExternalReference(miss, param_count); | 111 __ CallExternalReference(miss, param_count); |
112 } | 112 } |
113 | 113 |
114 __ Ret(); | 114 __ Ret(); |
115 } | 115 } |
116 | 116 |
117 | 117 |
118 void StoreBufferOverflowStub::Generate(MacroAssembler* masm) { | 118 void StoreBufferOverflowStub::Generate(MacroAssembler* masm) { |
119 __ PushCallerSaved(save_doubles() ? kSaveFPRegs : kDontSaveFPRegs); | 119 __ PushCallerSaved(save_doubles() ? kSaveFPRegs : kDontSaveFPRegs); |
(...skipping 5303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5423 kStackSpace, nullptr, return_value_operand, NULL); | 5423 kStackSpace, nullptr, return_value_operand, NULL); |
5424 } | 5424 } |
5425 | 5425 |
5426 | 5426 |
5427 #undef __ | 5427 #undef __ |
5428 | 5428 |
5429 } // namespace internal | 5429 } // namespace internal |
5430 } // namespace v8 | 5430 } // namespace v8 |
5431 | 5431 |
5432 #endif // V8_TARGET_ARCH_X64 | 5432 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |