Lookup table read with 2-bit indices (8-bit and 16-bit)
This instruction copies indexed 8-bit or 16-bit elements from the low 128 bits of the table vector to the destination vector using packed 2-bit indices from a segment of the source vector. A segment corresponds to a portion of the source vector that is consumed in order to fill the destination vector. The segment is selected by the vector segment index. This instruction is unpredicated.
Variants: (FEAT_SVE2 || FEAT_SME2) && FEAT_LUT ((FEAT_SVE2 || FEAT_SME2) && FEAT_LUT)
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | |||||||||||||||||
i2 | Zm | Zn | Zd |
---|
LUTI2 <Zd>.B, { <Zn>.B }, <Zm>[<index>]
if ((!IsFeatureImplemented(FEAT_SVE2) && !IsFeatureImplemented(FEAT_SME2)) || !IsFeatureImplemented(FEAT_LUT)) then EndOfDecode(Decode_UNDEF); constant integer isize = 2; constant integer esize = 8; constant integer m = UInt(Zm); constant integer n = UInt(Zn); constant integer d = UInt(Zd); constant integer part = UInt(i2);
Variants: (FEAT_SVE2 || FEAT_SME2) && FEAT_LUT ((FEAT_SVE2 || FEAT_SME2) && FEAT_LUT)
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | ||||||||||||||||||
i3h | Zm | i3l | Zn | Zd |
---|
LUTI2 <Zd>.H, { <Zn>.H }, <Zm>[<index>]
if ((!IsFeatureImplemented(FEAT_SVE2) && !IsFeatureImplemented(FEAT_SME2)) || !IsFeatureImplemented(FEAT_LUT)) then EndOfDecode(Decode_UNDEF); constant integer isize = 2; constant integer esize = 16; constant integer m = UInt(Zm); constant integer n = UInt(Zn); constant integer d = UInt(Zd); constant integer part = UInt(i3h:i3l);
if IsFeatureImplemented(FEAT_SME2) then CheckSVEEnabled(); else CheckNonStreamingSVEEnabled(); constant integer VL = CurrentVL; constant integer elements = VL DIV esize; constant integer ibase = elements * part; constant bits(VL) indices = Z[m, VL]; constant bits(VL) table = Z[n, VL]; bits(VL) result; for e = 0 to elements-1 constant integer index = UInt(Elem[indices, ibase + e, isize]); Elem[result, e, esize] = Elem[table, index, esize]; Z[d, VL] = result;
If PSTATE.DIT is 1: