more m68k breakage on m68k-linux
Richard Zidlicky
rz@linux-m68k.org
Mon Mar 1 22:05:00 GMT 2004
On Mon, Mar 01, 2004 at 09:05:53PM +0100, Richard Zidlicky wrote:
> Hi,
>
> Appears we have an off by 1 error in m68k.h. Any idea how the old
> m68k CPU magically gained another hard register?
>
> gcc-3.2: #define FIRST_PSEUDO_REGISTER 24
> gcc-3.4: #define FIRST_PSEUDO_REGISTER 25
Apparently it is this change:
<<
2003-09-08 Bernardo Innocenti <bernie@develer.com>
Peter Barada <peter@baradas.org>
* config/m68k/coff.h (REGISTER_NAMES): Add fake register `argptr'
* config/m68k/hp320.h (REGISTER_NAMES): Likewise.
* config/m68k/linux.h (REGISTER_NAMES): Likewise.
* config/m68k/m68kelf.h (REGISTER_NAMES): Likewise.
* gcc/config/m68k/sgs.h (REGISTER_NAMES): Likewise.
* config/m68k/m68k-protos.h (m68k_initial_elimination_offset): Add prot
otype.
* config/m68k/m68k.c (m68k_frame): New struct, simular to ix86 back-end
.
(m68k_compute_frame_layout): New function.
(m68k_initial_elimination_offset): New function.
(m68k_output_function_prologue): ColdFire-specific movem handling.
(m68k_output_function_epilogue): Likewise.
* config/m68k/m68k.h (FIRST_PSEOUDO_REGISTER): Make room for argptr reg
.
(ARG_POINTER_REGNUM): Add new definition.
(INITIAL_FRAME_POINTER_OFFSET): Remove macro.
(ELIMINABLE_REGS): Define new macro, like in ix86 back-end.
(CAN_ELIMINATE): Likewise.
(INITIAL_ELIMINATION_OFFSET): Likewise.
>>
Note the typo "FIRST_PSEOUDO_REGISTER".. made it somewhat hard to
find the change.
This looks highly bogus to me: You create a new "hard" register but
dont init it anywhere (FIXED_REGISTERS,...). You change ARG_POINTER_REGNUM
from 14 to 24 claiming in the comment that it is not a hard register..
well it is still < FIRST_PSEOUDO_REGISTER so it is a hard register.
Last not least there is
#define ELIMINABLE_REGS \
{{ ARG_POINTER_REGNUM, STACK_POINTER_REGNUM }, \
{ ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM }, \
{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM }}
and it is not clear to me how this should work if ARG_POINTER_REGNUM
were a pseudo register.
Richard
More information about the Gcc
mailing list