lkml.org 
[lkml]   [2003]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: any chance of 2.6.0-test*?
Date
Am Montag, 13. Januar 2003 00:11 schrieb Rob Wilkens:
> On Sun, 2003-01-12 at 17:52, Aaron Lehmann wrote:
> > On Sun, Jan 12, 2003 at 05:34:58PM -0500, Rob Wilkens wrote:
> > > You're wrong. You wouldn't have to jump over them any more than you
> > > have to jump over the "goto" statement.
> >
> > The goto is a conditional jump. You propose replacing it with a
> > conditional jump past the error handling code predicated on the
> > opposite condition. Where's the improvement?
>
> The goto is absolutely not a conditional jump. The if that precedes it
> is conditional. The goto is not. The if is already there.

Oh, well.
Apologies first, my assembler is rusty.

if (a == NULL)
goto err_out;

bad compiler ->
tst $D0 ; evaluate a == NULL
bne L1 ; this is the if
bra err_out ; this is the goto
L1:

good compiler ->
tst $D0
beq err_out ; obvious optimisation

Oliver

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

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