Skip to content

Commit 296b496

Browse files
author
Kim Barrett
committedSep 19, 2024
8340353: Remove CompressedOops::ptrs_base
Reviewed-by: stefank, coleenp, shade, mli
1 parent fde8508 commit 296b496

File tree

5 files changed

+11
-13
lines changed

5 files changed

+11
-13
lines changed
 

‎src/hotspot/cpu/aarch64/aarch64.ad

+1-1
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,7 @@ source %{
12441244

12451245
// r27 is not allocatable when compressed oops is on and heapbase is not
12461246
// zero, compressed klass pointers doesn't use r27 after JDK-8234794
1247-
if (UseCompressedOops && (CompressedOops::ptrs_base() != nullptr)) {
1247+
if (UseCompressedOops && (CompressedOops::base() != nullptr)) {
12481248
_NO_SPECIAL_REG32_mask.Remove(OptoReg::as_OptoReg(r27->as_VMReg()));
12491249
_NO_SPECIAL_REG_mask.Remove(OptoReg::as_OptoReg(r27->as_VMReg()));
12501250
_NO_SPECIAL_PTR_REG_mask.Remove(OptoReg::as_OptoReg(r27->as_VMReg()));

‎src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -2967,7 +2967,7 @@ void MacroAssembler::verify_heapbase(const char* msg) {
29672967
if (CheckCompressedOops) {
29682968
Label ok;
29692969
push(1 << rscratch1->encoding(), sp); // cmpptr trashes rscratch1
2970-
cmpptr(rheapbase, ExternalAddress(CompressedOops::ptrs_base_addr()));
2970+
cmpptr(rheapbase, ExternalAddress(CompressedOops::base_addr()));
29712971
br(Assembler::EQ, ok);
29722972
stop(msg);
29732973
bind(ok);
@@ -3133,9 +3133,9 @@ void MacroAssembler::reinit_heapbase()
31333133
{
31343134
if (UseCompressedOops) {
31353135
if (Universe::is_fully_initialized()) {
3136-
mov(rheapbase, CompressedOops::ptrs_base());
3136+
mov(rheapbase, CompressedOops::base());
31373137
} else {
3138-
lea(rheapbase, ExternalAddress(CompressedOops::ptrs_base_addr()));
3138+
lea(rheapbase, ExternalAddress(CompressedOops::base_addr()));
31393139
ldr(rheapbase, Address(rheapbase));
31403140
}
31413141
}

‎src/hotspot/cpu/riscv/macroAssembler_riscv.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1970,9 +1970,9 @@ int MacroAssembler::patch_oop(address insn_addr, address o) {
19701970
void MacroAssembler::reinit_heapbase() {
19711971
if (UseCompressedOops) {
19721972
if (Universe::is_fully_initialized()) {
1973-
mv(xheapbase, CompressedOops::ptrs_base());
1973+
mv(xheapbase, CompressedOops::base());
19741974
} else {
1975-
ExternalAddress target(CompressedOops::ptrs_base_addr());
1975+
ExternalAddress target(CompressedOops::base_addr());
19761976
relocate(target.rspec(), [&] {
19771977
int32_t offset;
19781978
la(xheapbase, target.target(), offset);

‎src/hotspot/cpu/x86/macroAssembler_x86.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -5756,7 +5756,7 @@ void MacroAssembler::verify_heapbase(const char* msg) {
57565756
assert (Universe::heap() != nullptr, "java heap should be initialized");
57575757
if (CheckCompressedOops) {
57585758
Label ok;
5759-
ExternalAddress src2(CompressedOops::ptrs_base_addr());
5759+
ExternalAddress src2(CompressedOops::base_addr());
57605760
const bool is_src2_reachable = reachable(src2);
57615761
if (!is_src2_reachable) {
57625762
push(rscratch1); // cmpptr trashes rscratch1
@@ -6047,10 +6047,10 @@ void MacroAssembler::reinit_heapbase() {
60476047
if (CompressedOops::base() == nullptr) {
60486048
MacroAssembler::xorptr(r12_heapbase, r12_heapbase);
60496049
} else {
6050-
mov64(r12_heapbase, (int64_t)CompressedOops::ptrs_base());
6050+
mov64(r12_heapbase, (int64_t)CompressedOops::base());
60516051
}
60526052
} else {
6053-
movptr(r12_heapbase, ExternalAddress(CompressedOops::ptrs_base_addr()));
6053+
movptr(r12_heapbase, ExternalAddress(CompressedOops::base_addr()));
60546054
}
60556055
}
60566056
}

‎src/hotspot/share/oops/compressedOops.hpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -88,15 +88,13 @@ class CompressedOops : public AllStatic {
8888
static void set_use_implicit_null_checks(bool use);
8989

9090
static address base() { return _narrow_oop._base; }
91+
static address base_addr() { return (address)&_narrow_oop._base; }
9192
static address begin() { return (address)_heap_address_range.start(); }
9293
static address end() { return (address)_heap_address_range.end(); }
9394
static bool is_base(void* addr) { return (base() == (address)addr); }
9495
static int shift() { return _narrow_oop._shift; }
9596
static bool use_implicit_null_checks() { return _narrow_oop._use_implicit_null_checks; }
9697

97-
static address ptrs_base_addr() { return (address)&_narrow_oop._base; }
98-
static address ptrs_base() { return _narrow_oop._base; }
99-
10098
static bool is_in(void* addr);
10199
static bool is_in(MemRegion mr);
102100

0 commit comments

Comments
 (0)
Please sign in to comment.