From ab17f88f6ccd793b718394987f868322a2cc0d1f Mon Sep 17 00:00:00 2001 From: Evgeny Astigeevich Date: Tue, 29 Mar 2022 13:48:18 +0000 Subject: [PATCH] 8283626: AArch64: Set relocInfo::offset_unit to 4 Reviewed-by: simonis, aph --- src/hotspot/cpu/aarch64/relocInfo_aarch64.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hotspot/cpu/aarch64/relocInfo_aarch64.hpp b/src/hotspot/cpu/aarch64/relocInfo_aarch64.hpp index 7708b4423e0..904fe081427 100644 --- a/src/hotspot/cpu/aarch64/relocInfo_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/relocInfo_aarch64.hpp @@ -29,8 +29,9 @@ // machine-dependent parts of class relocInfo private: enum { - // Relocations are byte-aligned. - offset_unit = 1, + // AArch64 instructions are always 4 bytes long and 4-aligned, so + // the two lowest offset bits can always be discarded. + offset_unit = 4, // Must be at least 1 for RelocInfo::narrow_oop_in_const. format_width = 1 };