< prev index next >

src/hotspot/cpu/aarch64/nativeInst_aarch64.cpp

Print this page




 215 
 216   address bl_destination
 217     = MacroAssembler::pd_call_destination(call_addr);
 218   if (code->contains(bl_destination) &&
 219       is_NativeCallTrampolineStub_at(bl_destination))
 220     return bl_destination;
 221 
 222   if (code->is_nmethod()) {
 223     return trampoline_stub_Relocation::get_trampoline_for(call_addr, (nmethod*)code);
 224   }
 225 
 226   return NULL;
 227 }
 228 
 229 // Inserts a native call instruction at a given pc
 230 void NativeCall::insert(address code_pos, address entry) { Unimplemented(); }
 231 
 232 //-------------------------------------------------------------------
 233 
 234 void NativeMovConstReg::verify() {
 235   if (! (nativeInstruction_at(instruction_address())->is_movz() ||
 236         is_adrp_at(instruction_address()) ||
 237         is_ldr_literal_at(instruction_address())) ) {
 238     fatal("should be MOVZ or ADRP or LDR (literal)");
 239   }
 240 }
 241 
 242 
 243 intptr_t NativeMovConstReg::data() const {
 244   // das(uint64_t(instruction_address()),2);
 245   address addr = MacroAssembler::target_addr_for_insn(instruction_address());
 246   if (maybe_cpool_ref(instruction_address())) {
 247     return *(intptr_t*)addr;
 248   } else {
 249     return (intptr_t)addr;
 250   }
 251 }
 252 
 253 void NativeMovConstReg::set_data(intptr_t x) {
 254   if (maybe_cpool_ref(instruction_address())) {
 255     address addr = MacroAssembler::target_addr_for_insn(instruction_address());
 256     *(intptr_t*)addr = x;
 257   } else {
 258     // Store x into the instruction stream.
 259     MacroAssembler::pd_patch_instruction(instruction_address(), (address)x);




 215 
 216   address bl_destination
 217     = MacroAssembler::pd_call_destination(call_addr);
 218   if (code->contains(bl_destination) &&
 219       is_NativeCallTrampolineStub_at(bl_destination))
 220     return bl_destination;
 221 
 222   if (code->is_nmethod()) {
 223     return trampoline_stub_Relocation::get_trampoline_for(call_addr, (nmethod*)code);
 224   }
 225 
 226   return NULL;
 227 }
 228 
 229 // Inserts a native call instruction at a given pc
 230 void NativeCall::insert(address code_pos, address entry) { Unimplemented(); }
 231 
 232 //-------------------------------------------------------------------
 233 
 234 void NativeMovConstReg::verify() {
 235   // make sure code pattern is actually mov reg64, imm64 instructions




 236 }
 237 
 238 
 239 intptr_t NativeMovConstReg::data() const {
 240   // das(uint64_t(instruction_address()),2);
 241   address addr = MacroAssembler::target_addr_for_insn(instruction_address());
 242   if (maybe_cpool_ref(instruction_address())) {
 243     return *(intptr_t*)addr;
 244   } else {
 245     return (intptr_t)addr;
 246   }
 247 }
 248 
 249 void NativeMovConstReg::set_data(intptr_t x) {
 250   if (maybe_cpool_ref(instruction_address())) {
 251     address addr = MacroAssembler::target_addr_for_insn(instruction_address());
 252     *(intptr_t*)addr = x;
 253   } else {
 254     // Store x into the instruction stream.
 255     MacroAssembler::pd_patch_instruction(instruction_address(), (address)x);


< prev index next >