OLD | NEW |
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/cpu-profiler.h" | 7 #include "src/cpu-profiler.h" |
8 #include "src/hydrogen-osr.h" | 8 #include "src/hydrogen-osr.h" |
9 #include "src/ic/ic.h" | 9 #include "src/ic/ic.h" |
10 #include "src/ic/stub-cache.h" | 10 #include "src/ic/stub-cache.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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::from_code(save_iterator.Current()), | 74 __ sdc1(DoubleRegister::FromAllocationIndex(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::from_code(save_iterator.Current()), | 90 __ ldc1(DoubleRegister::FromAllocationIndex(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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 | 379 |
380 | 380 |
381 bool LCodeGen::GenerateSafepointTable() { | 381 bool LCodeGen::GenerateSafepointTable() { |
382 DCHECK(is_done()); | 382 DCHECK(is_done()); |
383 safepoints_.Emit(masm(), GetStackSlotCount()); | 383 safepoints_.Emit(masm(), GetStackSlotCount()); |
384 return !is_aborted(); | 384 return !is_aborted(); |
385 } | 385 } |
386 | 386 |
387 | 387 |
388 Register LCodeGen::ToRegister(int index) const { | 388 Register LCodeGen::ToRegister(int index) const { |
389 return Register::from_code(index); | 389 return Register::FromAllocationIndex(index); |
390 } | 390 } |
391 | 391 |
392 | 392 |
393 DoubleRegister LCodeGen::ToDoubleRegister(int index) const { | 393 DoubleRegister LCodeGen::ToDoubleRegister(int index) const { |
394 return DoubleRegister::from_code(index); | 394 return DoubleRegister::FromAllocationIndex(index); |
395 } | 395 } |
396 | 396 |
397 | 397 |
398 Register LCodeGen::ToRegister(LOperand* op) const { | 398 Register LCodeGen::ToRegister(LOperand* op) const { |
399 DCHECK(op->IsRegister()); | 399 DCHECK(op->IsRegister()); |
400 return ToRegister(op->index()); | 400 return ToRegister(op->index()); |
401 } | 401 } |
402 | 402 |
403 | 403 |
404 Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) { | 404 Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) { |
(...skipping 5680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6085 __ Push(at, ToRegister(instr->function())); | 6085 __ Push(at, ToRegister(instr->function())); |
6086 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6086 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6087 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6087 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6088 } | 6088 } |
6089 | 6089 |
6090 | 6090 |
6091 #undef __ | 6091 #undef __ |
6092 | 6092 |
6093 } // namespace internal | 6093 } // namespace internal |
6094 } // namespace v8 | 6094 } // namespace v8 |
OLD | NEW |