This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/45296] register long double ICE at -O2, -Os, -O3
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Aug 2010 06:12:02 -0000
- Subject: [Bug target/45296] register long double ICE at -O2, -Os, -O3
- References: <bug-45296-17273@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from jakub at gcc dot gnu dot org 2010-08-17 06:12 -------
The GCC manual says that the register should be call-saved, that isn't the case
in your testcase, so it isn't valid.
But, more importantly, the i387 floating point stack is even more special, as
the st* registers change meaning during compilation - before reg-stack pass
they are just flat 8 registers and the reg-stack pass changes them into real
stacked registers, adding various fixup instructions. So, what is "st(1)"
before reg-stack can be at various depths in the i387 stack during the
function.
There is really no way to make this work. You can use inline-asm with "t"
resp. "u" constraints, but that's the only way you can directly influence the
operation of the i387 register stack.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45296