< prev index next > src/hotspot/cpu/aarch64/compressedKlass_aarch64.cpp
Print this page
}
return result;
}
- void CompressedKlassPointers::initialize(address addr, size_t len) {
+ bool CompressedKlassPointers::pd_initialize(address addr, size_t len) {
+
+ if (tiny_classpointer_mode()) {
+ // In tiny-classpointer mode, we do what all other platforms do.
+ return false;
+ }
+
+ // Aarch64 uses an own initialization logic that avoids zero-base shifted mode
+ // (_base=0 _shift>0), instead preferring non-zero-based mode with shift=0
constexpr uintptr_t unscaled_max = nth_bit(32);
assert(len <= unscaled_max, "Klass range larger than 32 bits?");
- // Shift is always 0 on aarch64.
_shift = 0;
- // On aarch64, we don't bother with zero-based encoding (base=0 shift>0).
address const end = addr + len;
_base = (end <= (address)unscaled_max) ? nullptr : addr;
_range = end - _base;
+
+ #ifdef ASSERT
+ _klass_range_start = addr;
+ _klass_range_end = addr + len;
+ calc_lowest_highest_narrow_klass_id();
+ sanity_check_after_initialization();
+ #endif
+
+ return true;
}
< prev index next >