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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 } | 100 } |
101 | 101 |
102 | 102 |
103 #define __ ACCESS_MASM(masm) | 103 #define __ ACCESS_MASM(masm) |
104 | 104 |
105 | 105 |
106 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { | 106 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { |
107 // Update the static counter each time a new code stub is generated. | 107 // Update the static counter each time a new code stub is generated. |
108 isolate()->counters()->code_stubs()->Increment(); | 108 isolate()->counters()->code_stubs()->Increment(); |
109 | 109 |
110 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(); | 110 CodeStubInterfaceDescriptor descriptor; |
111 int param_count = descriptor->GetEnvironmentParameterCount(); | 111 InitializeInterfaceDescriptor(&descriptor); |
| 112 int param_count = descriptor.GetEnvironmentParameterCount(); |
112 { | 113 { |
113 // Call the runtime system in a fresh internal frame. | 114 // Call the runtime system in a fresh internal frame. |
114 FrameScope scope(masm, StackFrame::INTERNAL); | 115 FrameScope scope(masm, StackFrame::INTERNAL); |
115 DCHECK(param_count == 0 || | 116 DCHECK(param_count == 0 || |
116 rax.is(descriptor->GetEnvironmentParameterRegister( | 117 rax.is(descriptor.GetEnvironmentParameterRegister(param_count - 1))); |
117 param_count - 1))); | |
118 // Push arguments | 118 // Push arguments |
119 for (int i = 0; i < param_count; ++i) { | 119 for (int i = 0; i < param_count; ++i) { |
120 __ Push(descriptor->GetEnvironmentParameterRegister(i)); | 120 __ Push(descriptor.GetEnvironmentParameterRegister(i)); |
121 } | 121 } |
122 ExternalReference miss = descriptor->miss_handler(); | 122 ExternalReference miss = descriptor.miss_handler(); |
123 __ CallExternalReference(miss, param_count); | 123 __ CallExternalReference(miss, param_count); |
124 } | 124 } |
125 | 125 |
126 __ Ret(); | 126 __ Ret(); |
127 } | 127 } |
128 | 128 |
129 | 129 |
130 void StoreBufferOverflowStub::Generate(MacroAssembler* masm) { | 130 void StoreBufferOverflowStub::Generate(MacroAssembler* masm) { |
131 __ PushCallerSaved(save_doubles() ? kSaveFPRegs : kDontSaveFPRegs); | 131 __ PushCallerSaved(save_doubles() ? kSaveFPRegs : kDontSaveFPRegs); |
132 const int argument_count = 1; | 132 const int argument_count = 1; |
(...skipping 4515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4648 return_value_operand, | 4648 return_value_operand, |
4649 NULL); | 4649 NULL); |
4650 } | 4650 } |
4651 | 4651 |
4652 | 4652 |
4653 #undef __ | 4653 #undef __ |
4654 | 4654 |
4655 } } // namespace v8::internal | 4655 } } // namespace v8::internal |
4656 | 4656 |
4657 #endif // V8_TARGET_ARCH_X64 | 4657 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |