diff options
author | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-25 17:10:03 +0000 |
---|---|---|
committer | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-25 17:10:03 +0000 |
commit | cfd55026f093911ef80ef0bc22e3be9f3e0b899c (patch) | |
tree | f673e5d334cd5fbaf8a5cee153aaffa0dc88f378 /gcc/config/avr | |
parent | 991a2f27658e0c2911c9c0fceca8092df6170bc7 (diff) | |
download | gcc-cfd55026f093911ef80ef0bc22e3be9f3e0b899c.tar.gz |
* config/avr/avr.c (TARGET_STRUCT_VALUE_RTX): New.
(TARGET_RETURN_IN_MEMORY): Likewise.
(TARGET_STRICT_ARGUMENT_NAMING): Likewise.
(avr_return_in_memory): Remove.
* config/avr/avr.h (RETURN_IN_MEMORY): Remove.
(STRUCT_VALUE): Likewise.
(STRUCT_VALUE_INCOMING): Likewise.
(STRICT_ARGUMENT_NAMING): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76565 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/avr')
-rw-r--r-- | gcc/config/avr/avr.c | 17 | ||||
-rw-r--r-- | gcc/config/avr/avr.h | 52 |
2 files changed, 20 insertions, 49 deletions
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 198c56895d3..dc60d18fcb8 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -77,6 +77,7 @@ static void avr_asm_out_dtor (rtx, int); static int default_rtx_costs (rtx, enum rtx_code, enum rtx_code); static bool avr_rtx_costs (rtx, int, int, int *); static int avr_address_cost (rtx); +static bool avr_return_in_memory (tree, tree); /* Allocate registers from r25 to r8 for parameters for function calls. */ #define FIRST_CUM_REG 26 @@ -242,6 +243,14 @@ int avr_case_values_threshold = 30000; #undef TARGET_MACHINE_DEPENDENT_REORG #define TARGET_MACHINE_DEPENDENT_REORG avr_reorg +#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 avr_return_in_memory + +#undef TARGET_STRICT_ARGUMENT_NAMING +#define TARGET_STRICT_ARGUMENT_NAMING hook_bool_CUMULATIVE_ARGS_true + struct gcc_target targetm = TARGET_INITIALIZER; void @@ -5366,4 +5375,12 @@ avr_asm_out_dtor (rtx symbol, int priority) default_dtor_section_asm_out_destructor (symbol, priority); } +static bool +avr_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED) +{ + return ((TYPE_MODE (type) == BLKmode) + ? int_size_in_bytes (type) > 8 + : 0); +} + #include "gt-avr.h" diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h index acac4fa9b92..f94cc578424 100644 --- a/gcc/config/avr/avr.h +++ b/gcc/config/avr/avr.h @@ -1188,9 +1188,9 @@ extern int avr_reg_order[]; `parallel' RTX, if the return value is in multiple places. See `FUNCTION_ARG' for an explanation of the `parallel' form. - If `PROMOTE_FUNCTION_RETURN' is defined, you must apply the same - promotion rules specified in `PROMOTE_MODE' if VALTYPE is a scalar - type. + If `TARGET_PROMOTE_FUNCTION_RETURN' is defined to return true, you + must apply the same promotion rules specified in `PROMOTE_MODE' if + VALTYPE is a scalar type. If the precise function being called is known, FUNC is a tree node (`FUNCTION_DECL') for it; otherwise, FUNC is a null pointer. This @@ -1233,26 +1233,6 @@ extern int avr_reg_order[]; called function use different registers for the return value, this macro should recognize only the caller's register numbers. */ -#define RETURN_IN_MEMORY(TYPE) ((TYPE_MODE (TYPE) == BLKmode) \ - ? int_size_in_bytes (TYPE) > 8 \ - : 0) -/* A C expression which can inhibit the returning of certain function - values in registers, based on the type of value. A nonzero value - says to return the function value in memory, just as large - structures are always returned. Here TYPE will be a C expression - of type `tree', representing the data type of the value. - - Note that values of mode `BLKmode' must be explicitly handled by - this macro. Also, the option `-fpcc-struct-return' takes effect - regardless of this macro. On most systems, it is possible to - leave the macro undefined; this causes a default definition to be - used, whose value is the constant 1 for `BLKmode' values, and 0 - otherwise. - - Do not use this macro to indicate that structures and unions - should always be returned in memory. You should instead use - `DEFAULT_PCC_STRUCT_RETURN' to indicate this. */ - #define DEFAULT_PCC_STRUCT_RETURN 0 /* Define this macro to be 1 if all structure and union return values must be in memory. Since this results in slower code, this should @@ -1263,38 +1243,12 @@ extern int avr_reg_order[]; If not defined, this defaults to the value 1. */ -#define STRUCT_VALUE 0 -/* If the structure value address is not passed in a register, define - `STRUCT_VALUE' as an expression returning an RTX for the place - where the address is passed. If it returns 0, the address is - passed as an "invisible" first argument. */ - -#define STRUCT_VALUE_INCOMING 0 -/* If the incoming location is not a register, then you should define - `STRUCT_VALUE_INCOMING' as an expression for an RTX for where the - called function should find the value. If it should find the - value on the stack, define this to create a `mem' which refers to - the frame pointer. A definition of 0 means that the address is - passed as an "invisible" first argument. */ - #define EPILOGUE_USES(REGNO) 0 /* Define this macro as a C expression that is nonzero for registers are used by the epilogue or the `return' pattern. The stack and frame pointer registers are already be assumed to be used as needed. */ -#define STRICT_ARGUMENT_NAMING 1 -/* Define this macro if the location where a function argument is - passed depends on whether or not it is a named argument. - - This macro controls how the NAMED argument to `FUNCTION_ARG' is - set for varargs and stdarg functions. With this macro defined, - the NAMED argument is always true for named arguments, and false - for unnamed arguments. If this is not defined, but - `SETUP_INCOMING_VARARGS' is defined, then all arguments are - treated as named. Otherwise, all named arguments except the last - are treated as named. */ - #define HAVE_POST_INCREMENT 1 /* Define this macro if the machine supports post-increment |