您的位置 首页 模拟

ARMv8指令学习(2)

1.UXTB—-UnsignedextendbyteUXTBWd>,Wn>等同于UBFMWd>,Wn>,#0,#7即:Wd=ZeroExtend(Wn7:0>)从Wn

1. UXTB —- Unsigned extend byte

UXTB , 等同于 UBFM ,,#0,#7

即:Wd = ZeroExtend(Wn<7:0>)

从Wn中取出一个byte,赋给Wd,并把Wd的高3 bytes,用0填充。

2. UXTH —- Unsigned extend halfword

UXTB , 等同于 UBFM ,,#0,#15

即:Wd = ZeroExtend(Wn<15:0>)

从Wn中取出2个byte,赋给Wd,并把Wd的高2 bytes,用0填充。

3. Bitfield move指令
(1) BFM : Bitfield move

BFM Wd,Wn,#r,#s

if (s>=r )

Wd = Wn

else

Wd<32+s-r,32-r> = Wn

一起:坚持Wd中的其它bit不变
(2)SBFM: Signed bitfield move

SBFM Wd,Wn,#r,#s

if (s>=r )

Wd = Wn

else

Wd<32+s-r,32-r> = Wn

并扩展相应的符号位.

(3)UBFM:Unsignedbitfield move

UBFM Wd,Wn,#r,#s

if (s>=r )

Wd = Wn

else

Wd<32+s-r,32-r> = Wn

一起:设置Wd中的其它bit位为0

4. Bitfield insert and extract指令
(1) BFI : Bitfield insert

BFI Wd, Wn, #lsb, #width

等同于

BFM Wd, Wn, #((32-lsb)&31) , #(width-1)

即:

width bits in Wd , starting at lsb , are replaced by width bits from Wn, starting at bit[0].

Other bits in Rd are unchanged

BFI指令,不会更改PSTATE中的flags

(2) BFXIL : Bitfield extract and insert low

BFXIL Wd, Wn, #lsb, #width
等同于
BFM Wd,Wn,#lsb,#(lsb+width-1)

(3) SBFIZ : Signed bitfield insert in zero
(4) SBFX : Signed bitfield extract
(5) UBFIZ : Unsigned bitfield insert in zero
(6) UBFX : Unsigned bitfield extract

声明:本文内容来自网络转载或用户投稿,文章版权归原作者和原出处所有。文中观点,不代表本站立场。若有侵权请联系本站删除(kf@86ic.com)https://www.86ic.net/zhishi/moni/275655.html

为您推荐

联系我们

联系我们

在线咨询: QQ交谈

邮箱: kf@86ic.com

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

返回顶部