linux.h (FUNCTION_VALUE_REGNO_P): Use macros for register numbers more.

* 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.

From-SVN: r123850
This commit is contained in:
Kazu Hirata 2007-04-15 15:54:36 +00:00 committed by Kazu Hirata
parent 9a3db5a366
commit 3bfe36dce0
7 changed files with 31 additions and 14 deletions

View File

@ -1,3 +1,18 @@
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

View 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. */

View 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
@ -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.

View File

@ -129,6 +129,7 @@
(A0_REG 8)
(A1_REG 9)
(PIC_REG 13)
(FP_REG 14)
(SP_REG 15)
(FP0_REG 16)
])

View 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"

View 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

View 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