This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]