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

Sve: Early versions of Intrinsics/Arm/Sve and hwintrinsiclistarm64sve #94606

Closed
wants to merge 1 commit into from
Closed
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
684 changes: 684 additions & 0 deletions src/coreclr/jit/hwintrinsiclistarm64sve.h

Large diffs are not rendered by default.

Large diffs are not rendered by default.

14,058 changes: 14,058 additions & 0 deletions src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve.cs

Large diffs are not rendered by default.

Large diffs are not rendered by default.

7,720 changes: 7,720 additions & 0 deletions src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve2.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.Intrinsics;
using System.Numerics;

namespace System.Runtime.Intrinsics.Arm
{
/// <summary>
/// This class provides access to the ARM SVE hardware instructions via intrinsics
/// </summary>
[Intrinsic]
[CLSCompliant(false)]
public abstract class SveAes : AdvSimd
{
internal SveAes() { }

public static new bool IsSupported { get => IsSupported; }


/// AesInverseMixColumns : AES inverse mix columns

/// <summary>
/// svuint8_t svaesimc[_u8](svuint8_t op)
/// AESIMC Ztied.B, Ztied.B
/// </summary>
public static unsafe Vector<byte> AesInverseMixColumns(Vector<byte> value) { throw new PlatformNotSupportedException(); }


/// AesMixColumns : AES mix columns

/// <summary>
/// svuint8_t svaesmc[_u8](svuint8_t op)
/// AESMC Ztied.B, Ztied.B
/// </summary>
public static unsafe Vector<byte> AesMixColumns(Vector<byte> value) { throw new PlatformNotSupportedException(); }


/// AesSingleRoundDecryption : AES single round decryption

/// <summary>
/// svuint8_t svaesd[_u8](svuint8_t op1, svuint8_t op2)
/// AESD Ztied1.B, Ztied1.B, Zop2.B
/// AESD Ztied2.B, Ztied2.B, Zop1.B
/// </summary>
public static unsafe Vector<byte> AesSingleRoundDecryption(Vector<byte> left, Vector<byte> right) { throw new PlatformNotSupportedException(); }


/// AesSingleRoundEncryption : AES single round encryption

/// <summary>
/// svuint8_t svaese[_u8](svuint8_t op1, svuint8_t op2)
/// AESE Ztied1.B, Ztied1.B, Zop2.B
/// AESE Ztied2.B, Ztied2.B, Zop1.B
/// </summary>
public static unsafe Vector<byte> AesSingleRoundEncryption(Vector<byte> left, Vector<byte> right) { throw new PlatformNotSupportedException(); }


/// PolynomialMultiplyWideningLower : Polynomial multiply long (bottom)

/// <summary>
/// svuint64_t svpmullb_pair[_u64](svuint64_t op1, svuint64_t op2)
/// PMULLB Zresult.Q, Zop1.D, Zop2.D
/// </summary>
public static unsafe Vector<ulong> PolynomialMultiplyWideningLower(Vector<ulong> left, Vector<ulong> right) { throw new PlatformNotSupportedException(); }


/// PolynomialMultiplyWideningUpper : Polynomial multiply long (top)

/// <summary>
/// svuint64_t svpmullt_pair[_u64](svuint64_t op1, svuint64_t op2)
/// PMULLT Zresult.Q, Zop1.D, Zop2.D
/// </summary>
public static unsafe Vector<ulong> PolynomialMultiplyWideningUpper(Vector<ulong> left, Vector<ulong> right) { throw new PlatformNotSupportedException(); }

}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.Intrinsics;
using System.Numerics;

namespace System.Runtime.Intrinsics.Arm
{
/// <summary>
/// This class provides access to the ARM SVE hardware instructions via intrinsics
/// </summary>
[Intrinsic]
[CLSCompliant(false)]
public abstract class SveAes : AdvSimd
{
internal SveAes() { }

public static new bool IsSupported { get => IsSupported; }


/// AesInverseMixColumns : AES inverse mix columns

/// <summary>
/// svuint8_t svaesimc[_u8](svuint8_t op)
/// AESIMC Ztied.B, Ztied.B
/// </summary>
public static unsafe Vector<byte> AesInverseMixColumns(Vector<byte> value) => AesInverseMixColumns(value);


/// AesMixColumns : AES mix columns

/// <summary>
/// svuint8_t svaesmc[_u8](svuint8_t op)
/// AESMC Ztied.B, Ztied.B
/// </summary>
public static unsafe Vector<byte> AesMixColumns(Vector<byte> value) => AesMixColumns(value);


/// AesSingleRoundDecryption : AES single round decryption

/// <summary>
/// svuint8_t svaesd[_u8](svuint8_t op1, svuint8_t op2)
/// AESD Ztied1.B, Ztied1.B, Zop2.B
/// AESD Ztied2.B, Ztied2.B, Zop1.B
/// </summary>
public static unsafe Vector<byte> AesSingleRoundDecryption(Vector<byte> left, Vector<byte> right) => AesSingleRoundDecryption(left, right);


/// AesSingleRoundEncryption : AES single round encryption

/// <summary>
/// svuint8_t svaese[_u8](svuint8_t op1, svuint8_t op2)
/// AESE Ztied1.B, Ztied1.B, Zop2.B
/// AESE Ztied2.B, Ztied2.B, Zop1.B
/// </summary>
public static unsafe Vector<byte> AesSingleRoundEncryption(Vector<byte> left, Vector<byte> right) => AesSingleRoundEncryption(left, right);


/// PolynomialMultiplyWideningLower : Polynomial multiply long (bottom)

/// <summary>
/// svuint64_t svpmullb_pair[_u64](svuint64_t op1, svuint64_t op2)
/// PMULLB Zresult.Q, Zop1.D, Zop2.D
/// </summary>
public static unsafe Vector<ulong> PolynomialMultiplyWideningLower(Vector<ulong> left, Vector<ulong> right) => PolynomialMultiplyWideningLower(left, right);


/// PolynomialMultiplyWideningUpper : Polynomial multiply long (top)

/// <summary>
/// svuint64_t svpmullt_pair[_u64](svuint64_t op1, svuint64_t op2)
/// PMULLT Zresult.Q, Zop1.D, Zop2.D
/// </summary>
public static unsafe Vector<ulong> PolynomialMultiplyWideningUpper(Vector<ulong> left, Vector<ulong> right) => PolynomialMultiplyWideningUpper(left, right);

}
}

Loading
Loading