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 <limits.h> // For LONG_MIN, LONG_MAX. | 5 #include <limits.h> // For LONG_MIN, LONG_MAX. |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #if V8_TARGET_ARCH_MIPS | 9 #if V8_TARGET_ARCH_MIPS |
10 | 10 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 111 |
112 void MacroAssembler::PopSafepointRegisters() { | 112 void MacroAssembler::PopSafepointRegisters() { |
113 const int num_unsaved = kNumSafepointRegisters - kNumSafepointSavedRegisters; | 113 const int num_unsaved = kNumSafepointRegisters - kNumSafepointSavedRegisters; |
114 MultiPop(kSafepointSavedRegisters); | 114 MultiPop(kSafepointSavedRegisters); |
115 if (num_unsaved > 0) { | 115 if (num_unsaved > 0) { |
116 Addu(sp, sp, Operand(num_unsaved * kPointerSize)); | 116 Addu(sp, sp, Operand(num_unsaved * kPointerSize)); |
117 } | 117 } |
118 } | 118 } |
119 | 119 |
120 | 120 |
121 void MacroAssembler::PushSafepointRegistersAndDoubles() { | |
122 PushSafepointRegisters(); | |
123 Subu(sp, sp, Operand(FPURegister::NumAllocatableRegisters() * kDoubleSize)); | |
124 for (int i = 0; i < FPURegister::NumAllocatableRegisters(); i+=2) { | |
125 FPURegister reg = FPURegister::FromAllocationIndex(i); | |
126 sdc1(reg, MemOperand(sp, i * kDoubleSize)); | |
127 } | |
128 } | |
129 | |
130 | |
131 void MacroAssembler::PopSafepointRegistersAndDoubles() { | |
132 for (int i = 0; i < FPURegister::NumAllocatableRegisters(); i+=2) { | |
133 FPURegister reg = FPURegister::FromAllocationIndex(i); | |
134 ldc1(reg, MemOperand(sp, i * kDoubleSize)); | |
135 } | |
136 Addu(sp, sp, Operand(FPURegister::NumAllocatableRegisters() * kDoubleSize)); | |
137 PopSafepointRegisters(); | |
138 } | |
139 | |
140 | |
141 void MacroAssembler::StoreToSafepointRegistersAndDoublesSlot(Register src, | |
142 Register dst) { | |
143 sw(src, SafepointRegistersAndDoublesSlot(dst)); | |
144 } | |
145 | |
146 | |
147 void MacroAssembler::StoreToSafepointRegisterSlot(Register src, Register dst) { | 121 void MacroAssembler::StoreToSafepointRegisterSlot(Register src, Register dst) { |
148 sw(src, SafepointRegisterSlot(dst)); | 122 sw(src, SafepointRegisterSlot(dst)); |
149 } | 123 } |
150 | 124 |
151 | 125 |
152 void MacroAssembler::LoadFromSafepointRegisterSlot(Register dst, Register src) { | 126 void MacroAssembler::LoadFromSafepointRegisterSlot(Register dst, Register src) { |
153 lw(dst, SafepointRegisterSlot(src)); | 127 lw(dst, SafepointRegisterSlot(src)); |
154 } | 128 } |
155 | 129 |
156 | 130 |
(...skipping 5620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5777 } | 5751 } |
5778 if (ms.shift() > 0) sra(result, result, ms.shift()); | 5752 if (ms.shift() > 0) sra(result, result, ms.shift()); |
5779 srl(at, dividend, 31); | 5753 srl(at, dividend, 31); |
5780 Addu(result, result, Operand(at)); | 5754 Addu(result, result, Operand(at)); |
5781 } | 5755 } |
5782 | 5756 |
5783 | 5757 |
5784 } } // namespace v8::internal | 5758 } } // namespace v8::internal |
5785 | 5759 |
5786 #endif // V8_TARGET_ARCH_MIPS | 5760 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |