s390.md ("cpu_facility", "enabled"): Attribute definitions added.
authorAndreas Krebbel <krebbel1@de.ibm.com>
Tue, 27 May 2008 11:48:14 +0000 (11:48 +0000)
committerAndreas Krebbel <krebbel@gcc.gnu.org>
Tue, 27 May 2008 11:48:14 +0000 (11:48 +0000)
2008-05-27  Andreas Krebbel  <krebbel1@de.ibm.com>

* config/s390/s390.md ("cpu_facility", "enabled"): Attribute
definitions added.
("*movdi_64dfp", "*movdi_64extimm", "*movdi_64"): Merged into
"*movdi_64".
("*anddi3_extimm", "*anddi3"): Merged into "*anddi3".
("*iordi3_extimm", "*iordi3"): Merged into "*iordi3".
("*xordi3_extimm", "*xordi3"): Merged into "*xordi3".

From-SVN: r136013

gcc/ChangeLog
gcc/config/s390/s390.md

index 6fe4bdc..42457ba 100644 (file)
@@ -1,5 +1,15 @@
 2008-05-27  Andreas Krebbel  <krebbel1@de.ibm.com>
 
+       * config/s390/s390.md ("cpu_facility", "enabled"): Attribute
+       definitions added.
+       ("*movdi_64dfp", "*movdi_64extimm", "*movdi_64"): Merged into
+       "*movdi_64".
+       ("*anddi3_extimm", "*anddi3"): Merged into "*anddi3".
+       ("*iordi3_extimm", "*iordi3"): Merged into "*iordi3".
+       ("*xordi3_extimm", "*xordi3"): Merged into "*xordi3".
+
+2008-05-27  Andreas Krebbel  <krebbel1@de.ibm.com>
+
        * reload.c: (find_reloads): Skip alternatives according to the
        "enabled" attribute. Constify the constraint variable.
        * recog.c (get_attr_enabled): Add default implementation.
index 5ffa728..c6a4e05 100644 (file)
 (define_attr "cpu" "g5,g6,z900,z990,z9_109"
   (const (symbol_ref "s390_tune")))
 
+(define_attr "cpu_facility" "standard,ieee,zarch,longdisp,extimm,dfp"
+  (const_string "standard"))
+
+(define_attr "enabled" ""
+  (cond [(eq_attr "cpu_facility" "standard")
+        (const_int 1)
+
+         (and (eq_attr "cpu_facility" "ieee")
+             (ne (symbol_ref "TARGET_CPU_IEEE_FLOAT") (const_int 0)))
+        (const_int 1)
+
+        (and (eq_attr "cpu_facility" "zarch")
+             (ne (symbol_ref "TARGET_ZARCH") (const_int 0)))
+        (const_int 1)
+
+        (and (eq_attr "cpu_facility" "longdisp")
+             (ne (symbol_ref "TARGET_LONG_DISPLACEMENT") (const_int 0)))
+        (const_int 1)
+
+         (and (eq_attr "cpu_facility" "extimm")
+             (ne (symbol_ref "TARGET_EXTIMM") (const_int 0)))
+        (const_int 1)
+
+         (and (eq_attr "cpu_facility" "dfp")
+             (ne (symbol_ref "TARGET_DFP") (const_int 0)))
+        (const_int 1)]
+       (const_int 0)))
+
 ;; Pipeline description for z900.  For lack of anything better,
 ;; this description is also used for the g5 and g6.
 (include "2064.md")
    [(set_attr "op_type" "RIL")
     (set_attr "type"    "larl")])
 
-(define_insn "*movdi_64dfp"
+(define_insn "*movdi_64"
   [(set (match_operand:DI 0 "nonimmediate_operand"
                             "=d,d,d,d,d,d,d,d,f,d,d,d,d,
                              m,!*f,!*f,!*f,!R,!T,d,t,Q,t,?Q")
         (match_operand:DI 1 "general_operand"
                             "K,N0HD0,N1HD0,N2HD0,N3HD0,Os,N0SD0,N1SD0,d,f,L,d,m,
                              d,*f,R,T,*f,*f,t,d,t,Q,?Q"))]
-  "TARGET_64BIT && TARGET_DFP"
+  "TARGET_64BIT"
   "@
    lghi\t%0,%h1
    llihh\t%0,%i1
   [(set_attr "op_type" "RI,RI,RI,RI,RI,RIL,RIL,RIL,RRE,RRE,RXY,RRE,RXY,RXY,
                         RR,RX,RXY,RX,RXY,*,*,RS,RS,SS")
    (set_attr "type" "*,*,*,*,*,*,*,*,floaddf,floaddf,la,lr,load,store,
-                     floaddf,floaddf,floaddf,fstoredf,fstoredf,*,*,*,*,*")])
-
-(define_insn "*movdi_64extimm"
-  [(set (match_operand:DI 0 "nonimmediate_operand"
-                            "=d,d,d,d,d,d,d,d,d,d,d,m,!*f,!*f,!*f,!R,!T,d,t,Q,t,?Q")
-        (match_operand:DI 1 "general_operand"
-                            "K,N0HD0,N1HD0,N2HD0,N3HD0,Os,N0SD0,N1SD0,L,d,m,d,*f,R,T,*f,*f,t,d,t,Q,?Q"))]
-  "TARGET_64BIT && TARGET_EXTIMM"
-  "@
-   lghi\t%0,%h1
-   llihh\t%0,%i1
-   llihl\t%0,%i1
-   llilh\t%0,%i1
-   llill\t%0,%i1
-   lgfi\t%0,%1
-   llihf\t%0,%k1
-   llilf\t%0,%k1
-   lay\t%0,%a1
-   lgr\t%0,%1
-   lg\t%0,%1
-   stg\t%1,%0
-   ldr\t%0,%1
-   ld\t%0,%1
-   ldy\t%0,%1
-   std\t%1,%0
-   stdy\t%1,%0
-   #
-   #
-   stam\t%1,%N1,%S0
-   lam\t%0,%N0,%S1
-   #"
-  [(set_attr "op_type" "RI,RI,RI,RI,RI,RIL,RIL,RIL,RXY,RRE,RXY,RXY,
-                        RR,RX,RXY,RX,RXY,*,*,RS,RS,SS")
-   (set_attr "type" "*,*,*,*,*,*,*,*,la,lr,load,store,
-                     floaddf,floaddf,floaddf,fstoredf,fstoredf,*,*,*,*,*")])
-
-(define_insn "*movdi_64"
-  [(set (match_operand:DI 0 "nonimmediate_operand"
-                            "=d,d,d,d,d,d,d,d,m,!*f,!*f,!*f,!R,!T,d,t,Q,t,?Q")
-        (match_operand:DI 1 "general_operand"
-                            "K,N0HD0,N1HD0,N2HD0,N3HD0,L,d,m,d,*f,R,T,*f,*f,t,d,t,Q,?Q"))]
-  "TARGET_64BIT && !TARGET_EXTIMM"
-  "@
-   lghi\t%0,%h1
-   llihh\t%0,%i1
-   llihl\t%0,%i1
-   llilh\t%0,%i1
-   llill\t%0,%i1
-   lay\t%0,%a1
-   lgr\t%0,%1
-   lg\t%0,%1
-   stg\t%1,%0
-   ldr\t%0,%1
-   ld\t%0,%1
-   ldy\t%0,%1
-   std\t%1,%0
-   stdy\t%1,%0
-   #
-   #
-   stam\t%1,%N1,%S0
-   lam\t%0,%N0,%S1
-   #"
-  [(set_attr "op_type" "RI,RI,RI,RI,RI,RXY,RRE,RXY,RXY,
-                        RR,RX,RXY,RX,RXY,*,*,RS,RS,SS")
-   (set_attr "type" "*,*,*,*,*,la,lr,load,store,
-                     floaddf,floaddf,floaddf,fstoredf,fstoredf,*,*,*,*,*")])
+                     floaddf,floaddf,floaddf,fstoredf,fstoredf,*,*,*,*,*")
+   (set_attr "cpu_facility" "*,*,*,*,*,extimm,extimm,extimm,dfp,dfp,longdisp,
+                             *,*,*,*,*,longdisp,*,longdisp,*,*,*,*,*")])
 
 (define_split
   [(set (match_operand:DI 0 "register_operand" "")
    ng\t%0,%2"
   [(set_attr "op_type"  "RRE,RXY")])
 
-(define_insn "*anddi3_extimm"
+(define_insn "*anddi3"
   [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,d,d,d,d,d,d,AQ,Q")
         (and:DI (match_operand:DI 1 "nonimmediate_operand"
                                     "%d,o,0,0,0,0,0,0,0,0,0,0")
                 (match_operand:DI 2 "general_operand"
                                     "M,M,N0HDF,N1HDF,N2HDF,N3HDF,N0SDF,N1SDF,d,m,NxQDF,Q")))
    (clobber (reg:CC CC_REGNUM))]
-  "TARGET_64BIT && TARGET_EXTIMM && s390_logical_operator_ok_p (operands)"
+  "TARGET_64BIT && s390_logical_operator_ok_p (operands)"
   "@
    #
    #
    ng\t%0,%2
    #
    #"
-  [(set_attr "op_type" "RRE,RXE,RI,RI,RI,RI,RIL,RIL,RRE,RXY,SI,SS")])
-
-(define_insn "*anddi3"
-  [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,d,d,d,d,AQ,Q")
-        (and:DI (match_operand:DI 1 "nonimmediate_operand"
-                                    "%d,o,0,0,0,0,0,0,0,0")
-                (match_operand:DI 2 "general_operand"
-                                    "M,M,N0HDF,N1HDF,N2HDF,N3HDF,d,m,NxQDF,Q")))
-   (clobber (reg:CC CC_REGNUM))]
-  "TARGET_64BIT && !TARGET_EXTIMM && s390_logical_operator_ok_p (operands)"
-  "@
-   #
-   #
-   nihh\t%0,%j2
-   nihl\t%0,%j2
-   nilh\t%0,%j2
-   nill\t%0,%j2
-   ngr\t%0,%2
-   ng\t%0,%2
-   #
-   #"
-  [(set_attr "op_type" "RRE,RXE,RI,RI,RI,RI,RRE,RXY,SI,SS")])
+  [(set_attr "op_type" "RRE,RXE,RI,RI,RI,RI,RIL,RIL,RRE,RXY,SI,SS")
+   (set_attr "cpu_facility" "*,*,*,*,*,*,extimm,extimm,*,*,*,*")])
 
 (define_split
   [(set (match_operand:DI 0 "s_operand" "")
    og\t%0,%2"
   [(set_attr "op_type"  "RRE,RXY")])
 
-(define_insn "*iordi3_extimm"
+(define_insn "*iordi3"
   [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,d,d,d,d,AQ,Q")
         (ior:DI (match_operand:DI 1 "nonimmediate_operand" "%0,0,0,0,0,0,0,0,0,0")
                 (match_operand:DI 2 "general_operand"
                                     "N0HD0,N1HD0,N2HD0,N3HD0,N0SD0,N1SD0,d,m,NxQD0,Q")))
    (clobber (reg:CC CC_REGNUM))]
-  "TARGET_64BIT && TARGET_EXTIMM && s390_logical_operator_ok_p (operands)"
+  "TARGET_64BIT && s390_logical_operator_ok_p (operands)"
   "@
    oihh\t%0,%i2
    oihl\t%0,%i2
    og\t%0,%2
    #
    #"
-  [(set_attr "op_type"  "RI,RI,RI,RI,RIL,RIL,RRE,RXY,SI,SS")])
-
-(define_insn "*iordi3"
-  [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,d,d,AQ,Q")
-        (ior:DI (match_operand:DI 1 "nonimmediate_operand" "%0,0,0,0,0,0,0,0")
-                (match_operand:DI 2 "general_operand"
-                                    "N0HD0,N1HD0,N2HD0,N3HD0,d,m,NxQD0,Q")))
-   (clobber (reg:CC CC_REGNUM))]
-  "TARGET_64BIT && !TARGET_EXTIMM && s390_logical_operator_ok_p (operands)"
-  "@
-   oihh\t%0,%i2
-   oihl\t%0,%i2
-   oilh\t%0,%i2
-   oill\t%0,%i2
-   ogr\t%0,%2
-   og\t%0,%2
-   #
-   #"
-  [(set_attr "op_type"  "RI,RI,RI,RI,RRE,RXY,SI,SS")])
+  [(set_attr "op_type"  "RI,RI,RI,RI,RIL,RIL,RRE,RXY,SI,SS")
+   (set_attr "cpu_facility" "*,*,*,*,extimm,extimm,*,*,*,*")])
 
 (define_split
   [(set (match_operand:DI 0 "s_operand" "")
    xg\t%0,%2"
   [(set_attr "op_type"  "RRE,RXY")])
 
-(define_insn "*xordi3_extimm"
+(define_insn "*xordi3"
   [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,d,d,AQ,Q")
         (xor:DI (match_operand:DI 1 "nonimmediate_operand" "%0,0,0,0,0,0")
                 (match_operand:DI 2 "general_operand" "N0SD0,N1SD0,d,m,NxQD0,Q")))
    (clobber (reg:CC CC_REGNUM))]
-  "TARGET_64BIT && TARGET_EXTIMM && s390_logical_operator_ok_p (operands)"
+  "TARGET_64BIT && s390_logical_operator_ok_p (operands)"
   "@
    xihf\t%0,%k2
    xilf\t%0,%k2
    xg\t%0,%2
    #
    #"
-  [(set_attr "op_type"  "RIL,RIL,RRE,RXY,SI,SS")])
-
-(define_insn "*xordi3"
-  [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,AQ,Q")
-        (xor:DI (match_operand:DI 1 "nonimmediate_operand" "%0,0,0,0")
-                (match_operand:DI 2 "general_operand" "d,m,NxQD0,Q")))
-   (clobber (reg:CC CC_REGNUM))]
-  "TARGET_64BIT && !TARGET_EXTIMM && s390_logical_operator_ok_p (operands)"
-  "@
-   xgr\t%0,%2
-   xg\t%0,%2
-   #
-   #"
-  [(set_attr "op_type"  "RRE,RXY,SI,SS")])
+  [(set_attr "op_type"  "RIL,RIL,RRE,RXY,SI,SS")
+   (set_attr "cpu_facility" "extimm,extimm,*,*,*,*")])
 
 (define_split
   [(set (match_operand:DI 0 "s_operand" "")