Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: src/mips/deoptimizer-mips.cc

Issue 1405673003: provides a mechanism for optimizing compilers to select the different Register configuration. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add the TODO comments. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ia32/deoptimizer-ia32.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/ia32/deoptimizer-ia32.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698