This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c/2308: x86_64 opcode generated for i686
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c/2308: x86_64 opcode generated for i686
- From: drepper at redhat dot com
- Date: 17 Mar 2001 06:30:29 -0000
- Reply-To: drepper at redhat dot com
>Number: 2308
>Category: c
>Synopsis: x86_64 opcode generated for i686
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Mar 16 22:36:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Ulrich Drepper
>Release: gcc version 3.1 20010316 (experimental)
>Organization:
>Environment:
Linux/x86
>Description:
Compiling the attached file with
gcc -c -O2 ffsll.i
with today's (2000-3-16) gcc leads to the message
/tmp/ccdIDgSe.s:26: Error: suffix or operands invalid for `bsf'
/tmp/ccdIDgSe.s:43: Error: suffix or operands invalid for `bsf'
What happens is that the registers in the asm statements are substituted inccorectly:
bsfl %rsi,%ebx
This seems to be the syntax for the extended x86_64 registers but of course is very wrong on i686.
>How-To-Repeat:
Compile attached file with
gcc -c -O2 ffsll.i
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="ffsll.i"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="ffsll.i"
aW50CmZmc2xsIChsb25nIGxvbmcgaW50IGkpCnsKICB1bnNpZ25lZCBsb25nIGxvbmcgaW50IHgg
PSBpICYgLWk7CiAgaWYgKHggPD0gMHhmZmZmZmZmZikKICAgIHJldHVybiAoX19idWlsdGluX2Nv
bnN0YW50X3AgKGkpID8gX19idWlsdGluX2ZmcyAoaSkgOiAoeyBpbnQgX19jbnQsIF9fdG1wOyBf
X2FzbV9fIF9fdm9sYXRpbGVfXyAoImJzZmwgJTIsJTBcblx0IiAiY21vdmVsICUxLCUwIiA6ICI9
JnIiIChfX2NudCksICI9ciIgKF9fdG1wKSA6ICJybSIgKGkpLCAiMSIgKC0xKSk7IF9fY250ICsg
MTsgfSkpOwogIGVsc2UKICAgIHJldHVybiAzMiArIChfX2J1aWx0aW5fY29uc3RhbnRfcCAoaSA+
PiAzMikgPyBfX2J1aWx0aW5fZmZzIChpID4+IDMyKSA6ICh7IGludCBfX2NudCwgX190bXA7IF9f
YXNtX18gX192b2xhdGlsZV9fICgiYnNmbCAlMiwlMFxuXHQiICJjbW92ZWwgJTEsJTAiIDogIj0m
ciIgKF9fY250KSwgIj1yIiAoX190bXApIDogInJtIiAoaSA+PiAzMiksICIxIiAoLTEpKTsgX19j
bnQgKyAxOyB9KSk7Cn0K