This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Q about REGNO_OK_FOR_BASE_P et al
- From: Robert Baruch <autophile at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Sun, 19 Dec 2004 13:59:38 -0500
- Subject: Q about REGNO_OK_FOR_BASE_P et al
- Reply-to: Robert Baruch <autophile at gmail dot com>
Hi all,
I'm trying to add a new RISC processor to gcc. I've read through the
GCC Internals manual and "Porting GCC for Dummies". I'm a bit fuzzy on
REGNO_OK_FOR_BASE_P (and its related macros).
The processor I'm working with doesn't have a base-with-displacement
or base-with-index addressing mode. It doesn't have specialized base
or index registers. All of its general purpose registers could be used
in such a calculation, though. So does that mean that all of the
general purpose registers should be ok for base and index, or that
none should be used?
Also, the internals manual states that "[The base register] may be
either a suitable hard register or a pseudo register that has been
allocated such a hard register." Does that mean that a pseudo register
that has NOT been allocated any hard register should always be
considered unsuitable?
Thanks for any help you can give me in porting my processor!
--Rob