diff options
author | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-25 20:17:44 +0000 |
---|---|---|
committer | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-25 20:17:44 +0000 |
commit | f2d49d02f3d8a8bacb3ce423a174746c7777c5a6 (patch) | |
tree | 62597dcae4591089cf9ef1a77245e8ced3b06a70 /gcc/config/mn10300 | |
parent | fa015b9a32cd95e30b59149bd49c5cdd520cbcdc (diff) | |
download | gcc-f2d49d02f3d8a8bacb3ce423a174746c7777c5a6.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76581 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/mn10300')
-rw-r--r-- | gcc/config/mn10300/mn10300-protos.h | 3 | ||||
-rw-r--r-- | gcc/config/mn10300/mn10300.c | 24 | ||||
-rw-r--r-- | gcc/config/mn10300/mn10300.h | 21 |
3 files changed, 24 insertions, 24 deletions
diff --git a/gcc/config/mn10300/mn10300-protos.h b/gcc/config/mn10300/mn10300-protos.h index 1c6bc7a4095..debb9bcee07 100644 --- a/gcc/config/mn10300/mn10300-protos.h +++ b/gcc/config/mn10300/mn10300-protos.h @@ -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); diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c index 74aab427d71..669acce64f6 100644 --- a/gcc/config/mn10300/mn10300.c +++ b/gcc/config/mn10300/mn10300.c @@ -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; diff --git a/gcc/config/mn10300/mn10300.h b/gcc/config/mn10300/mn10300.h index 9aaf7ffc5ff..f3eb753f33b 100644 --- a/gcc/config/mn10300/mn10300.h +++ b/gcc/config/mn10300/mn10300.h @@ -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) |