mn10300-protos.h: Remove the prototype for mn10300_builtin_saveregs.

* config/mn10300/mn10300-protos.h: Remove the prototype for
	mn10300_builtin_saveregs.
	* config/mn10300/mn10300.c (TARGET_PROMOTE_PROTOTYPES): New.
	(TARGET_STRUCT_VALUE_RTX): Likewise.
	(TARGET_RETURN_IN_MEMORY): Likewise.
	(TARGET_EXPAND_BUILTIN_SAVEREGS): Likewise.
	(mn10300_return_in_memory): Likewise.
	(mn10300_builtin_saveregs): Make it static.
	* config/mn10300/mn10300.h (PROMOTE_PROTOTYPES): Remove.
	(RETURN_IN_MEMORY): Likewise.
	(STRUCT_VALUE): Likewise.
	(EXPAND_BUILTIN_SAVEREGS): Likewise.

From-SVN: r76581
This commit is contained in:
Kazu Hirata 2004-01-25 20:17:44 +00:00 committed by Kazu Hirata
parent 20b4e8aea1
commit 9024ea92ac
4 changed files with 39 additions and 24 deletions

View File

@ -1,3 +1,18 @@
2004-01-25 Kazu Hirata <kazu@cs.umass.edu>
* config/mn10300/mn10300-protos.h: Remove the prototype for
mn10300_builtin_saveregs.
* config/mn10300/mn10300.c (TARGET_PROMOTE_PROTOTYPES): New.
(TARGET_STRUCT_VALUE_RTX): Likewise.
(TARGET_RETURN_IN_MEMORY): Likewise.
(TARGET_EXPAND_BUILTIN_SAVEREGS): Likewise.
(mn10300_return_in_memory): Likewise.
(mn10300_builtin_saveregs): Make it static.
* config/mn10300/mn10300.h (PROMOTE_PROTOTYPES): Remove.
(RETURN_IN_MEMORY): Likewise.
(STRUCT_VALUE): Likewise.
(EXPAND_BUILTIN_SAVEREGS): Likewise.
2004-01-25 Eric Botcazou <ebotcazou@act-europe.fr>
PR bootstrap/13853

View File

@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler. Matsushita MN10300 series
Copyright (C) 2000, 2003 Free Software Foundation, Inc.
Copyright (C) 2000, 2003, 2004 Free Software Foundation, Inc.
Contributed by Jeff Law (law@cygnus.com).
This file is part of GCC.
@ -54,7 +54,6 @@ extern int function_arg_partial_nregs (CUMULATIVE_ARGS *,
extern struct rtx_def *mn10300_va_arg (tree, tree);
#endif /* TREE_CODE */
extern struct rtx_def *mn10300_builtin_saveregs (void);
extern void expand_prologue (void);
extern void expand_epilogue (void);
extern int initial_offset (int, int);

View File

@ -1,5 +1,5 @@
/* Subroutines for insn-output.c for Matsushita MN10300 series
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Contributed by Jeff Law (law@cygnus.com).
@ -69,6 +69,8 @@ static int mn10300_address_cost_1 (rtx, int *);
static int mn10300_address_cost (rtx);
static bool mn10300_rtx_costs (rtx, int, int, int *);
static void mn10300_file_start (void);
static bool mn10300_return_in_memory (tree, tree);
static rtx mn10300_builtin_saveregs (void);
/* Initialize the GCC target structure. */
@ -88,6 +90,17 @@ static void mn10300_file_start (void);
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO mn10300_encode_section_info
#undef TARGET_PROMOTE_PROTOTYPES
#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true
#undef TARGET_STRUCT_VALUE_RTX
#define TARGET_STRUCT_VALUE_RTX hook_rtx_tree_int_null
#undef TARGET_RETURN_IN_MEMORY
#define TARGET_RETURN_IN_MEMORY mn10300_return_in_memory
#undef TARGET_EXPAND_BUILTIN_SAVEREGS
#define TARGET_EXPAND_BUILTIN_SAVEREGS mn10300_builtin_saveregs
static void mn10300_encode_section_info (tree, rtx, int);
struct gcc_target targetm = TARGET_INITIALIZER;
@ -1405,9 +1418,16 @@ initial_offset (int from, int to)
abort ();
}
static bool
mn10300_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
{
/* Return values > 8 bytes in length in memory. */
return int_size_in_bytes (type) > 8 || TYPE_MODE (type) == BLKmode;
}
/* Flush the argument registers to the stack for a stdarg function;
return the new argument pointer. */
rtx
static rtx
mn10300_builtin_saveregs (void)
{
rtx offset, mem;

View File

@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler.
Matsushita MN10300 series
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Contributed by Jeff Law (law@cygnus.com).
@ -517,9 +517,6 @@ enum reg_class {
#define FRAME_POINTER_REQUIRED 0
#define CAN_DEBUG_WITHOUT_FP
/* A guess for the MN10300. */
#define PROMOTE_PROTOTYPES 1
/* Value is the number of bytes of arguments automatically
popped when returning from a subroutine call.
FUNDECL is the declaration node of the function (as a tree),
@ -621,16 +618,7 @@ struct cum_arg {int nbytes; };
#define FUNCTION_VALUE_REGNO_P(N) \
((N) == FIRST_DATA_REGNUM || (N) == FIRST_ADDRESS_REGNUM)
/* Return values > 8 bytes in length in memory. */
#define DEFAULT_PCC_STRUCT_RETURN 0
#define RETURN_IN_MEMORY(TYPE) \
(int_size_in_bytes (TYPE) > 8 || TYPE_MODE (TYPE) == BLKmode)
/* Register in which address to store a structure value
is passed to a function. On the MN10300 it's passed as
the first parameter. */
#define STRUCT_VALUE 0
/* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
the stack pointer does not matter. The value is tested only in
@ -688,13 +676,6 @@ struct cum_arg {int nbytes; };
? gen_rtx_MEM (Pmode, arg_pointer_rtx) \
: (rtx) 0)
/* Emit code for a call to builtin_saveregs. We must emit USE insns which
reference the 2 integer arg registers.
Ordinarily they are not call used registers, but they are for
_builtin_saveregs, so we must make this explicit. */
#define EXPAND_BUILTIN_SAVEREGS() mn10300_builtin_saveregs ()
/* Implement `va_start' for varargs and stdarg. */
#define EXPAND_BUILTIN_VA_START(valist, nextarg) \
mn10300_va_start (valist, nextarg)