< prev index next >

src/hotspot/cpu/aarch64/nativeInst_aarch64.cpp

Print this page

194   address pc = instruction_address();
195   if (maybe_cpool_ref(pc)) {
196     address addr = MacroAssembler::target_addr_for_insn(pc);
197     *(int64_t*)addr = x;
198   } else {
199     MacroAssembler::pd_patch_instruction(pc, (address)intptr_t(x));
200     ICache::invalidate_range(instruction_address(), instruction_size);
201   }
202 }
203 
204 void NativeMovRegMem::verify() {
205 #ifdef ASSERT
206   MacroAssembler::target_addr_for_insn(instruction_address());
207 #endif
208 }
209 
210 //--------------------------------------------------------------------------------
211 
212 void NativeJump::verify() { ; }
213 

214 address NativeJump::jump_destination() const          {
215   address dest = MacroAssembler::target_addr_for_insn(instruction_address());
216 
217   // We use jump to self as the unresolved address which the inline
218   // cache code (and relocs) know about
219   // As a special case we also use sequence movptr(r,0); br(r);
220   // i.e. jump to 0 when we need leave space for a wide immediate
221   // load
222 
223   // return -1 if jump to self or to 0
224   if ((dest == (address)this) || dest == nullptr) {
225     dest = (address) -1;
226   }
227   return dest;
228 }
229 
230 void NativeJump::set_jump_destination(address dest) {
231   // We use jump to self as the unresolved address which the inline
232   // cache code (and relocs) know about
233   if (dest == (address) -1)

194   address pc = instruction_address();
195   if (maybe_cpool_ref(pc)) {
196     address addr = MacroAssembler::target_addr_for_insn(pc);
197     *(int64_t*)addr = x;
198   } else {
199     MacroAssembler::pd_patch_instruction(pc, (address)intptr_t(x));
200     ICache::invalidate_range(instruction_address(), instruction_size);
201   }
202 }
203 
204 void NativeMovRegMem::verify() {
205 #ifdef ASSERT
206   MacroAssembler::target_addr_for_insn(instruction_address());
207 #endif
208 }
209 
210 //--------------------------------------------------------------------------------
211 
212 void NativeJump::verify() { ; }
213 
214 
215 address NativeJump::jump_destination() const          {
216   address dest = MacroAssembler::target_addr_for_insn(instruction_address());
217 
218   // We use jump to self as the unresolved address which the inline
219   // cache code (and relocs) know about
220   // As a special case we also use sequence movptr(r,0); br(r);
221   // i.e. jump to 0 when we need leave space for a wide immediate
222   // load
223 
224   // return -1 if jump to self or to 0
225   if ((dest == (address)this) || dest == nullptr) {
226     dest = (address) -1;
227   }
228   return dest;
229 }
230 
231 void NativeJump::set_jump_destination(address dest) {
232   // We use jump to self as the unresolved address which the inline
233   // cache code (and relocs) know about
234   if (dest == (address) -1)
< prev index next >