RFR: 8359965: Enable paired pushp and popp instruction usage for APX enabled CPUs [v2]

Volodymyr Paprotski vpaprotski at openjdk.org
Mon Jul 14 17:56:42 UTC 2025


On Mon, 14 Jul 2025 17:27:35 GMT, Srinivas Vamsi Parasa <sparasa at openjdk.org> wrote:

>> src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp line 114:
>> 
>>> 112:         __ paired_push(rax);
>>> 113:       }
>>> 114:       __ paired_push(rcx);
>> 
>> Hi @vamsi-parasa , for consecutive push/pop we can use push2/pop2 and 16byte alignment can be  guaranteed using following technique 
>> https://github.com/openjdk/jdk/pull/25351/files#diff-d5d721ebf93346ba66e81257e4f6c5e6268d59774313c61e97353c0dfbf686a5R94
>
> Hi Jatin (@jatin-bhateja), for the first iteration, would it be ok to get the push_paired/pop_paired changes integrated and then make the push2p/pop2p related optimizations in a separate PR?
> 
> Thanks,
> Vamsi

I like the current approach, unless we can come up with a very 'visually-low-overhead' way of adding extra alignment (i.e. this current change is across quite a few files, rather not complicate it). At most, perhaps something like `MacroAssembler::push_align()/MacroAssembler::pop_align()`, but I really rather not add more to this PR; It touches quite a few places so I like it being simpler.

As it stands, if nothing else, its clear from the `if` statement that existing path is left unmodified.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25889#discussion_r2205494234


More information about the hotspot-dev mailing list