3.7.1 Shift, Round and Saturate Operations

Vector shift instructions shift all elements of the vector accumulator by the same amount, either a immediate constant or a scalar register value. There are no Memory Vector Shift instructions.

Vector Constant Shift

Mnemonic Format Unit Semantics Description
sllbv sN su 8{ a.bv <<= sc } Shift Left Logical Byte Vector
sllhv sN su 4{ a.hv <<= sc } Shift Left Logical Halfword Vector
srlbv sN su 8{ a.ubv >>= sc } Shift Right Logical Byte Vector
srlhv sN su 4{ a.uhv >>= sc } Shift Right Logical Halfword Vector
srabv sN su 8{ a.bv >>= sc } Shift Right Arithmetic Byte Vector
srahv sN su 4{ a.hv >>= sc } Shift Right Arithmetic Halfword Vector


Vector Variable Shift

Mnemonic Format Unit Semantics Description
vsllbv aO su 8{ a.bv <<= (y.i & 0x3F) } Variable Shift Left Logical Byte Vector
vsllhv aO su 4{ a.hv <<= (y.i & 0x3F) } Variable Shift Left Logical Halfword Vector
vsrlbv aO su 8{ a.ubv >>= (y.i & 0x3F) } Variable Shift Right Logical Byte Vector
vsrlhv aO su 4{ a.uhv >>= (y.i & 0x3F) } Variable Shift Right Logical Halfword Vector
vsrabv aO su 8{ a.bv >>= (y.i & 0x3F) } Variable Shift Right Arithmetic Byte Vector
vsrahv aO su 4{ a.hv >>= (y.i & 0x3F) } Variable Shift Right Arithmetic Halfword Vector


Vector Shift and Round

Mnemonic Format Unit Semantics Description
sarbv sN su 8{ a.bv = sarw(a.bv, sc) } Shift And Round Byte Vector
sarhv sN su 4{ a.hv = sarl(a.hv, sc) } Shift And Round Halfword Vector


Vector Saturation

Mnemonic Format Unit Semantics Description
satbv aN lu 8{ a.bv = sclamp(a.bv, 7) } Saturate Byte Vector
sathv aN lu 4{ a.hv = sclamp(a.hv, 15) } Saturate Halfword Vector
satubv aN lu 8{ a.bv = uclamp(a.bv, 8) } Saturate Unsigned Byte Vector
satuhv aN lu 4{ a.hv = uclamp(a.hv, 16) } Saturate Unsigned Halfword Vector