RFR: 8339790: Support Intel APX setzucc instruction [v3]

Vladimir Kozlov kvn at openjdk.org
Fri Sep 13 17:32:10 UTC 2024


On Fri, 13 Sep 2024 07:52:38 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> - Support APX variant of SETcc, which supports zero-upper semantics (full register writer). Sets the destination operand to 0 or 1 depending on the settings of the status flags (CF, SF, OF, ZF, and PF) in the EFLAGS register. The destination operand points to a byte register or a byte in memory. The
>> condition code suffix (cc) indicates the condition being tested for. Additionally, if ND = 1 and the destination is a GPR, then also set the upper 56 bits of the GPR to 0.
>> - This saves emitting an explicit MOVZX instruction after setCC.
>> - These new instructions are encoded using 4 byte Extended EVEX encoding.
>> 
>> Validation performed over stand alone test point using Intel SDE.
>> 
>> Best Regards,
>> Jatin
>
> Jatin Bhateja has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits:
> 
>  - Review comments resolution.
>  - Merge branch 'master' of http://github.com/openjdk/jdk into JDK-8339790
>  - Review resolutions.
>  - 8339790: Support Intel APX setzucc instruction.

Just one comment

src/hotspot/cpu/x86/gc/x/x_x86_64.ad line 129:

> 127:   format %{ "lock\n\t"
> 128:             "cmpxchgq $newval, $mem\n\t"
> 129:             "sete_with_zextl  $res\n\t" %}

Please, use `setcc` in format to match `ins_encode`.  `sete_with_zextl` isused only when it is supported.

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

PR Review: https://git.openjdk.org/jdk/pull/20920#pullrequestreview-2303690290
PR Review Comment: https://git.openjdk.org/jdk/pull/20920#discussion_r1759235416


More information about the hotspot-dev mailing list