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位

相关推荐
脑子慢且灵3 天前
C语言与Java语言编译过程及文件类型
java·c语言·开发语言·汇编·编辑器
日更嵌入式的打工仔7 天前
汇编与反汇编
汇编
oioihoii12 天前
从汇编角度看C++优化:编译器真正做了什么
java·汇编·c++
CHANG_THE_WORLD12 天前
函数简单传入参数的汇编分析
汇编·c++·算法
GHL28427109013 天前
i++汇编学习
汇编·学习
iCxhust13 天前
Intel8259汇编串口接收转C语言
c语言·开发语言·汇编
东亚_劲夫13 天前
汇编和反汇编
汇编
无名J0kзr16 天前
汇编:语法速通
汇编
月盈缺20 天前
学习嵌入式的第三十九天——ARM——汇编
汇编·arm开发·学习
7hhhhhhh21 天前
自学嵌入式第四十四天:汇编
汇编