GASのローカルシンボルネーム

linuxコンテキストスイッチは以下のようになってます.
(http://lxr.linux.no/linux+v3.2.7/arch/x86/include/asm/system.h#L48)

59   asm volatile("pushfl\n\t"               /* save    flags */     \
60                "pushl %%ebp\n\t"          /* save    EBP   */     \
61                "movl %%esp,%[prev_sp]\n\t"        /* save    ESP   */ \
62                "movl %[next_sp],%%esp\n\t"        /* restore ESP   */ \
63                "movl $1f,%[prev_ip]\n\t"  /* save    EIP   */     \
64                "pushl %[next_ip]\n\t"     /* restore EIP   */     \
65                __switch_canary                                    \
66                "jmp __switch_to\n"        /* regparm call  */     \
67                "1:\t"                                             \
68                "popl %%ebp\n\t"           /* restore EBP   */     \
69                "popfl\n"                  /* restore flags */     \
 (以下省略)

前にこの辺の流れを追っていたとき,63行目で67行目のアドレスを保存して,スタックに切り替えたいプロセスのアドレスを積んどくと__switch_toのret命令のときにスタックに積んである戻りアドレスが切り替えるプロセスのものになっているのでプロセスが切り替わって,再びこのプロセスが再開するときは67行目から開始される,ということは分かったのですが, mov $1f,%[prev_ip] って命令で 1: のところのアドレスが入るのがよく分かりませんでした.が,今日マニュアル読んだら普通に書いてありました.

Local Symbol Names

Local symbols help compilers and programmers use names temporarily. They create symbols which are guaranteed to be unique over the entire scope of the input source code and which can be referred to by a simple notation. To define a local symbol, write a label of the form N: (where N represents any positive integer). To refer to the most recent previous definition of that symbol write Nb, using the same number as when you defined the label. To refer to the next definition of a local label, write Nf - The b stands for "backwards" and the f stands for "forwards".

There is no restriction on how you can use these labels, and you can reuse them as well. So it is possible to repeatedly define the same local label (using the same number N), although you can only refer to the most recently defined local label of that number (for a backwards reference) or the next definition of a specific local label for a forward reference. It is also worth noting that the first 10 local labels (0:...9:) are implemented in a slightly more efficient manner than the others.

Here is an example:

1: jra 1f
2: jra 1b
1: jra 2f
2: jra 1b
Which is the equivalent of:

label_1: jra label_3
label_2: jra label_1
label_3: jra label_4
label_4: jra label_3

http://tigcc.ticalc.org/doc/gnuasm.html#SEC48L

ということでローカルシンボルネームっていって ラベル名を N: みたいにすると(Nは正数),Nb で直前のNのラベル,Nf で直後のNのラベルが参照できるんですね.