Bug 25622 - [2.35 Regression] Warning: no instruction mnemonic suffix given and no register operands; using default for `cvtsi2sd'
Summary: [2.35 Regression] Warning: no instruction mnemonic suffix given and no regist...
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.35
: P2 normal
Target Milestone: 2.35
Assignee: H.J. Lu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-03 03:02 UTC by H.J. Lu
Modified: 2020-03-03 15:49 UTC (History)
1 user (show)

See Also:
Host:
Target: i386,x86-64
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2020-03-03 03:02:12 UTC
Suffix warning caused many test failures on GCC 8 branch, like

FAIL: gcc.dg/compat/struct-by-value-10 c_compat_y_tst.o compile

with

Warning: no instruction mnemonic suffix given and no register operands; using default for `cvtsi2sd'
Comment 1 H.J. Lu 2020-03-03 03:05:00 UTC
Many regressions in

https://gcc.gnu.org/ml/gcc-regression/2020-03/msg00008.html

are due to this bug.
Comment 2 H.J. Lu 2020-03-03 03:15:04 UTC
At least, I saw

Warning: no instruction mnemonic suffix given and no register operands; using default for `cvtsi2sd'
Warning: no instruction mnemonic suffix given and no register operands; using default for `cvtsi2ss'
Warning: no instruction mnemonic suffix given and no register operands; using default for `vcvtsi2sd'
Warning: no instruction mnemonic suffix given and no register operands; using default for `vcvtsi2ss'
Comment 3 Jan Beulich 2020-03-03 08:46:50 UTC
Well, that's not a regression at all, but intended behavior. The requirement you had put up was that gcc be fixed before the changes goes into gas. This did happen. If new gas is to be used with old gcc, the respective fix(es) will need backporting _there_.
Comment 4 H.J. Lu 2020-03-03 11:20:44 UTC
(In reply to Jan Beulich from comment #3)
> Well, that's not a regression at all, but intended behavior. The requirement
> you had put up was that gcc be fixed before the changes goes into gas. This
> did happen. If new gas is to be used with old gcc, the respective fix(es)
> will need backporting _there_.

No, there is not now how gas works.  I will fix it.
Comment 5 Sourceware Commits 2020-03-03 15:44:59 UTC
The master branch has been updated by H.J. Lu <hjl@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=10d97a0f99079325bf85e17cc741496e686a6b74

commit 10d97a0f99079325bf85e17cc741496e686a6b74
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Mar 3 07:39:18 2020 -0800

    x86: Allow integer conversion without suffix in AT&T syntax
    
    According to gas manual, suffix in instruction mnemonics isn't always
    required:
    
    When there is no sizing suffix and no (suitable) register operands to
    deduce the size of memory operands, with a few exceptions and where long
    operand size is possible in the first place, operand size will default
    to long in 32- and 64-bit modes.
    
    This includes cvtsi2sd, cvtsi2ss, vcvtsi2sd, vcvtsi2ss, vcvtusi2sd and
    vcvtusi2ss.  Since they are used in GCC 8 and older GCC releases, they
    must be allowed without suffix in AT&T syntax.
    
    gas/
    
    	PR gas/25622
    	* testsuite/gas/i386/i386.exp: Run x86-64-default-suffix and
    	x86-64-default-suffix-avx.
    	* testsuite/gas/i386/noreg64.s: Remove cvtsi2sd, cvtsi2ss,
    	vcvtsi2sd, vcvtsi2ss, vcvtusi2sd and vcvtusi2ss entries.
    	* testsuite/gas/i386/noreg64.d: Updated.
    	* testsuite/gas/i386/noreg64.l: Likewise.
    	* testsuite/gas/i386/x86-64-default-suffix-avx.d: New file.
    	* testsuite/gas/i386/x86-64-default-suffix.d: Likewise.
    	* testsuite/gas/i386/x86-64-default-suffix.s: Likewise.
    
    opcodes/
    
    	PR gas/25622
    	* i386-opc.tbl: Add IgnoreSize to cvtsi2sd, cvtsi2ss, vcvtsi2sd,
    	vcvtsi2ss, vcvtusi2sd and vcvtusi2ss for AT&T syntax.
    	* i386-tbl.h: Regenerated.
Comment 6 H.J. Lu 2020-03-03 15:49:04 UTC
Fixed for 2.35.