1b and 1f in the GNU assembly

I am analyzing linux exception code. By the way, I can not understand the syntax of the gnu assembly.

    svc_preempt:
    mov r8, lr
1:  bl  preempt_schedule_irq        @ irq en/disable is done inside
    ldr r0, [tsk, #TI_FLAGS]        @ get new tasks TI_FLAGS
    tst r0, #_TIF_NEED_RESCHED
    moveq   pc, r8              @ go again
    b   1b

In this code, I see "b 1b", but I can not find the shortcut "1b" anywhere.

and

#ifdef CONFIG_NEON
    adr r6, .LCneon_thumb_opcodes
    b   2f
#endif
call_fpe:
#ifdef CONFIG_NEON
    adr r6, .LCneon_arm_opcodes
2:
    ldr r7, [r6], #4            @ mask value
    cmp r7, #0              @ end mask?
    beq 1f
    and r8, r0, r7
    ldr r7, [r6], #4            @ opcode bits matching in mask
    cmp r8, r7              @ NEON instruction?
    bne 2b
    get_thread_info r10
    mov r7, #1
    strb    r7, [r10, #TI_USED_CP + 10] @ mark CP#10 as used
    strb    r7, [r10, #TI_USED_CP + 11] @ mark CP#11 as used
    b   do_vfp              @ let VFP handler handle this
1:

I can not find the labels "2f" and "1f".

So, I am interested in the meaning of "1b", "1f", "2f", etc.

+3
source share
2 answers

The shortcuts "xb" and "xf", where "x" is the number, are an intelligent extension to the GNU build. It branches to the first β€œx” found to search for β€œforward” for β€œf” or β€œback” for β€œb”.

, "1b" "1" , . "2f" "2" , , "2b" "2", .

.

. https://sourceware.org/binutils/docs-2.24/as/Symbol-Names.html#Symbol-Names - " ".

+11

( ), . - , , - , "-" 1, - .

IBM370 - , !

-1

Source: https://habr.com/ru/post/1670159/


All Articles