gcc/doc/md.texi buglet?

Thomas Sailer sailer@ife.ee.ethz.ch
Tue Oct 16 12:15:00 GMT 2007


md.texi of mainline as of now states at line 4451ff:

@cindex @code{add@var{mode}cc} instruction pattern
@item @samp{add@var{mode}cc}
Similar to @samp{mov@var{mode}cc} but for conditional addition.  Conditionally
move operand 2 or (operands 2 + operand 3) into operand 0 according to the
comparison in operand 1.  If the comparison is true, operand 2 is moved into
operand 0, otherwise (operand 2 + operand 3) is moved.

Now isn't it the other way round? that is if the condition is true,
operand 2 + operand 3 is stored, operand 2 otherwise? That's at least
how I read the code in ifcvt.c, and that's what my experiments with that
pattern resulted in.

Tom




More information about the Gcc mailing list