This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: i386, m88k, and rs6000 (possibly others) dbra confusion
- To: John Wehle <john at feith dot com>
- Subject: Re: i386, m88k, and rs6000 (possibly others) dbra confusion
- From: Richard Henderson <rth at cygnus dot com>
- Date: Fri, 16 Jun 2000 13:15:41 -0700
- Cc: gcc at gcc dot gnu dot org
- References: <200006160601.CAA04701@jwlab.FEITH.COM>
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~