Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Sve.ReverseBits() #103806

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/coreclr/jit/hwintrinsiclistarm64sve.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ HARDWARE_INTRINSIC(Sve, PrefetchBytes,
HARDWARE_INTRINSIC(Sve, PrefetchInt16, -1, 3, false, {INS_invalid, INS_invalid, INS_invalid, INS_sve_prfh, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_MemoryLoad, HW_Flag_Scalable|HW_Flag_SpecialCodeGen|HW_Flag_ExplicitMaskedOperation|HW_Flag_LowMaskedOperation|HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand|HW_Flag_HasEnumOperand)
HARDWARE_INTRINSIC(Sve, PrefetchInt32, -1, 3, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_prfw, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_MemoryLoad, HW_Flag_Scalable|HW_Flag_SpecialCodeGen|HW_Flag_ExplicitMaskedOperation|HW_Flag_LowMaskedOperation|HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand|HW_Flag_HasEnumOperand)
HARDWARE_INTRINSIC(Sve, PrefetchInt64, -1, 3, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_prfd, INS_invalid, INS_invalid}, HW_Category_MemoryLoad, HW_Flag_Scalable|HW_Flag_SpecialCodeGen|HW_Flag_ExplicitMaskedOperation|HW_Flag_LowMaskedOperation|HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand|HW_Flag_HasEnumOperand)
HARDWARE_INTRINSIC(Sve, ReverseBits, -1, -1, false, {INS_sve_rbit, INS_sve_rbit, INS_sve_rbit, INS_sve_rbit, INS_sve_rbit, INS_sve_rbit, INS_sve_rbit, INS_sve_rbit, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_EmbeddedMaskedOperation|HW_Flag_LowMaskedOperation)
HARDWARE_INTRINSIC(Sve, ReverseElement, -1, 1, true, {INS_sve_rev, INS_sve_rev, INS_sve_rev, INS_sve_rev, INS_sve_rev, INS_sve_rev, INS_sve_rev, INS_sve_rev, INS_sve_rev, INS_sve_rev}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_SpecialCodeGen)
HARDWARE_INTRINSIC(Sve, ReverseElement16, -1, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_revh, INS_sve_revh, INS_sve_revh, INS_sve_revh, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_EmbeddedMaskedOperation|HW_Flag_LowMaskedOperation)
HARDWARE_INTRINSIC(Sve, ReverseElement32, -1, -1, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_sve_revw, INS_sve_revw, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_Scalable|HW_Flag_EmbeddedMaskedOperation|HW_Flag_LowMaskedOperation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4282,6 +4282,57 @@ internal Arm64() { }
public static unsafe void PrefetchInt64(Vector<ulong> mask, void* address, [ConstantExpected] SvePrefetchType prefetchType) { throw new PlatformNotSupportedException(); }


/// Reverse bits

/// <summary>
/// svuint8_t svrbit[_u8]_m(svuint8_t inactive, svbool_t pg, svuint8_t op)
/// RBIT Ztied.B, Pg/M, Zop.B
/// </summary>
public static unsafe Vector<byte> ReverseBits(Vector<byte> value) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svint16_t svrbit[_s16]_m(svint16_t inactive, svbool_t pg, svint16_t op)
/// RBIT Ztied.H, Pg/M, Zop.H
/// </summary>
public static unsafe Vector<short> ReverseBits(Vector<short> value) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svint32_t svrbit[_s32]_m(svint32_t inactive, svbool_t pg, svint32_t op)
/// RBIT Ztied.S, Pg/M, Zop.S
/// </summary>
public static unsafe Vector<int> ReverseBits(Vector<int> value) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svint64_t svrbit[_s64]_m(svint64_t inactive, svbool_t pg, svint64_t op)
/// RBIT Ztied.D, Pg/M, Zop.D
/// </summary>
public static unsafe Vector<long> ReverseBits(Vector<long> value) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svint8_t svrbit[_s8]_m(svint8_t inactive, svbool_t pg, svint8_t op)
/// RBIT Ztied.B, Pg/M, Zop.B
/// </summary>
public static unsafe Vector<sbyte> ReverseBits(Vector<sbyte> value) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svuint16_t svrbit[_u16]_m(svuint16_t inactive, svbool_t pg, svuint16_t op)
/// RBIT Ztied.H, Pg/M, Zop.H
/// </summary>
public static unsafe Vector<ushort> ReverseBits(Vector<ushort> value) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svuint32_t svrbit[_u32]_m(svuint32_t inactive, svbool_t pg, svuint32_t op)
/// RBIT Ztied.S, Pg/M, Zop.S
/// </summary>
public static unsafe Vector<uint> ReverseBits(Vector<uint> value) { throw new PlatformNotSupportedException(); }

/// <summary>
/// svuint64_t svrbit[_u64]_m(svuint64_t inactive, svbool_t pg, svuint64_t op)
/// RBIT Ztied.D, Pg/M, Zop.D
/// </summary>
public static unsafe Vector<ulong> ReverseBits(Vector<ulong> value) { throw new PlatformNotSupportedException(); }


/// Reverse all elements

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4336,6 +4336,57 @@ internal Arm64() { }
/// </summary>
public static unsafe void PrefetchInt64(Vector<ulong> mask, void* address, [ConstantExpected] SvePrefetchType prefetchType) => PrefetchInt64(mask, address, prefetchType);

/// Reverse bits

/// <summary>
/// svuint8_t svrbit[_u8]_x(svbool_t pg, svuint8_t op)
/// RBIT Ztied.B, Pg/M, Ztied.B
/// </summary>
public static unsafe Vector<byte> ReverseBits(Vector<byte> value) => ReverseBits(value);

/// <summary>
/// svint16_t svrbit[_s16]_m(svint16_t inactive, svbool_t pg, svint16_t op)
/// RBIT Ztied.H, Pg/M, Zop.H
/// </summary>
public static unsafe Vector<short> ReverseBits(Vector<short> value) => ReverseBits(value);

/// <summary>
/// svint32_t svrbit[_s32]_m(svint32_t inactive, svbool_t pg, svint32_t op)
/// RBIT Ztied.S, Pg/M, Zop.S
/// </summary>
public static unsafe Vector<int> ReverseBits(Vector<int> value) => ReverseBits(value);

/// <summary>
/// svint64_t svrbit[_s64]_m(svint64_t inactive, svbool_t pg, svint64_t op)
/// RBIT Ztied.D, Pg/M, Zop.D
/// </summary>
public static unsafe Vector<long> ReverseBits(Vector<long> value) => ReverseBits(value);

/// <summary>
/// svint8_t svrbit[_s8]_m(svint8_t inactive, svbool_t pg, svint8_t op)
/// RBIT Ztied.B, Pg/M, Zop.B
/// </summary>
public static unsafe Vector<sbyte> ReverseBits(Vector<sbyte> value) => ReverseBits(value);

/// <summary>
/// svuint16_t svrbit[_u16]_m(svuint16_t inactive, svbool_t pg, svuint16_t op)
/// RBIT Ztied.H, Pg/M, Zop.H
/// </summary>
public static unsafe Vector<ushort> ReverseBits(Vector<ushort> value) => ReverseBits(value);

/// <summary>
/// svuint32_t svrbit[_u32]_m(svuint32_t inactive, svbool_t pg, svuint32_t op)
/// RBIT Ztied.S, Pg/M, Zop.S
/// </summary>
public static unsafe Vector<uint> ReverseBits(Vector<uint> value) => ReverseBits(value);

/// <summary>
/// svuint64_t svrbit[_u64]_m(svuint64_t inactive, svbool_t pg, svuint64_t op)
/// RBIT Ztied.D, Pg/M, Zop.D
/// </summary>
public static unsafe Vector<ulong> ReverseBits(Vector<ulong> value) => ReverseBits(value);


/// Reverse all elements

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4806,6 +4806,15 @@ internal Arm64() { }
public static unsafe void PrefetchInt32(System.Numerics.Vector<uint> mask, void* address, [ConstantExpected] SvePrefetchType prefetchType) { throw null; }
public static unsafe void PrefetchInt64(System.Numerics.Vector<ulong> mask, void* address, [ConstantExpected] SvePrefetchType prefetchType) { throw null; }

public static System.Numerics.Vector<byte> ReverseBits(System.Numerics.Vector<byte> value) { throw null; }
public static System.Numerics.Vector<short> ReverseBits(System.Numerics.Vector<short> value) { throw null; }
public static System.Numerics.Vector<int> ReverseBits(System.Numerics.Vector<int> value) { throw null; }
public static System.Numerics.Vector<long> ReverseBits(System.Numerics.Vector<long> value) { throw null; }
public static System.Numerics.Vector<sbyte> ReverseBits(System.Numerics.Vector<sbyte> value) { throw null; }
public static System.Numerics.Vector<ushort> ReverseBits(System.Numerics.Vector<ushort> value) { throw null; }
public static System.Numerics.Vector<uint> ReverseBits(System.Numerics.Vector<uint> value) { throw null; }
public static System.Numerics.Vector<ulong> ReverseBits(System.Numerics.Vector<ulong> value) { throw null; }

public static System.Numerics.Vector<byte> ReverseElement(System.Numerics.Vector<byte> value) { throw null; }
public static System.Numerics.Vector<double> ReverseElement(System.Numerics.Vector<double> value) { throw null; }
public static System.Numerics.Vector<short> ReverseElement(System.Numerics.Vector<short> value) { throw null; }
Expand Down
Loading
Loading