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 #if V8_TARGET_ARCH_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
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/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 94 |
95 void LCodeGen::SaveCallerDoubles() { | 95 void LCodeGen::SaveCallerDoubles() { |
96 DCHECK(info()->saves_caller_doubles()); | 96 DCHECK(info()->saves_caller_doubles()); |
97 DCHECK(NeedsEagerFrame()); | 97 DCHECK(NeedsEagerFrame()); |
98 Comment(";;; Save clobbered callee double registers"); | 98 Comment(";;; Save clobbered callee double registers"); |
99 int count = 0; | 99 int count = 0; |
100 BitVector* doubles = chunk()->allocated_double_registers(); | 100 BitVector* doubles = chunk()->allocated_double_registers(); |
101 BitVector::Iterator save_iterator(doubles); | 101 BitVector::Iterator save_iterator(doubles); |
102 while (!save_iterator.Done()) { | 102 while (!save_iterator.Done()) { |
103 __ movsd(MemOperand(esp, count * kDoubleSize), | 103 __ movsd(MemOperand(esp, count * kDoubleSize), |
104 XMMRegister::FromAllocationIndex(save_iterator.Current())); | 104 XMMRegister::from_code(save_iterator.Current())); |
105 save_iterator.Advance(); | 105 save_iterator.Advance(); |
106 count++; | 106 count++; |
107 } | 107 } |
108 } | 108 } |
109 | 109 |
110 | 110 |
111 void LCodeGen::RestoreCallerDoubles() { | 111 void LCodeGen::RestoreCallerDoubles() { |
112 DCHECK(info()->saves_caller_doubles()); | 112 DCHECK(info()->saves_caller_doubles()); |
113 DCHECK(NeedsEagerFrame()); | 113 DCHECK(NeedsEagerFrame()); |
114 Comment(";;; Restore clobbered callee double registers"); | 114 Comment(";;; Restore clobbered callee double registers"); |
115 BitVector* doubles = chunk()->allocated_double_registers(); | 115 BitVector* doubles = chunk()->allocated_double_registers(); |
116 BitVector::Iterator save_iterator(doubles); | 116 BitVector::Iterator save_iterator(doubles); |
117 int count = 0; | 117 int count = 0; |
118 while (!save_iterator.Done()) { | 118 while (!save_iterator.Done()) { |
119 __ movsd(XMMRegister::FromAllocationIndex(save_iterator.Current()), | 119 __ movsd(XMMRegister::from_code(save_iterator.Current()), |
120 MemOperand(esp, count * kDoubleSize)); | 120 MemOperand(esp, count * kDoubleSize)); |
121 save_iterator.Advance(); | 121 save_iterator.Advance(); |
122 count++; | 122 count++; |
123 } | 123 } |
124 } | 124 } |
125 | 125 |
126 | 126 |
127 bool LCodeGen::GeneratePrologue() { | 127 bool LCodeGen::GeneratePrologue() { |
128 DCHECK(is_generating()); | 128 DCHECK(is_generating()); |
129 | 129 |
130 if (info()->IsOptimizing()) { | 130 if (info()->IsOptimizing()) { |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 int target_offset = masm()->pc_offset() + Deoptimizer::patch_size(); | 507 int target_offset = masm()->pc_offset() + Deoptimizer::patch_size(); |
508 while (masm()->pc_offset() < target_offset) { | 508 while (masm()->pc_offset() < target_offset) { |
509 masm()->nop(); | 509 masm()->nop(); |
510 } | 510 } |
511 } | 511 } |
512 safepoints_.Emit(masm(), GetStackSlotCount()); | 512 safepoints_.Emit(masm(), GetStackSlotCount()); |
513 return !is_aborted(); | 513 return !is_aborted(); |
514 } | 514 } |
515 | 515 |
516 | 516 |
517 Register LCodeGen::ToRegister(int index) const { | 517 Register LCodeGen::ToRegister(int code) const { |
518 return Register::FromAllocationIndex(index); | 518 return Register::from_code(code); |
519 } | 519 } |
520 | 520 |
521 | 521 |
522 XMMRegister LCodeGen::ToDoubleRegister(int index) const { | 522 XMMRegister LCodeGen::ToDoubleRegister(int code) const { |
523 return XMMRegister::FromAllocationIndex(index); | 523 return XMMRegister::from_code(code); |
524 } | 524 } |
525 | 525 |
526 | 526 |
527 Register LCodeGen::ToRegister(LOperand* op) const { | 527 Register LCodeGen::ToRegister(LOperand* op) const { |
528 DCHECK(op->IsRegister()); | 528 DCHECK(op->IsRegister()); |
529 return ToRegister(op->index()); | 529 return ToRegister(op->index()); |
530 } | 530 } |
531 | 531 |
532 | 532 |
533 XMMRegister LCodeGen::ToDoubleRegister(LOperand* op) const { | 533 XMMRegister LCodeGen::ToDoubleRegister(LOperand* op) const { |
(...skipping 5183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5717 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5717 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5718 } | 5718 } |
5719 | 5719 |
5720 | 5720 |
5721 #undef __ | 5721 #undef __ |
5722 | 5722 |
5723 } // namespace internal | 5723 } // namespace internal |
5724 } // namespace v8 | 5724 } // namespace v8 |
5725 | 5725 |
5726 #endif // V8_TARGET_ARCH_IA32 | 5726 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |