This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/15492] floating-point arguments are loaded too early to x87 stack
- From: "uros at kss-loka dot si" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Sep 2004 14:49:05 -0000
- Subject: [Bug target/15492] floating-point arguments are loaded too early to x87 stack
- References: <20040517130734.15492.uros@kss-loka.si>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From uros at kss-loka dot si 2004-09-13 14:49 -------
(In reply to comment #7)
> So, it looks like it's fixed?
Hm, first testcase still produces (gcc -O2 -ffast-math -march=pentium4
-fomit-frame-pointer).
test:
fldl 4(%esp)
fldl 12(%esp)
fxch %st(1)
fmul %st(0), %st
fxch %st(1)
fmul %st(0), %st
faddp %st, %st(1)
ret
It looks that gcc does not know that arguments to add can be exchanged and is
emitting fxch insns to get arguments in the top stack position.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15492