Skip to content
Permalink
Browse files
8282392: [zero] Build broken on AArch64
Reviewed-by: aph, shade
  • Loading branch information
a74nh authored and Ningsheng Jian committed Mar 1, 2022
1 parent 7743266 commit c1a28aa04ada6c13031eaa85746e6b1d5945d10d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
@@ -55,7 +55,7 @@ int BarrierSetNMethod::nmethod_stub_entry_barrier(address* return_address_ptr) {
MACOS_AARCH64_ONLY(ThreadWXEnable wx(WXWrite, Thread::current()));

address return_address = *return_address_ptr;
AARCH64_ONLY(return_address = pauth_strip_pointer(return_address));
AARCH64_PORT_ONLY(return_address = pauth_strip_pointer(return_address));
CodeBlob* cb = CodeCache::find_blob(return_address);
assert(cb != NULL, "invariant");

@@ -1469,7 +1469,7 @@ address OptoRuntime::rethrow_C(oopDesc* exception, JavaThread* thread, address r
// This needs authenticating, but to do that here requires the fp of the previous frame.
// A better way of doing it would be authenticate in the caller by adding a
// AuthPAuthNode and using it in GraphKit::gen_stub. For now, just strip it.
AARCH64_ONLY(ret_pc = pauth_strip_pointer(ret_pc));
AARCH64_PORT_ONLY(ret_pc = pauth_strip_pointer(ret_pc));

#ifndef PRODUCT
SharedRuntime::_rethrow_ctr++; // count rethrows
@@ -1110,7 +1110,7 @@ void frame::verify(const RegisterMap* map) const {

#ifdef ASSERT
bool frame::verify_return_pc(address x) {
#ifdef AARCH64
#ifdef TARGET_ARCH_aarch64
if (!pauth_ptr_is_raw(x)) {
return false;
}
@@ -1947,7 +1947,7 @@ bool SharedRuntime::should_fixup_call_destination(address destination, address e
JRT_LEAF(void, SharedRuntime::fixup_callers_callsite(Method* method, address caller_pc))
Method* moop(method);

AARCH64_ONLY(assert(pauth_ptr_is_raw(caller_pc), "should be raw"));
AARCH64_PORT_ONLY(assert(pauth_ptr_is_raw(caller_pc), "should be raw"));

address entry_point = moop->from_compiled_entry_no_trampoline();

@@ -512,7 +512,7 @@

// Note: There are two ARM ports. They set the following in the makefiles:
// 1. 32-bit port: -DARM -DARM32 -DTARGET_ARCH_arm
// 2. 64-bit port: -DAARCH64 -D_LP64 -DTARGET_ARCH_aaarch64
// 2. 64-bit port: -DAARCH64 -D_LP64 -DTARGET_ARCH_aarch64
#ifdef ARM
#define ARM_ONLY(code) code
#define NOT_ARM(code)
@@ -537,6 +537,12 @@
#define NOT_AARCH64(code) code
#endif

#ifdef TARGET_ARCH_aarch64
#define AARCH64_PORT_ONLY(code) code
#else
#define AARCH64_PORT_ONLY(code)
#endif

#define MACOS_AARCH64_ONLY(x) MACOS_ONLY(AARCH64_ONLY(x))

#ifdef VM_LITTLE_ENDIAN

1 comment on commit c1a28aa

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.