< prev index next >

src/hotspot/cpu/aarch64/aarch64.ad

Print this page
rev 54117 : AArch64: 64-bit Literal Oops

@@ -1029,11 +1029,11 @@
   static uint size_exception_handler() {
     return MacroAssembler::far_branch_size();
   }
 
   static uint size_deopt_handler() {
-    // count one adr and one far branch instruction
+    // adr, adrp, add, br
     return 4 * NativeInstruction::instruction_size;
   }
 };
 
  bool is_CAS(int opcode, bool maybe_volatile);

@@ -1489,11 +1489,15 @@
   return off;
 }
 
 int MachCallDynamicJavaNode::ret_addr_offset()
 {
+  if (!Use64BitLiteralAddresses) {
   return 16; // movz, movk, movk, bl
+  } else {
+    return 20; // movz, movk, movk, movk, bl
+  }
 }
 
 int MachCallRuntimeNode::ret_addr_offset() {
   // for generated stubs the call will be
   //   far_call(addr)

@@ -1505,11 +1509,16 @@
   //   blrt rscratch1
   CodeBlob *cb = CodeCache::find_blob(_entry_point);
   if (cb) {
     return MacroAssembler::far_branch_size();
   } else {
+    // lea will emit 3 or an extra movk to make 4 instructions.
+    if (!Use64BitLiteralAddresses) {
     return 6 * NativeInstruction::instruction_size;
+    } else {
+      return 7 * NativeInstruction::instruction_size;
+    }
   }
 }
 
 // Indicate if the safepoint node needs the polling page as an input
 
< prev index next >