RFR: 8329032: C2 compiler register allocation support for APX EGPRs [v6]
Jatin Bhateja
jbhateja at openjdk.org
Wed Jun 19 06:34:17 UTC 2024
On Tue, 18 Jun 2024 17:07:27 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:
>> Jatin Bhateja has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 14 commits:
>>
>> - Merge branch 'master' of http://github.com/openjdk/jdk into JDK-8329032
>> - 32-bit build fix.
>> - Review comments resolutions.
>> - jvmci test failures fixes
>> - 32-bit build fixes.
>> - Merge branch 'master' of http://github.com/openjdk/jdk into JDK-8329032
>> - Changes to skip over stack alignment gaps while popping registers using POP2 after comment from sviswa7
>> - 32 bit build fix and enforced stack alignment constraints.
>> - Support new PUSH2/POP2 instructions along with Push-Pop Acceleration (PPX) to optimize register save/restore operation.
>> - Merge branch 'master' of http://github.com/openjdk/jdk into JDK-8329032
>> - ... and 4 more: https://git.openjdk.org/jdk/compare/6f860f8f...8db22672
>
> src/hotspot/cpu/x86/assembler_x86.cpp line 14315:
>
>> 14313: push2p(rbx, rdx);
>> 14314: // To maintain 16 byte alignment after rcx is pushed.
>> 14315: subq(rsp, 8);
>
> Just curious, why do we need to maintain 16 byte alignment here? It looks to me that the subq(rsp, 8) is not required here. The next push is not a push2.
Its a safety padding inserted to ensure 16 byte stack alignment constraints are preserved for subsequent consumers of stack after pusha.
> src/hotspot/cpu/x86/assembler_x86.cpp line 14327:
>
>> 14325: // from the value of rsp immediately after pusha (rsp + 16 * wordSize).
>> 14326: // FIXME: For APX any such direct access should also consider EGPR size
>> 14327: // during address compution.
>
> This comment could be removed.
Its added in context of above comment which talks about computing the original RSP prior to pushing GPRs state on stack.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19042#discussion_r1645481972
PR Review Comment: https://git.openjdk.org/jdk/pull/19042#discussion_r1645482023
More information about the hotspot-dev
mailing list