RFR: 8351159: Remaining cleanups in cpu/x86 after 32-bit x86 removal

Stefan Karlsson stefank at openjdk.org
Mon Oct 27 09:19:14 UTC 2025


On Sat, 25 Oct 2025 07:06:49 GMT, Anton Seoane Ampudia <aseoane at openjdk.org> wrote:

> This PR carries out cleanup on the `cpu` and `os_cpu` directories after the removal of the 32-bit x86 architecture from HotSpot.
> 
> Mainly, code guarded by `IA32` or `X32`, or `!AMD64` or `!LP64` in a x86 context, has been removed. These guards are now redundant (e.g. checking for 64bit on a x86 context) or the code blocks never executed (e.g. code under `#ifdef X32`). Additionally, x86 AD files have been merged.
> 
> Please note that this changeset limits itself to changes under `cpu/x86` and `os_cpu/x86`. Other cleanups are filed under a different RFE, and consequently addressed in a different PR: [JDK-8351149](https://github.com/openjdk/jdk/pull/27990).
> 
> **Testing:** passes tiers 1-5

I've looked through all files except the .ad files.

src/hotspot/cpu/x86/c2_globals_x86.hpp line 49:

> 47: define_pd_global(intx, LoopPercentProfileLimit,      10);
> 48: define_pd_global(intx,  InteriorEntryAlignment,      16);
> 49: define_pd_global(size_t, NewSizeThreadIncrease,      ScaleForWordSize(4*K));

FWIW, I think the comment previously only applied to MaxRAM but now it sounds like it is meant for both:

// Ergonomics related flags
define_pd_global(uint64_t, MaxRAM,                   128ULL*G);
define_pd_global(intx, RegisterCostAreaRatio,        16000);

Is it meant for both?

src/hotspot/cpu/x86/frame_x86.cpp line 573:

> 571:     case T_LONG    : value_result->j = *(jlong*)tos_addr; break;
> 572:     case T_FLOAT   : {
> 573: #ifdef AMD64

The T_FLOAT case could look like the surrounding cases now.

src/hotspot/cpu/x86/frame_x86.hpp line 83:

> 81: 
> 82:     // Entry frames
> 83: #ifdef AMD64

Did you consider if `_WIN64` could be replaced with _WINDOWS?

src/hotspot/os_cpu/bsd_x86/atomicAccess_bsd_x86.hpp line 138:

> 136: }
> 137: 
> 138: #else // !AMD64

Could you collapse this into one blank line?

src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp line 398:

> 396:           stub = SharedRuntime::handle_unsafe_access(thread, next_pc);
> 397:         }
> 398:       } else if (sig == SIGFPE &&

Could you double-check that the alignment looks good after this change?

src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp line 273:

> 271:           stub = SharedRuntime::handle_unsafe_access(thread, next_pc);
> 272:         }
> 273:       } else if (sig == SIGFPE &&

Check alignment.

src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp line 163:

> 161: }
> 162: 
> 163: #if defined(_WINDOWS)

Do we really need to check for `_WINDOWS` in a windows file?

-------------

Changes requested by stefank (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/27987#pullrequestreview-3382371099
PR Review Comment: https://git.openjdk.org/jdk/pull/27987#discussion_r2464848908
PR Review Comment: https://git.openjdk.org/jdk/pull/27987#discussion_r2464858426
PR Review Comment: https://git.openjdk.org/jdk/pull/27987#discussion_r2464889037
PR Review Comment: https://git.openjdk.org/jdk/pull/27987#discussion_r2464903736
PR Review Comment: https://git.openjdk.org/jdk/pull/27987#discussion_r2464908631
PR Review Comment: https://git.openjdk.org/jdk/pull/27987#discussion_r2464913129
PR Review Comment: https://git.openjdk.org/jdk/pull/27987#discussion_r2464917394


More information about the hotspot-dev mailing list