inline-asm/9981: attempt to read 64 bit pentium timestamp failure

jon@mast.queensu.ca jon@mast.queensu.ca
Thu Mar 6 17:27:00 GMT 2003


>Number:         9981
>Category:       inline-asm
>Synopsis:       attempt to read 64 bit pentium timestamp failure
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 06 15:36:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     jon@mast.queensu.ca
>Release:        gcc 3.2
>Organization:
>Environment:

>Description:
Inline assembly to read 64 bit pentium timer fails with

testrdtsc.c:7: can't find a register in class `AD_REGS' while reloading `asm'

under gcc 3.2 . The info seems to indicate =A constraint allows a 64 bit result.
>How-To-Repeat:
gcc -g -O6 -o testrdtsc testrdtsc.c
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="testrdtsc.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="testrdtsc.c"

Lyogc3VwcG9ydCBmb3IgcGVudGl1bSBjeWNsZSBjb3VudGVyICovCgpzdGF0aWMgX19pbmxpbmVf
XyB1bnNpZ25lZCBsb25nIGxvbmcgaW50IHJkdHNjKCkKewogIHVuc2lnbmVkIGxvbmcgbG9uZyBp
bnQgeDsKCiAgYXNtIF9fdm9sYXRpbGVfXyAoCiAgICAgICAgICAgICAgICAgICAgIi5ieXRlIDB4
MGYsIDB4MzEiCiAgICAgICAgICAgICAgICAgICAgOiAiPUEiICh4KQogICAgICAgICAgICAgICAg
ICAgIDoKICAgICAgICAgICAgICAgICAgICA6ICIlZWF4IiwgIiVlZHgiCiAgICAgICAgICAgICAg
ICAgICAgKTsKICByZXR1cm4oeCk7Cn0KIAppbnQgbWFpbihpbnQgYXJnYywgY2hhciAqKmFyZ3Yp
CnsKICBwcmluZigicmR0c2MgcmV0dXJuZWQgJWQiLCByZHRzYygpKTsKICByZXR1cm4gMDsKICAK
fQoK



More information about the Gcc-bugs mailing list