ARM base instruction -- bfi

Bitfield Insert copies a bitfield of <width> bits from the least significant bits of the source register to bit position <lsb> of the destination register, leaving the other destination bits unchanged.

位域插入将<width>位的位域从源寄存器的最低有效位复制到目标寄存器的位位置<lsb>,保持其他目标位不变。

32-bit variant

Applies when sf == 0 && N == 0.

BFI <Wd>, <Wn>, #<lsb>, #<width>

is equivalent to

BFM <Wd>, <Wn>, #(-<lsb> MOD 32), #(<width>-1)

and is the preferred disassembly when UInt(imms) < UInt(immr).

64-bit variant

Applies when sf == 1 && N == 1.

BFI <Xd>, <Xn>, #<lsb>, #<width>

is equivalent to

BFM <Xd>, <Xn>, #(-<lsb> MOD 64), #(<width>-1)

and is the preferred disassembly when UInt(imms) < UInt(immr).

4005a0: d2800000 mov x0, #0x0 // #0

4005a4: b94023e1 ldr w1, [sp, #32]

4005a8: b3407c20 bfxil x0, x1, #0, #32

4005ac: b94027e1 ldr w1, [sp, #36]

4005b0: b3607c20 bfi x0, x1, #32, #32 // x0=取x1的高32位

相关推荐
Trouvaille ~10 小时前
【Linux】库制作与原理(三):动态链接与加载机制
linux·c语言·汇编·got·动静态库·动态链接·plt
猫猫的小茶馆12 小时前
【ARM】从零封装STM32标准库
汇编·arm开发·stm32·单片机·嵌入式硬件·架构
切糕师学AI13 小时前
ARM 汇编指令:PUSH 和 POP
汇编·arm开发·assembly
切糕师学AI14 小时前
ARM 汇编指令:ERET
汇编·arm开发
切糕师学AI1 天前
ARM 汇编指令:BX
汇编·arm开发·assembly
切糕师学AI2 天前
ARM 汇编指令:B
汇编·arm开发
Trouvaille ~2 天前
【Linux】库制作与原理(一):静态库与动态库的制作使用
linux·运维·服务器·c语言·汇编·动静态库·编译链接
渡我白衣2 天前
计算机组成原理(9):零拓展与符号拓展
c语言·汇编·人工智能·嵌入式硬件·网络协议·硬件工程·c
CHANG_THE_WORLD2 天前
6.2.在汇编层面,数据本身没有类型
java·服务器·汇编
切糕师学AI3 天前
ARM 汇编指令:TST
汇编·arm开发