RFR: 8328998: Encoding support for Intel APX extended general-purpose registers [v26]
Steve Dohrmann
duke at openjdk.org
Wed May 22 00:30:09 UTC 2024
On Tue, 21 May 2024 23:19:04 GMT, Steve Dohrmann <duke at openjdk.org> wrote:
>> src/hotspot/cpu/x86/assembler_x86.cpp line 6397:
>>
>>> 6395:
>>> 6396: void Assembler::stmxcsr(Address dst) {
>>> 6397: if (UseAVX > 0 && !UseAPX ) {
>>
>> New ` && !UseAPX` check is strange here. If `UseAPX` is `true` we will execute `} else {` part of code which was executed only for SSE (UseAVX == 0) before. Is this intentional? This needs comment explaining why we do that if it is intentional.
>>
>> I see in other place you have `adr.base_needs_rex2() || adr.index_needs_rex2()` check. Do we need it here too?
>
> The !UseAPX test was added because if UseAPX is enabled we want to support extended register use via rex2 encoding in the else clause. The existing vex encoding remains when UseAPX is not enabled. There is a needs_rex2 check of address registers in the call to ::vex_prefix, asserting if UseAPX not enabled.
I added a comment on this to the stmxcsr/ldmxcsr functions.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18476#discussion_r1609066816
More information about the hotspot-compiler-dev
mailing list