This is the mail archive of the gcc@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]

Re: i386, m88k, and rs6000 (possibly others) dbra confusion


On Fri, Jun 16, 2000 at 02:01:27AM -0400, John Wehle wrote:
> (define_insn "*dbra_ge"
>   [(set (pc)
> 	(if_then_else (ge (match_operand:SI 1 "register_operand" "c,*r,*r")
> 			  (const_int 0))
> 		      (label_ref (match_operand 0 "" ""))
> 		      (pc)))
>    (set (match_operand:SI 2 "register_operand" "=1,*r,*m*r")
> 	(plus:SI (match_dup 1)
> 		 (const_int -1)))
[...]
>   1) REG_NONNEG means that operand 1 is always nonnegative in which
>      case the branch will * always * be taken.

Well, no, it means that operand 1 will always be nonnegative
within the loop.  Not globally.

>   2) loop is documented by Intel as:
> 
>      DEC count; jump short if count <> 0
> 
>      which doesn't match the define_insn.

How would you write it?  Duplicate the subtraction in the test?
I suppose that would make things more pedanticly correct, though
I don't see an urgent need to change it.


r~

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