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位

相关推荐
花阴偷移10 小时前
逆向基础--汇编基础(字与物料地址) (004)
汇编
小尧嵌入式16 小时前
STM32启动汇编文件详解及启动逻辑
汇编·arm开发·stm32·单片机
花阴偷移18 小时前
逆向基础--汇编基础(CS与IP) (05)
网络·汇编·网络协议·tcp/ip
梓仁沐白6 天前
CSAPP实验2:Bomb
汇编
资料,小偿7 天前
8086微机原理与汇编语言,8086程序设计,EMU8086,MASM,汇编程序设计,proteus
汇编·51单片机·proteus
rechol16 天前
汇编与底层编程笔记
汇编·arm开发·笔记
CHANG_THE_WORLD17 天前
switch语句在汇编层面的几种优化方式 ,为什么能进行优化
汇编·算法·switch·汇编分析·switch case·switch case 汇编·switch case 语句
SundayBear18 天前
嵌入式进阶:C语言内联汇编
c语言·开发语言·汇编
CC-NX19 天前
32位汇编:实验5算数运算类指令使用
汇编·win32·算数运算
伐尘19 天前
【汇编】RAX,eax,ax,ah,al 关系
汇编