aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/arc/arc.c
diff options
context:
space:
mode:
authorKazu Hirata <kazu@cs.umass.edu>2004-01-26 23:22:55 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2004-01-26 23:22:55 +0000
commit96ab60fc9353bd70ad1acf041f4732fccc9a724e (patch)
treec85d41db841f6e7c5548ac6aca6106b0332335f3 /gcc/config/arc/arc.c
parent1aaec916ad5f7a37060a2bee39df50f158f4013e (diff)
downloadgcc-96ab60fc9353bd70ad1acf041f4732fccc9a724e.zip
gcc-96ab60fc9353bd70ad1acf041f4732fccc9a724e.tar.gz
gcc-96ab60fc9353bd70ad1acf041f4732fccc9a724e.tar.bz2
arc.c (TARGET_PROMOTE_FUNCTION_ARGS): New.
* config/arc/arc.c (TARGET_PROMOTE_FUNCTION_ARGS): New. (TARGET_PROMOTE_FUNCTION_RETURN): Likewise. (TARGET_PROMOTE_PROTOTYPES): Likewise. (TARGET_STRUCT_VALUE_RTX): Likewise. (TARGET_RETURN_IN_MEMORY): Likewise. (arc_return_in_memory): Likewise. * config/arc/arc.h (PROMOTE_FUNCTION_ARGS): Remove. (PROMOTE_FUNCTION_RETURN): Likewise. (RETURN_IN_MEMORY): Likewise. (STRUCT_VALUE): Likewise. From-SVN: r76677
Diffstat (limited to 'gcc/config/arc/arc.c')
-rw-r--r--gcc/config/arc/arc.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index ad26913..e8e4019 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -98,6 +98,7 @@ static void arc_file_start (void);
static void arc_internal_label (FILE *, const char *, unsigned long);
static bool arc_rtx_costs (rtx, int, int, int *);
static int arc_address_cost (rtx);
+static bool arc_return_in_memory (tree, tree);
/* Initialize the GCC target structure. */
#undef TARGET_ASM_ALIGNED_HI_OP
@@ -123,6 +124,18 @@ static int arc_address_cost (rtx);
#undef TARGET_ADDRESS_COST
#define TARGET_ADDRESS_COST arc_address_cost
+#undef TARGET_PROMOTE_FUNCTION_ARGS
+#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_tree_true
+#undef TARGET_PROMOTE_FUNCTION_RETURN
+#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_tree_true
+#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 arc_return_in_memory
+
struct gcc_target targetm = TARGET_INITIALIZER;
/* Called by OVERRIDE_OPTIONS to initialize various things. */
@@ -2351,3 +2364,11 @@ arc_internal_label (FILE *stream, const char *prefix, unsigned long labelno)
arc_ccfsm_at_label (prefix, labelno);
default_internal_label (stream, prefix, labelno);
}
+
+static bool
+arc_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
+{
+ return (AGGREGATE_TYPE_P (type)
+ || int_size_in_bytes (type) > 8
+ || TREE_ADDRESSABLE (type));
+}