新手小白学go语言 (初学者basic编程)

Branch 分支跳转指令。

用法:

B{cond}{.W} label

其中:

cond

is an optional condition code.可选的条件码

.W

is an optional instruction width specifier to force the use of a 32-bit B instruction in Thumb.

可选的指令宽度,强制在Thumb模式时使用32位的B指令。

label

is a PC-relative expression 标签表示相对的PC的表达式。

Operation 指令用途

The B instruction causes a branch to label .

执行B指令可以跳转到指定的标签。

B in Thumb

You can use the .W width specifier to force B to generate a 32-bit instruction in Thumb code. B.W always generates a 32-bit instruction, even if the target could be reached using a 16-bit instruction. For forward references, B without .W always generates a 16-bit instruction in Thumb code, even if that results in failure for a target that could be reached using a 32-bit Thumb instruction.

B.W 指令生成32位的指令。不使用.W时,在thumb模式时生成16位的指令。

参考资料:

https://www.keil.com/support/man/docs/armasm/armasm_dom1361289863797.htm