bne 1b. What is the 1b????

Yves Rutschle y.rutschle@indigovision.com
Mon Nov 18 03:18:00 GMT 2002


On Mon, Nov 18, 2002 at 11:36:46AM +0200, liberty eran-RM27540 wrote:
> branch statments with 1b are scattrered all over the linux sources.
> 
> what does the 1b stands for ???

"local label 1, backwards" ie the first label "1" you'll
meet when going back up. Opposite is "1f" (Forward) which
means "the first label you'll meet going forward in the
source).

So :
        
1:     cmp     r0,#0
        beq     1f
        bne     1b
1:


If r0==0, you leave the loop, otherwise you stay in it
(obviously that's not what you'd do in real life, you'd call
your labels "1", "2", ...)

/Y



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list