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

Side by Side Diff: src/mips64/lithium-codegen-mips64.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/mips64/deoptimizer-mips64.cc ('k') | src/mips64/lithium-mips64.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 #include "src/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/code-stubs.h" 6 #include "src/code-stubs.h"
7 #include "src/hydrogen-osr.h" 7 #include "src/hydrogen-osr.h"
8 #include "src/ic/ic.h" 8 #include "src/ic/ic.h"
9 #include "src/ic/stub-cache.h" 9 #include "src/ic/stub-cache.h"
10 #include "src/mips64/lithium-codegen-mips64.h" 10 #include "src/mips64/lithium-codegen-mips64.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 65
66 void LCodeGen::SaveCallerDoubles() { 66 void LCodeGen::SaveCallerDoubles() {
67 DCHECK(info()->saves_caller_doubles()); 67 DCHECK(info()->saves_caller_doubles());
68 DCHECK(NeedsEagerFrame()); 68 DCHECK(NeedsEagerFrame());
69 Comment(";;; Save clobbered callee double registers"); 69 Comment(";;; Save clobbered callee double registers");
70 int count = 0; 70 int count = 0;
71 BitVector* doubles = chunk()->allocated_double_registers(); 71 BitVector* doubles = chunk()->allocated_double_registers();
72 BitVector::Iterator save_iterator(doubles); 72 BitVector::Iterator save_iterator(doubles);
73 while (!save_iterator.Done()) { 73 while (!save_iterator.Done()) {
74 __ sdc1(DoubleRegister::FromAllocationIndex(save_iterator.Current()), 74 __ sdc1(DoubleRegister::from_code(save_iterator.Current()),
75 MemOperand(sp, count * kDoubleSize)); 75 MemOperand(sp, count * kDoubleSize));
76 save_iterator.Advance(); 76 save_iterator.Advance();
77 count++; 77 count++;
78 } 78 }
79 } 79 }
80 80
81 81
82 void LCodeGen::RestoreCallerDoubles() { 82 void LCodeGen::RestoreCallerDoubles() {
83 DCHECK(info()->saves_caller_doubles()); 83 DCHECK(info()->saves_caller_doubles());
84 DCHECK(NeedsEagerFrame()); 84 DCHECK(NeedsEagerFrame());
85 Comment(";;; Restore clobbered callee double registers"); 85 Comment(";;; Restore clobbered callee double registers");
86 BitVector* doubles = chunk()->allocated_double_registers(); 86 BitVector* doubles = chunk()->allocated_double_registers();
87 BitVector::Iterator save_iterator(doubles); 87 BitVector::Iterator save_iterator(doubles);
88 int count = 0; 88 int count = 0;
89 while (!save_iterator.Done()) { 89 while (!save_iterator.Done()) {
90 __ ldc1(DoubleRegister::FromAllocationIndex(save_iterator.Current()), 90 __ ldc1(DoubleRegister::from_code(save_iterator.Current()),
91 MemOperand(sp, count * kDoubleSize)); 91 MemOperand(sp, count * kDoubleSize));
92 save_iterator.Advance(); 92 save_iterator.Advance();
93 count++; 93 count++;
94 } 94 }
95 } 95 }
96 96
97 97
98 bool LCodeGen::GeneratePrologue() { 98 bool LCodeGen::GeneratePrologue() {
99 DCHECK(is_generating()); 99 DCHECK(is_generating());
100 100
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 378
379 379
380 bool LCodeGen::GenerateSafepointTable() { 380 bool LCodeGen::GenerateSafepointTable() {
381 DCHECK(is_done()); 381 DCHECK(is_done());
382 safepoints_.Emit(masm(), GetStackSlotCount()); 382 safepoints_.Emit(masm(), GetStackSlotCount());
383 return !is_aborted(); 383 return !is_aborted();
384 } 384 }
385 385
386 386
387 Register LCodeGen::ToRegister(int index) const { 387 Register LCodeGen::ToRegister(int index) const {
388 return Register::FromAllocationIndex(index); 388 return Register::from_code(index);
389 } 389 }
390 390
391 391
392 DoubleRegister LCodeGen::ToDoubleRegister(int index) const { 392 DoubleRegister LCodeGen::ToDoubleRegister(int index) const {
393 return DoubleRegister::FromAllocationIndex(index); 393 return DoubleRegister::from_code(index);
394 } 394 }
395 395
396 396
397 Register LCodeGen::ToRegister(LOperand* op) const { 397 Register LCodeGen::ToRegister(LOperand* op) const {
398 DCHECK(op->IsRegister()); 398 DCHECK(op->IsRegister());
399 return ToRegister(op->index()); 399 return ToRegister(op->index());
400 } 400 }
401 401
402 402
403 Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) { 403 Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) {
(...skipping 5674 matching lines...) Expand 10 before | Expand all | Expand 10 after
6078 __ Push(at, ToRegister(instr->function())); 6078 __ Push(at, ToRegister(instr->function()));
6079 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6079 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6080 RecordSafepoint(Safepoint::kNoLazyDeopt); 6080 RecordSafepoint(Safepoint::kNoLazyDeopt);
6081 } 6081 }
6082 6082
6083 6083
6084 #undef __ 6084 #undef __
6085 6085
6086 } // namespace internal 6086 } // namespace internal
6087 } // namespace v8 6087 } // namespace v8
OLDNEW
« no previous file with comments | « src/mips64/deoptimizer-mips64.cc ('k') | src/mips64/lithium-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698