This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
optimal encoding of SIMD insns
- From: "Jan Beulich" <JBeulich at suse dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: <binutils at sourceware dot org>
- Date: Mon, 20 Nov 2017 05:08:16 -0700
- Subject: optimal encoding of SIMD insns
- Authentication-results: sourceware.org; auth=none
H.J.,
one more sub-optimal thing I've come across, int the context of my
analysis of whether Vec_Disp8 really is fully redundant with
DispMemShift: Certain instructions, for example
vaddps xmm0, xmm0, [eax+0x80]
are encodable with both VEX and EVEX. Generally the assembler
tries to pick the shortest encoding. Obviously the VEX encoding,
due to requiring the Disp32 ModR/M form, is longer than the
EVEX one in the specific example above. Clearly such a
conversion can't be done unilaterally, as that could break code
assuming to be run on AVX-512-incapable hardware. However,
does anything speak against doing so after having seen a
command line option or directive explicitly enabling AVX-512
insns? Or should this instead be made even more explicit, by
introducing something paralleling the automatic SSE->AVX
conversion?
Jan