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位

相关推荐
万象.16 小时前
GNU汇编语法和Cortex-A7常用汇编指令
服务器·汇编·gnu
资料,小偿17 小时前
4.95基于8086流水灯霓虹彩灯控制器,8086彩灯控制器proteus8.9仿真文件+源码功能四个开关对应四种模式。
汇编·proteus
YeGop2 天前
51单片机定时器函数分享(8051汇编)
汇编·嵌入式硬件·51单片机
YeGop2 天前
51单片机汇编实现DHT11读取温湿度
汇编·嵌入式硬件·51单片机
资料,小偿2 天前
8086汇编语言定制,8086仿真proteus8086定制,emu8086汇编语言
汇编
花阴偷移3 天前
逆向基础--汇编基础(段的分类) (07)
汇编
YeGop3 天前
51单片机数码管显示函数分享(8051汇编)
汇编·嵌入式硬件·51单片机
花阴偷移3 天前
逆向基础--汇编基础(DOS安装与介绍) (06)
汇编
花阴偷移3 天前
逆向基础--汇编源程序认识(08)
汇编
阿昭L5 天前
计算机外设与CPU通信
汇编·计算机外设