This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
AM30/AM33 SP handling
- To: gcc-patches at gcc dot gnu dot org
- Subject: AM30/AM33 SP handling
- From: Alexandre Oliva <aoliva at cygnus dot com>
- Date: 21 Apr 2000 16:28:00 -0300
- Organization: Cygnus Solutions, a Red Hat Company
This could make GCC a tad bit faster, and might improve some
optimizations. No significant effects on code size (that was not the
point):
^ gcc/am33/libgcc.a 26923 26947
v gcc/libgcc.a 27179 27018
v mn10300-elf/am33/libio/libiostream.a 63979 63977
v mn10300-elf/am33/libstdc++/libstdc++.a 69913 69839
^ mn10300-elf/libiberty/libiberty.a 27904 27926
^ mn10300-elf/libio/libio.a 23667 23710
v mn10300-elf/libio/libiostream.a 63691 63640
v mn10300-elf/libstdc++/libstdc++.a 69605 69442
v mn10300-elf/newlib/libc.a 46930 46896
v mn10300-elf/newlib/libc/libc.a 45525 45488
v mn10300-elf/newlib/libc/misc/lib.a 762 755
v mn10300-elf/newlib/libc/stdio/lib.a 17080 17047
^ mn10300-elf/newlib/libc/stdlib/lib.a 19858 19865
v mn10300-elf/newlib/libc/string/lib.a 2876 2871
v mn10300-elf/newlib/libc/time/lib.a 2722 2720
v mn10300-elf/newlib/libg.a 46930 46896
^ mn10300-elf/newlib/libm.a 95856 95892
^ mn10300-elf/newlib/libm/common/lib.a 8216 8259
^ mn10300-elf/newlib/libm/libm.a 95856 95892
v mn10300-elf/newlib/libm/math/lib.a 87640 87633
Ok to install?
Index: gcc/ChangeLog
from Alexandre Oliva <aoliva@cygnus.com>
* config/mn10300/mn10300.h (REG_CLASS_FROM_LETTER): Return
EXTENDED_REGS only if TARGET_AM33.
* config/mn10300/mn10300.md (movsi): Move SP handling to
separate patterns.
Index: gcc/config/mn10300/mn10300.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mn10300/mn10300.h,v
retrieving revision 1.25
diff -u -r1.25 mn10300.h
--- gcc/config/mn10300/mn10300.h 2000/03/29 13:10:44 1.25
+++ gcc/config/mn10300/mn10300.h 2000/04/21 18:32:14
@@ -287,8 +287,10 @@
#define REG_CLASS_FROM_LETTER(C) \
((C) == 'd' ? DATA_REGS : \
(C) == 'a' ? ADDRESS_REGS : \
+ (C) == 'y' ? SP_REGS : \
+ ! TARGET_AM33 ? NO_REGS : \
(C) == 'x' ? EXTENDED_REGS : \
- (C) == 'y' ? SP_REGS : NO_REGS)
+ NO_REGS)
/* Macros to check register numbers against specific register classes. */
Index: gcc/config/mn10300/mn10300.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mn10300/mn10300.md,v
retrieving revision 1.27
diff -u -r1.27 mn10300.md
--- gcc/config/mn10300/mn10300.md 2000/01/14 23:03:45 1.27
+++ gcc/config/mn10300/mn10300.md 2000/04/21 19:19:50
@@ -295,10 +295,26 @@
}")
(define_insn ""
+ [(set (match_operand:SI 0 "general_operand" "=y,*d*xaR")
+ (match_operand:SI 1 "general_operand" "dxaR,y"))]
+ "TARGET_AM33 && (operands[0] == stack_pointer_rtx
+ || operands[1] == stack_pointer_rtx)"
+ "mov %1, %0"
+ [(set_attr "cc" "none_0hit,none_0hit")])
+
+(define_insn ""
+ [(set (match_operand:SI 0 "general_operand" "=y,aR")
+ (match_operand:SI 1 "general_operand" "aR,y"))]
+ "operands[0] == stack_pointer_rtx
+ || operands[1] == stack_pointer_rtx"
+ "mov %1, %0"
+ [(set_attr "cc" "none_0hit,none_0hit")])
+
+(define_insn ""
[(set (match_operand:SI 0 "general_operand"
- "=dx,ax,dx,a,dxm,dxm,axm,axm,dx,dx,ax,ax,axR,y")
+ "=dx,ax,dx,a,dxm,dxm,axm,axm,dx,dx,ax,ax")
(match_operand:SI 1 "general_operand"
- "0,0,I,I,dx,ax,dx,ax,dixm,aixm,dixm,aixm,xy,axR"))]
+ "0,0,I,I,dx,ax,dx,ax,dixm,aixm,dixm,aixm"))]
"register_operand (operands[0], SImode)
|| register_operand (operands[1], SImode)"
"*
@@ -319,8 +335,6 @@
case 9:
case 10:
case 11:
- case 12:
- case 13:
if (GET_CODE (operands[1]) == CONST_DOUBLE)
{
rtx xoperands[2];
@@ -344,7 +358,7 @@
abort();
}
}"
- [(set_attr "cc" "none,none,clobber,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")])
+ [(set_attr "cc" "none,none,clobber,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")])
(define_expand "movsf"
[(set (match_operand:SF 0 "general_operand" "")
--
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