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

Side by Side Diff: src/x64/deoptimizer-x64.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/x64/code-stubs-x64.h ('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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 void Deoptimizer::TableEntryGenerator::Generate() { 110 void Deoptimizer::TableEntryGenerator::Generate() {
111 GeneratePrologue(); 111 GeneratePrologue();
112 112
113 // Save all general purpose registers before messing with them. 113 // Save all general purpose registers before messing with them.
114 const int kNumberOfRegisters = Register::kNumRegisters; 114 const int kNumberOfRegisters = Register::kNumRegisters;
115 115
116 const int kDoubleRegsSize = kDoubleSize * XMMRegister::kMaxNumRegisters; 116 const int kDoubleRegsSize = kDoubleSize * XMMRegister::kMaxNumRegisters;
117 __ subp(rsp, Immediate(kDoubleRegsSize)); 117 __ subp(rsp, Immediate(kDoubleRegsSize));
118 118
119 const RegisterConfiguration* config = 119 const RegisterConfiguration* config = RegisterConfiguration::Crankshaft();
120 RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT);
121 for (int i = 0; i < config->num_allocatable_double_registers(); ++i) { 120 for (int i = 0; i < config->num_allocatable_double_registers(); ++i) {
122 int code = config->GetAllocatableDoubleCode(i); 121 int code = config->GetAllocatableDoubleCode(i);
123 XMMRegister xmm_reg = XMMRegister::from_code(code); 122 XMMRegister xmm_reg = XMMRegister::from_code(code);
124 int offset = code * kDoubleSize; 123 int offset = code * kDoubleSize;
125 __ Movsd(Operand(rsp, offset), xmm_reg); 124 __ Movsd(Operand(rsp, offset), xmm_reg);
126 } 125 }
127 126
128 // We push all registers onto the stack, even though we do not need 127 // We push all registers onto the stack, even though we do not need
129 // to restore all later. 128 // to restore all later.
130 for (int i = 0; i < kNumberOfRegisters; i++) { 129 for (int i = 0; i < kNumberOfRegisters; i++) {
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 } 333 }
335 334
336 335
337 #undef __ 336 #undef __
338 337
339 338
340 } // namespace internal 339 } // namespace internal
341 } // namespace v8 340 } // namespace v8
342 341
343 #endif // V8_TARGET_ARCH_X64 342 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.h ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698