This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: mn10300/AM33: Simplify movhi patterns
- To: law at cygnus dot com
- Subject: Re: mn10300/AM33: Simplify movhi patterns
- From: Alexandre Oliva <aoliva at cygnus dot com>
- Date: 27 Apr 2000 11:58:13 -0300
- Cc: gcc-patches at gcc dot gnu dot org
- Organization: Cygnus Solutions, a Red Hat Company
- References: <15429.956758316@upchuck>
On Apr 26, 2000, Jeffrey A Law <law@cygnus.com> wrote:
>> * config/mn10300/mn10300.md (movhi): Simplify. Prefer data
>> registers.
> OK. Same comments as the movqi patch.
Same explanation :-)
Here's the patch I'm checking in and the updated savings:
v mn10300-elf/am33/libio/libio.a 23772 23763
v mn10300-elf/am33/libio/libiostream.a 64999 64872
v mn10300-elf/am33/libstdc++/libstdc++.a 70837 70710
v mn10300-elf/am33/newlib/libc.a 47573 47533
v mn10300-elf/am33/newlib/libc/libc.a 46127 46087
v mn10300-elf/am33/newlib/libc/stdio/lib.a 16931 16922
v mn10300-elf/am33/newlib/libc/stdlib/lib.a 20333 20302
v mn10300-elf/am33/newlib/libg.a 47573 47533
Index: gcc/ChangeLog
from Alexandre Oliva <aoliva@cygnus.com>
* config/mn10300/mn10300.md (movhi): Simplify. Prefer data
registers.
Index: gcc/config/mn10300/mn10300.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mn10300/mn10300.md,v
retrieving revision 1.32
diff -u -c -r1.32 mn10300.md
*** gcc/config/mn10300/mn10300.md 2000/04/27 14:46:55 1.32
--- gcc/config/mn10300/mn10300.md 2000/04/27 14:56:19
***************
*** 146,153 ****
}")
(define_insn ""
! [(set (match_operand:HI 0 "general_operand" "=dx,a,dx,a,dx,a,dx,a,dxa,m")
! (match_operand:HI 1 "general_operand" "0,0,I,I,a,dx,dxi,ia,m,dxa"))]
"TARGET_AM33
&& (register_operand (operands[0], HImode)
|| register_operand (operands[1], HImode))"
--- 146,153 ----
}")
(define_insn ""
! [(set (match_operand:HI 0 "general_operand" "=d*x*a,d*x,d*x*a,d*x*a,m")
! (match_operand:HI 1 "general_operand" "0,I,d*x*ai,m,d*x*a"))]
"TARGET_AM33
&& (register_operand (operands[0], HImode)
|| register_operand (operands[1], HImode))"
***************
*** 156,170 ****
switch (which_alternative)
{
case 0:
- case 1:
return \"nop\";
! case 2:
return \"clr %0\";
! case 3:
! case 4:
! case 5:
! case 6:
! case 7:
if (GET_CODE (operands[1]) == CONST_DOUBLE)
{
rtx xoperands[2];
--- 156,165 ----
switch (which_alternative)
{
case 0:
return \"nop\";
! case 1:
return \"clr %0\";
! case 2:
if (GET_CODE (operands[1]) == CONST_DOUBLE)
{
rtx xoperands[2];
***************
*** 184,201 ****
return \"movu %1,%0\";
}
return \"mov %1,%0\";
! case 8:
! case 9:
return \"movhu %1,%0\";
default:
abort ();
}
}"
! [(set_attr "cc" "none,none,clobber,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")])
(define_insn ""
! [(set (match_operand:HI 0 "general_operand" "=dx,*a,dx,*a,dx,*a,dx,*a,dx,m")
! (match_operand:HI 1 "general_operand" "0,0,I,I,a,dx,dxi,ia,m,dx"))]
"register_operand (operands[0], HImode)
|| register_operand (operands[1], HImode)"
"*
--- 179,196 ----
return \"movu %1,%0\";
}
return \"mov %1,%0\";
! case 3:
! case 4:
return \"movhu %1,%0\";
default:
abort ();
}
}"
! [(set_attr "cc" "none,clobber,none_0hit,none_0hit,none_0hit")])
(define_insn ""
! [(set (match_operand:HI 0 "general_operand" "=d*a,d,d*a,d,m")
! (match_operand:HI 1 "general_operand" "0,I,dai,m,d"))]
"register_operand (operands[0], HImode)
|| register_operand (operands[1], HImode)"
"*
***************
*** 203,217 ****
switch (which_alternative)
{
case 0:
- case 1:
return \"nop\";
! case 2:
return \"clr %0\";
! case 3:
! case 4:
! case 5:
! case 6:
! case 7:
if (GET_CODE (operands[1]) == CONST_DOUBLE)
{
rtx xoperands[2];
--- 198,207 ----
switch (which_alternative)
{
case 0:
return \"nop\";
! case 1:
return \"clr %0\";
! case 2:
if (GET_CODE (operands[1]) == CONST_DOUBLE)
{
rtx xoperands[2];
***************
*** 221,234 ****
return \"\";
}
return \"mov %1,%0\";
! case 8:
! case 9:
return \"movhu %1,%0\";
default:
abort ();
}
}"
! [(set_attr "cc" "none,none,clobber,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")])
;; movsi and helpers
--- 211,224 ----
return \"\";
}
return \"mov %1,%0\";
! case 3:
! case 4:
return \"movhu %1,%0\";
default:
abort ();
}
}"
! [(set_attr "cc" "none,clobber,none_0hit,none_0hit,none_0hit")])
;; movsi and helpers
--
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