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位

相关推荐
hef28811 小时前
NASM工具怎么用 汇编转机器码实战教程
汇编
是星辰吖~17 小时前
X86反汇编:内存幻影_数组解码纪元(3-2)
汇编
是星辰吖~21 小时前
X86反汇编:内存矩阵与指针之剑(3-1)
汇编
iCxhust2 天前
如何利用iret修改cs ip
汇编·单片机·嵌入式硬件·微机原理·8088单板机
是星辰吖~3 天前
X86反汇编:透视之眼_反编译特训(1-2)
汇编
是星辰吖~3 天前
X86反汇编:破茧成蝶 —— 赤裸逻辑与机械之心(1-1)
汇编
逆向命运3 天前
PC企微搜索手机号窗口绕过
c语言·汇编·c++·飞书·企业微信
是星辰吖~4 天前
函数战争:内存领地的争夺与撤退
汇编
止观止4 天前
在 WSL2 上从零搭建 ARM 混合编程环境
汇编·arm开发·嵌入式开发·混合编程
say_fall5 天前
8086汇编程序设计_从基础到实战
开发语言·汇编·8086