87 void CodeInstaller::pd_patch_MetaspaceConstant(int pc_offset, Handle constant, TRAPS) { |
87 void CodeInstaller::pd_patch_MetaspaceConstant(int pc_offset, Handle constant, TRAPS) { |
88 address pc = _instructions->start() + pc_offset; |
88 address pc = _instructions->start() + pc_offset; |
89 if (HotSpotMetaspaceConstantImpl::compressed(constant)) { |
89 if (HotSpotMetaspaceConstantImpl::compressed(constant)) { |
90 #ifdef _LP64 |
90 #ifdef _LP64 |
91 address operand = Assembler::locate_operand(pc, Assembler::narrow_oop_operand); |
91 address operand = Assembler::locate_operand(pc, Assembler::narrow_oop_operand); |
92 *((narrowKlass*) operand) = record_narrow_metadata_reference(constant, CHECK); |
92 *((narrowKlass*) operand) = record_narrow_metadata_reference(_instructions, operand, constant, CHECK); |
93 TRACE_jvmci_3("relocating (narrow metaspace constant) at " PTR_FORMAT "/" PTR_FORMAT, p2i(pc), p2i(operand)); |
93 TRACE_jvmci_3("relocating (narrow metaspace constant) at " PTR_FORMAT "/" PTR_FORMAT, p2i(pc), p2i(operand)); |
94 #else |
94 #else |
95 JVMCI_ERROR("compressed Klass* on 32bit"); |
95 JVMCI_ERROR("compressed Klass* on 32bit"); |
96 #endif |
96 #endif |
97 } else { |
97 } else { |
98 address operand = Assembler::locate_operand(pc, Assembler::imm_operand); |
98 address operand = Assembler::locate_operand(pc, Assembler::imm_operand); |
99 *((void**) operand) = record_metadata_reference(constant, CHECK); |
99 *((void**) operand) = record_metadata_reference(_instructions, operand, constant, CHECK); |
100 TRACE_jvmci_3("relocating (metaspace constant) at " PTR_FORMAT "/" PTR_FORMAT, p2i(pc), p2i(operand)); |
100 TRACE_jvmci_3("relocating (metaspace constant) at " PTR_FORMAT "/" PTR_FORMAT, p2i(pc), p2i(operand)); |
101 } |
101 } |
102 } |
102 } |
103 |
103 |
104 void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, int data_offset, TRAPS) { |
104 void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, int data_offset, TRAPS) { |