This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

target/2395: x86_64 opcode generated for i686



>Number:         2395
>Category:       target
>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:   Mon Mar 26 14:06:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     drepper@redhat.com
>Release:        gcc version 3.1 20010325 (experimental)
>Organization:
>Environment:
Linux/i686
>Description:
I've reported this before with the wrong category.  Maybe this is why nobody looked at this.

Compiling the attached file with

gcc -c -O2 ffsll.i

with today's (2001-3-26, but going back to at least 2001-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.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="ffsll.c"

aW50CmZmc2xsIChpKQogICAgIGxvbmcgbG9uZyBpbnQgaTsKewogIHVuc2lnbmVkIGxvbmcgbG9u
ZyBpbnQgeCA9IGkgJiAtaTsKICBpZiAoeCA8PSAweGZmZmZmZmZmKQogICAgcmV0dXJuIChfX2J1
aWx0aW5fY29uc3RhbnRfcCAoaSkKCSAgICA/IF9fYnVpbHRpbl9mZnMgKGkpCgkgICAgOiAoeyBp
bnQgX19jbnQsIF9fdG1wOwoJICAgICAgICAgX19hc21fXyBfX3ZvbGF0aWxlX18gKCJic2ZsICUz
LCUwXG5cdCIKCQkJCSAgICAgICAiY21vdmVsICUxLCUwIgoJCQkJICAgICAgIDogIj0mciIgKF9f
Y250KSwgIj1yIiAoX190bXApCgkJCQkgICAgICAgOiAicm0iIChpKSwgIjEiICgtMSkpOwoJCSBf
X2NudCArIDE7IH0pKTsKICBlbHNlCiAgICByZXR1cm4gMzIgKyAoX19idWlsdGluX2NvbnN0YW50
X3AgKGkgPj4gMzIpCgkJID8gX19idWlsdGluX2ZmcyAoaSA+PiAzMikKCQkgOiAoeyBpbnQgX19j
bnQsIF9fdG1wOwoJCSAgICAgIF9fYXNtX18gX192b2xhdGlsZV9fICgiYnNmbCAlMiwlMFxuXHQi
CgkJCQkJICAgICJjbW92ZWwgJTEsJTAiCgkJCQkJICAgIDogIj0mciIgKF9fY250KSwgIj1yIiAo
X190bXApCgkJCQkJICAgIDogInJtIiAoaSA+PiAzMiksICIxIiAoLTEpKTsKCQkgICAgICBfX2Nu
dCArIDE7IH0pKTsKfQo=


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]