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位

相关推荐
枷锁—sha16 小时前
【CTFshow-pwn系列】03_栈溢出【pwn 073】详解:静态编译下的自动化 ROP 链构建
网络·汇编·笔记·安全·网络安全·自动化
wechatbot8882 天前
极客互动企业微信聚合聊天与接口能力全景展示
汇编·微信·企业微信·ipad
枷锁—sha3 天前
【CTFshow-pwn系列】03_栈溢出【pwn 072】详解:无字符串环境下的多级 Ret2Syscall 与 BSS 段注入
服务器·网络·汇编·笔记·安全·网络安全
iCxhust5 天前
8088汇编测试程序 (MASM/TASM) — 显示 “HELLO 8088!“ + “LCD1602 OK“
汇编·单片机·嵌入式硬件·51单片机·微机原理
lhbian6 天前
AI编程革命:Codex让脚本开发提速10倍
开发语言·汇编·jvm·c#
wechatbot8887 天前
企业微信全场景消息发送接口开发实现及接口调用
java·汇编·微信·企业微信
wechatbot8887 天前
企业微信 iPad 协议接口全功能开发实战
汇编·人工智能·ios·微信·企业微信·ipad
techdashen8 天前
Rust 1.88 终于稳定了裸函数:写汇编不再需要那堆样板代码
汇编·rust
So_shine9 天前
stm32f103汇编-1:LED点灯
汇编·stm32·单片机·led
北漂Zachary10 天前
四大编程语言终极对决:汇编/C#/Go/Java谁更强
汇编·golang·c#