BX dest
其中:
dest |
包含目標地址的暫存器 (R0..R15) |
BX 指令分支到指定的 dest(包含 ARM* 或 Thumb* 指令),並可選擇執行它。要選擇 ARM 指令,BX 指令需要位於字對齊的地址。要選擇 Thumb 指令,請將暫存器 R15 指定為 dest。
無運算元。
N |
Z |
C |
>V |
Q |
S |
I |
F |
T |
|
|
|
|
|
|
|
|
M |
15 |
14 |
13 |
12 |
11 |
10 |
9 |
8 |
7 |
6 |
5 |
|
3 |
2 |
|
0 |
0 |
1 |
0 |
0 |
0 |
1 |
1 |
1 |
0 |
H2 |
dest |
SBZ |
1 ;@.text
2 ;@.globl funblx
3 ;@.align 0
4 ;
5 AREA example,CODE,READONLY
6 CODE16
7
8 label1
9 ; Unconditional branch to another
10 ; Thumb subroutine, whose address
11 ; is in R5.Do not save return address
12 00000000 4728 BX R5
13
14
15
16
17 ; Unconditional call to an ARM
18 ; (32-bit) subroutine, whose address
19 ; is at word boundary A0 and loaded
20 ; into R7.Do not save return address
21 00000002 F7C7 MOV R7, OxA0
22 00000004 4738 BX R7