8204341: AArch64: AOT runtime does not need a workaround for far calls

Reviewed-by: kvn
This commit is contained in:
Andrew Haley 2018-06-05 16:12:57 +01:00
parent 056f7b3bd8
commit 74dd5acae0
2 changed files with 6 additions and 2 deletions

View File

@ -1020,7 +1020,7 @@ public:
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.

View File

@ -234,8 +234,12 @@ class NativeCall: public NativeInstruction {
}
#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