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位

相关推荐
cch891811 小时前
PHP与汇编:高级与低级的终极对决
开发语言·汇编·php
One_Blanks1 天前
WIndows x64 ShellCode开发 第三章 x64汇编细节点
汇编·windows·网络安全·渗透测试·红队技术
Kira Skyler1 天前
kprobe函数入口时的汇编跳板执行流程与栈帧机制
linux·汇编
LittleFishC1 天前
08_长调用与短调用
c语言·汇编·逆向·windows内核
老师用之于民2 天前
【DAY35】ARM开发:UART 异步串行通信原理、通信标准及模块配置详解
c语言·汇编·arm开发·vscode
陌上花开缓缓归以3 天前
mips u-boot如何在汇编中添加调式打印
汇编
山楂树の4 天前
【计算机系统原理】Intel 与 AT&T 汇编指令格式转换
汇编·学习·缓存
浩浩测试一下5 天前
RadASM 汇编工具从下载汉化配置汇编运行 --->>>>环境详细说明
汇编·asm·radasm·pe壳
给点sun,就shine6 天前
交叉编译链
汇编·物联网
’长谷深风‘7 天前
嵌入式 ARM 开发入门解析
汇编·arm开发·cpu·cortex