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

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

Issue 1380863004: Revert of Reland: 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/hydrogen-osr.h" 10 #include "src/hydrogen-osr.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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 } 397 }
398 398
399 399
400 bool LCodeGen::GenerateSafepointTable() { 400 bool LCodeGen::GenerateSafepointTable() {
401 DCHECK(is_done()); 401 DCHECK(is_done());
402 safepoints_.Emit(masm(), GetStackSlotCount()); 402 safepoints_.Emit(masm(), GetStackSlotCount());
403 return !is_aborted(); 403 return !is_aborted();
404 } 404 }
405 405
406 406
407 Register LCodeGen::ToRegister(int code) const { 407 Register LCodeGen::ToRegister(int index) const {
408 return Register::from_code(code); 408 return Register::FromAllocationIndex(index);
409 } 409 }
410 410
411 411
412 DwVfpRegister LCodeGen::ToDoubleRegister(int code) const { 412 DwVfpRegister LCodeGen::ToDoubleRegister(int index) const {
413 return DwVfpRegister::from_code(code); 413 return DwVfpRegister::FromAllocationIndex(index);
414 } 414 }
415 415
416 416
417 Register LCodeGen::ToRegister(LOperand* op) const { 417 Register LCodeGen::ToRegister(LOperand* op) const {
418 DCHECK(op->IsRegister()); 418 DCHECK(op->IsRegister());
419 return ToRegister(op->index()); 419 return ToRegister(op->index());
420 } 420 }
421 421
422 422
423 Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) { 423 Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) {
(...skipping 5412 matching lines...) Expand 10 before | Expand all | Expand 10 after
5836 __ push(ToRegister(instr->function())); 5836 __ push(ToRegister(instr->function()));
5837 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5837 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5838 RecordSafepoint(Safepoint::kNoLazyDeopt); 5838 RecordSafepoint(Safepoint::kNoLazyDeopt);
5839 } 5839 }
5840 5840
5841 5841
5842 #undef __ 5842 #undef __
5843 5843
5844 } // namespace internal 5844 } // namespace internal
5845 } // namespace v8 5845 } // 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