ARMv8指令學(xué)習(2)
UXTB
即:Wd = ZeroExtend(Wn<7:0>)
從Wn中取出一個byte,賦給Wd,并把Wd的高3 bytes,用0填充。
2. UXTH ---- Unsigned extend halfword
UXTB
即: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
else
Wd<32+s-r,32-r> = Wn
同時:保持Wd中的其它bit不變
(2)SBFM: Signed bitfield move
SBFM Wd,Wn,#r,#s
if (s>=r )
Wd
else
Wd<32+s-r,32-r> = Wn
并擴展相應(yīng)的符號位.
(3)UBFM:Unsignedbitfield move
UBFM Wd,Wn,#r,#s
if (s>=r )
Wd
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
評論