Something similar to this is needed on aarch64
diff --git a/src/cpu/sparc/vm/jvmciCodeInstaller_sparc.cpp b/src/cpu/sparc/vm/jvmciCodeInstaller_sparc.cpp
--- a/src/cpu/sparc/vm/jvmciCodeInstaller_sparc.cpp
+++ b/src/cpu/sparc/vm/jvmciCodeInstaller_sparc.cpp
@@ -71,7 +71,7 @@
if (HotSpotMetaspaceConstantImpl::compressed(constant)) {
#ifdef _LP64
NativeMovConstReg32* move = nativeMovConstReg32_at(pc);
- narrowKlass narrowOop = record_narrow_metadata_reference(constant, CHECK);
+ narrowKlass narrowOop = record_narrow_metadata_reference(_instructions, pc, constant, CHECK);
move->set_data((intptr_t)narrowOop);
TRACE_jvmci_3("relocating (narrow metaspace constant) at " PTR_FORMAT "/0x%x", p2i(pc), narrowOop);
#else
@@ -79,7 +79,7 @@
#endif
} else {
NativeMovConstReg* move = nativeMovConstReg_at(pc);
- void* reference = record_metadata_reference(constant, CHECK);
+ void* reference = record_metadata_reference(_instructions, pc, constant, CHECK);
move->set_data((intptr_t)reference);
TRACE_jvmci_3("relocating (metaspace constant) at " PTR_FORMAT "/" PTR_FORMAT, p2i(pc), p2i(reference));
}
diff --git a/src/cpu/x86/vm/jvmciCodeInstaller_x86.cpp b/src/cpu/x86/vm/jvmciCodeInstaller_x86.cpp
--- a/src/cpu/x86/vm/jvmciCodeInstaller_x86.cpp
+++ b/src/cpu/x86/vm/jvmciCodeInstaller_x86.cpp
@@ -89,14 +89,14 @@
if (HotSpotMetaspaceConstantImpl::compressed(constant)) {
#ifdef _LP64
address operand = Assembler::locate_operand(pc, Assembler::narrow_oop_operand);
- *((narrowKlass*) operand) = record_narrow_metadata_reference(constant, CHECK);
+ *((narrowKlass*) operand) = record_narrow_metadata_reference(_instructions, operand, constant, CHECK);
TRACE_jvmci_3("relocating (narrow metaspace constant) at " PTR_FORMAT "/" PTR_FORMAT, p2i(pc), p2i(operand));
#else
JVMCI_ERROR("compressed Klass* on 32bit");
#endif
} else {
address operand = Assembler::locate_operand(pc, Assembler::imm_operand);
- *((void**) operand) = record_metadata_reference(constant, CHECK);
+ *((void**) operand) = record_metadata_reference(_instructions, operand, constant, CHECK);
TRACE_jvmci_3("relocating (metaspace constant) at " PTR_FORMAT "/" PTR_FORMAT, p2i(pc), p2i(operand));
}
}
diff --git a/src/cpu/sparc/vm/jvmciCodeInstaller_sparc.cpp b/src/cpu/sparc/vm/jvmciCodeInstaller_sparc.cpp
--- a/src/cpu/sparc/vm/jvmciCodeInstaller_sparc.cpp
+++ b/src/cpu/sparc/vm/jvmciCodeInstaller_sparc.cpp
@@ -71,7 +71,7 @@
if (HotSpotMetaspaceConstantImpl::compressed(constant)) {
#ifdef _LP64
NativeMovConstReg32* move = nativeMovConstReg32_at(pc);
- narrowKlass narrowOop = record_narrow_metadata_reference(constant, CHECK);
+ narrowKlass narrowOop = record_narrow_metadata_reference(_instructions, pc, constant, CHECK);
move->set_data((intptr_t)narrowOop);
TRACE_jvmci_3("relocating (narrow metaspace constant) at " PTR_FORMAT "/0x%x", p2i(pc), narrowOop);
#else
@@ -79,7 +79,7 @@
#endif
} else {
NativeMovConstReg* move = nativeMovConstReg_at(pc);
- void* reference = record_metadata_reference(constant, CHECK);
+ void* reference = record_metadata_reference(_instructions, pc, constant, CHECK);
move->set_data((intptr_t)reference);
TRACE_jvmci_3("relocating (metaspace constant) at " PTR_FORMAT "/" PTR_FORMAT, p2i(pc), p2i(reference));
}
diff --git a/src/cpu/x86/vm/jvmciCodeInstaller_x86.cpp b/src/cpu/x86/vm/jvmciCodeInstaller_x86.cpp
--- a/src/cpu/x86/vm/jvmciCodeInstaller_x86.cpp
+++ b/src/cpu/x86/vm/jvmciCodeInstaller_x86.cpp
@@ -89,14 +89,14 @@
if (HotSpotMetaspaceConstantImpl::compressed(constant)) {
#ifdef _LP64
address operand = Assembler::locate_operand(pc, Assembler::narrow_oop_operand);
- *((narrowKlass*) operand) = record_narrow_metadata_reference(constant, CHECK);
+ *((narrowKlass*) operand) = record_narrow_metadata_reference(_instructions, operand, constant, CHECK);
TRACE_jvmci_3("relocating (narrow metaspace constant) at " PTR_FORMAT "/" PTR_FORMAT, p2i(pc), p2i(operand));
#else
JVMCI_ERROR("compressed Klass* on 32bit");
#endif
} else {
address operand = Assembler::locate_operand(pc, Assembler::imm_operand);
- *((void**) operand) = record_metadata_reference(constant, CHECK);
+ *((void**) operand) = record_metadata_reference(_instructions, operand, constant, CHECK);
TRACE_jvmci_3("relocating (metaspace constant) at " PTR_FORMAT "/" PTR_FORMAT, p2i(pc), p2i(operand));
}
}
- relates to
-
JDK-8166869 [JVMCI] record metadata relocations for metadata references
-
- Resolved
-