< prev index next >

src/hotspot/cpu/aarch64/nativeInst_aarch64.cpp

Print this page
rev 56543 : 8232046: AArch64 build failure after JDK-8225681
Reviewed-by: duke

@@ -330,13 +330,18 @@
 address NativeJump::jump_destination() const          {
   address dest = MacroAssembler::target_addr_for_insn(instruction_address());
 
   // We use jump to self as the unresolved address which the inline
   // cache code (and relocs) know about
-
-  // return -1 if jump to self
-  dest = (dest == (address) this) ? (address) -1 : dest;
+  // As a special case we also use sequence movptr(r,0); br(r);
+  // i.e. jump to 0 when we need leave space for a wide immediate
+  // load
+
+  // return -1 if jump to self or to 0
+  if ((dest == (address)this) || dest == 0) {
+    dest = (address) -1;
+  }
   return dest;
 }
 
 void NativeJump::set_jump_destination(address dest) {
   // We use jump to self as the unresolved address which the inline

@@ -354,13 +359,17 @@
   NativeMovConstReg* move = nativeMovConstReg_at(instruction_address());
   address dest = (address) move->data();
 
   // We use jump to self as the unresolved address which the inline
   // cache code (and relocs) know about
+  // As a special case we also use jump to 0 when first generating
+  // a general jump
 
-  // return -1 if jump to self
-  dest = (dest == (address) this) ? (address) -1 : dest;
+  // return -1 if jump to self or to 0
+  if ((dest == (address)this) || dest == 0) {
+    dest = (address) -1;
+  }
   return dest;
 }
 
 void NativeGeneralJump::set_jump_destination(address dest) {
   NativeMovConstReg* move = nativeMovConstReg_at(instruction_address());
< prev index next >