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_MIPS64 | 9 #if V8_TARGET_ARCH_MIPS64 |
10 | 10 |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 Register scratch, | 160 Register scratch, |
161 Condition cc, | 161 Condition cc, |
162 Label* branch) { | 162 Label* branch) { |
163 DCHECK(cc == eq || cc == ne); | 163 DCHECK(cc == eq || cc == ne); |
164 And(scratch, object, Operand(ExternalReference::new_space_mask(isolate()))); | 164 And(scratch, object, Operand(ExternalReference::new_space_mask(isolate()))); |
165 Branch(branch, cc, scratch, | 165 Branch(branch, cc, scratch, |
166 Operand(ExternalReference::new_space_start(isolate()))); | 166 Operand(ExternalReference::new_space_start(isolate()))); |
167 } | 167 } |
168 | 168 |
169 | 169 |
| 170 // Clobbers object, dst, value, and ra, if (ra_status == kRAHasBeenSaved) |
| 171 // The register 'object' contains a heap object pointer. The heap object |
| 172 // tag is shifted away. |
170 void MacroAssembler::RecordWriteField( | 173 void MacroAssembler::RecordWriteField( |
171 Register object, | 174 Register object, |
172 int offset, | 175 int offset, |
173 Register value, | 176 Register value, |
174 Register dst, | 177 Register dst, |
175 RAStatus ra_status, | 178 RAStatus ra_status, |
176 SaveFPRegsMode save_fp, | 179 SaveFPRegsMode save_fp, |
177 RememberedSetAction remembered_set_action, | 180 RememberedSetAction remembered_set_action, |
178 SmiCheck smi_check, | 181 SmiCheck smi_check, |
179 PointersToHereCheck pointers_to_here_check_for_value) { | 182 PointersToHereCheck pointers_to_here_check_for_value) { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 216 |
214 // Clobber clobbered input registers when running with the debug-code flag | 217 // Clobber clobbered input registers when running with the debug-code flag |
215 // turned on to provoke errors. | 218 // turned on to provoke errors. |
216 if (emit_debug_code()) { | 219 if (emit_debug_code()) { |
217 li(value, Operand(bit_cast<int64_t>(kZapValue + 4))); | 220 li(value, Operand(bit_cast<int64_t>(kZapValue + 4))); |
218 li(dst, Operand(bit_cast<int64_t>(kZapValue + 8))); | 221 li(dst, Operand(bit_cast<int64_t>(kZapValue + 8))); |
219 } | 222 } |
220 } | 223 } |
221 | 224 |
222 | 225 |
223 // Will clobber 4 registers: object, map, dst, ip. The | 226 // Clobbers object, dst, map, and ra, if (ra_status == kRAHasBeenSaved) |
224 // register 'object' contains a heap object pointer. | |
225 void MacroAssembler::RecordWriteForMap(Register object, | 227 void MacroAssembler::RecordWriteForMap(Register object, |
226 Register map, | 228 Register map, |
227 Register dst, | 229 Register dst, |
228 RAStatus ra_status, | 230 RAStatus ra_status, |
229 SaveFPRegsMode fp_mode) { | 231 SaveFPRegsMode fp_mode) { |
230 if (emit_debug_code()) { | 232 if (emit_debug_code()) { |
231 DCHECK(!dst.is(at)); | 233 DCHECK(!dst.is(at)); |
232 ld(dst, FieldMemOperand(map, HeapObject::kMapOffset)); | 234 ld(dst, FieldMemOperand(map, HeapObject::kMapOffset)); |
233 Check(eq, | 235 Check(eq, |
234 kWrongAddressOrValuePassedToRecordWrite, | 236 kWrongAddressOrValuePassedToRecordWrite, |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 | 290 |
289 // Clobber clobbered registers when running with the debug-code flag | 291 // Clobber clobbered registers when running with the debug-code flag |
290 // turned on to provoke errors. | 292 // turned on to provoke errors. |
291 if (emit_debug_code()) { | 293 if (emit_debug_code()) { |
292 li(dst, Operand(bit_cast<int64_t>(kZapValue + 12))); | 294 li(dst, Operand(bit_cast<int64_t>(kZapValue + 12))); |
293 li(map, Operand(bit_cast<int64_t>(kZapValue + 16))); | 295 li(map, Operand(bit_cast<int64_t>(kZapValue + 16))); |
294 } | 296 } |
295 } | 297 } |
296 | 298 |
297 | 299 |
298 // Will clobber 4 registers: object, address, scratch, ip. The | 300 // Clobbers object, address, value, and ra, if (ra_status == kRAHasBeenSaved) |
299 // register 'object' contains a heap object pointer. The heap object | 301 // The register 'object' contains a heap object pointer. The heap object |
300 // tag is shifted away. | 302 // tag is shifted away. |
301 void MacroAssembler::RecordWrite( | 303 void MacroAssembler::RecordWrite( |
302 Register object, | 304 Register object, |
303 Register address, | 305 Register address, |
304 Register value, | 306 Register value, |
305 RAStatus ra_status, | 307 RAStatus ra_status, |
306 SaveFPRegsMode fp_mode, | 308 SaveFPRegsMode fp_mode, |
307 RememberedSetAction remembered_set_action, | 309 RememberedSetAction remembered_set_action, |
308 SmiCheck smi_check, | 310 SmiCheck smi_check, |
309 PointersToHereCheck pointers_to_here_check_for_value) { | 311 PointersToHereCheck pointers_to_here_check_for_value) { |
(...skipping 6036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6346 if (mag.shift > 0) sra(result, result, mag.shift); | 6348 if (mag.shift > 0) sra(result, result, mag.shift); |
6347 srl(at, dividend, 31); | 6349 srl(at, dividend, 31); |
6348 Addu(result, result, Operand(at)); | 6350 Addu(result, result, Operand(at)); |
6349 } | 6351 } |
6350 | 6352 |
6351 | 6353 |
6352 } // namespace internal | 6354 } // namespace internal |
6353 } // namespace v8 | 6355 } // namespace v8 |
6354 | 6356 |
6355 #endif // V8_TARGET_ARCH_MIPS64 | 6357 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |