Michael Eager <eager@mvista.com> writes:
I'm building glibc-2.3.2 for mips with the gcc-3.4-20040114 snapshot.
I'm getting an error building sigaction.c:
../sysdeps/unix/sysv/linux/mips/sigaction.c:83: error: $1 cannot be used in asm here
This code compiles using gcc-3.3.1.
This is a side-effect of a "cute" trick in the MIPS port.
Since it doesn't use $1 for anything, it reuses register 1 for
FRAME_POINTER_REGNUM.
I guess this was a good idea at one time (it reduced the number of hard
registers so could have reduced memory requirements or compile time).
But these days we have several hard registers that aren't being used for
anything. We might as well use one of them as the frame pointer.
I've just tried the quick hack below and it seems to make
your test case pass. I'll try to clean it up and test it later.