diff --git a/make/hotspot/gensrc/GensrcAdlc.gmk b/make/hotspot/gensrc/GensrcAdlc.gmk index d25b517252f1..8f17b28911a2 100644 --- a/make/hotspot/gensrc/GensrcAdlc.gmk +++ b/make/hotspot/gensrc/GensrcAdlc.gmk @@ -99,6 +99,9 @@ ifeq ($(call check-jvm-feature, compiler2), true) ADLCFLAGS += -DAIX=1 else ifeq ($(OPENJDK_TARGET_OS), macosx) ADLCFLAGS += -D_ALLBSD_SOURCE=1 -D_GNU_SOURCE=1 + ifeq ($(HOTSPOT_TARGET_CPU_ARCH), aarch64) + ADLCFLAGS += -DR18_RESERVED=1 + endif else ifeq ($(OPENJDK_TARGET_OS), windows) ifeq ($(call isTargetCpuBits, 64), true) ADLCFLAGS += -D_WIN64=1 diff --git a/src/hotspot/cpu/aarch64/globalDefinitions_aarch64.hpp b/src/hotspot/cpu/aarch64/globalDefinitions_aarch64.hpp index 4f9c5207587b..83043feb5a2e 100644 --- a/src/hotspot/cpu/aarch64/globalDefinitions_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/globalDefinitions_aarch64.hpp @@ -53,7 +53,7 @@ const bool CCallingConventionRequiresIntsAsLongs = false; #define THREAD_LOCAL_POLL -#if defined(_WIN64) +#if defined(__APPLE__) || defined(_WIN64) #define R18_RESERVED #define R18_RESERVED_ONLY(code) code #define NOT_R18_RESERVED(code)