This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

x86-64 merger part 9 - few cleanups/fixes



Hi,
few cleanups that should've got in earlier, but I forgot on that.
The *_one_bit changes are needed, since :SI test is mistakely used
for HI/QImode patterns.

Honza

Sat Mar 10 14:29:38 CET 2001  Jan Hubicka  <jh@suse.cz>
	* i386.md (trunctfdf2_2): Rename missnamed pattern.
	(?sh?di3): Remove constraints; add expander for 64bits.
	(?sh?si3): Remove lea output tableate; use '#' instead.
	(*_one_bit): Remove type on the match_operand in attributes.
***************
*** 3951,3957 ****
    [(set_attr "type" "fmov,multi")
     (set_attr "mode" "DF")])
  
! (define_insn "*truncxfdf2_2"
    [(set (match_operand:DF 0 "memory_operand" "=m")
  	(float_truncate:DF
  	  (match_operand:TF 1 "register_operand" "f")))]
--- 6881,6887 ----
    [(set_attr "type" "fmov,multi")
     (set_attr "mode" "DF")])
  
! (define_insn "*trunctfdf2_2"
    [(set (match_operand:DF 0 "memory_operand" "=m")
  	(float_truncate:DF
  	  (match_operand:TF 1 "register_operand" "f")))]
***************
*** 7777,7794 ****
  ;; than 31.
  
  (define_expand "ashldi3"
!   [(parallel [(set (match_operand:DI 0 "register_operand" "=r")
! 		   (ashift:DI (match_operand:DI 1 "register_operand" "0")
! 			      (match_operand:QI 2 "nonmemory_operand" "Jc")))
  	      (clobber (reg:CC 17))])]
    ""
    "
  {
!   if (TARGET_CMOVE && ! immediate_operand (operands[2], QImode))
      {
        emit_insn (gen_ashldi3_1 (operands[0], operands[1], operands[2]));
        DONE;
      }
  }")
  
  (define_insn "ashldi3_1"
--- 10886,10904 ----
  ;; than 31.
  
  (define_expand "ashldi3"
!   [(parallel [(set (match_operand:DI 0 "register_operand" "")
! 		   (ashift:DI (match_operand:DI 1 "register_operand" "")
! 			      (match_operand:QI 2 "nonmemory_operand" "")))
  	      (clobber (reg:CC 17))])]
    ""
    "
  {
!   if (!TARGET_64BIT && TARGET_CMOVE && ! immediate_operand (operands[2], QImode))
      {
        emit_insn (gen_ashldi3_1 (operands[0], operands[1], operands[2]));
        DONE;
      }
+   ix86_expand_binary_operator (ASHIFT, DImode, operands); DONE;
  }")
  
  (define_insn "ashldi3_1"
***************
*** 7918,7929 ****
        return \"add{l}\\t{%0, %0|%0, %0}\";
  
      case TYPE_LEA:
!       if (GET_CODE (operands[2]) != CONST_INT
! 	  || (unsigned HOST_WIDE_INT) INTVAL (operands[2]) > 3)
! 	abort ();
!       operands[1] = gen_rtx_MULT (SImode, operands[1],
! 				  GEN_INT (1 << INTVAL (operands[2])));
!       return \"lea{l}\\t{%a1, %0|%0, %a1}\";
  
      default:
        if (REG_P (operands[2]))
--- 11028,11034 ----
        return \"add{l}\\t{%0, %0|%0, %0}\";
  
      case TYPE_LEA:
!       return \"#\";
  
      default:
        if (REG_P (operands[2]))
***************
*** 8312,8329 ****
  ;; See comment above `ashldi3' about how this works.
  
  (define_expand "ashrdi3"
!   [(parallel [(set (match_operand:DI 0 "register_operand" "=r")
! 		   (ashiftrt:DI (match_operand:DI 1 "register_operand" "0")
! 				(match_operand:QI 2 "nonmemory_operand" "Jc")))
  	      (clobber (reg:CC 17))])]
    ""
    "
  {
!   if (TARGET_CMOVE && ! immediate_operand (operands[2], QImode))
      {
        emit_insn (gen_ashrdi3_1 (operands[0], operands[1], operands[2]));
        DONE;
      }
  }")
  
  (define_insn "ashrdi3_1"
--- 11416,11437 ----
  ;; See comment above `ashldi3' about how this works.
  
  (define_expand "ashrdi3"
!   [(parallel [(set (match_operand:DI 0 "register_operand" "")
! 		   (ashiftrt:DI (match_operand:DI 1 "register_operand" "")
! 				(match_operand:QI 2 "nonmemory_operand" "")))
  	      (clobber (reg:CC 17))])]
    ""
    "
  {
!   if (!TARGET_64BIT && TARGET_CMOVE && ! immediate_operand (operands[2], QImode))
      {
        emit_insn (gen_ashrdi3_1 (operands[0], operands[1], operands[2]));
        DONE;
      }
+   if (TARGET_64BIT)
+     {
+       ix86_expand_binary_operator (ASHIFTRT, DImode, operands); DONE;
+     }
  }")
  
  (define_insn "ashrdi3_1"
***************
*** 8418,8424 ****
    "INTVAL (operands[2]) == 31 && (TARGET_USE_CLTD || optimize_size)
     && ix86_binary_operator_ok (ASHIFTRT, SImode, operands)"
    "@
!    {cltd|cdq}
     sar{l}\\t{%2, %0|%0, %2}"
    [(set_attr "type" "imovx,ishift")
     (set_attr "prefix_0f" "0,*")
--- 11526,11532 ----
    "INTVAL (operands[2]) == 31 && (TARGET_USE_CLTD || optimize_size)
     && ix86_binary_operator_ok (ASHIFTRT, SImode, operands)"
    "@
!    {cltd|cdqe}
     sar{l}\\t{%2, %0|%0, %2}"
    [(set_attr "type" "imovx,ishift")
     (set_attr "prefix_0f" "0,*")
***************
*** 8516,8522 ****
    "sar{w}\\t%0"
    [(set_attr "type" "ishift")
     (set (attr "length") 
!      (if_then_else (match_operand:SI 0 "register_operand" "") 
  	(const_string "2")
  	(const_string "*")))])
  
--- 11624,11630 ----
    "sar{w}\\t%0"
    [(set_attr "type" "ishift")
     (set (attr "length") 
!      (if_then_else (match_operand 0 "register_operand" "") 
  	(const_string "2")
  	(const_string "*")))])
  
***************
*** 8549,8555 ****
    "sar{w}\\t%0"
    [(set_attr "type" "ishift")
     (set (attr "length") 
!      (if_then_else (match_operand:SI 0 "register_operand" "") 
  	(const_string "2")
  	(const_string "*")))])
  
--- 11657,11663 ----
    "sar{w}\\t%0"
    [(set_attr "type" "ishift")
     (set (attr "length") 
!      (if_then_else (match_operand 0 "register_operand" "") 
  	(const_string "2")
  	(const_string "*")))])
  
***************
*** 8588,8594 ****
    "sar{b}\\t%0"
    [(set_attr "type" "ishift")
     (set (attr "length") 
!      (if_then_else (match_operand:SI 0 "register_operand" "") 
  	(const_string "2")
  	(const_string "*")))])
  
--- 11696,11702 ----
    "sar{b}\\t%0"
    [(set_attr "type" "ishift")
     (set (attr "length") 
!      (if_then_else (match_operand 0 "register_operand" "") 
  	(const_string "2")
  	(const_string "*")))])
  
***************
*** 8621,8627 ****
    "sar{b}\\t%0"
    [(set_attr "type" "ishift")
     (set (attr "length") 
!      (if_then_else (match_operand:SI 0 "register_operand" "") 
  	(const_string "2")
  	(const_string "*")))])
  
--- 11729,11735 ----
    "sar{b}\\t%0"
    [(set_attr "type" "ishift")
     (set (attr "length") 
!      (if_then_else (match_operand 0 "register_operand" "") 
  	(const_string "2")
  	(const_string "*")))])
  
***************
*** 8647,8664 ****
  ;; See comment above `ashldi3' about how this works.
  
  (define_expand "lshrdi3"
!   [(parallel [(set (match_operand:DI 0 "register_operand" "=r")
! 		   (lshiftrt:DI (match_operand:DI 1 "register_operand" "0")
! 			        (match_operand:QI 2 "nonmemory_operand" "Jc")))
  	      (clobber (reg:CC 17))])]
    ""
    "
  {
!   if (TARGET_CMOVE && ! immediate_operand (operands[2], QImode))
      {
        emit_insn (gen_lshrdi3_1 (operands[0], operands[1], operands[2]));
        DONE;
      }
  }")
  
  (define_insn "lshrdi3_1"
--- 11755,11773 ----
  ;; See comment above `ashldi3' about how this works.
  
  (define_expand "lshrdi3"
!   [(parallel [(set (match_operand:DI 0 "register_operand" "")
! 		   (lshiftrt:DI (match_operand:DI 1 "register_operand" "")
! 			        (match_operand:QI 2 "nonmemory_operand" "")))
  	      (clobber (reg:CC 17))])]
    ""
    "
  {
!   if (!TARGET_64BIT && TARGET_CMOVE && ! immediate_operand (operands[2], QImode))
      {
        emit_insn (gen_lshrdi3_1 (operands[0], operands[1], operands[2]));
        DONE;
      }
+   ix86_expand_binary_operator (LSHIFTRT, DImode, operands); DONE;
  }")
  
  (define_insn "lshrdi3_1"
***************
*** 8789,8795 ****
    "shr{w}\\t%0"
    [(set_attr "type" "ishift")
     (set (attr "length") 
!      (if_then_else (match_operand:SI 0 "register_operand" "") 
  	(const_string "2")
  	(const_string "*")))])
  
--- 11898,11904 ----
    "shr{w}\\t%0"
    [(set_attr "type" "ishift")
     (set (attr "length") 
!      (if_then_else (match_operand 0 "register_operand" "") 
  	(const_string "2")
  	(const_string "*")))])
  
***************
*** 8861,8867 ****
    "shr{b}\\t%0"
    [(set_attr "type" "ishift")
     (set (attr "length") 
!      (if_then_else (match_operand:SI 0 "register_operand" "") 
  	(const_string "2")
  	(const_string "*")))])
  
--- 11970,11976 ----
    "shr{b}\\t%0"
    [(set_attr "type" "ishift")
     (set (attr "length") 
!      (if_then_else (match_operand 0 "register_operand" "") 
  	(const_string "2")
  	(const_string "*")))])
  
***************
*** 8969,8975 ****
    "rol{w}\\t%0"
    [(set_attr "type" "ishift")
     (set (attr "length") 
!      (if_then_else (match_operand:SI 0 "register_operand" "") 
  	(const_string "2")
  	(const_string "*")))])
  
--- 12078,12084 ----
    "rol{w}\\t%0"
    [(set_attr "type" "ishift")
     (set (attr "length") 
!      (if_then_else (match_operand 0 "register_operand" "") 
  	(const_string "2")
  	(const_string "*")))])
  
***************
*** 9003,9009 ****
    "rol{b}\\t%0"
    [(set_attr "type" "ishift")
     (set (attr "length") 
!      (if_then_else (match_operand:SI 0 "register_operand" "") 
  	(const_string "2")
  	(const_string "*")))])
  
--- 12112,12118 ----
    "rol{b}\\t%0"
    [(set_attr "type" "ishift")
     (set (attr "length") 
!      (if_then_else (match_operand 0 "register_operand" "") 
  	(const_string "2")
  	(const_string "*")))])
  
***************
*** 9071,9077 ****
    "ror{w}\\t%0"
    [(set_attr "type" "ishift")
     (set (attr "length") 
!      (if_then_else (match_operand:SI 0 "register_operand" "") 
  	(const_string "2")
  	(const_string "*")))])
  
--- 12180,12186 ----
    "ror{w}\\t%0"
    [(set_attr "type" "ishift")
     (set (attr "length") 
!      (if_then_else (match_operand 0 "register_operand" "") 
  	(const_string "2")
  	(const_string "*")))])
  
***************
*** 9105,9111 ****
    "ror{b}\\t%0"
    [(set_attr "type" "ishift")
     (set (attr "length") 
!      (if_then_else (match_operand:SI 0 "register_operand" "") 
  	(const_string "2")
  	(const_string "*")))])
  
--- 12214,12220 ----
    "ror{b}\\t%0"
    [(set_attr "type" "ishift")
     (set (attr "length") 
!      (if_then_else (match_operand 0 "register_operand" "") 
  	(const_string "2")
  	(const_string "*")))])
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]