OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
(...skipping 4424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4435 save_fp, | 4435 save_fp, |
4436 remembered_set_action, | 4436 remembered_set_action, |
4437 OMIT_SMI_CHECK, | 4437 OMIT_SMI_CHECK, |
4438 pointers_to_here_check_for_value); | 4438 pointers_to_here_check_for_value); |
4439 | 4439 |
4440 Bind(&done); | 4440 Bind(&done); |
4441 | 4441 |
4442 // Clobber clobbered input registers when running with the debug-code flag | 4442 // Clobber clobbered input registers when running with the debug-code flag |
4443 // turned on to provoke errors. | 4443 // turned on to provoke errors. |
4444 if (emit_debug_code()) { | 4444 if (emit_debug_code()) { |
4445 Mov(value, Operand(BitCast<int64_t>(kZapValue + 4))); | 4445 Mov(value, Operand(bit_cast<int64_t>(kZapValue + 4))); |
4446 Mov(scratch, Operand(BitCast<int64_t>(kZapValue + 8))); | 4446 Mov(scratch, Operand(bit_cast<int64_t>(kZapValue + 8))); |
4447 } | 4447 } |
4448 } | 4448 } |
4449 | 4449 |
4450 | 4450 |
4451 // Will clobber: object, map, dst. | 4451 // Will clobber: object, map, dst. |
4452 // If lr_status is kLRHasBeenSaved, lr will also be clobbered. | 4452 // If lr_status is kLRHasBeenSaved, lr will also be clobbered. |
4453 void MacroAssembler::RecordWriteForMap(Register object, | 4453 void MacroAssembler::RecordWriteForMap(Register object, |
4454 Register map, | 4454 Register map, |
4455 Register dst, | 4455 Register dst, |
4456 LinkRegisterStatus lr_status, | 4456 LinkRegisterStatus lr_status, |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4507 Bind(&done); | 4507 Bind(&done); |
4508 | 4508 |
4509 // Count number of write barriers in generated code. | 4509 // Count number of write barriers in generated code. |
4510 isolate()->counters()->write_barriers_static()->Increment(); | 4510 isolate()->counters()->write_barriers_static()->Increment(); |
4511 IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1, map, | 4511 IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1, map, |
4512 dst); | 4512 dst); |
4513 | 4513 |
4514 // Clobber clobbered registers when running with the debug-code flag | 4514 // Clobber clobbered registers when running with the debug-code flag |
4515 // turned on to provoke errors. | 4515 // turned on to provoke errors. |
4516 if (emit_debug_code()) { | 4516 if (emit_debug_code()) { |
4517 Mov(dst, Operand(BitCast<int64_t>(kZapValue + 12))); | 4517 Mov(dst, Operand(bit_cast<int64_t>(kZapValue + 12))); |
4518 Mov(map, Operand(BitCast<int64_t>(kZapValue + 16))); | 4518 Mov(map, Operand(bit_cast<int64_t>(kZapValue + 16))); |
4519 } | 4519 } |
4520 } | 4520 } |
4521 | 4521 |
4522 | 4522 |
4523 // Will clobber: object, address, value. | 4523 // Will clobber: object, address, value. |
4524 // If lr_status is kLRHasBeenSaved, lr will also be clobbered. | 4524 // If lr_status is kLRHasBeenSaved, lr will also be clobbered. |
4525 // | 4525 // |
4526 // The register 'object' contains a heap object pointer. The heap object tag is | 4526 // The register 'object' contains a heap object pointer. The heap object tag is |
4527 // shifted away. | 4527 // shifted away. |
4528 void MacroAssembler::RecordWrite( | 4528 void MacroAssembler::RecordWrite( |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4580 Bind(&done); | 4580 Bind(&done); |
4581 | 4581 |
4582 // Count number of write barriers in generated code. | 4582 // Count number of write barriers in generated code. |
4583 isolate()->counters()->write_barriers_static()->Increment(); | 4583 isolate()->counters()->write_barriers_static()->Increment(); |
4584 IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1, address, | 4584 IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1, address, |
4585 value); | 4585 value); |
4586 | 4586 |
4587 // Clobber clobbered registers when running with the debug-code flag | 4587 // Clobber clobbered registers when running with the debug-code flag |
4588 // turned on to provoke errors. | 4588 // turned on to provoke errors. |
4589 if (emit_debug_code()) { | 4589 if (emit_debug_code()) { |
4590 Mov(address, Operand(BitCast<int64_t>(kZapValue + 12))); | 4590 Mov(address, Operand(bit_cast<int64_t>(kZapValue + 12))); |
4591 Mov(value, Operand(BitCast<int64_t>(kZapValue + 16))); | 4591 Mov(value, Operand(bit_cast<int64_t>(kZapValue + 16))); |
4592 } | 4592 } |
4593 } | 4593 } |
4594 | 4594 |
4595 | 4595 |
4596 void MacroAssembler::AssertHasValidColor(const Register& reg) { | 4596 void MacroAssembler::AssertHasValidColor(const Register& reg) { |
4597 if (emit_debug_code()) { | 4597 if (emit_debug_code()) { |
4598 // The bit sequence is backward. The first character in the string | 4598 // The bit sequence is backward. The first character in the string |
4599 // represents the least significant bit. | 4599 // represents the least significant bit. |
4600 DCHECK(strcmp(Marking::kImpossibleBitPattern, "01") == 0); | 4600 DCHECK(strcmp(Marking::kImpossibleBitPattern, "01") == 0); |
4601 | 4601 |
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5428 } | 5428 } |
5429 } | 5429 } |
5430 | 5430 |
5431 | 5431 |
5432 #undef __ | 5432 #undef __ |
5433 | 5433 |
5434 | 5434 |
5435 } } // namespace v8::internal | 5435 } } // namespace v8::internal |
5436 | 5436 |
5437 #endif // V8_TARGET_ARCH_ARM64 | 5437 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |