This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: more m68k breakage on m68k-linux
- From: Richard Zidlicky <rz at linux-m68k dot org>
- To: bernie at develer dot com, peter at baradas dot org
- Cc: Matthias Klose <doko at cs dot tu-berlin dot de>,Bernardo Innocenti <bernie at develer dot com>, gcc at gcc dot gnu dot org,Gunther Nikl <gni at gecko dot de>, Andreas Schwab <schwab at suse dot de>
- Date: Mon, 1 Mar 2004 22:54:09 +0100
- Subject: Re: more m68k breakage on m68k-linux
- References: <4009E670.5090600@develer.com> <16394.22429.131429.162236@gargle.gargle.HOWL> <m31xpxs6wx.fsf@whitebox.m5r.de> <20040301200553.GA4188@linux-m68k.org>
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