8340353: Remove CompressedOops::ptrs_base

Reviewed-by: stefank, coleenp, shade, mli
This commit is contained in:
Kim Barrett 2024-09-19 21:06:46 +00:00
parent fde8508379
commit 296b49634e
5 changed files with 11 additions and 13 deletions

View File

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

View File

@ -2967,7 +2967,7 @@ void MacroAssembler::verify_heapbase(const char* msg) {
if (CheckCompressedOops) {
Label ok;
push(1 << rscratch1->encoding(), sp); // cmpptr trashes rscratch1
cmpptr(rheapbase, ExternalAddress(CompressedOops::ptrs_base_addr()));
cmpptr(rheapbase, ExternalAddress(CompressedOops::base_addr()));
br(Assembler::EQ, ok);
stop(msg);
bind(ok);
@ -3133,9 +3133,9 @@ void MacroAssembler::reinit_heapbase()
{
if (UseCompressedOops) {
if (Universe::is_fully_initialized()) {
mov(rheapbase, CompressedOops::ptrs_base());
mov(rheapbase, CompressedOops::base());
} else {
lea(rheapbase, ExternalAddress(CompressedOops::ptrs_base_addr()));
lea(rheapbase, ExternalAddress(CompressedOops::base_addr()));
ldr(rheapbase, Address(rheapbase));
}
}

View File

@ -1970,9 +1970,9 @@ int MacroAssembler::patch_oop(address insn_addr, address o) {
void MacroAssembler::reinit_heapbase() {
if (UseCompressedOops) {
if (Universe::is_fully_initialized()) {
mv(xheapbase, CompressedOops::ptrs_base());
mv(xheapbase, CompressedOops::base());
} else {
ExternalAddress target(CompressedOops::ptrs_base_addr());
ExternalAddress target(CompressedOops::base_addr());
relocate(target.rspec(), [&] {
int32_t offset;
la(xheapbase, target.target(), offset);

View File

@ -5756,7 +5756,7 @@ void MacroAssembler::verify_heapbase(const char* msg) {
assert (Universe::heap() != nullptr, "java heap should be initialized");
if (CheckCompressedOops) {
Label ok;
ExternalAddress src2(CompressedOops::ptrs_base_addr());
ExternalAddress src2(CompressedOops::base_addr());
const bool is_src2_reachable = reachable(src2);
if (!is_src2_reachable) {
push(rscratch1); // cmpptr trashes rscratch1
@ -6047,10 +6047,10 @@ void MacroAssembler::reinit_heapbase() {
if (CompressedOops::base() == nullptr) {
MacroAssembler::xorptr(r12_heapbase, r12_heapbase);
} else {
mov64(r12_heapbase, (int64_t)CompressedOops::ptrs_base());
mov64(r12_heapbase, (int64_t)CompressedOops::base());
}
} else {
movptr(r12_heapbase, ExternalAddress(CompressedOops::ptrs_base_addr()));
movptr(r12_heapbase, ExternalAddress(CompressedOops::base_addr()));
}
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -88,15 +88,13 @@ public:
static void set_use_implicit_null_checks(bool use);
static address base() { return _narrow_oop._base; }
static address base_addr() { return (address)&_narrow_oop._base; }
static address begin() { return (address)_heap_address_range.start(); }
static address end() { return (address)_heap_address_range.end(); }
static bool is_base(void* addr) { return (base() == (address)addr); }
static int shift() { return _narrow_oop._shift; }
static bool use_implicit_null_checks() { return _narrow_oop._use_implicit_null_checks; }
static address ptrs_base_addr() { return (address)&_narrow_oop._base; }
static address ptrs_base() { return _narrow_oop._base; }
static bool is_in(void* addr);
static bool is_in(MemRegion mr);