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.c: Fix mov length computation.


Hi,

Attached is a patch to fix mov length computation.

For SFmode, const0_rtx can't happen.  Even if const0_rtx is given to
mov:SF, loading 0 takes 4 bytes on H8/300 (using sub.w).

Also, if a constant given, mov:SF takes 8 bytes.  (Currently this does
not happen because LEGITIMATE_CONSTANT_P rejects CONST_DOUBLE, but I
am planning to change this soon.)

Committed as obvious.

Kazu Hirata

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

	* config/h8300/h8300.c (compute_mov_length): Fix length of
	mov:SF on H8/300.

Index: h8300.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/h8300/h8300.c,v
retrieving revision 1.245
diff -u -r1.245 h8300.c
--- h8300.c	28 Jun 2003 19:15:57 -0000	1.245
+++ h8300.c	30 Jun 2003 14:36:20 -0000
@@ -1893,10 +1893,7 @@
 	      if (REG_P (src))
 		return 4;
 
-	      if (src == const0_rtx)
-		return 2;
-
-	      return 6;
+	      return 8;
 	    }
 
 	  base_length = 8;


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