changeset 51015:0191ac1da300

8204341: AArch64: AOT runtime does not need a workaround for far calls Reviewed-by: kvn
author aph
date Tue, 05 Jun 2018 16:12:57 +0100
parents bf7eb61349d2
children 3d658c910e83
files src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp src/hotspot/cpu/aarch64/nativeInst_aarch64.hpp
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp	Tue Jun 05 09:15:03 2018 -0400
+++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp	Tue Jun 05 16:12:57 2018 +0100
@@ -1020,7 +1020,7 @@
   address trampoline_call(Address entry, CodeBuffer *cbuf = NULL);
 
   static bool far_branches() {
-    return ReservedCodeCacheSize > branch_range;
+    return ReservedCodeCacheSize > branch_range || UseAOT;
   }
 
   // Jumps that can reach anywhere in the code cache.
--- a/src/hotspot/cpu/aarch64/nativeInst_aarch64.hpp	Tue Jun 05 09:15:03 2018 -0400
+++ b/src/hotspot/cpu/aarch64/nativeInst_aarch64.hpp	Tue Jun 05 16:12:57 2018 +0100
@@ -234,8 +234,12 @@
   }
 
 #if INCLUDE_AOT
+  // Return true iff a call from instr to target is out of range.
+  // Used for calls from JIT- to AOT-compiled code.
   static bool is_far_call(address instr, address target) {
-    return !Assembler::reachable_from_branch_at(instr, target);
+    // On AArch64 we use trampolines which can reach anywhere in the
+    // address space, so calls are never out of range.
+    return false;
   }
 #endif