luti2

Lookup Table Index (2-bit)

LUTI2 <Zd>.<T>, ZT0, <Zn>[<index>]

Looks up values in ZT0 table using 2-bit indices (SME2).

Pseudocode Operation

No pseudocode available.

Encoding

Binary Layout
1100000011001
31:19
1
18
i4
17:14
size
13:12
00
11:10
Zn
9:5
Zd
4:0
 
Format SME2 LUT
Opcode 0xC0CC0000
Extension SME2

Operands

  • Zd
    Dest
  • ZT0
    Table
  • Zn
    Indices

Related

More in SME2

Reference

Instruction Forms

Encoding Instruction ISA Bit pattern
0x4E801000 LUTI2 <Vd>.16B, { <Vn>.16B }, <Vm>[<index>] A64 0 | 1 | 001110 | 10 | 0 | Rm | 0 | len | 1 | 00 | Rn | Rd
0x4EC00000 LUTI2 <Vd>.8H, { <Vn>.8H }, <Vm>[<index>] A64 0 | 1 | 001110 | 11 | 0 | Rm | 0 | len | op | 00 | Rn | Rd
0xC08C4000 LUTI2 { <Zd1>.<T>-<Zd2>.<T> }, ZT0, <Zn>[<index>] A64 1100000010001 | 1 | i3 | 1 | size | 00 | Zn | Zd | 0
0xC09C4000 LUTI2 { <Zd1>.<T>, <Zd2>.<T> }, ZT0, <Zn>[<index>] A64 11 | 00000010011 | 1 | i3 | 1 | size | 00 | Zn | D | 0 | Zd
0xC08C8000 LUTI2 { <Zd1>.<T>-<Zd4>.<T> }, ZT0, <Zn>[<index>] A64 1100000010001 | 1 | i2 | 10 | size | 00 | Zn | Zd | 00
0xC09C8000 LUTI2 { <Zd1>.<T>, <Zd2>.<T>, <Zd3>.<T>, <Zd4>.<T> }, ZT0, <Zn>[<index>] A64 11 | 0000001001 | 1 | 1 | i2 | 10 | size | 00 | Zn | D | 0 | 0 | Zd
0xC0CC0000 LUTI2 <Zd>.<T>, ZT0, <Zn>[<index>] A64 1100000011001 | 1 | i4 | size | 00 | Zn | Zd
0x4520B000 LUTI2 <Zd>.B, { <Zn>.B }, <Zm>[<index>] A64 01000101 | i2 | 1 | Zm | 101100 | Zn | Zd
0x4520A800 LUTI2 <Zd>.H, { <Zn>.H }, <Zm>[<index>] A64 01000101 | i3h | 1 | Zm | 101 | i3l | 10 | Zn | Zd

Description

Copy 8-bit, 16-bit or 32-bit elements from ZT0 to one destination vector using packed 2-bit indices from a segment of the source vector register. 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 modulo the total number of segments. This instruction is unpredicated.

Operation

CheckStreamingSVEEnabled();
CheckSMEZT0Enabled();
constant integer VL = CurrentVL;
constant integer elements = VL DIV esize;
integer segments = esize DIV (isize * nreg);
integer segment = imm MOD segments;
bits(VL) indexes = Z[n, VL];
bits(512) table = ZT0[512];

for r = 0 to nreg-1
    integer base = (segment * nreg + r) * elements;
    bits(VL) result;
    for e = 0 to elements-1
        integer index = UInt(Elem[indexes, base+e, isize]);
        Elem[result, e, esize] = Elem[table, index, 32]<esize-1:0>;
    Z[d+r, VL] = result;