This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] m68k: Use macros for register numbers more.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]