This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] h8300: Use define_constants more.


Hi,

Committed as obvious.

Kazu Hirata

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

	* config/h8300/h8300.h (FUNCTION_VALUE): Use R0_REG.
	(FUNCTION_VALUE_REGNO_P): Likewise.
	* config/h8300/h8300.md: Define R0_REG.

Index: h8300.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/h8300/h8300.h,v
retrieving revision 1.157
diff -u -r1.157 h8300.h
--- h8300.h	27 Nov 2003 17:20:33 -0000	1.157
+++ h8300.h	27 Nov 2003 17:42:17 -0000
@@ -609,7 +609,7 @@
    On the H8 the return value is in R0/R1.  */
 
 #define FUNCTION_VALUE(VALTYPE, FUNC) \
-  gen_rtx_REG (TYPE_MODE (VALTYPE), 0)
+  gen_rtx_REG (TYPE_MODE (VALTYPE), R0_REG)
 
 /* Define how to find the value returned by a library function
    assuming the value has mode MODE.  */
@@ -622,7 +622,7 @@
 /* 1 if N is a possible register number for a function value.
    On the H8, R0 is the only register thus used.  */
 
-#define FUNCTION_VALUE_REGNO_P(N) ((N) == 0)
+#define FUNCTION_VALUE_REGNO_P(N) ((N) == R0_REG)
 
 /* Define this if PCC uses the nonreentrant convention for returning
    structure and union values.  */
Index: h8300.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/h8300/h8300.md,v
retrieving revision 1.248
diff -u -r1.248 h8300.md
--- h8300.md	27 Nov 2003 17:40:10 -0000	1.248
+++ h8300.md	27 Nov 2003 17:42:18 -0000
@@ -53,7 +53,8 @@
    (UNSPEC_MONITOR	1)])
 
 (define_constants
-  [(SC_REG	 3)
+  [(R0_REG	 0)
+   (SC_REG	 3)
    (FP_REG	 6)
    (SP_REG	 7)
    (MAC_REG	 8)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]