[PATCH] x86/APX: Don't promote AVX512 instructions out of APX spec
H.J. Lu
hjl.tools@gmail.com
Mon Sep 16 06:32:01 GMT 2024
On Mon, Sep 16, 2024 at 2:01 PM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 16.09.2024 01:38, H.J. Lu wrote:
> > V{BROADCAST,EXTRACT,INSERT}{F,I}128 and VROUND{P,S}{S,D} aren't promoted
> > to support EGPR in APX spec. Don't promote them out of APX spec.
>
> As previously indicated - I disagree with outright removal. If you want
> to have a strict mode, which compilers may want to enable, that's fine.
There is no need to allow them.
> For hand-written assembly (possibly including inline assembly, yet there
Adding them doesn't solve the inline assembly issue. By default, GCC
doesn't allow EGPR in asm statements. This option is needed to enable
EGPR in asm statements:
‘-mapx-inline-asm-use-gpr32’
For inline asm support with APX, by default the EGPR feature was
disabled to prevent potential illegal instruction with EGPR occurs.
To invoke egpr usage in inline asm, use new compiler option
-mapx-inline-asm-use-gpr32 and user should ensure the instruction
supports EGPR.
> are sharp edges there) we ought to aid programmers. We aren't obliged
> to follow the spec to the letter, especially when the spec itself can be
A spec is a spec even though you don't agreed with it. We should follow
the APX spec.
> considered questionable, as to not properly promoting all existing
> insns (which surely would have been possible from a purely technical
> perspective).
>
> As an aside,
> - such a commit imo likely would want to mention the commits it
> (effectively) reverts (the need for which will disappear when the
> effect is limited to said "strict" mode),
I will update the commit message with
V{BROADCAST,EXTRACT,INSERT}{F,I}128 and VROUND{P,S}{S,D} aren't promoted
to support EGPR in APX spec. Don't promote them out of APX spec. This
commit effectively reverted:
ec3babb8c10 x86/APX: V{BROADCAST,EXTRACT,INSERT}{F,I}128 can also be expressed
5a635f1f59a x86/APX: VROUND{P,S}{S,D} encodings require AVX512{F,VL}
eea4357967b x86/APX: VROUND{P,S}{S,D} can generally be encoded
> - I'm struggling with the purpose of the additions to the
> x86-64-apx-egpr-inval testcase, with the use of ".arch default"
> there.
There are
.arch default
.arch .noapx_f
a few lines before. ".arch default" restores the default.
--
H.J.
More information about the Binutils
mailing list