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

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 1365073002: Revert of Remove register index/code indirection (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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/deoptimizer-x64.cc ('k') | src/x64/lithium-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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/cpu-profiler.h" 10 #include "src/cpu-profiler.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 void LCodeGen::SaveCallerDoubles() { 83 void LCodeGen::SaveCallerDoubles() {
84 DCHECK(info()->saves_caller_doubles()); 84 DCHECK(info()->saves_caller_doubles());
85 DCHECK(NeedsEagerFrame()); 85 DCHECK(NeedsEagerFrame());
86 Comment(";;; Save clobbered callee double registers"); 86 Comment(";;; Save clobbered callee double registers");
87 int count = 0; 87 int count = 0;
88 BitVector* doubles = chunk()->allocated_double_registers(); 88 BitVector* doubles = chunk()->allocated_double_registers();
89 BitVector::Iterator save_iterator(doubles); 89 BitVector::Iterator save_iterator(doubles);
90 while (!save_iterator.Done()) { 90 while (!save_iterator.Done()) {
91 __ movsd(MemOperand(rsp, count * kDoubleSize), 91 __ movsd(MemOperand(rsp, count * kDoubleSize),
92 XMMRegister::from_code(save_iterator.Current())); 92 XMMRegister::FromAllocationIndex(save_iterator.Current()));
93 save_iterator.Advance(); 93 save_iterator.Advance();
94 count++; 94 count++;
95 } 95 }
96 } 96 }
97 97
98 98
99 void LCodeGen::RestoreCallerDoubles() { 99 void LCodeGen::RestoreCallerDoubles() {
100 DCHECK(info()->saves_caller_doubles()); 100 DCHECK(info()->saves_caller_doubles());
101 DCHECK(NeedsEagerFrame()); 101 DCHECK(NeedsEagerFrame());
102 Comment(";;; Restore clobbered callee double registers"); 102 Comment(";;; Restore clobbered callee double registers");
103 BitVector* doubles = chunk()->allocated_double_registers(); 103 BitVector* doubles = chunk()->allocated_double_registers();
104 BitVector::Iterator save_iterator(doubles); 104 BitVector::Iterator save_iterator(doubles);
105 int count = 0; 105 int count = 0;
106 while (!save_iterator.Done()) { 106 while (!save_iterator.Done()) {
107 __ movsd(XMMRegister::from_code(save_iterator.Current()), 107 __ movsd(XMMRegister::FromAllocationIndex(save_iterator.Current()),
108 MemOperand(rsp, count * kDoubleSize)); 108 MemOperand(rsp, count * kDoubleSize));
109 save_iterator.Advance(); 109 save_iterator.Advance();
110 count++; 110 count++;
111 } 111 }
112 } 112 }
113 113
114 114
115 bool LCodeGen::GeneratePrologue() { 115 bool LCodeGen::GeneratePrologue() {
116 DCHECK(is_generating()); 116 DCHECK(is_generating());
117 117
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 430
431 431
432 bool LCodeGen::GenerateSafepointTable() { 432 bool LCodeGen::GenerateSafepointTable() {
433 DCHECK(is_done()); 433 DCHECK(is_done());
434 safepoints_.Emit(masm(), GetStackSlotCount()); 434 safepoints_.Emit(masm(), GetStackSlotCount());
435 return !is_aborted(); 435 return !is_aborted();
436 } 436 }
437 437
438 438
439 Register LCodeGen::ToRegister(int index) const { 439 Register LCodeGen::ToRegister(int index) const {
440 return Register::from_code(index); 440 return Register::FromAllocationIndex(index);
441 } 441 }
442 442
443 443
444 XMMRegister LCodeGen::ToDoubleRegister(int index) const { 444 XMMRegister LCodeGen::ToDoubleRegister(int index) const {
445 return XMMRegister::from_code(index); 445 return XMMRegister::FromAllocationIndex(index);
446 } 446 }
447 447
448 448
449 Register LCodeGen::ToRegister(LOperand* op) const { 449 Register LCodeGen::ToRegister(LOperand* op) const {
450 DCHECK(op->IsRegister()); 450 DCHECK(op->IsRegister());
451 return ToRegister(op->index()); 451 return ToRegister(op->index());
452 } 452 }
453 453
454 454
455 XMMRegister LCodeGen::ToDoubleRegister(LOperand* op) const { 455 XMMRegister LCodeGen::ToDoubleRegister(LOperand* op) const {
(...skipping 5458 matching lines...) Expand 10 before | Expand all | Expand 10 after
5914 RecordSafepoint(Safepoint::kNoLazyDeopt); 5914 RecordSafepoint(Safepoint::kNoLazyDeopt);
5915 } 5915 }
5916 5916
5917 5917
5918 #undef __ 5918 #undef __
5919 5919
5920 } // namespace internal 5920 } // namespace internal
5921 } // namespace v8 5921 } // namespace v8
5922 5922
5923 #endif // V8_TARGET_ARCH_X64 5923 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/deoptimizer-x64.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698