-
Notifications
You must be signed in to change notification settings - Fork 5k
Add SVE2 API skeleton and implement BitwiseClearXor #115428
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
Open
snickolls-arm
wants to merge
2
commits into
dotnet:main
Choose a base branch
from
snickolls-arm:sve2-bitwiseclearxor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+286
−3
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
...ies/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve2.PlatformNotSupported.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
// 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)] | ||
[Experimental(Experimentals.ArmSveDiagId, UrlFormat = Experimentals.SharedUrlFormat)] | ||
public abstract class Sve2 : Sve | ||
{ | ||
internal Sve2() { } | ||
|
||
public static new bool IsSupported { get => IsSupported; } | ||
|
||
[Intrinsic] | ||
public new abstract class Arm64 : Sve.Arm64 | ||
{ | ||
internal Arm64() { } | ||
|
||
public static new bool IsSupported { get => IsSupported; } | ||
} | ||
|
||
// Bitwise clear and exclusive OR | ||
|
||
/// <summary> | ||
/// svuint8_t svbcax[_u8](svuint8_t op1, svuint8_t op2, svuint8_t op3) | ||
/// BCAX Ztied1.D, Ztied1.D, Zop2.D, Zop3.D | ||
/// </summary> | ||
public static unsafe Vector<byte> BitwiseClearXor(Vector<byte> xor, Vector<byte> value, Vector<byte> mask) { throw new PlatformNotSupportedException(); } | ||
|
||
/// <summary> | ||
/// svint16_t svbcax[_s16](svint16_t op1, svint16_t op2, svint16_t op3) | ||
/// BCAX Ztied1.D, Ztied1.D, Zop2.D, Zop3.D | ||
/// </summary> | ||
public static unsafe Vector<short> BitwiseClearXor(Vector<short> xor, Vector<short> value, Vector<short> mask) { throw new PlatformNotSupportedException(); } | ||
|
||
/// <summary> | ||
/// svint32_t svbcax[_s32](svint32_t op1, svint32_t op2, svint32_t op3) | ||
/// BCAX Ztied1.D, Ztied1.D, Zop2.D, Zop3.D | ||
/// </summary> | ||
public static unsafe Vector<int> BitwiseClearXor(Vector<int> xor, Vector<int> value, Vector<int> mask) { throw new PlatformNotSupportedException(); } | ||
|
||
/// <summary> | ||
/// svint64_t svbcax[_s64](svint64_t op1, svint64_t op2, svint64_t op3) | ||
/// BCAX Ztied1.D, Ztied1.D, Zop2.D, Zop3.D | ||
/// </summary> | ||
public static unsafe Vector<long> BitwiseClearXor(Vector<long> xor, Vector<long> value, Vector<long> mask) { throw new PlatformNotSupportedException(); } | ||
|
||
/// <summary> | ||
/// svint8_t svbcax[_s8](svint8_t op1, svint8_t op2, svint8_t op3) | ||
/// BCAX Ztied1.D, Ztied1.D, Zop2.D, Zop3.D | ||
/// </summary> | ||
public static unsafe Vector<sbyte> BitwiseClearXor(Vector<sbyte> xor, Vector<sbyte> value, Vector<sbyte> mask) { throw new PlatformNotSupportedException(); } | ||
|
||
/// <summary> | ||
/// svuint16_t svbcax[_u16](svuint16_t op1, svuint16_t op2, svuint16_t op3) | ||
/// BCAX Ztied1.D, Ztied1.D, Zop2.D, Zop3.D | ||
/// </summary> | ||
public static unsafe Vector<ushort> BitwiseClearXor(Vector<ushort> xor, Vector<ushort> value, Vector<ushort> mask) { throw new PlatformNotSupportedException(); } | ||
|
||
/// <summary> | ||
/// svuint32_t svbcax[_u32](svuint32_t op1, svuint32_t op2, svuint32_t op3) | ||
/// BCAX Ztied1.D, Ztied1.D, Zop2.D, Zop3.D | ||
/// </summary> | ||
public static unsafe Vector<uint> BitwiseClearXor(Vector<uint> xor, Vector<uint> value, Vector<uint> mask) { throw new PlatformNotSupportedException(); } | ||
|
||
/// <summary> | ||
/// svuint64_t svbcax[_u64](svuint64_t op1, svuint64_t op2, svuint64_t op3) | ||
/// BCAX Ztied1.D, Ztied1.D, Zop2.D, Zop3.D | ||
/// </summary> | ||
public static unsafe Vector<ulong> BitwiseClearXor(Vector<ulong> xor, Vector<ulong> value, Vector<ulong> mask) { throw new PlatformNotSupportedException(); } | ||
} | ||
} |
81 changes: 81 additions & 0 deletions
81
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sve2.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
// 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)] | ||
[Experimental(Experimentals.ArmSveDiagId, UrlFormat = Experimentals.SharedUrlFormat)] | ||
public abstract class Sve2 : Sve | ||
{ | ||
internal Sve2() { } | ||
|
||
public static new bool IsSupported { get => IsSupported; } | ||
|
||
[Intrinsic] | ||
public new abstract class Arm64 : Sve.Arm64 | ||
{ | ||
internal Arm64() { } | ||
|
||
public static new bool IsSupported { get => IsSupported; } | ||
} | ||
|
||
// Bitwise clear and exclusive OR | ||
|
||
/// <summary> | ||
/// svuint8_t svbcax[_u8](svuint8_t op1, svuint8_t op2, svuint8_t op3) | ||
/// BCAX Ztied1.D, Ztied1.D, Zop2.D, Zop3.D | ||
/// </summary> | ||
public static unsafe Vector<byte> BitwiseClearXor(Vector<byte> xor, Vector<byte> value, Vector<byte> mask) => BitwiseClearXor(xor, value, mask); | ||
|
||
/// <summary> | ||
/// svint16_t svbcax[_s16](svint16_t op1, svint16_t op2, svint16_t op3) | ||
/// BCAX Ztied1.D, Ztied1.D, Zop2.D, Zop3.D | ||
/// </summary> | ||
public static unsafe Vector<short> BitwiseClearXor(Vector<short> xor, Vector<short> value, Vector<short> mask) => BitwiseClearXor(xor, value, mask); | ||
|
||
/// <summary> | ||
/// svint32_t svbcax[_s32](svint32_t op1, svint32_t op2, svint32_t op3) | ||
/// BCAX Ztied1.D, Ztied1.D, Zop2.D, Zop3.D | ||
/// </summary> | ||
public static unsafe Vector<int> BitwiseClearXor(Vector<int> xor, Vector<int> value, Vector<int> mask) => BitwiseClearXor(xor, value, mask); | ||
|
||
/// <summary> | ||
/// svint64_t svbcax[_s64](svint64_t op1, svint64_t op2, svint64_t op3) | ||
/// BCAX Ztied1.D, Ztied1.D, Zop2.D, Zop3.D | ||
/// </summary> | ||
public static unsafe Vector<long> BitwiseClearXor(Vector<long> xor, Vector<long> value, Vector<long> mask) => BitwiseClearXor(xor, value, mask); | ||
|
||
/// <summary> | ||
/// svint8_t svbcax[_s8](svint8_t op1, svint8_t op2, svint8_t op3) | ||
/// BCAX Ztied1.D, Ztied1.D, Zop2.D, Zop3.D | ||
/// </summary> | ||
public static unsafe Vector<sbyte> BitwiseClearXor(Vector<sbyte> xor, Vector<sbyte> value, Vector<sbyte> mask) => BitwiseClearXor(xor, value, mask); | ||
|
||
/// <summary> | ||
/// svuint16_t svbcax[_u16](svuint16_t op1, svuint16_t op2, svuint16_t op3) | ||
/// BCAX Ztied1.D, Ztied1.D, Zop2.D, Zop3.D | ||
/// </summary> | ||
public static unsafe Vector<ushort> BitwiseClearXor(Vector<ushort> xor, Vector<ushort> value, Vector<ushort> mask) => BitwiseClearXor(xor, value, mask); | ||
|
||
/// <summary> | ||
/// svuint32_t svbcax[_u32](svuint32_t op1, svuint32_t op2, svuint32_t op3) | ||
/// BCAX Ztied1.D, Ztied1.D, Zop2.D, Zop3.D | ||
/// </summary> | ||
public static unsafe Vector<uint> BitwiseClearXor(Vector<uint> xor, Vector<uint> value, Vector<uint> mask) => BitwiseClearXor(xor, value, mask); | ||
|
||
/// <summary> | ||
/// svuint64_t svbcax[_u64](svuint64_t op1, svuint64_t op2, svuint64_t op3) | ||
/// BCAX Ztied1.D, Ztied1.D, Zop2.D, Zop3.D | ||
/// </summary> | ||
public static unsafe Vector<ulong> BitwiseClearXor(Vector<ulong> xor, Vector<ulong> value, Vector<ulong> mask) => BitwiseClearXor(xor, value, mask); | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just need to confirm that this inheritance matches the agreed design, as there was some discrepancy in our code generation scripts? I assumed it should be like this, as the architecture has this dependency and some of the API design issues had this inheritance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense to me.