diff --git a/src/hotspot/cpu/riscv/globalDefinitions_riscv.hpp b/src/hotspot/cpu/riscv/globalDefinitions_riscv.hpp index e368bbdc9141f..68cd51ece5f70 100644 --- a/src/hotspot/cpu/riscv/globalDefinitions_riscv.hpp +++ b/src/hotspot/cpu/riscv/globalDefinitions_riscv.hpp @@ -50,6 +50,9 @@ const bool CCallingConventionRequiresIntsAsLongs = false; #define USE_POINTERS_TO_REGISTER_IMPL_ARRAY +// auipc useable for all cc -> cc calls and jumps +#define CODE_CACHE_SIZE_LIMIT ((2*G)-(2*K)) + // The expected size in bytes of a cache line. #define DEFAULT_CACHE_LINE_SIZE 64 diff --git a/src/hotspot/share/utilities/globalDefinitions.hpp b/src/hotspot/share/utilities/globalDefinitions.hpp index 08eb25828703f..c0f5b71966662 100644 --- a/src/hotspot/share/utilities/globalDefinitions.hpp +++ b/src/hotspot/share/utilities/globalDefinitions.hpp @@ -581,13 +581,16 @@ extern uint64_t OopEncodingHeapMax; // Machine dependent stuff +#include CPU_HEADER(globalDefinitions) + // The maximum size of the code cache. Can be overridden by targets. +#ifndef CODE_CACHE_SIZE_LIMIT #define CODE_CACHE_SIZE_LIMIT (2*G) +#endif + // Allow targets to reduce the default size of the code cache. #define CODE_CACHE_DEFAULT_LIMIT CODE_CACHE_SIZE_LIMIT -#include CPU_HEADER(globalDefinitions) - // To assure the IRIW property on processors that are not multiple copy // atomic, sync instructions must be issued between volatile reads to // assure their ordering, instead of after volatile stores.