Skip to content

Commit 897a8ab

Browse files
committed
8346040: Zero interpreter build on Linux Aarch64 is broken
Reviewed-by: kbarrett Backport-of: ef6e987
1 parent 3b53ed7 commit 897a8ab

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/hotspot/share/oops/compressedKlass.hpp

+9-3
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,15 @@ class CompressedKlassPointers : public AllStatic {
258258
is_aligned(addr, klass_alignment_in_bytes());
259259
}
260260

261-
// Check that with the given base, shift and range, aarch64 an encode and decode the klass pointer.
262-
static bool check_klass_decode_mode(address base, int shift, const size_t range) NOT_AARCH64({ return true;});
263-
static bool set_klass_decode_mode() NOT_AARCH64({ return true;}); // can be called after initialization
261+
#if defined(AARCH64) && !defined(ZERO)
262+
// Check that with the given base, shift and range, aarch64 code can encode and decode the klass pointer.
263+
static bool check_klass_decode_mode(address base, int shift, const size_t range);
264+
// Called after initialization.
265+
static bool set_klass_decode_mode();
266+
#else
267+
static bool check_klass_decode_mode(address base, int shift, const size_t range) { return true; }
268+
static bool set_klass_decode_mode() { return true; }
269+
#endif
264270
};
265271

266272
#endif // SHARE_OOPS_COMPRESSEDKLASS_HPP

0 commit comments

Comments
 (0)