< prev index next >

src/cpu/aarch64/vm/jvmciCodeInstaller_aarch64.cpp

Print this page




  48     RelocationHolder rspec = oop_Relocation::spec(oop_index);
  49     _instructions->relocate(pc, rspec, 1);
  50     Unimplemented();
  51   } else {
  52     NativeMovConstReg* move = nativeMovConstReg_at(pc);
  53     move->set_data((intptr_t) value);
  54     int oop_index = _oop_recorder->find_index(value);
  55     RelocationHolder rspec = oop_Relocation::spec(oop_index);
  56     _instructions->relocate(pc, rspec);
  57   }
  58 }
  59 
  60 void CodeInstaller::pd_patch_MetaspaceConstant(int pc_offset, Handle constant, TRAPS) {
  61   address pc = _instructions->start() + pc_offset;
  62   if (HotSpotMetaspaceConstantImpl::compressed(constant)) {
  63     narrowKlass narrowOop = record_narrow_metadata_reference(constant, CHECK);
  64     TRACE_jvmci_3("relocating (narrow metaspace constant) at " PTR_FORMAT "/0x%x", p2i(pc), narrowOop);
  65     Unimplemented();
  66   } else {
  67     NativeMovConstReg* move = nativeMovConstReg_at(pc);
  68     Metadata* reference = record_metadata_reference(constant, CHECK);
  69     move->set_data((intptr_t) reference);
  70     TRACE_jvmci_3("relocating (metaspace constant) at " PTR_FORMAT "/" PTR_FORMAT, p2i(pc), p2i(reference));
  71   }
  72 }
  73 
  74 void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, int data_offset, TRAPS) {
  75   address pc = _instructions->start() + pc_offset;
  76   NativeInstruction* inst = nativeInstruction_at(pc);
  77   if (inst->is_adr_aligned() || inst->is_ldr_literal()) {
  78     address dest = _constants->start() + data_offset;
  79     _instructions->relocate(pc, section_word_Relocation::spec((address) dest, CodeBuffer::SECT_CONSTS));
  80     TRACE_jvmci_3("relocating at " PTR_FORMAT " (+%d) with destination at %d", p2i(pc), pc_offset, data_offset);
  81   } else {
  82     JVMCI_ERROR("unknown load or move instruction at " PTR_FORMAT, p2i(pc));
  83   }
  84 }
  85 
  86 void CodeInstaller::pd_relocate_ForeignCall(NativeInstruction* inst, jlong foreign_call_destination, TRAPS) {
  87   address pc = (address) inst;
  88   if (inst->is_call()) {




  48     RelocationHolder rspec = oop_Relocation::spec(oop_index);
  49     _instructions->relocate(pc, rspec, 1);
  50     Unimplemented();
  51   } else {
  52     NativeMovConstReg* move = nativeMovConstReg_at(pc);
  53     move->set_data((intptr_t) value);
  54     int oop_index = _oop_recorder->find_index(value);
  55     RelocationHolder rspec = oop_Relocation::spec(oop_index);
  56     _instructions->relocate(pc, rspec);
  57   }
  58 }
  59 
  60 void CodeInstaller::pd_patch_MetaspaceConstant(int pc_offset, Handle constant, TRAPS) {
  61   address pc = _instructions->start() + pc_offset;
  62   if (HotSpotMetaspaceConstantImpl::compressed(constant)) {
  63     narrowKlass narrowOop = record_narrow_metadata_reference(constant, CHECK);
  64     TRACE_jvmci_3("relocating (narrow metaspace constant) at " PTR_FORMAT "/0x%x", p2i(pc), narrowOop);
  65     Unimplemented();
  66   } else {
  67     NativeMovConstReg* move = nativeMovConstReg_at(pc);
  68     void* reference = record_metadata_reference(constant, CHECK);
  69     move->set_data((intptr_t) reference);
  70     TRACE_jvmci_3("relocating (metaspace constant) at " PTR_FORMAT "/" PTR_FORMAT, p2i(pc), p2i(reference));
  71   }
  72 }
  73 
  74 void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, int data_offset, TRAPS) {
  75   address pc = _instructions->start() + pc_offset;
  76   NativeInstruction* inst = nativeInstruction_at(pc);
  77   if (inst->is_adr_aligned() || inst->is_ldr_literal()) {
  78     address dest = _constants->start() + data_offset;
  79     _instructions->relocate(pc, section_word_Relocation::spec((address) dest, CodeBuffer::SECT_CONSTS));
  80     TRACE_jvmci_3("relocating at " PTR_FORMAT " (+%d) with destination at %d", p2i(pc), pc_offset, data_offset);
  81   } else {
  82     JVMCI_ERROR("unknown load or move instruction at " PTR_FORMAT, p2i(pc));
  83   }
  84 }
  85 
  86 void CodeInstaller::pd_relocate_ForeignCall(NativeInstruction* inst, jlong foreign_call_destination, TRAPS) {
  87   address pc = (address) inst;
  88   if (inst->is_call()) {


< prev index next >