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]

More i386 cleanups


Hi
Because of recend lossage caused by my changes to conditions (sorry)
I've went trought whole i386.md verifying that rest of code is OK. I found
some glitches. None of them have effect on output code, but they are obvious
cut&paste based bugs and ought to be fixed to not cause problems in future.

Čt prosinec 16 07:50:39 CET 1999  Jan Hubicka  <hubicka@freesoft.cz>
	* i386.md (test?i_1): Use "nonmemory_operand" predicate, simplify
	condition.
	(one_cmpl?i*): Pass "NOT" to unary_operator_ok.
*** i386.md.nos	Wed Dec 15 19:56:53 1999
--- i386.md	Wed Dec 15 23:10:44 1999
***************
*** 4126,4134 ****
  (define_insn "testsi_1"
    [(set (reg:CCNO 17)
  	(compare:CCNO (and:SI (match_operand:SI 0 "nonimmediate_operand" "%*a,r,rm")
! 			      (match_operand:SI 1 "general_operand" "in,in,rin"))
  		      (const_int 0)))]
!   "GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM"
    "test{l}\\t{%1, %0|%0, %1}"
    [(set_attr "type" "icmp")
     (set_attr "pent_pair" "uv,np,uv")])
--- 4113,4121 ----
  (define_insn "testsi_1"
    [(set (reg:CCNO 17)
  	(compare:CCNO (and:SI (match_operand:SI 0 "nonimmediate_operand" "%*a,r,rm")
! 			      (match_operand:SI 1 "nonmemory_operand" "in,in,rin"))
  		      (const_int 0)))]
!   ""
    "test{l}\\t{%1, %0|%0, %1}"
    [(set_attr "type" "icmp")
     (set_attr "pent_pair" "uv,np,uv")])
***************
*** 4136,4144 ****
  (define_insn "*testhi_1"
    [(set (reg:CCNO 17)
          (compare:CCNO (and:HI (match_operand:HI 0 "nonimmediate_operand" "%*a,r,rm")
! 			      (match_operand:HI 1 "general_operand" "n,n,rn"))
  		      (const_int 0)))]
!   "GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM"
    "test{w}\\t{%1, %0|%0, %1}"
    [(set_attr "type" "icmp")
     (set_attr "pent_pair" "uv,np,uv")])
--- 4123,4131 ----
  (define_insn "*testhi_1"
    [(set (reg:CCNO 17)
          (compare:CCNO (and:HI (match_operand:HI 0 "nonimmediate_operand" "%*a,r,rm")
! 			      (match_operand:HI 1 "nonmemory_operand" "n,n,rn"))
  		      (const_int 0)))]
!   ""
    "test{w}\\t{%1, %0|%0, %1}"
    [(set_attr "type" "icmp")
     (set_attr "pent_pair" "uv,np,uv")])
***************
*** 4146,4154 ****
  (define_insn "testqi_1"
    [(set (reg:CCNO 17)
          (compare:CCNO (and:QI (match_operand:QI 0 "nonimmediate_operand" "%*a,q,qm")
! 			      (match_operand:QI 1 "general_operand" "n,n,qn"))
  		      (const_int 0)))]
!   "GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM"
    "test{b}\\t{%1, %0|%0, %1}"
    [(set_attr "type" "icmp")
     (set_attr "pent_pair" "uv,np,uv")])
--- 4133,4141 ----
  (define_insn "testqi_1"
    [(set (reg:CCNO 17)
          (compare:CCNO (and:QI (match_operand:QI 0 "nonimmediate_operand" "%*a,q,qm")
! 			      (match_operand:QI 1 "nonmemory_operand" "n,n,qn"))
  		      (const_int 0)))]
!   ""
    "test{b}\\t{%1, %0|%0, %1}"
    [(set_attr "type" "icmp")
     (set_attr "pent_pair" "uv,np,uv")])
***************
*** 5260,5275 ****
  ;; One complement instructions
  
  (define_expand "one_cmplsi2"
!   [(parallel [(set (match_operand:SI 0 "nonimmediate_operand" "")
! 		   (not:SI (match_operand:SI 1 "general_operand" "")))
! 	      (clobber (reg:CC 17))])]
    ""
    "ix86_expand_unary_operator (NOT, SImode, operands); DONE;")
  
  (define_insn "*one_cmplsi2_1"
    [(set (match_operand:SI 0 "nonimmediate_operand" "=rm")
  	(not:SI (match_operand:SI 1 "nonimmediate_operand" "0")))]
!   "ix86_unary_operator_ok (NEG, SImode, operands)"
    "not{l}\\t%0"
    [(set_attr "type" "negnot")])
  
--- 5194,5208 ----
  ;; One complement instructions
  
  (define_expand "one_cmplsi2"
!   [(set (match_operand:SI 0 "nonimmediate_operand" "")
! 	(not:SI (match_operand:SI 1 "general_operand" "")))]
    ""
    "ix86_expand_unary_operator (NOT, SImode, operands); DONE;")
  
  (define_insn "*one_cmplsi2_1"
    [(set (match_operand:SI 0 "nonimmediate_operand" "=rm")
  	(not:SI (match_operand:SI 1 "nonimmediate_operand" "0")))]
!   "ix86_unary_operator_ok (NOT, SImode, operands)"
    "not{l}\\t%0"
    [(set_attr "type" "negnot")])
  
***************
*** 5279,5285 ****
  		    (const_int 0)))
     (set (match_operand:SI 0 "nonimmediate_operand" "=rm")
  	(not:SI (match_dup 1)))]
!   "ix86_unary_operator_ok (NEG, SImode, operands)"
    "#"
    [(set_attr "type" "alu1")])
  
--- 5212,5218 ----
  		    (const_int 0)))
     (set (match_operand:SI 0 "nonimmediate_operand" "=rm")
  	(not:SI (match_dup 1)))]
!   "ix86_unary_operator_ok (NOT, SImode, operands)"
    "#"
    [(set_attr "type" "alu1")])
  
***************
*** 5298,5333 ****
    "")
  
  (define_expand "one_cmplhi2"
!   [(parallel [(set (match_operand:HI 0 "nonimmediate_operand" "")
! 		   (not:HI (match_operand:HI 1 "general_operand" "")))
! 	      (clobber (reg:CC 17))])]
    ""
    "ix86_expand_unary_operator (NOT, HImode, operands); DONE;")
  
  (define_insn "*one_cmplhi2_1"
    [(set (match_operand:HI 0 "nonimmediate_operand" "=rm")
  	(not:HI (match_operand:HI 1 "nonimmediate_operand" "0")))]
!   "ix86_unary_operator_ok (NEG, HImode, operands)"
    "not{w}\\t%0"
    [(set_attr "type" "negnot")])
  
  (define_split
    [(set (match_operand:HI 0 "register_operand" "")
  	(not:HI (match_operand:HI 1 "register_operand" "")))
     (clobber (reg:CC 17))]
    "! TARGET_PARTIAL_REG_STALL && reload_completed"
    [(parallel [(set (match_dup 0) (not:SI (match_dup 1)))
  	      (clobber (reg:CC 17))])]
    "operands[0] = gen_lowpart (SImode, operands[0]);
     operands[1] = gen_lowpart (SImode, operands[1]);")
  
  (define_insn "*one_cmplhi2_2"
    [(set (reg:CCNO 17)
  	(compare:CCNO (not:HI (match_operand:HI 1 "nonimmediate_operand" "0"))
  		      (const_int 0)))
     (set (match_operand:HI 0 "nonimmediate_operand" "=rm")
  	(not:HI (match_dup 1)))]
!   "ix86_unary_operator_ok (NEG, HImode, operands)"
    "#"
    [(set_attr "type" "alu1")])
  
--- 5231,5255 ----
    "")
  
  (define_expand "one_cmplhi2"
!   [(set (match_operand:HI 0 "nonimmediate_operand" "")
!         (not:HI (match_operand:HI 1 "general_operand" "")))]
    ""
    "ix86_expand_unary_operator (NOT, HImode, operands); DONE;")
  
  (define_insn "*one_cmplhi2_1"
    [(set (match_operand:HI 0 "nonimmediate_operand" "=rm")
  	(not:HI (match_operand:HI 1 "nonimmediate_operand" "0")))]
!   "ix86_unary_operator_ok (NOT, HImode, operands)"
    "not{w}\\t%0"
    [(set_attr "type" "negnot")])
  
  (define_insn "*one_cmplhi2_2"
    [(set (reg:CCNO 17)
  	(compare:CCNO (not:HI (match_operand:HI 1 "nonimmediate_operand" "0"))
  		      (const_int 0)))
     (set (match_operand:HI 0 "nonimmediate_operand" "=rm")
  	(not:HI (match_dup 1)))]
!   "ix86_unary_operator_ok (NOT, HImode, operands)"
    "#"
    [(set_attr "type" "alu1")])
  
***************
*** 5347,5362 ****
  
  ;; %%% Potential partial reg stall on alternative 1.  What to do?
  (define_expand "one_cmplqi2"
!   [(parallel [(set (match_operand:QI 0 "nonimmediate_operand" "")
! 		   (not:QI (match_operand:QI 1 "general_operand" "")))
! 	      (clobber (reg:CC 17))])]
    ""
    "ix86_expand_unary_operator (NOT, QImode, operands); DONE;")
  
  (define_insn "*one_cmplqi2_1"
    [(set (match_operand:QI 0 "nonimmediate_operand" "=qm,r")
  	(not:QI (match_operand:QI 1 "nonimmediate_operand" "0,0")))]
!   "ix86_unary_operator_ok (NEG, QImode, operands)"
    "@
     not{b}\\t%0
     not{l}\\t%k0"
--- 5269,5283 ----
  
  ;; %%% Potential partial reg stall on alternative 1.  What to do?
  (define_expand "one_cmplqi2"
!   [(set (match_operand:QI 0 "nonimmediate_operand" "")
! 	(not:QI (match_operand:QI 1 "general_operand" "")))]
    ""
    "ix86_expand_unary_operator (NOT, QImode, operands); DONE;")
  
  (define_insn "*one_cmplqi2_1"
    [(set (match_operand:QI 0 "nonimmediate_operand" "=qm,r")
  	(not:QI (match_operand:QI 1 "nonimmediate_operand" "0,0")))]
!   "ix86_unary_operator_ok (NOT, QImode, operands)"
    "@
     not{b}\\t%0
     not{l}\\t%k0"
***************
*** 5368,5374 ****
  		    (const_int 0)))
     (set (match_operand:QI 0 "nonimmediate_operand" "=qm")
  	(not:QI (match_dup 1)))]
!   "ix86_unary_operator_ok (NEG, QImode, operands)"
    "#"
    [(set_attr "type" "alu1")])
  
--- 5289,5295 ----
  		    (const_int 0)))
     (set (match_operand:QI 0 "nonimmediate_operand" "=qm")
  	(not:QI (match_dup 1)))]
!   "ix86_unary_operator_ok (NOT, QImode, operands)"
    "#"
    [(set_attr "type" "alu1")])
  


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