re PR target/15202 ([3.4 only] ICE in reload_cse_simplify_operands, at postreload.c)
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Fri, 7 May 2004 03:09:15 +0000 (03:09 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Fri, 7 May 2004 03:09:15 +0000 (03:09 +0000)
PR target/15202
* pa.md (movdi, movsi, movhi, movqi): Support move from shift amount
register to general register.

From-SVN: r81598

gcc/ChangeLog
gcc/config/pa/pa.md

index b152eda55f985533c1bfc0e3b9c14f99c12cfe59..c87394fb900e21a32e2af5a595a4418630d2270d 100644 (file)
@@ -1,3 +1,9 @@
+2004-05-06  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       PR target/15202
+       * pa.md (movdi, movsi, movhi, movqi): Support move from shift amount
+       register to general register.
+
 2004-05-07  Alan Modra  <amodra@bigpond.net.au>
 
        * config/rs6000/rs6000.h (STACK_BOUNDARY): Use 128 bit for either
index 072f60171e94d02b1d0bab2aece6802635aff709..1f3e2618eb2639da7cbc369f7a53f311a7568cb5 100644 (file)
 
 (define_insn ""
   [(set (match_operand:SI 0 "move_dest_operand"
-                         "=r,r,r,r,r,r,Q,!*q,!*f,*f,T")
+                         "=r,r,r,r,r,r,Q,!*q,!r,!*f,*f,T")
        (match_operand:SI 1 "move_src_operand"
-                         "A,r,J,N,K,RQ,rM,!rM,!*fM,RT,*f"))]
+                         "A,r,J,N,K,RQ,rM,!rM,!*q,!*fM,RT,*f"))]
   "(register_operand (operands[0], SImode)
     || reg_or_0_operand (operands[1], SImode))
    && !TARGET_SOFT_FLOAT"
    ldw%M1 %1,%0
    stw%M0 %r1,%0
    mtsar %r1
+   {mfctl|mfctl,w} %%sar,%0
    fcpy,sgl %f1,%0
    fldw%F1 %1,%0
    fstw%F0 %1,%0"
-  [(set_attr "type" "load,move,move,move,shift,load,store,move,fpalu,fpload,fpstore")
+  [(set_attr "type" "load,move,move,move,shift,load,store,move,move,fpalu,fpload,fpstore")
    (set_attr "pa_combine_type" "addmove")
-   (set_attr "length" "4,4,4,4,4,4,4,4,4,4,4")])
+   (set_attr "length" "4,4,4,4,4,4,4,4,4,4,4,4")])
 
 (define_insn ""
   [(set (match_operand:SI 0 "indexed_memory_operand" "=R")
 
 (define_insn ""
   [(set (match_operand:SI 0 "move_dest_operand"
-                         "=r,r,r,r,r,r,Q,!*q")
+                         "=r,r,r,r,r,r,Q,!*q,!r")
        (match_operand:SI 1 "move_src_operand"
-                         "A,r,J,N,K,RQ,rM,!rM"))]
+                         "A,r,J,N,K,RQ,rM,!rM,!*q"))]
   "(register_operand (operands[0], SImode)
     || reg_or_0_operand (operands[1], SImode))
    && TARGET_SOFT_FLOAT"
    {zdepi|depwi,z} %Z1,%0
    ldw%M1 %1,%0
    stw%M0 %r1,%0
-   mtsar %r1"
-  [(set_attr "type" "load,move,move,move,move,load,store,move")
+   mtsar %r1
+   {mfctl|mfctl,w} %%sar,%0"
+  [(set_attr "type" "load,move,move,move,move,load,store,move,move")
    (set_attr "pa_combine_type" "addmove")
-   (set_attr "length" "4,4,4,4,4,4,4,4")])
+   (set_attr "length" "4,4,4,4,4,4,4,4,4")])
 
 ;; Load or store with base-register modification.
 (define_insn ""
 
 (define_insn ""
   [(set (match_operand:HI 0 "move_dest_operand"
-                         "=r,r,r,r,r,Q,!*q,!*f")
+                         "=r,r,r,r,r,Q,!*q,!r,!*f")
        (match_operand:HI 1 "move_src_operand"
-                         "r,J,N,K,RQ,rM,!rM,!*fM"))]
+                         "r,J,N,K,RQ,rM,!rM,!*q,!*fM"))]
   "register_operand (operands[0], HImode)
    || reg_or_0_operand (operands[1], HImode)"
   "@
    ldh%M1 %1,%0
    sth%M0 %r1,%0
    mtsar %r1
+   mfctr %sar,%0
    fcpy,sgl %f1,%0"
-  [(set_attr "type" "move,move,move,shift,load,store,move,fpalu")
+  [(set_attr "type" "move,move,move,shift,load,store,move,move,fpalu")
    (set_attr "pa_combine_type" "addmove")
-   (set_attr "length" "4,4,4,4,4,4,4,4")])
+   (set_attr "length" "4,4,4,4,4,4,4,4,4")])
 
 (define_insn ""
   [(set (match_operand:HI 0 "register_operand" "=r")
 
 (define_insn ""
   [(set (match_operand:QI 0 "move_dest_operand"
-                         "=r,r,r,r,r,Q,!*q,!*f")
+                         "=r,r,r,r,r,Q,!*q,!r,!*f")
        (match_operand:QI 1 "move_src_operand"
-                         "r,J,N,K,RQ,rM,!rM,!*fM"))]
+                         "r,J,N,K,RQ,rM,!rM,!*q,!*fM"))]
   "register_operand (operands[0], QImode)
    || reg_or_0_operand (operands[1], QImode)"
   "@
    ldb%M1 %1,%0
    stb%M0 %r1,%0
    mtsar %r1
+   {mfctl|mfctl,w} %%sar,%0
    fcpy,sgl %f1,%0"
-  [(set_attr "type" "move,move,move,shift,load,store,move,fpalu")
+  [(set_attr "type" "move,move,move,shift,load,store,move,move,fpalu")
    (set_attr "pa_combine_type" "addmove")
-   (set_attr "length" "4,4,4,4,4,4,4,4")])
+   (set_attr "length" "4,4,4,4,4,4,4,4,4")])
 
 (define_insn ""
   [(set (match_operand:QI 0 "register_operand" "=r")
 
 (define_insn ""
   [(set (match_operand:DF 0 "move_dest_operand"
-                         "=!*r,*r,*r,*r,*r,Q,!*q,f,f,T")
+                         "=!*r,*r,*r,*r,*r,Q,!*q,!r,f,f,T")
        (match_operand:DF 1 "move_src_operand"
-                         "!*r,J,N,K,RQ,*rM,!*rM,fM,RT,f"))]
+                         "!*r,J,N,K,RQ,*rM,!*rM,!*q,fM,RT,f"))]
   "(register_operand (operands[0], DFmode)
     || reg_or_0_operand (operands[1], DFmode))
    && !TARGET_SOFT_FLOAT && TARGET_64BIT"
    ldd%M1 %1,%0
    std%M0 %r1,%0
    mtsar %r1
+   {mfctl|mfctl,w} %%sar,%0
    fcpy,dbl %f1,%0
    fldd%F1 %1,%0
    fstd%F0 %1,%0"
-  [(set_attr "type" "move,move,move,shift,load,store,move,fpalu,fpload,fpstore")
+  [(set_attr "type" "move,move,move,shift,load,store,move,move,fpalu,fpload,fpstore")
    (set_attr "pa_combine_type" "addmove")
-   (set_attr "length" "4,4,4,4,4,4,4,4,4,4")])
+   (set_attr "length" "4,4,4,4,4,4,4,4,4,4,4")])
 
 \f
 (define_expand "movdi"
 
 (define_insn ""
   [(set (match_operand:DI 0 "move_dest_operand"
-                         "=r,r,r,r,r,r,Q,!*q,!*f,*f,T")
+                         "=r,r,r,r,r,r,Q,!*q,!r,!*f,*f,T")
        (match_operand:DI 1 "move_src_operand"
-                         "A,r,J,N,K,RQ,rM,!rM,!*fM,RT,*f"))]
+                         "A,r,J,N,K,RQ,rM,!rM,!*q,!*fM,RT,*f"))]
   "(register_operand (operands[0], DImode)
     || reg_or_0_operand (operands[1], DImode))
    && !TARGET_SOFT_FLOAT && TARGET_64BIT"
    ldd%M1 %1,%0
    std%M0 %r1,%0
    mtsar %r1
+   {mfctl|mfctl,w} %%sar,%0
    fcpy,dbl %f1,%0
    fldd%F1 %1,%0
    fstd%F0 %1,%0"
-  [(set_attr "type" "load,move,move,move,shift,load,store,move,fpalu,fpload,fpstore")
+  [(set_attr "type" "load,move,move,move,shift,load,store,move,move,fpalu,fpload,fpstore")
    (set_attr "pa_combine_type" "addmove")
-   (set_attr "length" "4,4,4,4,4,4,4,4,4,4,4")])
+   (set_attr "length" "4,4,4,4,4,4,4,4,4,4,4,4")])
 
 (define_insn ""
   [(set (match_operand:DI 0 "indexed_memory_operand" "=R")