From 85150e0a429bbffb9d6aec0039d6bb1c937e6c84 Mon Sep 17 00:00:00 2001 From: Artem Bochkarev Date: Fri, 3 Sep 2021 16:41:39 +0700 Subject: [PATCH] JBR-3715: cherry-pick of origin fix. implemented correct r18 usage fixed JBR-3715 patch from V.Kempik (cherry picked from commit a08c2a715bb1ee319893f3e037c5f92a10759d81) --- make/hotspot/gensrc/GensrcAdlc.gmk | 3 +++ src/hotspot/cpu/aarch64/globalDefinitions_aarch64.hpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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)