lkml.org 
[lkml]   [1999]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Structure vs purism ?
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/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.133 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site