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位

相关推荐
水饺编程7 小时前
第2章:Linux 基础,制作【.tar.xz】压缩包文件
linux·c语言·汇编
小向是个Der2 天前
嵌入式进阶——编译与链接
汇编·单片机·学习·编译原理·交叉编译
二十七日秋2 天前
算法刷题笔记「Day 1|四道 OJ 入门题里的深坑」
c语言·汇编·数据结构·c++·笔记·python·算法
银河麒麟操作系统2 天前
两案例入选全球计算联盟年度产业应用案例汇编
大数据·汇编·人工智能
abc light2 天前
ARM 裸机开发(2)——ARM 汇编与启动代码
汇编·arm开发
soso19683 天前
Modbus协议开发实战指南
汇编
水饺编程4 天前
第2章:Linux 基础,解压缩【.tar.gz】压缩包
linux·c语言·汇编
水饺编程5 天前
第2章:Linux 基础,exit 命令
linux·c语言·汇编
水饺编程5 天前
第2章:Linux 基础,删除用户
linux·c语言·汇编
水饺编程7 天前
第2章:Linux 基础,切换用户
linux·c语言·汇编