OSDN Git Service

* config/mn10300/mn10300.h (REG_CLASS_FROM_LETTER): Return
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 26 Apr 2000 00:09:52 +0000 (00:09 +0000)
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 26 Apr 2000 00:09:52 +0000 (00:09 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33429 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/mn10300/mn10300.h
gcc/config/mn10300/mn10300.md

index 9f19de8..4be1494 100644 (file)
@@ -1,3 +1,12 @@
+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>
 
        * aclocal.m4 (gcc_AC_NEED_DECLARATION): This macro now requires
index bbea7b1..f737155 100644 (file)
@@ -287,8 +287,10 @@ enum reg_class {
 #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 c2f74e7..17195b4 100644 (file)
 
 (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,axR,!*y")
        (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[1], SImode)"
   "*
        (plus:SI (match_operand:SI 1 "register_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 ""
-  [(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")
                 (match_operand:SI 2 "nonmemory_operand" "J,J,L,L,daxi,i,dax")))]
   "TARGET_AM33"
   [(set_attr "cc" "set_zn,none_0hit,set_zn,none_0hit,set_zn,none_0hit,set_zn")])
 
 (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")
                 (match_operand:SI 2 "nonmemory_operand" "J,J,L,daxi,i,dax")))]
   ""