Bug 19005 - [3.4 regression] Error: bad register name `%sil'
Summary: [3.4 regression] Error: bad register name `%sil'
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.4.4
: P2 critical
Target Milestone: 3.4.4
Assignee: Richard Henderson
URL:
Keywords: wrong-code
: 19026 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-12-15 10:58 UTC by Debian GCC Maintainers
Modified: 2005-07-23 22:49 UTC (History)
2 users (show)

See Also:
Host: i486-linux
Target: i486-linux
Build: i486-linux
Known to work: 3.3.5 3.4.0
Known to fail: 3.4.4
Last reconfirmed:


Attachments
preprocessed source (3.58 KB, application/x-gzip)
2004-12-15 10:58 UTC, Debian GCC Maintainers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Debian GCC Maintainers 2004-12-15 10:58:15 UTC
[forwarded from http://bugs.debian.org/285695]

works with 3.3 CVS 20041215, HEAD 200401212, fails with 3.4 CVS 20041215,
binutils-2.15.

$ gcc -O foo.c
/tmp/cc68I7Tr.s: Assembler messages:
/tmp/cc68I7Tr.s:26: Error: bad register name `%sil'


#include <stdio.h>

int main( int nb, char *argv[] )
{
  unsigned char a = nb, b = nb + 1;

  printf("a = %d - b = %d\n", a, b);
  a ^= b; b ^= a; a ^= b;
  printf("a = %d - b = %d\n", a, b);
  return 0;
}
Comment 1 Debian GCC Maintainers 2004-12-15 10:58:58 UTC
Created attachment 7746 [details]
preprocessed source
Comment 2 Wolfgang Bangerth 2004-12-15 14:10:06 UTC
I can't reproduce this. Can you post the exact output of gcc -v? 
Thanks 
 Wolfgang 
Comment 3 Andrew Pinski 2004-12-16 00:10:17 UTC
*** Bug 19026 has been marked as a duplicate of this bug. ***
Comment 4 Guillaume Knispel 2004-12-16 00:31:09 UTC
I could reproduce this bug with :

Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)

Other people reported (https://linuxfr.org/forums/31/5533.html) they could
reproduce with :
gcc (GCC) 3.4.3 (Mandrakelinux 10.2 3.4.3-1mdk)
gcc (GCC) 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk)
Comment 5 Richard Henderson 2004-12-16 00:46:54 UTC
Confirmed.
Comment 6 GCC Commits 2004-12-16 01:51:49 UTC
Subject: Bug 19005

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	rth@gcc.gnu.org	2004-12-16 01:51:32

Modified files:
	gcc            : ChangeLog 
	gcc/config/i386: i386.md 

Log message:
	PR target/19005
	* config/i386/i386.md (swaphi_1): Swap with swaphi_2, allow with
	optimize_size.
	(swapqi_1): Rename from swapqi.  Enable only for no partial reg
	stall and optimize_size.
	(swapqi_2): New.
	(swaphi_1, swaphi_2, swapqi_1): Add athlon_decode.
	(swapsi, swaphi_1, swaphi_2, swapqi_1, swapdi): Remove modrm override.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.740&r2=2.2326.2.741
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.md.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.502.2.12&r2=1.502.2.13

Comment 7 GCC Commits 2004-12-16 09:31:32 UTC
Subject: Bug 19005

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	rth@gcc.gnu.org	2004-12-16 09:31:18

Modified files:
	gcc            : ChangeLog 
	gcc/config/i386: i386.md 

Log message:
	PR target/19005
	* config/i386/i386.md (swaphi_1): Swap with swaphi_2, allow with
	optimize_size.
	(swapqi_1): Rename from swapqi.  Enable only for no partial reg
	stall and optimize_size.
	(swapqi_2): New.
	(swaphi_1, swaphi_2, swapqi_1): Add athlon_decode.
	(swapsi, swaphi_1, swaphi_2, swapqi_1, swapdi): Remove modrm override.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.1039&r2=1.16114.2.1040
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.md.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.404.2.27&r2=1.404.2.28

Comment 8 Richard Henderson 2004-12-16 09:37:01 UTC
Fixed.
Comment 9 GCC Commits 2004-12-16 09:40:40 UTC
Subject: Bug 19005

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rth@gcc.gnu.org	2004-12-16 09:40:35

Modified files:
	gcc            : ChangeLog 
	gcc/config/i386: i386.md 

Log message:
	PR target/19005
	* config/i386/i386.md (swaphi_1): Swap with swaphi_2, allow with
	optimize_size.
	(swapqi_1): Rename from swapqi.  Enable only for no partial reg
	stall and optimize_size.
	(swapqi_2): New.
	(swaphi_1, swaphi_2, swapqi_1): Add athlon_decode.
	(swapsi, swaphi_1, swaphi_2, swapqi_1, swapdi): Remove modrm override.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6851&r2=2.6852
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.md.diff?cvsroot=gcc&r1=1.579&r2=1.580

Comment 10 GCC Commits 2005-07-08 14:21:04 UTC
Subject: Bug 19005

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-rhl-branch
Changes by:	jakub@gcc.gnu.org	2005-07-08 14:20:28

Modified files:
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/execute: pr19005.c 

Log message:
	PR target/19005
	* gcc.c-torture/execute/pr19005.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-rhl-branch&r1=1.5084.2.9.2.38&r2=1.5084.2.9.2.39
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/pr19005.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-rhl-branch&r1=NONE&r2=1.1.2.1

Comment 11 Jakub Jelinek 2005-12-08 21:49:21 UTC
Subject: Bug 19005

Author: jakub
Date: Thu Dec  8 21:49:17 2005
New Revision: 108246

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108246
Log:
	PR target/19005
	* gcc.c-torture/execute/pr19005.c: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/execute/pr19005.c
Modified:
    trunk/gcc/testsuite/ChangeLog

Comment 12 Jakub Jelinek 2005-12-08 21:54:39 UTC
Subject: Bug 19005

Author: jakub
Date: Thu Dec  8 21:54:34 2005
New Revision: 108252

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108252
Log:
	PR target/19005
	* gcc.c-torture/execute/pr19005.c: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/gcc.c-torture/execute/pr19005.c
Modified:
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog