[patch] h8300.h: Return DImode function values in registers.

Kazu Hirata kazu@cs.umass.edu
Wed Jun 11 12:29:00 GMT 2003


Hi,

Attached is a patch to make h8300 port return DImode function values
in registers.  This is an ABI change, but 64-bit support itself is new
in 3.4, so this shouldn't break the binary compatibility.

Tested on h8300 port.  Committed.

Kazu Hirata

2003-06-11  Kazu Hirata  <kazu@cs.umass.edu>

	* config/h8300/h8300.h (RETURN_IN_MEMORY): Accept DImode if
	!TARGET_H8300.

Index: h8300.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/h8300/h8300.h,v
retrieving revision 1.145
diff -u -r1.145 h8300.h
--- h8300.h	11 Jun 2003 11:58:39 -0000	1.145
+++ h8300.h	11 Jun 2003 12:03:40 -0000
@@ -635,8 +635,9 @@
 #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)) > 4)
+#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



More information about the Gcc-patches mailing list