From 7cf190fbb02e950eb3b5461be139d09add3f6a7d Mon Sep 17 00:00:00 2001 From: Boris Ulasevich Date: Tue, 29 Apr 2025 01:50:23 +0000 Subject: [PATCH] 8345225: AARCH64: VM crashes with -NearCpool +UseShenandoahGC options Reviewed-by: aph, shade --- src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp | 6 +----- src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp | 10 ---------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp index f231caeba9f..fd6af0b9b4b 100644 --- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp @@ -1003,9 +1003,6 @@ void MacroAssembler::c2bool(Register x) { address MacroAssembler::ic_call(address entry, jint method_index) { RelocationHolder rh = virtual_call_Relocation::spec(pc(), method_index); - // address const_ptr = long_constant((jlong)Universe::non_oop_word()); - // uintptr_t offset; - // ldr_constant(rscratch2, const_ptr); movptr(rscratch2, (intptr_t)Universe::non_oop_word()); return trampoline_call(Address(entry, rh)); } @@ -5520,9 +5517,8 @@ void MacroAssembler::movoop(Register dst, jobject obj) { mov(dst, Address((address)obj, rspec)); } else { address dummy = address(uintptr_t(pc()) & -wordSize); // A nearby aligned address - ldr_constant(dst, Address(dummy, rspec)); + ldr(dst, Address(dummy, rspec)); } - } // Move a metadata address into a register. diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp index af09f97e938..e6075b0073b 100644 --- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp @@ -1472,16 +1472,6 @@ public: public: - void ldr_constant(Register dest, const Address &const_addr) { - if (NearCpool) { - ldr(dest, const_addr); - } else { - uint64_t offset; - adrp(dest, InternalAddress(const_addr.target()), offset); - ldr(dest, Address(dest, offset)); - } - } - address read_polling_page(Register r, relocInfo::relocType rtype); void get_polling_page(Register dest, relocInfo::relocType rtype);