RFR: 8339790: Support Intel APX setzucc instruction [v3]
Vladimir Kozlov
kvn at openjdk.org
Fri Sep 13 19:40:05 UTC 2024
On Fri, 13 Sep 2024 19:20:07 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>> 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.
>
> Hi @vnkozlov ,
> setcc used in inst_encoding block is a macro assembly routine which emits either setcc + movzbl or setzucc for APX supported targets, I wanted to use one opto instruction to correctly depict semantics of both the cases.
Yes, I see `setcc` definition and using it in `format` is fine since it will match to `inst_encoding`.
On other hand, there is no macro or assembler instruction `sete_with_zextl` and it will be confusing.
If you want you can add comment to format (and you should not use `\n` in last line):
"setcc $res\t# emits sete + movzbl or setzucc for APX" %}
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20920#discussion_r1759397114
More information about the hotspot-compiler-dev
mailing list