From 1cefb30382a9061689e62ab4e48ad32e4a29aa2b Mon Sep 17 00:00:00 2001 From: tstuefe Date: Mon, 17 Nov 2025 11:40:54 +0100 Subject: [PATCH] Fixes, intermediate --- src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp | 17 ----------------- src/hotspot/share/cds/filemap.cpp | 3 ++- src/hotspot/share/code/aotCodeCache.cpp | 7 ------- src/hotspot/share/code/aotCodeCache.hpp | 11 +++++------ src/hotspot/share/code/compiledIC.cpp | 13 ++----------- test/hotspot/gtest/oops/test_objArrayOop.cpp | 2 +- 6 files changed, 10 insertions(+), 43 deletions(-) diff --git a/src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp b/src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp index b14fe32757e..0b370e1631f 100644 --- a/src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp +++ b/src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp @@ -76,23 +76,6 @@ const Register SHIFT_count = rcx; // where count for shift operations must be #define __ _masm-> - -static void select_different_registers(Register preserve, - Register extra, - Register &tmp1, - Register &tmp2) { - if (tmp1 == preserve) { - assert_different_registers(tmp1, tmp2, extra); - tmp1 = extra; - } else if (tmp2 == preserve) { - assert_different_registers(tmp1, tmp2, extra); - tmp2 = extra; - } - assert_different_registers(preserve, tmp1, tmp2); -} - - - static void select_different_registers(Register preserve, Register extra, Register &tmp1, diff --git a/src/hotspot/share/cds/filemap.cpp b/src/hotspot/share/cds/filemap.cpp index d06b9cab4ea..8269270ccfe 100644 --- a/src/hotspot/share/cds/filemap.cpp +++ b/src/hotspot/share/cds/filemap.cpp @@ -1907,7 +1907,8 @@ bool FileMapHeader::validate() { file_type, compressed_oops(), compact_headers()); if (compressed_oops() != UseCompressedOops) { aot_log_warning(aot)("Unable to use %s.\nThe saved state of UseCompressedOops (%d) is " - "different from runtime (%d), CDS will be disabled.", compressed_oops(), UseCompressedOops, file_type); + "different from runtime (%d), CDS will be disabled.", file_type, + compressed_oops(), UseCompressedOops); return false; } diff --git a/src/hotspot/share/code/aotCodeCache.cpp b/src/hotspot/share/code/aotCodeCache.cpp index e678c1d51ea..bd92ecac53f 100644 --- a/src/hotspot/share/code/aotCodeCache.cpp +++ b/src/hotspot/share/code/aotCodeCache.cpp @@ -407,9 +407,6 @@ void AOTCodeCache::Config::record() { if (UseCompressedOops) { _flags |= compressedOops; } - if (USE_COMPRESSED_CLASS_POINTERS_ALWAYS_TRUE) { - _flags |= compressedClassPointers; - } if (UseTLAB) { _flags |= useTLAB; } @@ -452,10 +449,6 @@ bool AOTCodeCache::Config::verify() const { return false; } - if (((_flags & compressedClassPointers) != 0) != USE_COMPRESSED_CLASS_POINTERS_ALWAYS_TRUE) { - log_debug(aot, codecache, init)("AOT Code Cache disabled: it was created with USE_COMPRESSED_CLASS_POINTERS_ALWAYS_TRUE = %s", USE_COMPRESSED_CLASS_POINTERS_ALWAYS_TRUE ? "false" : "true"); - return false; - } if (_compressedKlassShift != (uint)CompressedKlassPointers::shift()) { log_debug(aot, codecache, init)("AOT Code Cache disabled: it was created with CompressedKlassPointers::shift() = %d vs current %d", _compressedKlassShift, CompressedKlassPointers::shift()); return false; diff --git a/src/hotspot/share/code/aotCodeCache.hpp b/src/hotspot/share/code/aotCodeCache.hpp index 778ad34e448..1217dabd8bf 100644 --- a/src/hotspot/share/code/aotCodeCache.hpp +++ b/src/hotspot/share/code/aotCodeCache.hpp @@ -177,12 +177,11 @@ protected: none = 0, debugVM = 1, compressedOops = 2, - compressedClassPointers = 4, - useTLAB = 8, - systemClassAssertions = 16, - userClassAssertions = 32, - enableContendedPadding = 64, - restrictContendedPadding = 128 + useTLAB = 4, + systemClassAssertions = 8, + userClassAssertions = 16, + enableContendedPadding = 32, + restrictContendedPadding = 64 }; uint _flags; diff --git a/src/hotspot/share/code/compiledIC.cpp b/src/hotspot/share/code/compiledIC.cpp index 90f30808562..68544097ef3 100644 --- a/src/hotspot/share/code/compiledIC.cpp +++ b/src/hotspot/share/code/compiledIC.cpp @@ -76,11 +76,7 @@ CompiledICData::CompiledICData() // Inline cache callsite info is initialized once the first time it is resolved void CompiledICData::initialize(CallInfo* call_info, Klass* receiver_klass) { _speculated_method = call_info->selected_method(); - if (USE_COMPRESSED_CLASS_POINTERS_ALWAYS_TRUE) { - _speculated_klass = (uintptr_t)CompressedKlassPointers::encode_not_null(receiver_klass); - } else { - _speculated_klass = (uintptr_t)receiver_klass; - } + _speculated_klass = (uintptr_t)CompressedKlassPointers::encode_not_null(receiver_klass); if (call_info->call_kind() == CallInfo::itable_call) { assert(call_info->resolved_method() != nullptr, "virtual or interface method must be found"); _itable_defc_klass = call_info->resolved_method()->method_holder(); @@ -133,12 +129,7 @@ Klass* CompiledICData::speculated_klass() const { if (is_speculated_klass_unloaded()) { return nullptr; } - - if (USE_COMPRESSED_CLASS_POINTERS_ALWAYS_TRUE) { - return CompressedKlassPointers::decode_not_null((narrowKlass)_speculated_klass); - } else { - return (Klass*)_speculated_klass; - } + return CompressedKlassPointers::decode_not_null((narrowKlass)_speculated_klass); } //----------------------------------------------------------------------------- diff --git a/test/hotspot/gtest/oops/test_objArrayOop.cpp b/test/hotspot/gtest/oops/test_objArrayOop.cpp index ef45c4ca200..f6a53a3031f 100644 --- a/test/hotspot/gtest/oops/test_objArrayOop.cpp +++ b/test/hotspot/gtest/oops/test_objArrayOop.cpp @@ -46,7 +46,7 @@ TEST_VM(objArrayOop, osize) { #else { 8, false, false, 4 }, // 12 byte header, 4 byte oops, wordsize 4 #endif - { -1, false, false, false, -1 } + { -1, false, false, -1 } }; for (int i = 0; x[i].result != -1; i++) { if (x[i].objal == (int)ObjectAlignmentInBytes && x[i].coops == UseCompressedOops &&