Commit d25ed420 by Alexandre Oliva Committed by Alexandre Oliva

mn10300.h (REG_CLASS_FROM_LETTER): Return EXTENDED_REGS only if TARGET_AM33.

* config/mn10300/mn10300.h (REG_CLASS_FROM_LETTER): Return
EXTENDED_REGS only if TARGET_AM33.
* config/mn10300/mn10300.md (movsi, addsi): Avoid exposing
SP_REGS to register allocation and reloading unless absolutely
necessary.
(movsi3): Remove special-case of adding non-constants to SP.

From-SVN: r33429
parent 86cf1cbd
2000-04-25 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, addsi): Avoid exposing
SP_REGS to register allocation and reloading unless absolutely
necessary.
(movsi3): Remove special-case of adding non-constants to SP.
2000-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2000-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* aclocal.m4 (gcc_AC_NEED_DECLARATION): This macro now requires * aclocal.m4 (gcc_AC_NEED_DECLARATION): This macro now requires
......
...@@ -287,8 +287,10 @@ enum reg_class { ...@@ -287,8 +287,10 @@ enum reg_class {
#define REG_CLASS_FROM_LETTER(C) \ #define REG_CLASS_FROM_LETTER(C) \
((C) == 'd' ? DATA_REGS : \ ((C) == 'd' ? DATA_REGS : \
(C) == 'a' ? ADDRESS_REGS : \ (C) == 'a' ? ADDRESS_REGS : \
(C) == 'y' ? SP_REGS : \
! TARGET_AM33 ? NO_REGS : \
(C) == 'x' ? EXTENDED_REGS : \ (C) == 'x' ? EXTENDED_REGS : \
(C) == 'y' ? SP_REGS : NO_REGS) NO_REGS)
/* Macros to check register numbers against specific register classes. */ /* Macros to check register numbers against specific register classes. */
......
...@@ -296,9 +296,9 @@ ...@@ -296,9 +296,9 @@
(define_insn "" (define_insn ""
[(set (match_operand:SI 0 "general_operand" [(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,axR,!*y")
(match_operand:SI 1 "general_operand" (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,!*y,axR"))]
"register_operand (operands[0], SImode) "register_operand (operands[0], SImode)
|| register_operand (operands[1], SImode)" || register_operand (operands[1], SImode)"
"* "*
...@@ -744,23 +744,10 @@ ...@@ -744,23 +744,10 @@
(plus:SI (match_operand:SI 1 "register_operand" "") (plus:SI (match_operand:SI 1 "register_operand" "")
(match_operand:SI 2 "nonmemory_operand" "")))] (match_operand:SI 2 "nonmemory_operand" "")))]
"" ""
" "")
{
/* We can't add a variable amount directly to the stack pointer;
so do so via a temporary register. */
if (operands[0] == stack_pointer_rtx
&& GET_CODE (operands[1]) != CONST_INT
&& GET_CODE (operands[2]) != CONST_INT)
{
rtx temp = gen_reg_rtx (SImode);
emit_move_insn (temp, gen_rtx_PLUS (SImode, operands[1], operands[2]));
emit_move_insn (operands[0], temp);
DONE;
}
}")
(define_insn "" (define_insn ""
[(set (match_operand:SI 0 "register_operand" "=dx,a,x,a,dax,xy,!dax") [(set (match_operand:SI 0 "register_operand" "=dx,a,x,a,dax,!*y,!dax")
(plus:SI (match_operand:SI 1 "register_operand" "%0,0,0,0,0,0,dax") (plus:SI (match_operand:SI 1 "register_operand" "%0,0,0,0,0,0,dax")
(match_operand:SI 2 "nonmemory_operand" "J,J,L,L,daxi,i,dax")))] (match_operand:SI 2 "nonmemory_operand" "J,J,L,L,daxi,i,dax")))]
"TARGET_AM33" "TARGET_AM33"
...@@ -839,7 +826,7 @@ ...@@ -839,7 +826,7 @@
[(set_attr "cc" "set_zn,none_0hit,set_zn,none_0hit,set_zn,none_0hit,set_zn")]) [(set_attr "cc" "set_zn,none_0hit,set_zn,none_0hit,set_zn,none_0hit,set_zn")])
(define_insn "" (define_insn ""
[(set (match_operand:SI 0 "register_operand" "=dx,a,a,dax,xy,!dax") [(set (match_operand:SI 0 "register_operand" "=dx,a,a,dax,!*y,!dax")
(plus:SI (match_operand:SI 1 "register_operand" "%0,0,0,0,0,dax") (plus:SI (match_operand:SI 1 "register_operand" "%0,0,0,0,0,dax")
(match_operand:SI 2 "nonmemory_operand" "J,J,L,daxi,i,dax")))] (match_operand:SI 2 "nonmemory_operand" "J,J,L,daxi,i,dax")))]
"" ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment