This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
RS/6000 assembly bug
- To: egcs-bugs at cygnus dot com
- Subject: RS/6000 assembly bug
- From: hzoli at austin dot ibm dot com
- Date: Thu, 2 Apr 1998 18:23:09 -0600 (CST)
I get a `fixed or forbidden register was spilled' message trying to
compile the following little function:
void
foo(int i)
{
while (--i);
__asm__ ("" : : : "cr0");
}
This also happens when I replace "cr0" with "cc", but does not happen
if I write "cr1". This bug has been there at lease since gcc-2.6.3,
and it is really a general gcc bug, not specific to egcs. I tested
this on the egcs-1.0.2 release.
One other minor thing. It seems that this release (and more recent
gcc releases too) do not use the count register for loops. Instead of
mtctr/bdn they use a GPR for the loop variable, and use
ai. r,r,-1;bne, although the count register is more efficient.
Gcc-2.6.3 did use the ctr (e.g. while (--i); created a bdn loop).
Thanks,
Zoli