This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Changing call_used_regs etc. in a port (was: Re: Status of the MMIXGCC port...)
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Subject: Changing call_used_regs etc. in a port (was: Re: Status of the MMIXGCC port...)
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- Date: Wed, 23 Feb 2000 21:57:44 -0500 (EST)
- cc: gcc at gcc dot gnu dot org
On Mon, 21 Feb 2000, Richard Kenner wrote:
> GCC people now probably see at least one problem: GCC has
> support for renumbering of windowed registers (see (3)
> FUNCTION_ARG, FUNCTION_INCOMING_ARG, INCOMING_REGNO and
> OUTGOING_REGNO). However, this renumbering is static.
>
> That's OK. See the a29k config files, which are for a machine
> with variable-size register windows.
Aha. Thanks for the pointer. It might make some things easier.
However, the way fixed_regs, saved_regs and call_used_regs (and
other variables) are modified in INIT_ACCUMULATIVE_ARGS and
incoming_reg for a29k seems a bit questionable: it is not
mentioned in the documentation that these variables may be
modified by the port in any other way than the initializers in
FIXED_REGISTERS et al, with CONDITIONAL_REGISTER_USAGE being as
modifiable as it gets. The docs says this about those variables
and tables (Node: Register Basics):
The table initialized from this macro [FIXED_REGISTERS], and
the table initialized by the following one [CALL_USED_REGISTERS],
may be overridden at run time either automatically, by the
actions of the macro `CONDITIONAL_REGISTER_USAGE', or by the
user with the command options `-ffixed-REG', `-fcall-used-REG'
and `-fcall-saved-REG'.
When I re-read that text and the other sections about registers,
it implies to me that whatever variables are used for register
allocation, are off limits for the port, except to examine in
the prologue and epilogue.
If it is really intended that they can, and in cases like this,
should be modified by (e.g.) the target function-arg macros,
perhaps it should be documented and parametrized?
If for no other reason, than if it's *not* documented, then that
functionality may start to rot, and some core code will start to
rely on the register allocation variables be set only once per
compilation-unit. It also needs to be parametrized, like with
additional target macros, because currently a port has to know
which variables (not just the tables) to tweak for the intended
effect. The set of associated variables might change.
Is the a29k port in common use with gcc or egcs versions post
2.8.1, for example gcc 2.95? More precisely, does that scheme
still work?
brgds, H-P