diff --git a/src/hotspot/share/oops/compressedKlass.hpp b/src/hotspot/share/oops/compressedKlass.hpp index f0615283f33..dd54c8130eb 100644 --- a/src/hotspot/share/oops/compressedKlass.hpp +++ b/src/hotspot/share/oops/compressedKlass.hpp @@ -258,9 +258,15 @@ public: is_aligned(addr, klass_alignment_in_bytes()); } - // Check that with the given base, shift and range, aarch64 an encode and decode the klass pointer. - static bool check_klass_decode_mode(address base, int shift, const size_t range) NOT_AARCH64({ return true;}); - static bool set_klass_decode_mode() NOT_AARCH64({ return true;}); // can be called after initialization +#if defined(AARCH64) && !defined(ZERO) + // Check that with the given base, shift and range, aarch64 code can encode and decode the klass pointer. + static bool check_klass_decode_mode(address base, int shift, const size_t range); + // Called after initialization. + static bool set_klass_decode_mode(); +#else + static bool check_klass_decode_mode(address base, int shift, const size_t range) { return true; } + static bool set_klass_decode_mode() { return true; } +#endif }; #endif // SHARE_OOPS_COMPRESSEDKLASS_HPP