On Fri, May 16, 2008 at 11:12:54PM +0100, Nicholas Clark wrote:
> On Fri, May 16, 2008 at 03:20:34PM -0500, Patrick R. Michaud wrote:
> > On Fri, May 16, 2008 at 09:12:19PM +0100, Alberto Simões wrote:
> > >    if (!base && !(i && scale) && (!emit_is8bit(disp) || 1)) {
> > > 
> > > This is exactly
> > > 
> > >    if (!base && !(i && scale)) {
> > 
> > It's not *exactly* that.  The first version executes 
> > emit_is8bit(disp), while the second one doesn't.
> > 
> > You're correct that the return value of emit_is8bit(disp)
> > doesn't appear to matter to the C<if> statement itself.
> 
> So shouldn't it be re-written as
> 
>     if (!base && !(i && scale)) {
>       emit_is8bit(disp);

Yes.  

In this case it turns out that emit_is8bit(disp) has
no side effects, so removing it entirely also works.
But it was indeed a weird line, and has been around
for a long time (circa r3800 or so).

Thanks!

Pm

Reply via email to