LUTI2

Lookup table read with 2-bit indices

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.

It has encodings from 2 classes: Byte and Halfword

Byte
(FEAT_LUT)

313029282726252423222120191817161514131211109876543210
01000101i21Zm101100ZnZd

LUTI2 <Zd>.B, { <Zn>.B }, <Zm>[<index>]

if ((!IsFeatureImplemented(FEAT_SVE2) && !IsFeatureImplemented(FEAT_SME2)) || !IsFeatureImplemented(FEAT_LUT)) then UNDEFINED; 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);

Halfword
(FEAT_LUT)

313029282726252423222120191817161514131211109876543210
01000101i3h1Zm101i3l10ZnZd

LUTI2 <Zd>.H, { <Zn>.H }, <Zm>[<index>]

if ((!IsFeatureImplemented(FEAT_SVE2) && !IsFeatureImplemented(FEAT_SME2)) || !IsFeatureImplemented(FEAT_LUT)) then UNDEFINED; 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);

Assembler Symbols

<Zd>

Is the name of the destination scalable vector register, encoded in the "Zd" field.

<Zn>

Is the name of the table vector register, encoded in the "Zn" field.

<Zm>

Is the name of the source scalable vector register, encoded in the "Zm" field.

<index>

For the byte variant: is the vector segment index, in the range 0 to 3, encoded in the "i2" field.

For the halfword variant: is the vector segment index, in the range 0 to 7, encoded in the "i3h:i3l" fields.

Operation

CheckSVEEnabled(); 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;

Operational information

If FEAT_SVE2 is implemented or FEAT_SME is implemented, then if PSTATE.DIT is 1:


Internal version only: aarchmrs v2024-03_relA, pseudocode v2024-03_rel, sve v2024-03_rel ; Build timestamp: 2024-03-26T09:45

Copyright © 2010-2024 Arm Limited or its affiliates. All rights reserved. This document is Non-Confidential.