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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 Register scratch, | 157 Register scratch, |
158 Condition cc, | 158 Condition cc, |
159 Label* branch) { | 159 Label* branch) { |
160 DCHECK(cc == eq || cc == ne); | 160 DCHECK(cc == eq || cc == ne); |
161 And(scratch, object, Operand(ExternalReference::new_space_mask(isolate()))); | 161 And(scratch, object, Operand(ExternalReference::new_space_mask(isolate()))); |
162 Branch(branch, cc, scratch, | 162 Branch(branch, cc, scratch, |
163 Operand(ExternalReference::new_space_start(isolate()))); | 163 Operand(ExternalReference::new_space_start(isolate()))); |
164 } | 164 } |
165 | 165 |
166 | 166 |
| 167 // Clobbers object, dst, value, and ra, if (ra_status == kRAHasBeenSaved) |
| 168 // The register 'object' contains a heap object pointer. The heap object |
| 169 // tag is shifted away. |
167 void MacroAssembler::RecordWriteField( | 170 void MacroAssembler::RecordWriteField( |
168 Register object, | 171 Register object, |
169 int offset, | 172 int offset, |
170 Register value, | 173 Register value, |
171 Register dst, | 174 Register dst, |
172 RAStatus ra_status, | 175 RAStatus ra_status, |
173 SaveFPRegsMode save_fp, | 176 SaveFPRegsMode save_fp, |
174 RememberedSetAction remembered_set_action, | 177 RememberedSetAction remembered_set_action, |
175 SmiCheck smi_check, | 178 SmiCheck smi_check, |
176 PointersToHereCheck pointers_to_here_check_for_value) { | 179 PointersToHereCheck pointers_to_here_check_for_value) { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 | 213 |
211 // Clobber clobbered input registers when running with the debug-code flag | 214 // Clobber clobbered input registers when running with the debug-code flag |
212 // turned on to provoke errors. | 215 // turned on to provoke errors. |
213 if (emit_debug_code()) { | 216 if (emit_debug_code()) { |
214 li(value, Operand(bit_cast<int32_t>(kZapValue + 4))); | 217 li(value, Operand(bit_cast<int32_t>(kZapValue + 4))); |
215 li(dst, Operand(bit_cast<int32_t>(kZapValue + 8))); | 218 li(dst, Operand(bit_cast<int32_t>(kZapValue + 8))); |
216 } | 219 } |
217 } | 220 } |
218 | 221 |
219 | 222 |
220 // Will clobber 4 registers: object, map, dst, ip. The | 223 // Clobbers object, dst, map, and ra, if (ra_status == kRAHasBeenSaved) |
221 // register 'object' contains a heap object pointer. | |
222 void MacroAssembler::RecordWriteForMap(Register object, | 224 void MacroAssembler::RecordWriteForMap(Register object, |
223 Register map, | 225 Register map, |
224 Register dst, | 226 Register dst, |
225 RAStatus ra_status, | 227 RAStatus ra_status, |
226 SaveFPRegsMode fp_mode) { | 228 SaveFPRegsMode fp_mode) { |
227 if (emit_debug_code()) { | 229 if (emit_debug_code()) { |
228 DCHECK(!dst.is(at)); | 230 DCHECK(!dst.is(at)); |
229 lw(dst, FieldMemOperand(map, HeapObject::kMapOffset)); | 231 lw(dst, FieldMemOperand(map, HeapObject::kMapOffset)); |
230 Check(eq, | 232 Check(eq, |
231 kWrongAddressOrValuePassedToRecordWrite, | 233 kWrongAddressOrValuePassedToRecordWrite, |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 | 287 |
286 // Clobber clobbered registers when running with the debug-code flag | 288 // Clobber clobbered registers when running with the debug-code flag |
287 // turned on to provoke errors. | 289 // turned on to provoke errors. |
288 if (emit_debug_code()) { | 290 if (emit_debug_code()) { |
289 li(dst, Operand(bit_cast<int32_t>(kZapValue + 12))); | 291 li(dst, Operand(bit_cast<int32_t>(kZapValue + 12))); |
290 li(map, Operand(bit_cast<int32_t>(kZapValue + 16))); | 292 li(map, Operand(bit_cast<int32_t>(kZapValue + 16))); |
291 } | 293 } |
292 } | 294 } |
293 | 295 |
294 | 296 |
295 // Will clobber 4 registers: object, address, scratch, ip. The | 297 // Clobbers object, address, value, and ra, if (ra_status == kRAHasBeenSaved) |
296 // register 'object' contains a heap object pointer. The heap object | 298 // The register 'object' contains a heap object pointer. The heap object |
297 // tag is shifted away. | 299 // tag is shifted away. |
298 void MacroAssembler::RecordWrite( | 300 void MacroAssembler::RecordWrite( |
299 Register object, | 301 Register object, |
300 Register address, | 302 Register address, |
301 Register value, | 303 Register value, |
302 RAStatus ra_status, | 304 RAStatus ra_status, |
303 SaveFPRegsMode fp_mode, | 305 SaveFPRegsMode fp_mode, |
304 RememberedSetAction remembered_set_action, | 306 RememberedSetAction remembered_set_action, |
305 SmiCheck smi_check, | 307 SmiCheck smi_check, |
306 PointersToHereCheck pointers_to_here_check_for_value) { | 308 PointersToHereCheck pointers_to_here_check_for_value) { |
(...skipping 5809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6116 if (mag.shift > 0) sra(result, result, mag.shift); | 6118 if (mag.shift > 0) sra(result, result, mag.shift); |
6117 srl(at, dividend, 31); | 6119 srl(at, dividend, 31); |
6118 Addu(result, result, Operand(at)); | 6120 Addu(result, result, Operand(at)); |
6119 } | 6121 } |
6120 | 6122 |
6121 | 6123 |
6122 } // namespace internal | 6124 } // namespace internal |
6123 } // namespace v8 | 6125 } // namespace v8 |
6124 | 6126 |
6125 #endif // V8_TARGET_ARCH_MIPS | 6127 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |