mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-23 00:35:13 +00:00
8346832: runtime/CompressedOops/CompressedCPUSpecificClassSpaceReservation.java fails on RISC-V
Reviewed-by: stuefe, fjiang
This commit is contained in:
parent
27646e5516
commit
de0250368e
@ -31,7 +31,7 @@ char* CompressedKlassPointers::reserve_address_space_for_compressed_classes(size
|
||||
|
||||
char* result = nullptr;
|
||||
|
||||
// RiscV loads a 64-bit immediate in up to four separate steps, splitting it into four different sections
|
||||
// RISC-V loads a 64-bit immediate in up to four separate steps, splitting it into four different sections
|
||||
// (two 32-bit sections, each split into two subsections of 20/12 bits).
|
||||
//
|
||||
// 63 ....... 44 43 ... 32 31 ....... 12 11 ... 0
|
||||
@ -51,11 +51,6 @@ char* CompressedKlassPointers::reserve_address_space_for_compressed_classes(size
|
||||
// with one instruction (2)
|
||||
result = reserve_address_space_for_unscaled_encoding(size, aslr);
|
||||
|
||||
// Failing that, attempt to reserve for base=zero shift>0
|
||||
if (result == nullptr && optimize_for_zero_base) {
|
||||
result = reserve_address_space_for_zerobased_encoding(size, aslr);
|
||||
}
|
||||
|
||||
// Failing that, optimize for case (3) - a base with only bits set between [32-44)
|
||||
if (result == nullptr) {
|
||||
const uintptr_t from = nth_bit(32);
|
||||
|
||||
@ -85,15 +85,8 @@ public class CompressedCPUSpecificClassSpaceReservation {
|
||||
output.shouldContain(tryReserveFor16bitMoveIntoQ3);
|
||||
} else if (Platform.isRISCV64()) {
|
||||
output.shouldContain(tryReserveForUnscaled); // unconditionally
|
||||
if (CDS) {
|
||||
output.shouldNotContain(tryReserveForZeroBased);
|
||||
// bits 32..44
|
||||
output.shouldContain("reserve_between (range [0x0000000100000000-0x0000100000000000)");
|
||||
} else {
|
||||
output.shouldContain(tryReserveForZeroBased);
|
||||
// bits 32..44, but not lower than zero-based limit
|
||||
output.shouldContain("reserve_between (range [0x0000000800000000-0x0000100000000000)");
|
||||
}
|
||||
// bits 32..44
|
||||
output.shouldContain("reserve_between (range [0x0000000100000000-0x0000100000000000)");
|
||||
// bits 44..64
|
||||
output.shouldContain("reserve_between (range [0x0000100000000000-0xffffffffffffffff)");
|
||||
} else if (Platform.isS390x()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user