diff options
author | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-25 17:14:41 +0000 |
---|---|---|
committer | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-25 17:14:41 +0000 |
commit | ee78250484ebf5385e03ef580859ca58856fe18a (patch) | |
tree | 8b90dc97ba36d389c96334d1840ad2fe66f1c8ac /gcc/config/ip2k | |
parent | cfd55026f093911ef80ef0bc22e3be9f3e0b899c (diff) | |
download | gcc-ee78250484ebf5385e03ef580859ca58856fe18a.tar.gz |
* config/ip2k/ip2k.c (TARGET_STRUCT_VALUE_RTX): New.
(TARGET_RETURN_IN_MEMORY): Likewise.
(TARGET_SETUP_INCOMING_VARARGS): Likewise.
(ip2k_return_in_memory): Likewise.
(ip2k_setup_incoming_varargs): Likewise.
* config/ip2k/ip2k.h (RETURN_IN_MEMORY): Remove.
(STRUCT_VALUE): Likewise.
(STRUCT_VALUE_INCOMING): Likewise.
(SETUP_INCOMING_VARARGS): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76566 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/ip2k')
-rw-r--r-- | gcc/config/ip2k/ip2k.c | 29 | ||||
-rw-r--r-- | gcc/config/ip2k/ip2k.h | 13 |
2 files changed, 29 insertions, 13 deletions
diff --git a/gcc/config/ip2k/ip2k.c b/gcc/config/ip2k/ip2k.c index 6f32c43d07c..53f71b38f1a 100644 --- a/gcc/config/ip2k/ip2k.c +++ b/gcc/config/ip2k/ip2k.c @@ -1,6 +1,6 @@ /* Subroutines used for code generation on Ubicom IP2022 Communications Controller. - Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Contributed by Red Hat, Inc and Ubicom, Inc. This file is part of GCC. @@ -81,6 +81,9 @@ static tree ip2k_handle_fndecl_attribute (tree *, tree, tree, int, bool *); static bool ip2k_rtx_costs (rtx, int, int, int *); static int ip2k_address_cost (rtx); static void ip2k_init_libfuncs (void); +static bool ip2k_return_in_memory (tree, tree); +static void ip2k_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode, + tree, int *, int); const struct attribute_spec ip2k_attribute_table[]; @@ -112,6 +115,14 @@ const struct attribute_spec ip2k_attribute_table[]; #undef TARGET_INIT_LIBFUNCS #define TARGET_INIT_LIBFUNCS ip2k_init_libfuncs +#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 ip2k_return_in_memory + +#undef TARGET_SETUP_INCOMING_VARARGS +#define TARGET_SETUP_INCOMING_VARARGS ip2k_setup_incoming_varargs + struct gcc_target targetm = TARGET_INITIALIZER; /* Prologue/Epilogue size in words. */ @@ -6184,3 +6195,19 @@ ip2k_unsigned_comparison_operator (rtx op, enum machine_mode mode) return (comparison_operator (op, mode) && unsigned_condition (GET_CODE (op)) == GET_CODE (op)); } + +static bool +ip2k_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED) +{ + return (TYPE_MODE (type) == BLKmode) ? int_size_in_bytes (type) > 8 : 0; +} + +static void +ip2k_setup_incoming_varargs (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED, + enum machine_mode mode ATTRIBUTE_UNUSED, + tree type ATTRIBUTE_UNUSED, + int *pretend_arg_size, + int second_time ATTRIBUTE_UNUSED) +{ + *pretend_arg_size = 0; +} diff --git a/gcc/config/ip2k/ip2k.h b/gcc/config/ip2k/ip2k.h index 88b90b0c186..70eecdec2aa 100644 --- a/gcc/config/ip2k/ip2k.h +++ b/gcc/config/ip2k/ip2k.h @@ -1,7 +1,7 @@ /* Definitions of target machine for GCC, For Ubicom IP2022 Communications Controller - Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Contributed by Red Hat, Inc and Ubicom, Inc. This file is part of GCC. @@ -462,24 +462,13 @@ enum reg_class { #define FUNCTION_VALUE_REGNO_P(N) ((N) == REG_RESULT) -#define RETURN_IN_MEMORY(TYPE) \ - ((TYPE_MODE (TYPE) == BLKmode) ? int_size_in_bytes (TYPE) > 8 : 0) - /* Indicate that large structures are passed by reference. */ #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM,MODE,TYPE,NAMED) 0 #define DEFAULT_PCC_STRUCT_RETURN 0 -#define STRUCT_VALUE 0 - -#define STRUCT_VALUE_INCOMING 0 - #define EPILOGUE_USES(REGNO) 0 -#define SETUP_INCOMING_VARARGS(ARGS_SO_FAR,MODE,TYPE, \ - PRETEND_ARGS_SIZE,SECOND_TIME) \ - ((PRETEND_ARGS_SIZE) = (0)) - /* Hmmm. We don't actually like constants as addresses - they always need to be loaded to a register, except for function calls which take an |