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

Side by Side Diff: src/arm/lithium-codegen-arm.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, 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/arm/lithium-arm.cc ('k') | src/arm/macro-assembler-arm.h » ('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/arm/lithium-codegen-arm.h" 5 #include "src/arm/lithium-codegen-arm.h"
6 #include "src/arm/lithium-gap-resolver-arm.h" 6 #include "src/arm/lithium-gap-resolver-arm.h"
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 66
67 void LCodeGen::SaveCallerDoubles() { 67 void LCodeGen::SaveCallerDoubles() {
68 DCHECK(info()->saves_caller_doubles()); 68 DCHECK(info()->saves_caller_doubles());
69 DCHECK(NeedsEagerFrame()); 69 DCHECK(NeedsEagerFrame());
70 Comment(";;; Save clobbered callee double registers"); 70 Comment(";;; Save clobbered callee double registers");
71 int count = 0; 71 int count = 0;
72 BitVector* doubles = chunk()->allocated_double_registers(); 72 BitVector* doubles = chunk()->allocated_double_registers();
73 BitVector::Iterator save_iterator(doubles); 73 BitVector::Iterator save_iterator(doubles);
74 while (!save_iterator.Done()) { 74 while (!save_iterator.Done()) {
75 __ vstr(DoubleRegister::from_code(save_iterator.Current()), 75 __ vstr(DwVfpRegister::FromAllocationIndex(save_iterator.Current()),
76 MemOperand(sp, count * kDoubleSize)); 76 MemOperand(sp, count * kDoubleSize));
77 save_iterator.Advance(); 77 save_iterator.Advance();
78 count++; 78 count++;
79 } 79 }
80 } 80 }
81 81
82 82
83 void LCodeGen::RestoreCallerDoubles() { 83 void LCodeGen::RestoreCallerDoubles() {
84 DCHECK(info()->saves_caller_doubles()); 84 DCHECK(info()->saves_caller_doubles());
85 DCHECK(NeedsEagerFrame()); 85 DCHECK(NeedsEagerFrame());
86 Comment(";;; Restore clobbered callee double registers"); 86 Comment(";;; Restore clobbered callee double registers");
87 BitVector* doubles = chunk()->allocated_double_registers(); 87 BitVector* doubles = chunk()->allocated_double_registers();
88 BitVector::Iterator save_iterator(doubles); 88 BitVector::Iterator save_iterator(doubles);
89 int count = 0; 89 int count = 0;
90 while (!save_iterator.Done()) { 90 while (!save_iterator.Done()) {
91 __ vldr(DoubleRegister::from_code(save_iterator.Current()), 91 __ vldr(DwVfpRegister::FromAllocationIndex(save_iterator.Current()),
92 MemOperand(sp, count * kDoubleSize)); 92 MemOperand(sp, count * kDoubleSize));
93 save_iterator.Advance(); 93 save_iterator.Advance();
94 count++; 94 count++;
95 } 95 }
96 } 96 }
97 97
98 98
99 bool LCodeGen::GeneratePrologue() { 99 bool LCodeGen::GeneratePrologue() {
100 DCHECK(is_generating()); 100 DCHECK(is_generating());
101 101
102 if (info()->IsOptimizing()) { 102 if (info()->IsOptimizing()) {
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 } 398 }
399 399
400 400
401 bool LCodeGen::GenerateSafepointTable() { 401 bool LCodeGen::GenerateSafepointTable() {
402 DCHECK(is_done()); 402 DCHECK(is_done());
403 safepoints_.Emit(masm(), GetStackSlotCount()); 403 safepoints_.Emit(masm(), GetStackSlotCount());
404 return !is_aborted(); 404 return !is_aborted();
405 } 405 }
406 406
407 407
408 Register LCodeGen::ToRegister(int code) const { 408 Register LCodeGen::ToRegister(int index) const {
409 return Register::from_code(code); 409 return Register::FromAllocationIndex(index);
410 } 410 }
411 411
412 412
413 DwVfpRegister LCodeGen::ToDoubleRegister(int code) const { 413 DwVfpRegister LCodeGen::ToDoubleRegister(int index) const {
414 return DwVfpRegister::from_code(code); 414 return DwVfpRegister::FromAllocationIndex(index);
415 } 415 }
416 416
417 417
418 Register LCodeGen::ToRegister(LOperand* op) const { 418 Register LCodeGen::ToRegister(LOperand* op) const {
419 DCHECK(op->IsRegister()); 419 DCHECK(op->IsRegister());
420 return ToRegister(op->index()); 420 return ToRegister(op->index());
421 } 421 }
422 422
423 423
424 Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) { 424 Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) {
(...skipping 5417 matching lines...) Expand 10 before | Expand all | Expand 10 after
5842 __ push(ToRegister(instr->function())); 5842 __ push(ToRegister(instr->function()));
5843 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5843 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5844 RecordSafepoint(Safepoint::kNoLazyDeopt); 5844 RecordSafepoint(Safepoint::kNoLazyDeopt);
5845 } 5845 }
5846 5846
5847 5847
5848 #undef __ 5848 #undef __
5849 5849
5850 } // namespace internal 5850 } // namespace internal
5851 } // namespace v8 5851 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698