public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* optimization/3701: can't optimize asm version of lrint()
@ 2001-07-16 16:06 cartley
  0 siblings, 0 replies; 2+ messages in thread
From: cartley @ 2001-07-16 16:06 UTC (permalink / raw)
  To: gcc-gnats

>Number:         3701
>Category:       optimization
>Synopsis:       can't optimize asm version of lrint()
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 16 16:06:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Craig Artley
>Release:        gcc version 3.0
>Organization:
>Environment:
Linux 2.4.2 kernel, glibc 2.2.12, Intel P-III
>Description:
Attempts to use standard lrint() function from math.h
or similar asm() calls fail when optimization is turned on.

Generates errors like:
$ g++ -O3 round.cpp
/usr/include/bits/mathinline.h: In function `int main(int, char**)':
/usr/include/bits/mathinline.h:666: output number 0 not directly addressable
round.cpp:11: output number 0 not directly addressable

The lrint() uses the fistpl instruction via asm().
>How-To-Repeat:
Save as round.cpp and compile with
	g++ -O3 round.cpp


/usr/include/bits/mathinline.h: In function `int main(int, char**)':
/usr/include/bits/mathinline.h:666: output number 0 not directly addressable
round.cpp:11: output number 0 not directly addressable
>Fix:

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

Lyogc2F2ZSB0aGlzIGFzIHJvdW5kLmNwcCBhbmQgY29tcGlsZSB3aXRoIGcrKyAtTzMgcm91bmQu
Y3BwICovCgojaW5jbHVkZSA8bWF0aC5oPgojaW5jbHVkZSA8c3RkbGliLmg+CiNpbmNsdWRlIDxp
b3N0cmVhbT4KCi8qIHRoaXMgaXMgYmFzaWNhbGx5IHRoZSBlcXVpdmFsZW50IG9mIGxyaW50KCkg
Ki8Kc3RhdGljIGlubGluZSBsb25nIGZhc3Ryb3VuZCAoZmxvYXQgdmFsKQp7CiAgbG9uZyByZXQ7
CiAgYXNtICgiZmlzdHBsICUwIiA6ICI9bSIgKHJldCkgOiAidCIgKHZhbCkgOiAic3QiKTsKICBy
ZXR1cm4gcmV0Owp9CgppbnQKbWFpbiAoaW50IGFyZ2MsIGNoYXIqIGFyZ3ZbXSkKewogIGZsb2F0
IHggPSAwLjVmOwoKICBzdGQ6OmNvdXQgPDx4IDw8IjogICIgPDxscmludCh4KSA8PCJcbiI7CiAg
c3RkOjpjb3V0IDw8eCA8PCI6ICAiIDw8ZmFzdHJvdW5kKHgpIDw8IlxuIjsKCiAgcmV0dXJuIDA7
Cn0K


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: optimization/3701: can't optimize asm version of lrint()
@ 2001-07-20  7:41 mmitchel
  0 siblings, 0 replies; 2+ messages in thread
From: mmitchel @ 2001-07-20  7:41 UTC (permalink / raw)
  To: cartley, gcc-bugs, gcc-prs, nobody

Synopsis: can't optimize asm version of lrint()

State-Changed-From-To: open->closed
State-Changed-By: mmitchel
State-Changed-When: Fri Jul 20 07:41:42 2001
State-Changed-Why:
    Reported fixed by submitter.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3701&database=gcc


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-07-20  7:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-16 16:06 optimization/3701: can't optimize asm version of lrint() cartley
2001-07-20  7:41 mmitchel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).