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]

AM33: enable inc4 for data registers...


... and fix the condition-codes of inc4 for address registers.
It causes negligible (IMO :-) increase in code size:

^ mn10300-elf/am33/libiberty/libiberty.a 28016 28025
^ mn10300-elf/am33/libio/libio.a 23731 23733
^ mn10300-elf/am33/libio/libiostream.a 63981 63987
^ mn10300-elf/am33/libstdc++/libstdc++.a 69843 69850
^ mn10300-elf/am33/newlib/libc.a 47680 47683
^ mn10300-elf/am33/newlib/libc/libc.a 46233 46236
^ mn10300-elf/am33/newlib/libc/stdlib/lib.a 20370 20373
^ mn10300-elf/am33/newlib/libg.a 47680 47683
^ mn10300-elf/am33/newlib/libm.a 96509 96510
^ mn10300-elf/am33/newlib/libm/libm.a 96509 96510
^ mn10300-elf/am33/newlib/libm/math/lib.a 88179 88180

Ok to install?  (this patch assumes am33-gcc-add-sp.patch is already
installed, but it does not depend on it, i.e., there is an overlap
that requires one patch to be tweaked to be installed without the
other.)

Index: gcc/ChangeLog
from  Alexandre Oliva  <aoliva@cygnus.com>

	* config/mn10300/mn10300.md (addsi): Enable inc4 for data
	registers on AM33.  Note that `inc4' on address registers does
	not modify cc.

Index: gcc/config/mn10300/mn10300.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mn10300/mn10300.md,v
retrieving revision 1.28
diff -u -r1.28 mn10300.md
--- gcc/config/mn10300/mn10300.md	2000/04/21 21:14:13	1.28
+++ gcc/config/mn10300/mn10300.md	2000/04/21 22:17:20
@@ -768,9 +768,9 @@
   [(set_attr "cc" "none_0hit")])
 
 (define_insn ""
-  [(set (match_operand:SI 0 "register_operand" "=dx,ax,ax,dax,!dax")
-	(plus:SI (match_operand:SI 1 "register_operand" "%0,0,0,0,dax")
-		 (match_operand:SI 2 "nonmemory_operand" "J,J,L,daxi,dax")))]
+  [(set (match_operand:SI 0 "register_operand" "=dx,a,a,dx,dax,!dax")
+	(plus:SI (match_operand:SI 1 "register_operand" "%0,0,0,0,0,dax")
+		 (match_operand:SI 2 "nonmemory_operand" "J,J,L,L,daxi,dax")))]
   "TARGET_AM33"
   "*
 {
@@ -780,10 +780,11 @@
     case 1:
       return \"inc %0\";
     case 2:
-      return \"inc4 %0\";
     case 3:
-      return \"add %2,%0\";
+      return \"inc4 %0\";
     case 4:
+      return \"add %2,%0\";
+    case 5:
       {
 	enum reg_class src1_class, src2_class, dst_class;
 
@@ -842,7 +843,7 @@
       abort();
     }
 }"
-  [(set_attr "cc" "set_zn,none_0hit,none_0hit,set_zn,set_zn")])
+  [(set_attr "cc" "set_zn,none_0hit,none_0hit,set_zn,set_zn,set_zn")])
 
 (define_insn ""
   [(set (match_operand:SI 0 "register_operand" "=dx,ax,ax,dax,!dax")

-- 
Alexandre Oliva    Enjoy Guaranį, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company        aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist    CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org}   Write to mailing lists, not to me

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