]> git.ipfire.org Git - thirdparty/gcc.git/commit
x86-64: {,V}CVT{,U}SI2Sx are ambiguous without suffix
authorjbeulich <jbeulich@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 11 Jan 2019 11:20:40 +0000 (11:20 +0000)
committerjbeulich <jbeulich@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 11 Jan 2019 11:20:40 +0000 (11:20 +0000)
commit202e74d01c97145cdbf2b624d3096cec2fcfc5fb
tree0151aeb9024ef21eaa45c032e2093a2f051d29b2
parentbeb370cb93c1a61fd03deb90681b8d042b102507
x86-64: {,V}CVT{,U}SI2Sx are ambiguous without suffix

For 64-bit these should not be emitted without suffix in AT&T mode (as
being ambiguous that way); the suffixes are benign for 32-bit. For
consistency also omit the suffix in Intel mode for {,V}CVTSI2SxQ.

The omission has originally (prior to rev 260691) lead to wrong code
being generated for the 64-bit unsigned-to-float/double conversions (as
gas guesses an L suffix instead of the required Q one when the operand
is in memory). In all remaining cases (being changed here) the omission
would "just" lead to warnings with future gas versions.

As a result, arrange to check for the L suffixes in 32-bit test cases.

In order for related test cases to actually test what they're supposed
to test, add (seemingly unrelated) a few empty "asm volatile()".
Presumably there are more where constant propagation voids the intended
effect of the tests, but these are ones helping make sure the assembler
actually still assembles correctly the output after the changes here.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@267833 138bc75d-0d04-0410-961f-82ee72b054a4
16 files changed:
gcc/ChangeLog
gcc/config/i386/i386.md
gcc/config/i386/sse.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2si-1.c
gcc/testsuite/gcc.target/i386/avx512f-vcvtsi2ss-1.c
gcc/testsuite/gcc.target/i386/avx512f-vcvtss2si-1.c
gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2si-1.c
gcc/testsuite/gcc.target/i386/avx512f-vcvttss2si-1.c
gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd-1.c
gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd-2.c
gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd64-2.c
gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss-1.c
gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss-2.c
gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss64-2.c
gcc/testsuite/gcc.target/i386/pr19398.c