]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
h8300.c (h8300_return_in_memory): New.
authorKazu Hirata <kazu@cs.umass.edu>
Thu, 15 Jan 2004 18:02:01 +0000 (18:02 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Thu, 15 Jan 2004 18:02:01 +0000 (18:02 +0000)
* config/h8300/h8300.c (h8300_return_in_memory): New.
(TARGET_STRUCT_VALUE_RTX): Likewise.
(TARGET_RETURN_IN_MEMORY): Likewise.
* config/h8300/h8300.h (STRUCT_VALUE): Remove.
(RETURN_IN_MEMORY): Likewise.

From-SVN: r75933

gcc/ChangeLog
gcc/config/h8300/h8300.c
gcc/config/h8300/h8300.h

index 184b44d2afeeeb8a4b244e13c24e6f07f9d87879..2b6837260d7e9851fb623ee7e1f96e118f841f81 100644 (file)
@@ -1,3 +1,11 @@
+2004-01-15  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * config/h8300/h8300.c (h8300_return_in_memory): New.
+       (TARGET_STRUCT_VALUE_RTX): Likewise.
+       (TARGET_RETURN_IN_MEMORY): Likewise.
+       * config/h8300/h8300.h (STRUCT_VALUE): Remove.
+       (RETURN_IN_MEMORY): Likewise.
+
 2004-01-15  Richard Earnshaw  <rearnsha@arm.com>
 
        PR optimization/13375
index d4e315ba7ffeea371e835f6b2603b0b9e5a2bf4f..5c6f8c24db3712a10f43d3ff7d973b8ff21567bf 100644 (file)
@@ -4564,6 +4564,13 @@ h8300_init_libfuncs (void)
   set_optab_libfunc (umod_optab, HImode, "__umodhi3");
 }
 \f
+static bool
+h8300_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
+{
+  return (TYPE_MODE (type) == BLKmode
+         || GET_MODE_SIZE (TYPE_MODE (type)) > (TARGET_H8300 ? 4 : 8));
+}
+\f
 /* Initialize the GCC target structure.  */
 #undef TARGET_ATTRIBUTE_TABLE
 #define TARGET_ATTRIBUTE_TABLE h8300_attribute_table
@@ -4591,4 +4598,9 @@ h8300_init_libfuncs (void)
 #undef TARGET_INIT_LIBFUNCS
 #define TARGET_INIT_LIBFUNCS h8300_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 h8300_return_in_memory
+
 struct gcc_target targetm = TARGET_INITIALIZER;
index b60fc52af492daf137520ddd1496b5fbe5672152..240abdf3c75f56e8629f3b5a967ee19fb94acb6a 100644 (file)
@@ -632,16 +632,6 @@ enum reg_class {
 
 #define FUNCTION_ARG_REGNO_P(N) (TARGET_QUICKCALL ? N < 3 : 0)
 
-/* Register in which address to store a structure value
-   is passed to a function.  */
-
-#define STRUCT_VALUE 0
-
-/* Return true if X should be returned in memory.  */
-#define RETURN_IN_MEMORY(X)                                    \
-  (TYPE_MODE (X) == BLKmode                                    \
-   || GET_MODE_SIZE (TYPE_MODE (X)) > (TARGET_H8300 ? 4 : 8))
-
 /* When defined, the compiler allows registers explicitly used in the
    rtl to be used as spill registers but prevents the compiler from
    extending the lifetime of these registers.  */