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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 // For the rest, there are gaps on the stack, so the offsets remain the same. | 110 // For the rest, there are gaps on the stack, so the offsets remain the same. |
111 const int kNumberOfRegisters = Register::kNumRegisters; | 111 const int kNumberOfRegisters = Register::kNumRegisters; |
112 | 112 |
113 RegList restored_regs = kJSCallerSaved | kCalleeSaved; | 113 RegList restored_regs = kJSCallerSaved | kCalleeSaved; |
114 RegList saved_regs = restored_regs | sp.bit() | ra.bit(); | 114 RegList saved_regs = restored_regs | sp.bit() | ra.bit(); |
115 | 115 |
116 const int kDoubleRegsSize = kDoubleSize * DoubleRegister::kMaxNumRegisters; | 116 const int kDoubleRegsSize = kDoubleSize * DoubleRegister::kMaxNumRegisters; |
117 | 117 |
118 // Save all FPU registers before messing with them. | 118 // Save all FPU registers before messing with them. |
119 __ Subu(sp, sp, Operand(kDoubleRegsSize)); | 119 __ Subu(sp, sp, Operand(kDoubleRegsSize)); |
120 const RegisterConfiguration* config = | 120 const RegisterConfiguration* config = RegisterConfiguration::Crankshaft(); |
121 RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT); | |
122 for (int i = 0; i < config->num_allocatable_double_registers(); ++i) { | 121 for (int i = 0; i < config->num_allocatable_double_registers(); ++i) { |
123 int code = config->GetAllocatableDoubleCode(i); | 122 int code = config->GetAllocatableDoubleCode(i); |
124 const DoubleRegister fpu_reg = DoubleRegister::from_code(code); | 123 const DoubleRegister fpu_reg = DoubleRegister::from_code(code); |
125 int offset = code * kDoubleSize; | 124 int offset = code * kDoubleSize; |
126 __ sdc1(fpu_reg, MemOperand(sp, offset)); | 125 __ sdc1(fpu_reg, MemOperand(sp, offset)); |
127 } | 126 } |
128 | 127 |
129 // Push saved_regs (needed to populate FrameDescription::registers_). | 128 // Push saved_regs (needed to populate FrameDescription::registers_). |
130 // Leave gaps for other registers. | 129 // Leave gaps for other registers. |
131 __ Subu(sp, sp, kNumberOfRegisters * kPointerSize); | 130 __ Subu(sp, sp, kNumberOfRegisters * kPointerSize); |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 // No embedded constant pool support. | 382 // No embedded constant pool support. |
384 UNREACHABLE(); | 383 UNREACHABLE(); |
385 } | 384 } |
386 | 385 |
387 | 386 |
388 #undef __ | 387 #undef __ |
389 | 388 |
390 | 389 |
391 } // namespace internal | 390 } // namespace internal |
392 } // namespace v8 | 391 } // namespace v8 |
OLD | NEW |