OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 // For the rest, there are gaps on the stack, so the offsets remain the same. | 137 // For the rest, there are gaps on the stack, so the offsets remain the same. |
138 const int kNumberOfRegisters = Register::kNumRegisters; | 138 const int kNumberOfRegisters = Register::kNumRegisters; |
139 | 139 |
140 RegList restored_regs = kJSCallerSaved | kCalleeSaved; | 140 RegList restored_regs = kJSCallerSaved | kCalleeSaved; |
141 RegList saved_regs = restored_regs | sp.bit() | ra.bit(); | 141 RegList saved_regs = restored_regs | sp.bit() | ra.bit(); |
142 | 142 |
143 const int kDoubleRegsSize = kDoubleSize * DoubleRegister::kMaxNumRegisters; | 143 const int kDoubleRegsSize = kDoubleSize * DoubleRegister::kMaxNumRegisters; |
144 | 144 |
145 // Save all FPU registers before messing with them. | 145 // Save all FPU registers before messing with them. |
146 __ Subu(sp, sp, Operand(kDoubleRegsSize)); | 146 __ Subu(sp, sp, Operand(kDoubleRegsSize)); |
147 const RegisterConfiguration* config = RegisterConfiguration::ArchDefault(); | 147 const RegisterConfiguration* config = |
| 148 RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT); |
148 for (int i = 0; i < config->num_allocatable_double_registers(); ++i) { | 149 for (int i = 0; i < config->num_allocatable_double_registers(); ++i) { |
149 int code = config->GetAllocatableDoubleCode(i); | 150 int code = config->GetAllocatableDoubleCode(i); |
150 const DoubleRegister fpu_reg = DoubleRegister::from_code(code); | 151 const DoubleRegister fpu_reg = DoubleRegister::from_code(code); |
151 int offset = code * kDoubleSize; | 152 int offset = code * kDoubleSize; |
152 __ sdc1(fpu_reg, MemOperand(sp, offset)); | 153 __ sdc1(fpu_reg, MemOperand(sp, offset)); |
153 } | 154 } |
154 | 155 |
155 // Push saved_regs (needed to populate FrameDescription::registers_). | 156 // Push saved_regs (needed to populate FrameDescription::registers_). |
156 // Leave gaps for other registers. | 157 // Leave gaps for other registers. |
157 __ Subu(sp, sp, kNumberOfRegisters * kPointerSize); | 158 __ Subu(sp, sp, kNumberOfRegisters * kPointerSize); |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 // No embedded constant pool support. | 404 // No embedded constant pool support. |
404 UNREACHABLE(); | 405 UNREACHABLE(); |
405 } | 406 } |
406 | 407 |
407 | 408 |
408 #undef __ | 409 #undef __ |
409 | 410 |
410 | 411 |
411 } // namespace internal | 412 } // namespace internal |
412 } // namespace v8 | 413 } // namespace v8 |
OLD | NEW |