diff --git a/src/codegen/arm64/assembler-arm64-inl.h b/src/codegen/arm64/assembler-arm64-inl.h index f3c3e55975..c47f8f1aa5 100644 --- a/src/codegen/arm64/assembler-arm64-inl.h +++ b/src/codegen/arm64/assembler-arm64-inl.h @@ -660,6 +660,7 @@ Address RelocInfo::constant_pool_entry_address() { HeapObject RelocInfo::target_object() { DCHECK(IsCodeTarget(rmode_) || IsEmbeddedObjectMode(rmode_)); if (IsCompressedEmbeddedObject(rmode_)) { + CHECK(!host_.is_null()); return HeapObject::cast(Object(DecompressTaggedAny( host_.address(), Assembler::target_compressed_address_at(pc_, constant_pool_)))); diff --git a/src/codegen/arm64/assembler-arm64.cc b/src/codegen/arm64/assembler-arm64.cc index d5a0295934..97a57d6f3c 100644 --- a/src/codegen/arm64/assembler-arm64.cc +++ b/src/codegen/arm64/assembler-arm64.cc @@ -140,7 +140,9 @@ bool RelocInfo::IsCodedSpecially() { bool RelocInfo::IsInConstantPool() { Instruction* instr = reinterpret_cast(pc_); - return instr->IsLdrLiteralX(); + DCHECK_IMPLIES(instr->IsLdrLiteralW(), COMPRESS_POINTERS_BOOL); + return instr->IsLdrLiteralX() || + (COMPRESS_POINTERS_BOOL && instr->IsLdrLiteralW()); } uint32_t RelocInfo::wasm_call_tag() const { diff --git a/src/compiler/backend/ppc/code-generator-ppc.cc b/src/compiler/backend/ppc/code-generator-ppc.cc index 9c21fe1102..b7fece3f72 100644 --- a/src/compiler/backend/ppc/code-generator-ppc.cc +++ b/src/compiler/backend/ppc/code-generator-ppc.cc @@ -2780,7 +2780,10 @@ void CodeGenerator::AssembleMove(InstructionOperand* source, if (IsMaterializableFromRoot(src_object, &index)) { __ LoadRoot(dst, index); } else { - __ Move(dst, src_object, RelocInfo::COMPRESSED_EMBEDDED_OBJECT); + // TODO(v8:7703, jyan@ca.ibm.com): Turn into a + // COMPRESSED_EMBEDDED_OBJECT when the constant pool entry size is + // tagged size. + __ Move(dst, src_object, RelocInfo::FULL_EMBEDDED_OBJECT); } break; } diff --git a/src/diagnostics/disassembler.cc b/src/diagnostics/disassembler.cc index 1bbdb558f1..2b3c9ede00 100644 --- a/src/diagnostics/disassembler.cc +++ b/src/diagnostics/disassembler.cc @@ -222,7 +222,11 @@ static void PrintRelocInfo(StringBuilder* out, Isolate* isolate, } else if (RelocInfo::IsEmbeddedObjectMode(rmode)) { HeapStringAllocator allocator; StringStream accumulator(&allocator); - relocinfo->target_object().ShortPrint(&accumulator); + if (relocinfo->host().is_null()) { + relocinfo->target_object_no_host(isolate).ShortPrint(&accumulator); + } else { + relocinfo->target_object().ShortPrint(&accumulator); + } std::unique_ptr obj_name = accumulator.ToCString(); const bool is_compressed = RelocInfo::IsCompressedEmbeddedObject(rmode); out->AddFormatted(" ;; %sobject: %s", diff --git a/src/heap/remembered-set-inl.h b/src/heap/remembered-set-inl.h index 3eb395f6fc..034e98a06f 100644 --- a/src/heap/remembered-set-inl.h +++ b/src/heap/remembered-set-inl.h @@ -317,13 +317,12 @@ class UpdateTypedSlotHelper { } case COMPRESSED_OBJECT_SLOT: { HeapObject old_target = HeapObject::cast(Object(DecompressTaggedAny( - heap->isolate(), - static_cast(base::Memory
(addr))))); + heap->isolate(), base::Memory(addr)))); HeapObject new_target = old_target; SlotCallbackResult result = callback(FullMaybeObjectSlot(&new_target)); DCHECK(!HasWeakHeapObjectTag(new_target)); if (new_target != old_target) { - base::Memory
(addr) = new_target.ptr(); + base::Memory(addr) = CompressTagged(new_target.ptr()); } return result; }