Re: Structure vs purism ?

Thomas E. Dodd /CSDC (ted@cypress.com)
Fri, 22 Jan 1999 00:53:59 -0600


Stefan Monnier wrote:
> I think a lot of the goto's could be removed as soon as there is a decent
> possibility to tell the compiler to optimize for a certain case. This was
> discussed on the egcs lists some time ago IIRC.
>
> > compare against a final value because on most/many/(all?) processors
> > the flags change automatically when decrementing to zero or decrementing
> > to a negative number.
>
> MIPS and Alpha don't have `flags'. But I still agree that it's most of the
> time cheaper to check against 0 than against any other value.

Then how do you get a beq or bne instruction?
There must be a status register that knows if
the last operation resulted in 0.

The architecture coure I too was based on the MIPS.
We had a 0 bit from the ALU that could be checked.

-Thomas

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/