This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Some Haifa scheduler bugs
- To: crux at Pool dot Informatik dot RWTH-Aachen dot DE
- Subject: Re: Some Haifa scheduler bugs
- From: Ian Lance Taylor <ian at cygnus dot com>
- Date: Fri, 5 Sep 1997 11:33:14 -0400
- CC: law at cygnus dot com, egcs at cygnus dot com
Date: Fri, 5 Sep 1997 13:44:34 +0200 (MET DST)
From: Bernd Schmidt <crux@Pool.Informatik.RWTH-Aachen.DE>
> In message <Pine.SOL.3.90.970903184242.6496A-100000@bond.informatik.rwth-aachen.de>you write:
> > How can reload generate incorrect code in this case except if the lifetime
> > of a hard register gets extended by the scheduler or some other optimizer?
> When loading of an argument register requires a reload, which may force
> reload to clobber a previously loaded argument register.
Now I'm confused. Isn't the reload_address_base_reg_class stuff supposed to
handle that case?
Yes, it is. I wrote it to handle the MIPS16, which has only 8 general
purpose registers but, for reasons of compatibility with standard
MIPS, uses 4 of them for register passing. (The MIPS16 support will
get into the general release one of these days--it's all sitting on a
badly hacked up branch right now.)
However, people have encountered cases which fail when using the more
baroque MIPS EABI calling convention, which uses 8 registers for
register passing (but not the same 8 that the MIPS16 uses--it's too
complicated to get into now).
My personal attitude is that people should try using the register
parameters option on the ix86, but should not depend upon it to work,
and should be prepared to fix the problems themselves rather than
merely reporting them.
Note that the ix86 is more likely to work correctly than the MIPS16,
because the ix86 can load a value directly from memory, whereas the
MIPS16 must first construct the address in a register (i.e., the ix86
has a 32 bit direct addressing mode, but the MIPS16 does not).
Ian