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 #ifndef V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 5 #ifndef V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
6 #define V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 6 #define V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
7 | 7 |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/mips/assembler-mips.h" | 9 #include "src/mips/assembler-mips.h" |
10 #include "src/globals.h" | 10 #include "src/globals.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 // optimize the li to use a single instruction, rather than lui/ori pair. | 64 // optimize the li to use a single instruction, rather than lui/ori pair. |
65 OPTIMIZE_SIZE = 0, | 65 OPTIMIZE_SIZE = 0, |
66 // Always use 2 instructions (lui/ori pair), even if the constant could | 66 // Always use 2 instructions (lui/ori pair), even if the constant could |
67 // be loaded with just one, so that this value is patchable later. | 67 // be loaded with just one, so that this value is patchable later. |
68 CONSTANT_SIZE = 1 | 68 CONSTANT_SIZE = 1 |
69 }; | 69 }; |
70 | 70 |
71 | 71 |
72 enum RememberedSetAction { EMIT_REMEMBERED_SET, OMIT_REMEMBERED_SET }; | 72 enum RememberedSetAction { EMIT_REMEMBERED_SET, OMIT_REMEMBERED_SET }; |
73 enum SmiCheck { INLINE_SMI_CHECK, OMIT_SMI_CHECK }; | 73 enum SmiCheck { INLINE_SMI_CHECK, OMIT_SMI_CHECK }; |
| 74 enum PointersToHereCheck { |
| 75 kPointersToHereMaybeInteresting, |
| 76 kPointersToHereAreAlwaysInteresting |
| 77 }; |
74 enum RAStatus { kRAHasNotBeenSaved, kRAHasBeenSaved }; | 78 enum RAStatus { kRAHasNotBeenSaved, kRAHasBeenSaved }; |
75 | 79 |
76 Register GetRegisterThatIsNotOneOf(Register reg1, | 80 Register GetRegisterThatIsNotOneOf(Register reg1, |
77 Register reg2 = no_reg, | 81 Register reg2 = no_reg, |
78 Register reg3 = no_reg, | 82 Register reg3 = no_reg, |
79 Register reg4 = no_reg, | 83 Register reg4 = no_reg, |
80 Register reg5 = no_reg, | 84 Register reg5 = no_reg, |
81 Register reg6 = no_reg); | 85 Register reg6 = no_reg); |
82 | 86 |
83 bool AreAliased(Register r1, Register r2, Register r3, Register r4); | 87 bool AreAliased(Register r1, Register r2, Register r3, Register r4); |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 // The offset is the offset from the start of the object, not the offset from | 362 // The offset is the offset from the start of the object, not the offset from |
359 // the tagged HeapObject pointer. For use with FieldOperand(reg, off). | 363 // the tagged HeapObject pointer. For use with FieldOperand(reg, off). |
360 void RecordWriteField( | 364 void RecordWriteField( |
361 Register object, | 365 Register object, |
362 int offset, | 366 int offset, |
363 Register value, | 367 Register value, |
364 Register scratch, | 368 Register scratch, |
365 RAStatus ra_status, | 369 RAStatus ra_status, |
366 SaveFPRegsMode save_fp, | 370 SaveFPRegsMode save_fp, |
367 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, | 371 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, |
368 SmiCheck smi_check = INLINE_SMI_CHECK); | 372 SmiCheck smi_check = INLINE_SMI_CHECK, |
| 373 PointersToHereCheck pointers_to_here_check_for_value = |
| 374 kPointersToHereMaybeInteresting); |
369 | 375 |
370 // As above, but the offset has the tag presubtracted. For use with | 376 // As above, but the offset has the tag presubtracted. For use with |
371 // MemOperand(reg, off). | 377 // MemOperand(reg, off). |
372 inline void RecordWriteContextSlot( | 378 inline void RecordWriteContextSlot( |
373 Register context, | 379 Register context, |
374 int offset, | 380 int offset, |
375 Register value, | 381 Register value, |
376 Register scratch, | 382 Register scratch, |
377 RAStatus ra_status, | 383 RAStatus ra_status, |
378 SaveFPRegsMode save_fp, | 384 SaveFPRegsMode save_fp, |
379 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, | 385 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, |
380 SmiCheck smi_check = INLINE_SMI_CHECK) { | 386 SmiCheck smi_check = INLINE_SMI_CHECK, |
| 387 PointersToHereCheck pointers_to_here_check_for_value = |
| 388 kPointersToHereMaybeInteresting) { |
381 RecordWriteField(context, | 389 RecordWriteField(context, |
382 offset + kHeapObjectTag, | 390 offset + kHeapObjectTag, |
383 value, | 391 value, |
384 scratch, | 392 scratch, |
385 ra_status, | 393 ra_status, |
386 save_fp, | 394 save_fp, |
387 remembered_set_action, | 395 remembered_set_action, |
388 smi_check); | 396 smi_check, |
| 397 pointers_to_here_check_for_value); |
389 } | 398 } |
390 | 399 |
| 400 void RecordWriteForMap( |
| 401 Register object, |
| 402 Register map, |
| 403 Register dst, |
| 404 RAStatus ra_status, |
| 405 SaveFPRegsMode save_fp); |
| 406 |
391 // For a given |object| notify the garbage collector that the slot |address| | 407 // For a given |object| notify the garbage collector that the slot |address| |
392 // has been written. |value| is the object being stored. The value and | 408 // has been written. |value| is the object being stored. The value and |
393 // address registers are clobbered by the operation. | 409 // address registers are clobbered by the operation. |
394 void RecordWrite( | 410 void RecordWrite( |
395 Register object, | 411 Register object, |
396 Register address, | 412 Register address, |
397 Register value, | 413 Register value, |
398 RAStatus ra_status, | 414 RAStatus ra_status, |
399 SaveFPRegsMode save_fp, | 415 SaveFPRegsMode save_fp, |
400 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, | 416 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, |
401 SmiCheck smi_check = INLINE_SMI_CHECK); | 417 SmiCheck smi_check = INLINE_SMI_CHECK, |
| 418 PointersToHereCheck pointers_to_here_check_for_value = |
| 419 kPointersToHereMaybeInteresting); |
402 | 420 |
403 | 421 |
404 // --------------------------------------------------------------------------- | 422 // --------------------------------------------------------------------------- |
405 // Inline caching support. | 423 // Inline caching support. |
406 | 424 |
407 // Generate code for checking access rights - used for security checks | 425 // Generate code for checking access rights - used for security checks |
408 // on access to global objects across environments. The holder register | 426 // on access to global objects across environments. The holder register |
409 // is left untouched, whereas both scratch registers are clobbered. | 427 // is left untouched, whereas both scratch registers are clobbered. |
410 void CheckAccessGlobalProxy(Register holder_reg, | 428 void CheckAccessGlobalProxy(Register holder_reg, |
411 Register scratch, | 429 Register scratch, |
(...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1670 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 1688 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
1671 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1689 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
1672 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1690 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
1673 #else | 1691 #else |
1674 #define ACCESS_MASM(masm) masm-> | 1692 #define ACCESS_MASM(masm) masm-> |
1675 #endif | 1693 #endif |
1676 | 1694 |
1677 } } // namespace v8::internal | 1695 } } // namespace v8::internal |
1678 | 1696 |
1679 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 1697 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
OLD | NEW |