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

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

Issue 1287383003: Re-reland: Remove register index/code indirection (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix MIPS tests again 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/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/hydrogen-osr.h" 10 #include "src/hydrogen-osr.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::FromAllocationIndex(save_iterator.Current())); 92 XMMRegister::from_code(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::FromAllocationIndex(save_iterator.Current()), 107 __ movsd(XMMRegister::from_code(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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 429
430 430
431 bool LCodeGen::GenerateSafepointTable() { 431 bool LCodeGen::GenerateSafepointTable() {
432 DCHECK(is_done()); 432 DCHECK(is_done());
433 safepoints_.Emit(masm(), GetStackSlotCount()); 433 safepoints_.Emit(masm(), GetStackSlotCount());
434 return !is_aborted(); 434 return !is_aborted();
435 } 435 }
436 436
437 437
438 Register LCodeGen::ToRegister(int index) const { 438 Register LCodeGen::ToRegister(int index) const {
439 return Register::FromAllocationIndex(index); 439 return Register::from_code(index);
440 } 440 }
441 441
442 442
443 XMMRegister LCodeGen::ToDoubleRegister(int index) const { 443 XMMRegister LCodeGen::ToDoubleRegister(int index) const {
444 return XMMRegister::FromAllocationIndex(index); 444 return XMMRegister::from_code(index);
445 } 445 }
446 446
447 447
448 Register LCodeGen::ToRegister(LOperand* op) const { 448 Register LCodeGen::ToRegister(LOperand* op) const {
449 DCHECK(op->IsRegister()); 449 DCHECK(op->IsRegister());
450 return ToRegister(op->index()); 450 return ToRegister(op->index());
451 } 451 }
452 452
453 453
454 XMMRegister LCodeGen::ToDoubleRegister(LOperand* op) const { 454 XMMRegister LCodeGen::ToDoubleRegister(LOperand* op) const {
(...skipping 5453 matching lines...) Expand 10 before | Expand all | Expand 10 after
5908 RecordSafepoint(Safepoint::kNoLazyDeopt); 5908 RecordSafepoint(Safepoint::kNoLazyDeopt);
5909 } 5909 }
5910 5910
5911 5911
5912 #undef __ 5912 #undef __
5913 5913
5914 } // namespace internal 5914 } // namespace internal
5915 } // namespace v8 5915 } // namespace v8
5916 5916
5917 #endif // V8_TARGET_ARCH_X64 5917 #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