From 0e7ddbd3d7e9439c67573b854c49cf82c398ae82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Fri, 21 Sep 2018 09:14:51 +0200 Subject: deps: update V8 to 7.0.276.20 PR-URL: https://github.com/nodejs/node/pull/22754 Reviewed-By: Matteo Collina Reviewed-By: James M Snell Reviewed-By: Refael Ackermann Reviewed-By: Ali Ijaz Sheikh Reviewed-By: Colin Ihrig --- deps/v8/src/arm/assembler-arm-inl.h | 108 ++++++++++++++++++------------------ 1 file changed, 53 insertions(+), 55 deletions(-) (limited to 'deps/v8/src/arm/assembler-arm-inl.h') diff --git a/deps/v8/src/arm/assembler-arm-inl.h b/deps/v8/src/arm/assembler-arm-inl.h index a432e44814..68ea6f3210 100644 --- a/deps/v8/src/arm/assembler-arm-inl.h +++ b/deps/v8/src/arm/assembler-arm-inl.h @@ -78,10 +78,10 @@ Address RelocInfo::target_address_address() { DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_) || IsWasmCall(rmode_) || IsEmbeddedObject(rmode_) || IsExternalReference(rmode_) || IsOffHeapTarget(rmode_)); - if (Assembler::IsMovW(Memory::int32_at(pc_))) { + if (Assembler::IsMovW(Memory(pc_))) { return pc_; } else { - DCHECK(Assembler::IsLdrPcImmediateOffset(Memory::int32_at(pc_))); + DCHECK(Assembler::IsLdrPcImmediateOffset(Memory(pc_))); return constant_pool_entry_address(); } } @@ -120,8 +120,7 @@ void RelocInfo::set_target_object(Heap* heap, HeapObject* target, reinterpret_cast
(target), icache_flush_mode); if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != nullptr) { - heap->incremental_marking()->RecordWriteIntoCode(host(), this, target); - heap->RecordWriteIntoCode(host(), this, target); + WriteBarrierForCode(host(), this, target); } } @@ -140,7 +139,7 @@ void RelocInfo::set_target_external_reference( Address RelocInfo::target_internal_reference() { DCHECK(rmode_ == INTERNAL_REFERENCE); - return Memory::Address_at(pc_); + return Memory
(pc_); } @@ -170,9 +169,9 @@ Address RelocInfo::target_off_heap_target() { void RelocInfo::WipeOut() { DCHECK(IsEmbeddedObject(rmode_) || IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_) || IsExternalReference(rmode_) || - IsInternalReference(rmode_)); + IsInternalReference(rmode_) || IsOffHeapTarget(rmode_)); if (IsInternalReference(rmode_)) { - Memory::Address_at(pc_) = kNullAddress; + Memory
(pc_) = kNullAddress; } else { Assembler::set_target_address_at(pc_, constant_pool_, kNullAddress); } @@ -181,7 +180,7 @@ void RelocInfo::WipeOut() { Handle Assembler::relative_code_target_object_handle_at( Address pc) const { Instruction* branch = Instruction::At(pc); - int code_target_index = branch->GetBranchOffset() / Instruction::kInstrSize; + int code_target_index = branch->GetBranchOffset() / kInstrSize; return GetCodeTarget(code_target_index); } @@ -255,22 +254,21 @@ Address Assembler::target_address_from_return_address(Address pc) { // ldr ip, [pc, #...] @ call address // blx ip // @ return address - Address candidate = pc - 2 * Assembler::kInstrSize; - Instr candidate_instr(Memory::int32_at(candidate)); + Address candidate = pc - 2 * kInstrSize; + Instr candidate_instr(Memory(candidate)); if (IsLdrPcImmediateOffset(candidate_instr)) { return candidate; } else { if (CpuFeatures::IsSupported(ARMv7)) { - candidate -= 1 * Assembler::kInstrSize; - DCHECK(IsMovW(Memory::int32_at(candidate)) && - IsMovT(Memory::int32_at(candidate + Assembler::kInstrSize))); + candidate -= 1 * kInstrSize; + DCHECK(IsMovW(Memory(candidate)) && + IsMovT(Memory(candidate + kInstrSize))); } else { - candidate -= 3 * Assembler::kInstrSize; - DCHECK( - IsMovImmed(Memory::int32_at(candidate)) && - IsOrrImmed(Memory::int32_at(candidate + Assembler::kInstrSize)) && - IsOrrImmed(Memory::int32_at(candidate + 2 * Assembler::kInstrSize)) && - IsOrrImmed(Memory::int32_at(candidate + 3 * Assembler::kInstrSize))); + candidate -= 3 * kInstrSize; + DCHECK(IsMovImmed(Memory(candidate)) && + IsOrrImmed(Memory(candidate + kInstrSize)) && + IsOrrImmed(Memory(candidate + 2 * kInstrSize)) && + IsOrrImmed(Memory(candidate + 3 * kInstrSize))); } return candidate; } @@ -278,20 +276,20 @@ Address Assembler::target_address_from_return_address(Address pc) { Address Assembler::return_address_from_call_start(Address pc) { - if (IsLdrPcImmediateOffset(Memory::int32_at(pc))) { + if (IsLdrPcImmediateOffset(Memory(pc))) { // Load from constant pool, small section. return pc + kInstrSize * 2; } else { if (CpuFeatures::IsSupported(ARMv7)) { - DCHECK(IsMovW(Memory::int32_at(pc))); - DCHECK(IsMovT(Memory::int32_at(pc + kInstrSize))); + DCHECK(IsMovW(Memory(pc))); + DCHECK(IsMovT(Memory(pc + kInstrSize))); // A movw / movt load immediate. return pc + kInstrSize * 3; } else { - DCHECK(IsMovImmed(Memory::int32_at(pc))); - DCHECK(IsOrrImmed(Memory::int32_at(pc + kInstrSize))); - DCHECK(IsOrrImmed(Memory::int32_at(pc + 2 * kInstrSize))); - DCHECK(IsOrrImmed(Memory::int32_at(pc + 3 * kInstrSize))); + DCHECK(IsMovImmed(Memory(pc))); + DCHECK(IsOrrImmed(Memory(pc + kInstrSize))); + DCHECK(IsOrrImmed(Memory(pc + 2 * kInstrSize))); + DCHECK(IsOrrImmed(Memory(pc + 3 * kInstrSize))); // A mov / orr load immediate. return pc + kInstrSize * 5; } @@ -300,7 +298,7 @@ Address Assembler::return_address_from_call_start(Address pc) { void Assembler::deserialization_set_special_target_at( Address constant_pool_entry, Code* code, Address target) { - Memory::Address_at(constant_pool_entry) = target; + Memory
(constant_pool_entry) = target; } int Assembler::deserialization_special_target_size(Address location) { @@ -309,19 +307,19 @@ int Assembler::deserialization_special_target_size(Address location) { void Assembler::deserialization_set_target_internal_reference_at( Address pc, Address target, RelocInfo::Mode mode) { - Memory::Address_at(pc) = target; + Memory
(pc) = target; } bool Assembler::is_constant_pool_load(Address pc) { - return IsLdrPcImmediateOffset(Memory::int32_at(pc)); + return IsLdrPcImmediateOffset(Memory(pc)); } Address Assembler::constant_pool_entry_address(Address pc, Address constant_pool) { - DCHECK(Assembler::IsLdrPcImmediateOffset(Memory::int32_at(pc))); - Instr instr = Memory::int32_at(pc); + DCHECK(Assembler::IsLdrPcImmediateOffset(Memory(pc))); + Instr instr = Memory(pc); return pc + GetLdrRegisterImmediateOffset(instr) + Instruction::kPcLoadDelta; } @@ -329,21 +327,21 @@ Address Assembler::constant_pool_entry_address(Address pc, Address Assembler::target_address_at(Address pc, Address constant_pool) { if (is_constant_pool_load(pc)) { // This is a constant pool lookup. Return the value in the constant pool. - return Memory::Address_at(constant_pool_entry_address(pc, constant_pool)); - } else if (CpuFeatures::IsSupported(ARMv7) && IsMovW(Memory::int32_at(pc))) { + return Memory
(constant_pool_entry_address(pc, constant_pool)); + } else if (CpuFeatures::IsSupported(ARMv7) && IsMovW(Memory(pc))) { // This is an movw / movt immediate load. Return the immediate. - DCHECK(IsMovW(Memory::int32_at(pc)) && - IsMovT(Memory::int32_at(pc + kInstrSize))); + DCHECK(IsMovW(Memory(pc)) && + IsMovT(Memory(pc + kInstrSize))); Instruction* movw_instr = Instruction::At(pc); Instruction* movt_instr = Instruction::At(pc + kInstrSize); return static_cast
((movt_instr->ImmedMovwMovtValue() << 16) | movw_instr->ImmedMovwMovtValue()); - } else if (IsMovImmed(Memory::int32_at(pc))) { + } else if (IsMovImmed(Memory(pc))) { // This is an mov / orr immediate load. Return the immediate. - DCHECK(IsMovImmed(Memory::int32_at(pc)) && - IsOrrImmed(Memory::int32_at(pc + kInstrSize)) && - IsOrrImmed(Memory::int32_at(pc + 2 * kInstrSize)) && - IsOrrImmed(Memory::int32_at(pc + 3 * kInstrSize))); + DCHECK(IsMovImmed(Memory(pc)) && + IsOrrImmed(Memory(pc + kInstrSize)) && + IsOrrImmed(Memory(pc + 2 * kInstrSize)) && + IsOrrImmed(Memory(pc + 3 * kInstrSize))); Instr mov_instr = instr_at(pc); Instr orr_instr_1 = instr_at(pc + kInstrSize); Instr orr_instr_2 = instr_at(pc + 2 * kInstrSize); @@ -364,7 +362,7 @@ void Assembler::set_target_address_at(Address pc, Address constant_pool, ICacheFlushMode icache_flush_mode) { if (is_constant_pool_load(pc)) { // This is a constant pool lookup. Update the entry in the constant pool. - Memory::Address_at(constant_pool_entry_address(pc, constant_pool)) = target; + Memory
(constant_pool_entry_address(pc, constant_pool)) = target; // Intuitively, we would think it is necessary to always flush the // instruction cache after patching a target address in the code as follows: // Assembler::FlushICache(pc, sizeof(target)); @@ -373,37 +371,37 @@ void Assembler::set_target_address_at(Address pc, Address constant_pool, // ldr ip, [pp, #...] // since the instruction accessing this address in the constant pool remains // unchanged. - } else if (CpuFeatures::IsSupported(ARMv7) && IsMovW(Memory::int32_at(pc))) { + } else if (CpuFeatures::IsSupported(ARMv7) && IsMovW(Memory(pc))) { // This is an movw / movt immediate load. Patch the immediate embedded in // the instructions. - DCHECK(IsMovW(Memory::int32_at(pc))); - DCHECK(IsMovT(Memory::int32_at(pc + kInstrSize))); + DCHECK(IsMovW(Memory(pc))); + DCHECK(IsMovT(Memory(pc + kInstrSize))); uint32_t* instr_ptr = reinterpret_cast(pc); uint32_t immediate = static_cast(target); instr_ptr[0] = PatchMovwImmediate(instr_ptr[0], immediate & 0xFFFF); instr_ptr[1] = PatchMovwImmediate(instr_ptr[1], immediate >> 16); - DCHECK(IsMovW(Memory::int32_at(pc))); - DCHECK(IsMovT(Memory::int32_at(pc + kInstrSize))); + DCHECK(IsMovW(Memory(pc))); + DCHECK(IsMovT(Memory(pc + kInstrSize))); if (icache_flush_mode != SKIP_ICACHE_FLUSH) { Assembler::FlushICache(pc, 2 * kInstrSize); } - } else if (IsMovImmed(Memory::int32_at(pc))) { + } else if (IsMovImmed(Memory(pc))) { // This is an mov / orr immediate load. Patch the immediate embedded in // the instructions. - DCHECK(IsMovImmed(Memory::int32_at(pc)) && - IsOrrImmed(Memory::int32_at(pc + kInstrSize)) && - IsOrrImmed(Memory::int32_at(pc + 2 * kInstrSize)) && - IsOrrImmed(Memory::int32_at(pc + 3 * kInstrSize))); + DCHECK(IsMovImmed(Memory(pc)) && + IsOrrImmed(Memory(pc + kInstrSize)) && + IsOrrImmed(Memory(pc + 2 * kInstrSize)) && + IsOrrImmed(Memory(pc + 3 * kInstrSize))); uint32_t* instr_ptr = reinterpret_cast(pc); uint32_t immediate = static_cast(target); instr_ptr[0] = PatchShiftImm(instr_ptr[0], immediate & kImm8Mask); instr_ptr[1] = PatchShiftImm(instr_ptr[1], immediate & (kImm8Mask << 8)); instr_ptr[2] = PatchShiftImm(instr_ptr[2], immediate & (kImm8Mask << 16)); instr_ptr[3] = PatchShiftImm(instr_ptr[3], immediate & (kImm8Mask << 24)); - DCHECK(IsMovImmed(Memory::int32_at(pc)) && - IsOrrImmed(Memory::int32_at(pc + kInstrSize)) && - IsOrrImmed(Memory::int32_at(pc + 2 * kInstrSize)) && - IsOrrImmed(Memory::int32_at(pc + 3 * kInstrSize))); + DCHECK(IsMovImmed(Memory(pc)) && + IsOrrImmed(Memory(pc + kInstrSize)) && + IsOrrImmed(Memory(pc + 2 * kInstrSize)) && + IsOrrImmed(Memory(pc + 3 * kInstrSize))); if (icache_flush_mode != SKIP_ICACHE_FLUSH) { Assembler::FlushICache(pc, 4 * kInstrSize); } -- cgit v1.2.1