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

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

Issue 2092413002: [RegisterConfiguration] Streamline access to arch defaults, simplify Registers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compile. Created 4 years, 5 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/ppc/assembler-ppc.h ('k') | src/ppc/disasm-ppc.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 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // For the rest, there are gaps on the stack, so the offsets remain the same. 117 // For the rest, there are gaps on the stack, so the offsets remain the same.
118 const int kNumberOfRegisters = Register::kNumRegisters; 118 const int kNumberOfRegisters = Register::kNumRegisters;
119 119
120 RegList restored_regs = kJSCallerSaved | kCalleeSaved; 120 RegList restored_regs = kJSCallerSaved | kCalleeSaved;
121 RegList saved_regs = restored_regs | sp.bit(); 121 RegList saved_regs = restored_regs | sp.bit();
122 122
123 const int kDoubleRegsSize = kDoubleSize * DoubleRegister::kNumRegisters; 123 const int kDoubleRegsSize = kDoubleSize * DoubleRegister::kNumRegisters;
124 124
125 // Save all double registers before messing with them. 125 // Save all double registers before messing with them.
126 __ subi(sp, sp, Operand(kDoubleRegsSize)); 126 __ subi(sp, sp, Operand(kDoubleRegsSize));
127 const RegisterConfiguration* config = 127 const RegisterConfiguration* config = RegisterConfiguration::Crankshaft();
128 RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT);
129 for (int i = 0; i < config->num_allocatable_double_registers(); ++i) { 128 for (int i = 0; i < config->num_allocatable_double_registers(); ++i) {
130 int code = config->GetAllocatableDoubleCode(i); 129 int code = config->GetAllocatableDoubleCode(i);
131 const DoubleRegister dreg = DoubleRegister::from_code(code); 130 const DoubleRegister dreg = DoubleRegister::from_code(code);
132 int offset = code * kDoubleSize; 131 int offset = code * kDoubleSize;
133 __ stfd(dreg, MemOperand(sp, offset)); 132 __ stfd(dreg, MemOperand(sp, offset));
134 } 133 }
135 134
136 // Push saved_regs (needed to populate FrameDescription::registers_). 135 // Push saved_regs (needed to populate FrameDescription::registers_).
137 // Leave gaps for other registers. 136 // Leave gaps for other registers.
138 __ subi(sp, sp, Operand(kNumberOfRegisters * kPointerSize)); 137 __ subi(sp, sp, Operand(kNumberOfRegisters * kPointerSize));
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 335
337 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { 336 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) {
338 DCHECK(FLAG_enable_embedded_constant_pool); 337 DCHECK(FLAG_enable_embedded_constant_pool);
339 SetFrameSlot(offset, value); 338 SetFrameSlot(offset, value);
340 } 339 }
341 340
342 341
343 #undef __ 342 #undef __
344 } // namespace internal 343 } // namespace internal
345 } // namespace v8 344 } // namespace v8
OLDNEW
« no previous file with comments | « src/ppc/assembler-ppc.h ('k') | src/ppc/disasm-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698