This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] m68k: Use macros for register numbers more.
- From: Roman Zippel <zippel at linux-m68k dot org>
- To: Kazu Hirata <kazu at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 16 Apr 2007 03:14:14 +0200 (CEST)
- Subject: Re: [patch] m68k: Use macros for register numbers more.
- References: <200704151555.l3FFt74e016631@sparrowhawk.codesourcery.com>
Hi,
On Sun, 15 Apr 2007, Kazu Hirata wrote:
>
> /* Most m68k targets use %a6 as a frame pointer. The AmigaOS
> ABI uses %a6 for shared library calls, therefore the frame
> pointer is shifted to %a5 on this target. */
> -#define FRAME_POINTER_REGNUM 14
> +#define FRAME_POINTER_REGNUM FP_REG
>
You've seen this comment?
> Index: gcc/config/m68k/m68k.md
> ===================================================================
> --- gcc/config/m68k/m68k.md (revision 123846)
> +++ gcc/config/m68k/m68k.md (working copy)
> @@ -129,6 +129,7 @@ (define_constants
> (A0_REG 8)
> (A1_REG 9)
> (PIC_REG 13)
> + (FP_REG 14)
> (SP_REG 15)
> (FP0_REG 16)
> ])
Technically this isn't a constant and shouldn't be part of the generic
machine description, even though it's practically the same on all
officially supported targets. You could define a A6_REG here though and
use it in the header files. (Same goes for PIC_REG).
bye, Roman