Lookup table read with 4-bit indices
This instruction copies indexed 8-bit or 16-bit elements from the one or two table vectors to the destination vector using packed 4-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.
Variants: FEAT_AdvSIMD && FEAT_LUT (FEAT_AdvSIMD && 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 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | ||||||||||||||||||
Q | op2 | Rm | len | op | Rn | Rd |
---|
LUTI4 <Vd>.16B, { <Vn>.16B }, <Vm>[<index>]
LUTI4 <Vd>.8H, { <Vn1>.8H, <Vn2>.8H }, <Vm>[<index>]
if !IsFeatureImplemented(FEAT_AdvSIMD) || !IsFeatureImplemented(FEAT_LUT) then EndOfDecode(Decode_UNDEF); if len<0> == '0' && op == '0' then EndOfDecode(Decode_UNDEF); constant integer d = UInt(Rd); constant integer n = UInt(Rn); constant integer m = UInt(Rm); constant integer isize = 4; constant integer esize = 8 << UInt(op); constant integer ntblr = 1 << UInt(op); constant integer part = if op == '0' then UInt(len<1>) else UInt(len);
CheckFPAdvSIMDEnabled64(); constant integer elements = 128 DIV esize; constant integer ibase = elements * part; constant bits(128) indices = V[m, 128]; constant bits(128) table1 = V[n+0, 128]; constant bits(128) table2 = if ntblr == 2 then V[(n+1) MOD 32, 128] else Zeros(128); bits(128) result; bits(esize) res; for e = 0 to elements-1 constant integer index = UInt(Elem[indices, ibase + e, isize]); if index < elements then res = Elem[table1, index, esize]; else assert ntblr == 2; res = Elem[table2, index - elements, esize]; Elem[result, e, esize] = res; V[d, 128] = result;
If PSTATE.DIT is 1: