]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* i386.md (type attribute): Add "rotate" for rotate insns.
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 May 2002 17:58:09 +0000 (17:58 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 May 2002 17:58:09 +0000 (17:58 +0000)
        (rotate insns): Set type to "rotate".
        (various attributes and function units): Treat rotate like shift.
        (pent_pair attribute): Only rotates by one bit position are
        pairable.
        (sbb insns): Explicitly set pent_pair attribute on a couple
        that were missing it.

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

gcc/ChangeLog
gcc/config/i386/i386.md

index 62002f5705ee06fa9ac4b789447ca6335e60544e..d718791204622b9718697badbcaebc062c70630a 100644 (file)
@@ -1,3 +1,13 @@
+Thu May  9 11:50:09 2002  Jeffrey A Law  (law@cygnus.com)
+
+       * i386.md (type attribute): Add "rotate" for rotate insns.
+       (rotate insns): Set type to "rotate".
+       (various attributes and function units): Treat rotate like shift.
+       (pent_pair attribute): Only rotates by one bit position are
+       pairable.
+       (sbb insns): Explicitly set pent_pair attribute on a couple
+       that were missing it.
+
 Thu May  9 18:29:24 2002  J"orn Rennecke <joern.rennecke@superh.com>
 
        * sh.c (sh_builtin_saveregs): If starting with an odd fp register,
index 1fc139f46869783b4716e5983df93878228fb948..e99bd0ad6c2214b467c2e5f312bf4b19c28653c3 100644 (file)
 ;; A basic instruction type.  Refinements due to arguments to be
 ;; provided in other attributes.
 (define_attr "type"
-  "other,multi,alu1,negnot,alu,icmp,test,imov,imovx,lea,incdec,ishift,imul,idiv,ibr,setcc,push,pop,call,callv,icmov,fmov,fop,fsgn,fmul,fdiv,fpspc,fcmov,fcmp,fxch,str,cld,sse,sseadd,ssemul,ssediv,ssemov,ssecmp,ssecvt,sselog,sseiadd,sseishft,sseimul,mmx,mmxmov,mmxadd,mmxshft,mmxcmp,mmxcvt,mmxmul,fistp"
+  "other,multi,alu1,negnot,alu,icmp,test,imov,imovx,lea,incdec,ishift,rotate,imul,idiv,ibr,setcc,push,pop,call,callv,icmov,fmov,fop,fsgn,fmul,fdiv,fpspc,fcmov,fcmp,fxch,str,cld,sse,sseadd,ssemul,ssediv,ssemov,ssecmp,ssecvt,sselog,sseiadd,sseishft,sseimul,mmx,mmxmov,mmxadd,mmxshft,mmxcmp,mmxcvt,mmxmul,fistp"
   (const_string "other"))
 
 ;; Main data type used by the insn
           (const_int 0)
         (eq_attr "unit" "i387,sse,mmx")
           (const_int 0)
-        (eq_attr "type" "alu1,negnot,alu,icmp,imovx,ishift,imul,push,pop")
+        (eq_attr "type" "alu1,negnot,alu,icmp,imovx,ishift,rotate,imul,push,pop")
           (symbol_ref "ix86_attr_length_immediate_default(insn,1)")
         (eq_attr "type" "imov,test")
           (symbol_ref "ix86_attr_length_immediate_default(insn,0)")
              (and (match_operand 0 "memory_displacement_operand" "")
                   (match_operand 1 "immediate_operand" "")))
           (const_string "true")
-        (and (eq_attr "type" "alu,ishift,imul,idiv")
+        (and (eq_attr "type" "alu,ishift,rotate,imul,idiv")
              (and (match_operand 0 "memory_displacement_operand" "")
                   (match_operand 2 "immediate_operand" "")))
           (const_string "true")
         (and (eq_attr "type" "ishift")
              (match_operand 2 "const_int_operand" ""))
           (const_string "pu")
+        (and (eq_attr "type" "rotate")
+             (match_operand 2 "const_int_1_operand" ""))
+          (const_string "pu")
         (and (eq_attr "type" "call")
              (match_operand 0 "constant_call_address_operand" ""))
           (const_string "pv")
 
 (define_function_unit "ppro_p0" 1 0
   (and (eq_attr "cpu" "pentiumpro")
-       (eq_attr "type" "ishift,lea,ibr,cld"))
+       (eq_attr "type" "ishift,rotate,lea,ibr,cld"))
   1 1)
 
 (define_function_unit "ppro_p0" 1 0
 ;; Shift instructions and certain arithmetic are issued only to X pipe.
 (define_function_unit "k6_alux" 1 0
   (and (eq_attr "cpu" "k6")
-       (eq_attr "type" "ishift,alu1,negnot,cld"))
+       (eq_attr "type" "ishift,rotate,alu1,negnot,cld"))
   1 1)
 
 ;; The QI mode arithmetic is issued to X pipe only.
 
 (define_function_unit "k6_alu" 2 0
   (and (eq_attr "cpu" "k6")
-       (eq_attr "type" "ishift,alu1,negnot,alu,icmp,test,imovx,incdec,setcc,lea"))
+       (eq_attr "type" "ishift,rotate,alu1,negnot,alu,icmp,test,imovx,incdec,setcc,lea"))
   1 1)
 
 (define_function_unit "k6_alu" 2 0
 
 (define_function_unit "athlon_ieu" 3 0
   (and (eq_attr "cpu" "athlon")
-       (eq_attr "type" "alu1,negnot,alu,icmp,test,imov,imovx,lea,incdec,ishift,ibr,call,callv,icmov,cld,pop,setcc,push,pop"))
+       (eq_attr "type" "alu1,negnot,alu,icmp,test,imov,imovx,lea,incdec,ishift,rotate,ibr,call,callv,icmov,cld,pop,setcc,push,pop"))
   1 1)
 
 (define_function_unit "athlon_ieu" 3 0
   "TARGET_64BIT && ix86_binary_operator_ok (ROTATE, DImode, operands)
    && (TARGET_PENTIUM || TARGET_PENTIUMPRO)"
   "rol{q}\t%0"
-  [(set_attr "type" "ishift")
+  [(set_attr "type" "rotate")
    (set (attr "length") 
      (if_then_else (match_operand:DI 0 "register_operand" "") 
        (const_string "2")
   "@
    rol{q}\t{%2, %0|%0, %2}
    rol{q}\t{%b2, %0|%0, %b2}"
-  [(set_attr "type" "ishift")
+  [(set_attr "type" "rotate")
    (set_attr "mode" "DI")])
 
 (define_expand "rotlsi3"
   "ix86_binary_operator_ok (ROTATE, SImode, operands)
    && (TARGET_PENTIUM || TARGET_PENTIUMPRO)"
   "rol{l}\t%0"
-  [(set_attr "type" "ishift")
+  [(set_attr "type" "rotate")
    (set (attr "length") 
      (if_then_else (match_operand:SI 0 "register_operand" "") 
        (const_string "2")
   "TARGET_64BIT && ix86_binary_operator_ok (ROTATE, SImode, operands)
    && (TARGET_PENTIUM || TARGET_PENTIUMPRO)"
   "rol{l}\t%k0"
-  [(set_attr "type" "ishift")
+  [(set_attr "type" "rotate")
    (set_attr "length" "2")])
 
 (define_insn "*rotlsi3_1"
   "@
    rol{l}\t{%2, %0|%0, %2}
    rol{l}\t{%b2, %0|%0, %b2}"
-  [(set_attr "type" "ishift")
+  [(set_attr "type" "rotate")
    (set_attr "mode" "SI")])
 
 (define_insn "*rotlsi3_1_zext"
   "@
    rol{l}\t{%2, %k0|%k0, %2}
    rol{l}\t{%b2, %k0|%k0, %b2}"
-  [(set_attr "type" "ishift")
+  [(set_attr "type" "rotate")
    (set_attr "mode" "SI")])
 
 (define_expand "rotlhi3"
   "ix86_binary_operator_ok (ROTATE, HImode, operands)
    && (TARGET_PENTIUM || TARGET_PENTIUMPRO)"
   "rol{w}\t%0"
-  [(set_attr "type" "ishift")
+  [(set_attr "type" "rotate")
    (set (attr "length") 
      (if_then_else (match_operand 0 "register_operand" "") 
        (const_string "2")
   "@
    rol{w}\t{%2, %0|%0, %2}
    rol{w}\t{%b2, %0|%0, %b2}"
-  [(set_attr "type" "ishift")
+  [(set_attr "type" "rotate")
    (set_attr "mode" "HI")])
 
 (define_expand "rotlqi3"
   "ix86_binary_operator_ok (ROTATE, QImode, operands)
    && (TARGET_PENTIUM || TARGET_PENTIUMPRO)"
   "rol{b}\t%0"
-  [(set_attr "type" "ishift")
+  [(set_attr "type" "rotate")
    (set (attr "length") 
      (if_then_else (match_operand 0 "register_operand" "") 
        (const_string "2")
   "@
    rol{b}\t{%2, %0|%0, %2}
    rol{b}\t{%b2, %0|%0, %b2}"
-  [(set_attr "type" "ishift")
+  [(set_attr "type" "rotate")
    (set_attr "mode" "QI")])
 
 (define_expand "rotrdi3"
   "TARGET_64BIT && ix86_binary_operator_ok (ROTATERT, DImode, operands)
    && (TARGET_PENTIUM || TARGET_PENTIUMPRO)"
   "ror{q}\t%0"
-  [(set_attr "type" "ishift")
+  [(set_attr "type" "rotate")
    (set (attr "length") 
      (if_then_else (match_operand:DI 0 "register_operand" "") 
        (const_string "2")
   "@
    ror{q}\t{%2, %0|%0, %2}
    ror{q}\t{%b2, %0|%0, %b2}"
-  [(set_attr "type" "ishift")
+  [(set_attr "type" "rotate")
    (set_attr "mode" "DI")])
 
 (define_expand "rotrsi3"
   "ix86_binary_operator_ok (ROTATERT, SImode, operands)
    && (TARGET_PENTIUM || TARGET_PENTIUMPRO)"
   "ror{l}\t%0"
-  [(set_attr "type" "ishift")
+  [(set_attr "type" "rotate")
    (set (attr "length") 
      (if_then_else (match_operand:SI 0 "register_operand" "") 
        (const_string "2")
   "TARGET_64BIT && ix86_binary_operator_ok (ROTATERT, SImode, operands)
    && (TARGET_PENTIUM || TARGET_PENTIUMPRO)"
   "ror{l}\t%k0"
-  [(set_attr "type" "ishift")
+  [(set_attr "type" "rotate")
    (set (attr "length") 
      (if_then_else (match_operand:SI 0 "register_operand" "") 
        (const_string "2")
   "@
    ror{l}\t{%2, %0|%0, %2}
    ror{l}\t{%b2, %0|%0, %b2}"
-  [(set_attr "type" "ishift")
+  [(set_attr "type" "rotate")
    (set_attr "mode" "SI")])
 
 (define_insn "*rotrsi3_1_zext"
   "@
    ror{l}\t{%2, %k0|%k0, %2}
    ror{l}\t{%b2, %k0|%k0, %b2}"
-  [(set_attr "type" "ishift")
+  [(set_attr "type" "rotate")
    (set_attr "mode" "SI")])
 
 (define_expand "rotrhi3"
   "ix86_binary_operator_ok (ROTATERT, HImode, operands)
    && (TARGET_PENTIUM || TARGET_PENTIUMPRO)"
   "ror{w}\t%0"
-  [(set_attr "type" "ishift")
+  [(set_attr "type" "rotate")
    (set (attr "length") 
      (if_then_else (match_operand 0 "register_operand" "") 
        (const_string "2")
   "@
    ror{w}\t{%2, %0|%0, %2}
    ror{w}\t{%b2, %0|%0, %b2}"
-  [(set_attr "type" "ishift")
+  [(set_attr "type" "rotate")
    (set_attr "mode" "HI")])
 
 (define_expand "rotrqi3"
   "ix86_binary_operator_ok (ROTATERT, QImode, operands)
    && (TARGET_PENTIUM || TARGET_PENTIUMPRO)"
   "ror{b}\t%0"
-  [(set_attr "type" "ishift")
+  [(set_attr "type" "rotate")
    (set (attr "length") 
      (if_then_else (match_operand 0 "register_operand" "") 
        (const_string "2")
   "@
    ror{b}\t{%2, %0|%0, %2}
    ror{b}\t{%b2, %0|%0, %b2}"
-  [(set_attr "type" "ishift")
+  [(set_attr "type" "rotate")
    (set_attr "mode" "QI")])
 \f
 ;; Bit set / bit test instructions
   ; Since we don't have the proper number of operands for an alu insn,
   ; fill in all the blanks.
   [(set_attr "type" "alu")
+   (set_attr "pent_pair" "pu")
    (set_attr "memory" "none")
    (set_attr "imm_disp" "false")
    (set_attr "mode" "DI")
   ; Since we don't have the proper number of operands for an alu insn,
   ; fill in all the blanks.
   [(set_attr "type" "alu")
+   (set_attr "pent_pair" "pu")
    (set_attr "memory" "none")
    (set_attr "imm_disp" "false")
    (set_attr "mode" "SI")