新聞中心

ARMv8指令學(xué)習(2)

作者: 時間:2016-11-10 來源:網(wǎng)絡(luò) 收藏
1. UXTB ---- Unsigned extend byte

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

本文引用地址:http://m.butianyuan.cn/article/201611/317219.htm

即: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

并擴展相應(yīng)的符號位.


(3)UBFM:Unsignedbitfield move

UBFM Wd,Wn,#r,#s

if (s>=r )

Wd = Wn

else

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

同時:設(shè)置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



關(guān)鍵詞: ARMv8指令學(xué)

評論


技術(shù)專區(qū)

關(guān)閉