ip2k.c (TARGET_STRUCT_VALUE_RTX): New.
authorKazu Hirata <kazu@cs.umass.edu>
Sun, 25 Jan 2004 17:14:41 +0000 (17:14 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Sun, 25 Jan 2004 17:14:41 +0000 (17:14 +0000)
* 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.

From-SVN: r76566

gcc/ChangeLog
gcc/config/ip2k/ip2k.c
gcc/config/ip2k/ip2k.h

index 827ee7a72f1c8509e50932ebcfd9acfee1b4cf38..fd6e414c34ad5557102e3fb9ac85f4df12d608ec 100644 (file)
@@ -1,3 +1,15 @@
+2004-01-25  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * 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.
+
 2004-01-25  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/avr/avr.c (TARGET_STRUCT_VALUE_RTX): New.
index 6f32c43d07c1e3f8343e3a9243145ef914b15bb3..53f71b38f1aac66c5a432dcfdf6c00a4df9edc1c 100644 (file)
@@ -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;
+}
index 88b90b0c186ab94c5695e3da38117438e5ab7f69..70eecdec2aaaeccac35c5c2224f3cc668768edc2 100644 (file)
@@ -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