OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/codegen.h" | 5 #include "src/codegen.h" |
6 #include "src/deoptimizer.h" | 6 #include "src/deoptimizer.h" |
7 #include "src/full-codegen/full-codegen.h" | 7 #include "src/full-codegen/full-codegen.h" |
8 #include "src/register-configuration.h" | 8 #include "src/register-configuration.h" |
9 #include "src/safepoint-table.h" | 9 #include "src/safepoint-table.h" |
10 | 10 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 // For the rest, there are gaps on the stack, so the offsets remain the same. | 148 // For the rest, there are gaps on the stack, so the offsets remain the same. |
149 const int kNumberOfRegisters = Register::kNumRegisters; | 149 const int kNumberOfRegisters = Register::kNumRegisters; |
150 | 150 |
151 RegList restored_regs = kJSCallerSaved | kCalleeSaved; | 151 RegList restored_regs = kJSCallerSaved | kCalleeSaved; |
152 RegList saved_regs = restored_regs | sp.bit(); | 152 RegList saved_regs = restored_regs | sp.bit(); |
153 | 153 |
154 const int kDoubleRegsSize = kDoubleSize * DoubleRegister::kNumRegisters; | 154 const int kDoubleRegsSize = kDoubleSize * DoubleRegister::kNumRegisters; |
155 | 155 |
156 // Save all double registers before messing with them. | 156 // Save all double registers before messing with them. |
157 __ subi(sp, sp, Operand(kDoubleRegsSize)); | 157 __ subi(sp, sp, Operand(kDoubleRegsSize)); |
158 const RegisterConfiguration* config = RegisterConfiguration::ArchDefault(); | 158 const RegisterConfiguration* config = |
| 159 RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT); |
159 for (int i = 0; i < config->num_allocatable_double_registers(); ++i) { | 160 for (int i = 0; i < config->num_allocatable_double_registers(); ++i) { |
160 int code = config->GetAllocatableDoubleCode(i); | 161 int code = config->GetAllocatableDoubleCode(i); |
161 const DoubleRegister dreg = DoubleRegister::from_code(code); | 162 const DoubleRegister dreg = DoubleRegister::from_code(code); |
162 int offset = code * kDoubleSize; | 163 int offset = code * kDoubleSize; |
163 __ stfd(dreg, MemOperand(sp, offset)); | 164 __ stfd(dreg, MemOperand(sp, offset)); |
164 } | 165 } |
165 | 166 |
166 // Push saved_regs (needed to populate FrameDescription::registers_). | 167 // Push saved_regs (needed to populate FrameDescription::registers_). |
167 // Leave gaps for other registers. | 168 // Leave gaps for other registers. |
168 __ subi(sp, sp, Operand(kNumberOfRegisters * kPointerSize)); | 169 __ subi(sp, sp, Operand(kNumberOfRegisters * kPointerSize)); |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 | 360 |
360 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { | 361 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { |
361 DCHECK(FLAG_enable_embedded_constant_pool); | 362 DCHECK(FLAG_enable_embedded_constant_pool); |
362 SetFrameSlot(offset, value); | 363 SetFrameSlot(offset, value); |
363 } | 364 } |
364 | 365 |
365 | 366 |
366 #undef __ | 367 #undef __ |
367 } // namespace internal | 368 } // namespace internal |
368 } // namespace v8 | 369 } // namespace v8 |
OLD | NEW |