OSDN Git Service

* config/m68k/linux.h (FUNCTION_VALUE_REGNO_P): Use macros for
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 15 Apr 2007 15:54:36 +0000 (15:54 +0000)
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 15 Apr 2007 15:54:36 +0000 (15:54 +0000)
register numbers more.
* config/m68k/m68k.h (STACK_POINTER_REGNUM,
FRAME_POINTER_REGNUM, STATIC_CHAIN_REGNUM,
M68K_STRUCT_VALUE_REGNUM, FUNCTION_VALUE, LIBCALL_VALUE,
FUNCTION_VALUE_REGNO_P): Likewise.
* config/m68k/m68kelf.h (M68K_STRUCT_VALUE_REGNUM,
STATIC_CHAIN_REGNUM): Likewise.
* config/m68k/m68kemb.h (FUNCTION_VALUE_REGNO_P): Likewise.
* config/m68k/netbsd-elf.h (M68K_STRUCT_VALUE_REGNUM,
STATIC_CHAIN_REGNUM, FUNCTION_VALUE_REGNO_P): Likewise.
* config/m68k/m68k.md (FP_REG): New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123850 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/m68k/linux.h
gcc/config/m68k/m68k.h
gcc/config/m68k/m68k.md
gcc/config/m68k/m68kelf.h
gcc/config/m68k/m68kemb.h
gcc/config/m68k/netbsd-elf.h

index 1f8a250..40d06b4 100644 (file)
@@ -1,5 +1,20 @@
 2007-04-15  Kazu Hirata  <kazu@codesourcery.com>
 
+       * config/m68k/linux.h (FUNCTION_VALUE_REGNO_P): Use macros for
+       register numbers more.
+       * config/m68k/m68k.h (STACK_POINTER_REGNUM,
+       FRAME_POINTER_REGNUM, STATIC_CHAIN_REGNUM,
+       M68K_STRUCT_VALUE_REGNUM, FUNCTION_VALUE, LIBCALL_VALUE,
+       FUNCTION_VALUE_REGNO_P): Likewise.
+       * config/m68k/m68kelf.h (M68K_STRUCT_VALUE_REGNUM,
+       STATIC_CHAIN_REGNUM): Likewise.
+       * config/m68k/m68kemb.h (FUNCTION_VALUE_REGNO_P): Likewise.
+       * config/m68k/netbsd-elf.h (M68K_STRUCT_VALUE_REGNUM,
+       STATIC_CHAIN_REGNUM, FUNCTION_VALUE_REGNO_P): Likewise.
+       * config/m68k/m68k.md (FP_REG): New.
+
+2007-04-15  Kazu Hirata  <kazu@codesourcery.com>
+
        * config/m68k/m68k.h (PREFERRED_STACK_BOUNDARY): Prefer 32-bit
        alignment on fido.
 
index b480b37..31d0a58 100644 (file)
@@ -160,7 +160,7 @@ Boston, MA 02110-1301, USA.  */
 
 #undef FUNCTION_VALUE_REGNO_P
 #define FUNCTION_VALUE_REGNO_P(N) \
-  ((N) == 0 || (N) == 8 || (TARGET_68881 && (N) == 16))
+  ((N) == D0_REG || (N) == A0_REG || (TARGET_68881 && (N) == FP0_REG))
 
 /* Define this to be true when FUNCTION_VALUE_REGNO_P is true for
    more than one register.  */
index 1ce313f..6b3248a 100644 (file)
@@ -425,12 +425,12 @@ Boston, MA 02110-1301, USA.  */
 /* Specify the registers used for certain standard purposes.
    The values of these macros are register numbers.  */
 
-#define STACK_POINTER_REGNUM 15
+#define STACK_POINTER_REGNUM SP_REG
 
 /* 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
 
 #define FRAME_POINTER_REQUIRED 0
 
@@ -440,12 +440,12 @@ Boston, MA 02110-1301, USA.  */
  */
 #define ARG_POINTER_REGNUM 24
 
-#define STATIC_CHAIN_REGNUM 8
+#define STATIC_CHAIN_REGNUM A0_REG
 #define M68K_STATIC_CHAIN_REG_NAME REGISTER_PREFIX "a0"
 
 /* Register in which address to store a structure value
    is passed to a function.  */
-#define M68K_STRUCT_VALUE_REGNUM 9
+#define M68K_STRUCT_VALUE_REGNUM A1_REG
 
 \f
 
@@ -593,13 +593,13 @@ extern enum reg_class regno_reg_class[];
 
 /* On the m68k the return value defaults to D0.  */
 #define FUNCTION_VALUE(VALTYPE, FUNC)  \
-  gen_rtx_REG (TYPE_MODE (VALTYPE), 0)
+  gen_rtx_REG (TYPE_MODE (VALTYPE), D0_REG)
 
 /* On the m68k the return value defaults to D0.  */
-#define LIBCALL_VALUE(MODE)  gen_rtx_REG (MODE, 0)
+#define LIBCALL_VALUE(MODE)  gen_rtx_REG (MODE, D0_REG)
 
 /* On the m68k, D0 is usually the only register used.  */
-#define FUNCTION_VALUE_REGNO_P(N) ((N) == 0)
+#define FUNCTION_VALUE_REGNO_P(N) ((N) == D0_REG)
 
 /* Define this to be true when FUNCTION_VALUE_REGNO_P is true for
    more than one register.
index f983d39..185f598 100644 (file)
    (A0_REG             8)
    (A1_REG             9)
    (PIC_REG            13)
+   (FP_REG             14)
    (SP_REG             15)
    (FP0_REG            16)
   ])
index 6c26650..eb2c348 100644 (file)
@@ -81,13 +81,13 @@ do {                                                                \
    function.  The default in m68k.h is a1.  For m68k/SVR4 it is a0.  */
 
 #undef M68K_STRUCT_VALUE_REGNUM
-#define M68K_STRUCT_VALUE_REGNUM 8
+#define M68K_STRUCT_VALUE_REGNUM A0_REG
 
 /* The static chain regnum defaults to a0, but we use that for
    structure return, so have to use a1 for the static chain.  */
 
 #undef STATIC_CHAIN_REGNUM
-#define STATIC_CHAIN_REGNUM 9
+#define STATIC_CHAIN_REGNUM A1_REG
 #undef M68K_STATIC_CHAIN_REG_NAME
 #define M68K_STATIC_CHAIN_REG_NAME REGISTER_PREFIX "a1"
 
index 3ada8a9..5d917f9 100644 (file)
@@ -26,7 +26,8 @@
   m68k_libcall_value (MODE)
 
 #undef FUNCTION_VALUE_REGNO_P
-#define FUNCTION_VALUE_REGNO_P(N) ((N) == 0 || (TARGET_68881 && (N) == 16))
+#define FUNCTION_VALUE_REGNO_P(N)                      \
+  ((N) == D0_REG || (TARGET_68881 && (N) == FP0_REG))
 
 #undef NEEDS_UNTYPED_CALL
 #define NEEDS_UNTYPED_CALL 1
index 2d4012f..705afed 100644 (file)
@@ -224,7 +224,7 @@ while (0)
    function.  The default in m68k.h is a1.  For m68k/SVR4 it is a0. */
 
 #undef M68K_STRUCT_VALUE_REGNUM
-#define M68K_STRUCT_VALUE_REGNUM 8
+#define M68K_STRUCT_VALUE_REGNUM A0_REG
 
 
 /* Register in which static-chain is passed to a function.  The
@@ -232,7 +232,7 @@ while (0)
    regnum.  Make it a1 instead.  */
 
 #undef STATIC_CHAIN_REGNUM
-#define STATIC_CHAIN_REGNUM 9
+#define STATIC_CHAIN_REGNUM A1_REG
 #undef M68K_STATIC_CHAIN_REG_NAME
 #define M68K_STATIC_CHAIN_REG_NAME REGISTER_PREFIX "a1"
 
@@ -253,7 +253,7 @@ while (0)
 
 #undef FUNCTION_VALUE_REGNO_P
 #define FUNCTION_VALUE_REGNO_P(N)                                      \
-  ((N) == 0 || (N) == 8 || (TARGET_68881 && (N) == 16))
+  ((N) == D0_REG || (N) == A0_REG || (TARGET_68881 && (N) == FP0_REG))
 
 
 /* Define this to be true when FUNCTION_VALUE_REGNO_P is true for