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

Side by Side Diff: src/x64/deoptimizer-x64.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/register-configuration.cc ('k') | src/x64/macro-assembler-x64.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/deoptimizer.h" 8 #include "src/deoptimizer.h"
9 #include "src/full-codegen/full-codegen.h" 9 #include "src/full-codegen/full-codegen.h"
10 #include "src/register-configuration.h" 10 #include "src/register-configuration.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 void Deoptimizer::TableEntryGenerator::Generate() { 136 void Deoptimizer::TableEntryGenerator::Generate() {
137 GeneratePrologue(); 137 GeneratePrologue();
138 138
139 // Save all general purpose registers before messing with them. 139 // Save all general purpose registers before messing with them.
140 const int kNumberOfRegisters = Register::kNumRegisters; 140 const int kNumberOfRegisters = Register::kNumRegisters;
141 141
142 const int kDoubleRegsSize = kDoubleSize * XMMRegister::kMaxNumRegisters; 142 const int kDoubleRegsSize = kDoubleSize * XMMRegister::kMaxNumRegisters;
143 __ subp(rsp, Immediate(kDoubleRegsSize)); 143 __ subp(rsp, Immediate(kDoubleRegsSize));
144 144
145 const RegisterConfiguration* config = RegisterConfiguration::ArchDefault(); 145 const RegisterConfiguration* config =
146 RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT);
146 for (int i = 0; i < config->num_allocatable_double_registers(); ++i) { 147 for (int i = 0; i < config->num_allocatable_double_registers(); ++i) {
147 int code = config->GetAllocatableDoubleCode(i); 148 int code = config->GetAllocatableDoubleCode(i);
148 XMMRegister xmm_reg = XMMRegister::from_code(code); 149 XMMRegister xmm_reg = XMMRegister::from_code(code);
149 int offset = code * kDoubleSize; 150 int offset = code * kDoubleSize;
150 __ Movsd(Operand(rsp, offset), xmm_reg); 151 __ Movsd(Operand(rsp, offset), xmm_reg);
151 } 152 }
152 153
153 // We push all registers onto the stack, even though we do not need 154 // We push all registers onto the stack, even though we do not need
154 // to restore all later. 155 // to restore all later.
155 for (int i = 0; i < kNumberOfRegisters; i++) { 156 for (int i = 0; i < kNumberOfRegisters; i++) {
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 } 353 }
353 354
354 355
355 #undef __ 356 #undef __
356 357
357 358
358 } // namespace internal 359 } // namespace internal
359 } // namespace v8 360 } // namespace v8
360 361
361 #endif // V8_TARGET_ARCH_X64 362 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/register-configuration.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698