diff options
Diffstat (limited to 'gcc/config/alpha')
-rw-r--r-- | gcc/config/alpha/alpha.c | 15 | ||||
-rw-r--r-- | gcc/config/alpha/alpha.h | 9 |
2 files changed, 13 insertions, 11 deletions
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 422d6c6a44c..8ed7b78d72c 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -5922,8 +5922,6 @@ function_arg (CUMULATIVE_ARGS cum, enum machine_mode mode, tree type, basereg = 16; else if (targetm.calls.must_pass_in_stack (mode, type)) return NULL_RTX; - else if (FUNCTION_ARG_PASS_BY_REFERENCE (cum, mode, type, named)) - basereg = 16; } #else #error Unhandled ABI @@ -5979,6 +5977,17 @@ alpha_return_in_memory (tree type, tree fndecl ATTRIBUTE_UNUSED) return size > UNITS_PER_WORD; } +/* Return true if TYPE should be passed by invisible reference. */ + +static bool +alpha_pass_by_reference (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED, + enum machine_mode mode, + tree type ATTRIBUTE_UNUSED, + bool named ATTRIBUTE_UNUSED) +{ + return mode == TFmode || mode == TCmode; +} + /* Define how to find the value returned by a function. VALTYPE is the data type of the value (as a tree). If the precise function being called is known, FUNC is its FUNCTION_DECL; otherwise, FUNC is 0. @@ -10187,6 +10196,8 @@ alpha_init_libfuncs (void) #define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_false #undef TARGET_RETURN_IN_MEMORY #define TARGET_RETURN_IN_MEMORY alpha_return_in_memory +#undef TARGET_PASS_BY_REFERENCE +#define TARGET_PASS_BY_REFERENCE alpha_pass_by_reference #undef TARGET_SETUP_INCOMING_VARARGS #define TARGET_SETUP_INCOMING_VARARGS alpha_setup_incoming_varargs #undef TARGET_STRICT_ARGUMENT_NAMING diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h index e142e5e177a..b77a9bce290 100644 --- a/gcc/config/alpha/alpha.h +++ b/gcc/config/alpha/alpha.h @@ -1063,15 +1063,6 @@ extern int alpha_memory_latency; #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ function_arg((CUM), (MODE), (TYPE), (NAMED)) -/* A C expression that indicates when an argument must be passed by - reference. If nonzero for an argument, a copy of that argument is - made in memory and a pointer to the argument is passed instead of - the argument itself. The pointer is passed in whatever way is - appropriate for passing a pointer to that type. */ - -#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \ - ((MODE) == TFmode || (MODE) == TCmode) - /* For an arg passed partly in registers and partly in memory, this is the number of registers used. For args passed entirely in registers or entirely in memory, zero. */ |