We reviewed and approved the variants of these instructions that take 1 input in #1277. As part of that review, we also considered the variants that take 2-4 inputs. However, we did not approve those variants due to open questions around how the JIT could efficiently handle everything and whether it should be exposed as a tuple or custom type.
We're now at a point where we have settled on a design for how the JIT handles this and have opted for using ValueTuple, which we have already successfully done in several other hwintrinsic APIs.
namespace System.Runtime.Intrinsics.Arm;
public partial class AdvSimd
{
public static Vector64<byte> VectorTableLookup((Vector128<byte> Row0, Vector128<byte> Row1) table, Vector64<byte> byteIndexes);
public static Vector64<sbyte> VectorTableLookup((Vector128<sbyte> Row0, Vector128<byte> Row1) table, Vector64<sbyte> byteIndexes);
public static Vector64<byte> VectorTableLookupExtension(Vector64<byte> defaultValues, (Vector128<byte> Row0, Vector128<byte> Row1) table, Vector64<byte> byteIndexes);
public static Vector64<sbyte> VectorTableLookupExtension(Vector64<byte> defaultValues, (Vector128<sbyte> Row0, Vector128<sbyte> Row1) table, Vector64<sbyte> byteIndexes);
public partial class Arm32
{
public static Vector64<byte> VectorTableLookup ((Vector64<byte> Row0, Vector64<byte> Row1) table, Vector64<byte> byteIndexes);
public static Vector64<sbyte> VectorTableLookup ((Vector64<sbyte> Row0, Vector64<sbyte> Row1) table, Vector64<sbyte> byteIndexes);
public static Vector64<byte> VectorTableLookup ((Vector64<byte> Row0, Vector64<byte> Row1, Vector64<byte> Row2) table, Vector64<byte> byteIndexes);
public static Vector64<sbyte> VectorTableLookup ((Vector64<sbyte> Row0, Vector64<sbyte> Row1, Vector64<sbyte> Row2) table, Vector64<sbyte> byteIndexes);
public static Vector64<byte> VectorTableLookup ((Vector64<byte> Row0, Vector64<byte> Row1, Vector64<byte> Row2, Vector64<byte> Row3) table, Vector64<byte> byteIndexes);
public static Vector64<sbyte> VectorTableLookup ((Vector64<sbyte> Row0, Vector64<sbyte> Row1, Vector64<sbyte> Row2, Vector64<sbyte> Row3) table, Vector64<sbyte> byteIndexes);
public static Vector64<byte> VectorTableLookupExtension (Vector64<byte> defaultValues, (Vector64<byte> Row0, Vector64<byte> Row1) table, Vector64<byte> byteIndexes);
public static Vector64<sbyte> VectorTableLookupExtension (Vector64<byte> defaultValues, (Vector64<sbyte> Row0, Vector64<sbyte> Row1) table, Vector64<sbyte> byteIndexes);
public static Vector64<byte> VectorTableLookupExtension (Vector64<byte> defaultValues, (Vector64<byte> Row0, Vector64<byte> Row1,Vector64<byte> Row2) table, Vector64<byte> byteIndexes);
public static Vector64<sbyte> VectorTableLookupExtension (Vector64<byte> defaultValues, (Vector64<sbyte> Row0, Vector64<sbyte> Row1,Vector64<sbyte> Row2) table, Vector64<sbyte> byteIndexes);
public static Vector64<byte> VectorTableLookupExtension (Vector64<byte> defaultValues, (Vector64<byte> Row0, Vector64<byte> Row1, Vector64<byte> Row2, Vector64<byte> Row3) table, Vector64<byte> byteIndexes);
public static Vector64<sbyte> VectorTableLookupExtension (Vector64<byte> defaultValues, (Vector64<sbyte> Row0, Vector64<sbyte> Row1, Vector64<sbyte>Row2, Vector64<sbyte> Row3) table, Vector64<sbyte> byteIndexes);
}
public partial class Arm64
{
public static Vector64<byte> VectorTableLookup ((Vector128<byte> Row0, Vector128<byte> Row1, Vector128<byte> Row2) table, Vector64<byte> byteIndexes);
public static Vector64<sbyte> VectorTableLookup ((Vector128<sbyte> Row0, Vector128<sbyte> Row1, Vector128<sbyte> Row2) table, Vector64<sbyte> byteIndexes);
public static Vector64<byte> VectorTableLookup ((Vector128<byte> Row0, Vector128<byte> Row1, Vector128<byte> Row2, Vector128<byte> Row3) table, Vector64<byte> byteIndexes);
public static Vector64<sbyte> VectorTableLookup ((Vector128<sbyte> Row0, Vector128<sbyte> Row1, Vector128<sbyte> Row2, Vector128<sbyte> Row3) table, Vector64<sbyte> byteIndexes);
public static Vector128<byte> VectorTableLookup ((Vector128<byte> Row0, Vector128<byte> Row1) table, Vector128<byte> byteIndexes);
public static Vector128<sbyte> VectorTableLookup ((Vector128<sbyte> Row0, Vector128<sbyte> Row1) table, Vector128<sbyte> byteIndexes);
public static Vector128<byte> VectorTableLookup ((Vector128<byte> Row0, Vector128<byte> Row1, Vector128<byte> Row2) table, Vector128<byte> byteIndexes);
public static Vector128<sbyte> VectorTableLookup ((Vector128<sbyte> Row0, Vector128<sbyte> Row1, Vector128<sbyte> Row2) table, Vector128<sbyte> byteIndexes);
public static Vector128<byte> VectorTableLookup ((Vector128<byte> Row0, Vector128<byte> Row1, Vector128<byte> Row2, Vector128<byte> Row3) table, Vector128<byte> byteIndexes);
public static Vector128<sbyte> VectorTableLookup ((Vector128<sbyte> Row0, Vector128<sbyte> Row1, Vector128<sbyte> Row2, Vector128<sbyte> Row3) table, Vector128<sbyte> byteIndexes);
public static Vector64<byte> VectorTableLookupExtension (Vector64<byte> defaultValues, (Vector128<byte> Row0, Vector128<byte> Row1, Vector128<byte> Row2) table, Vector64<byte> byteIndexes);
public static Vector64<sbyte> VectorTableLookupExtension (Vector64<byte> defaultValues, (Vector128<sbyte> Row0, Vector128<sbyte> Row1, Vector128<sbyte> Row2) table, Vector64<sbyte> byteIndexes);
public static Vector64<byte> VectorTableLookupExtension (Vector64<byte> defaultValues, (Vector128<byte> Row0, Vector128<byte> Row1, Vector128<byte> Row2, Vector128<byte> Row3) table, Vector64<byte> byteIndexes);
public static Vector64<sbyte> VectorTableLookupExtension (Vector64<byte> defaultValues, (Vector128<sbyte> Row0, Vector128<sbyte> Row1, Vector128<sbyte> Row2, Vector128<sbyte> Row3) table, Vector64<sbyte> byteIndexes);
public static Vector128<byte> VectorTableLookupExtension (Vector128<byte> defaultValues, (Vector128<byte> Row0, Vector128<byte> Row1) table, Vector128<byte> byteIndexes);
public static Vector128<sbyte> VectorTableLookupExtension (Vector128<byte> defaultValues, (Vector128<sbyte> Row0, Vector128<sbyte> Row1) table, Vector128<sbyte> byteIndexes);
public static Vector128<byte> VectorTableLookupExtension (Vector128<byte> defaultValues, (Vector128<byte> Row0, Vector128<byte> Row1, Vector128<byte> Row2) table, Vector128<byte> byteIndexes);
public static Vector128<sbyte> VectorTableLookupExtension (Vector128<byte> defaultValues, (Vector128<sbyte> Row0, Vector128<sbyte> Row1, Vector128<sbyte> Row2) table, Vector128<sbyte> byteIndexes);
public static Vector128<byte> VectorTableLookupExtension (Vector128<byte> defaultValues, (Vector128<byte> Row0, Vector128<byte> Row1, Vector128<byte> Row2, Vector128<byte> Row3) table, Vector128<byte> byteIndexes);
public static Vector128<sbyte> VectorTableLookupExtension (Vector128<byte> defaultValues, (Vector128<sbyte> Row0, Vector128<sbyte> Row1, Vector128<sbyte> Row2, Vector128<sbyte> Row3) table, Vector128<sbyte> byteIndexes);
}
}
Background and Motivation
We reviewed and approved the variants of these instructions that take 1 input in #1277. As part of that review, we also considered the variants that take 2-4 inputs. However, we did not approve those variants due to open questions around how the JIT could efficiently handle everything and whether it should be exposed as a tuple or custom type.
We're now at a point where we have settled on a design for how the JIT handles this and have opted for using ValueTuple, which we have already successfully done in several other hwintrinsic APIs.
API Proposal