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

Obsolete invalid AdvSimd.ShiftRightLogicalRoundedNarrowingSaturate* overloads #99985

Merged
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 docs/project/list-of-diagnostics.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ The PR that reveals the implementation of the `<IncludeInternalObsoleteAttribute
| __`SYSLIB0052`__ | This API supports obsolete mechanisms for Regex extensibility. It is not supported. |
| __`SYSLIB0053`__ | AesGcm should indicate the required tag size for encryption and decryption. Use a constructor that accepts the tag size. |
| __`SYSLIB0054`__ | Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead. |
| __`SYSLIB0055`__ | The underlying hardware instruction does not perform a signed saturate narrowing operation, and it always returns an unsigned result. Use the unsigned overload instead. |

## Analyzer Warnings

Expand Down
3 changes: 3 additions & 0 deletions src/libraries/Common/src/System/Obsoletions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,5 +174,8 @@ internal static class Obsoletions

internal const string ThreadVolatileReadWriteMessage = "Thread.VolatileRead and Thread.VolatileWrite are obsolete. Use Volatile.Read or Volatile.Write respectively instead.";
internal const string ThreadVolatileReadWriteDiagId = "SYSLIB0054";

internal const string ArmIntrinsicPerformsUnsignedOperationMessage = "The underlying hardware instruction does not perform a signed saturate narrowing operation, and it always returns an unsigned result. Use the unsigned overload instead.";
internal const string ArmIntrinsicPerformsUnsignedOperationDiagId = "SYSLIB0055";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3502,18 +3502,21 @@ internal Arm64() { }
/// uint16_t vqrshrns_n_u32 (uint32_t a, const int n)
/// A64: UQRSHRN Hd, Sn, #n
/// </summary>
[Obsolete(Obsoletions.ArmIntrinsicPerformsUnsignedOperationMessage, DiagnosticId = Obsoletions.ArmIntrinsicPerformsUnsignedOperationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static Vector64<short> ShiftRightLogicalRoundedNarrowingSaturateScalar(Vector64<int> value, [ConstantExpected(Min = 1, Max = (byte)(16))] byte count) { throw new PlatformNotSupportedException(); }

/// <summary>
/// uint32_t vqrshrnd_n_u64 (uint64_t a, const int n)
/// A64: UQRSHRN Sd, Dn, #n
/// </summary>
[Obsolete(Obsoletions.ArmIntrinsicPerformsUnsignedOperationMessage, DiagnosticId = Obsoletions.ArmIntrinsicPerformsUnsignedOperationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static Vector64<int> ShiftRightLogicalRoundedNarrowingSaturateScalar(Vector64<long> value, [ConstantExpected(Min = 1, Max = (byte)(8))] byte count) { throw new PlatformNotSupportedException(); }

/// <summary>
/// uint8_t vqrshrnh_n_u16 (uint16_t a, const int n)
/// A64: UQRSHRN Bd, Hn, #n
/// </summary>
[Obsolete(Obsoletions.ArmIntrinsicPerformsUnsignedOperationMessage, DiagnosticId = Obsoletions.ArmIntrinsicPerformsUnsignedOperationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static Vector64<sbyte> ShiftRightLogicalRoundedNarrowingSaturateScalar(Vector64<short> value, [ConstantExpected(Min = 1, Max = (byte)(32))] byte count) { throw new PlatformNotSupportedException(); }

/// <summary>
Expand Down Expand Up @@ -15470,20 +15473,23 @@ internal Arm64() { }
/// A32: VQRSHRN.U32 Dd, Qm, #n
/// A64: UQRSHRN Vd.4H, Vn.4S, #n
/// </summary>
[Obsolete(Obsoletions.ArmIntrinsicPerformsUnsignedOperationMessage, DiagnosticId = Obsoletions.ArmIntrinsicPerformsUnsignedOperationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static Vector64<short> ShiftRightLogicalRoundedNarrowingSaturateLower(Vector128<int> value, [ConstantExpected(Min = 1, Max = (byte)(32))] byte count) { throw new PlatformNotSupportedException(); }

/// <summary>
/// uint32x2_t vqrshrn_n_u64 (uint64x2_t a, const int n)
/// A32: VQRSHRN.U64 Dd, Qm, #n
/// A64: UQRSHRN Vd.2S, Vn.2D, #n
/// </summary>
[Obsolete(Obsoletions.ArmIntrinsicPerformsUnsignedOperationMessage, DiagnosticId = Obsoletions.ArmIntrinsicPerformsUnsignedOperationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static Vector64<int> ShiftRightLogicalRoundedNarrowingSaturateLower(Vector128<long> value, [ConstantExpected(Min = 1, Max = (byte)(16))] byte count) { throw new PlatformNotSupportedException(); }

/// <summary>
/// uint8x8_t vqrshrn_n_u16 (uint16x8_t a, const int n)
/// A32: VQRSHRN.U16 Dd, Qm, #n
/// A64: UQRSHRN Vd.8B, Vn.8H, #n
/// </summary>
[Obsolete(Obsoletions.ArmIntrinsicPerformsUnsignedOperationMessage, DiagnosticId = Obsoletions.ArmIntrinsicPerformsUnsignedOperationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static Vector64<sbyte> ShiftRightLogicalRoundedNarrowingSaturateLower(Vector128<short> value, [ConstantExpected(Min = 1, Max = (byte)(64))] byte count) { throw new PlatformNotSupportedException(); }

/// <summary>
Expand Down Expand Up @@ -15512,20 +15518,23 @@ internal Arm64() { }
/// A32: VQRSHRN.U32 Dd+1, Dn, #n
/// A64: UQRSHRN2 Vd.8H, Vn.4S, #n
/// </summary>
[Obsolete(Obsoletions.ArmIntrinsicPerformsUnsignedOperationMessage, DiagnosticId = Obsoletions.ArmIntrinsicPerformsUnsignedOperationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static Vector128<short> ShiftRightLogicalRoundedNarrowingSaturateUpper(Vector64<short> lower, Vector128<int> value, [ConstantExpected(Min = 1, Max = (byte)(32))] byte count) { throw new PlatformNotSupportedException(); }

/// <summary>
/// uint32x4_t vqrshrn_high_n_u64 (uint32x2_t r, uint64x2_t a, const int n)
/// A32: VQRSHRN.U64 Dd+1, Dn, #n
/// A64: UQRSHRN2 Vd.4S, Vn.2D, #n
/// </summary>
[Obsolete(Obsoletions.ArmIntrinsicPerformsUnsignedOperationMessage, DiagnosticId = Obsoletions.ArmIntrinsicPerformsUnsignedOperationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static Vector128<int> ShiftRightLogicalRoundedNarrowingSaturateUpper(Vector64<int> lower, Vector128<long> value, [ConstantExpected(Min = 1, Max = (byte)(16))] byte count) { throw new PlatformNotSupportedException(); }

/// <summary>
/// uint8x16_t vqrshrn_high_n_u16 (uint8x8_t r, uint16x8_t a, const int n)
/// A32: VQRSHRN.U16 Dd+1, Dn, #n
/// A64: UQRSHRN2 Vd.16B, Vn.8H, #n
/// </summary>
[Obsolete(Obsoletions.ArmIntrinsicPerformsUnsignedOperationMessage, DiagnosticId = Obsoletions.ArmIntrinsicPerformsUnsignedOperationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static Vector128<sbyte> ShiftRightLogicalRoundedNarrowingSaturateUpper(Vector64<sbyte> lower, Vector128<short> value, [ConstantExpected(Min = 1, Max = (byte)(64))] byte count) { throw new PlatformNotSupportedException(); }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3500,18 +3500,21 @@ internal Arm64() { }
/// uint16_t vqrshrns_n_u32 (uint32_t a, const int n)
/// A64: UQRSHRN Hd, Sn, #n
/// </summary>
[Obsolete(Obsoletions.ArmIntrinsicPerformsUnsignedOperationMessage, DiagnosticId = Obsoletions.ArmIntrinsicPerformsUnsignedOperationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static Vector64<short> ShiftRightLogicalRoundedNarrowingSaturateScalar(Vector64<int> value, [ConstantExpected(Min = 1, Max = (byte)(16))] byte count) => ShiftRightLogicalRoundedNarrowingSaturateScalar(value, count);

/// <summary>
/// uint32_t vqrshrnd_n_u64 (uint64_t a, const int n)
/// A64: UQRSHRN Sd, Dn, #n
/// </summary>
[Obsolete(Obsoletions.ArmIntrinsicPerformsUnsignedOperationMessage, DiagnosticId = Obsoletions.ArmIntrinsicPerformsUnsignedOperationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static Vector64<int> ShiftRightLogicalRoundedNarrowingSaturateScalar(Vector64<long> value, [ConstantExpected(Min = 1, Max = (byte)(8))] byte count) => ShiftRightLogicalRoundedNarrowingSaturateScalar(value, count);

/// <summary>
/// uint8_t vqrshrnh_n_u16 (uint16_t a, const int n)
/// A64: UQRSHRN Bd, Hn, #n
/// </summary>
[Obsolete(Obsoletions.ArmIntrinsicPerformsUnsignedOperationMessage, DiagnosticId = Obsoletions.ArmIntrinsicPerformsUnsignedOperationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static Vector64<sbyte> ShiftRightLogicalRoundedNarrowingSaturateScalar(Vector64<short> value, [ConstantExpected(Min = 1, Max = (byte)(32))] byte count) => ShiftRightLogicalRoundedNarrowingSaturateScalar(value, count);

/// <summary>
Expand Down Expand Up @@ -15467,20 +15470,23 @@ internal Arm64() { }
/// A32: VQRSHRN.U32 Dd, Qm, #n
/// A64: UQRSHRN Vd.4H, Vn.4S, #n
/// </summary>
[Obsolete(Obsoletions.ArmIntrinsicPerformsUnsignedOperationMessage, DiagnosticId = Obsoletions.ArmIntrinsicPerformsUnsignedOperationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static Vector64<short> ShiftRightLogicalRoundedNarrowingSaturateLower(Vector128<int> value, [ConstantExpected(Min = 1, Max = (byte)(32))] byte count) => ShiftRightLogicalRoundedNarrowingSaturateLower(value, count);

/// <summary>
/// uint32x2_t vqrshrn_n_u64 (uint64x2_t a, const int n)
/// A32: VQRSHRN.U64 Dd, Qm, #n
/// A64: UQRSHRN Vd.2S, Vn.2D, #n
/// </summary>
[Obsolete(Obsoletions.ArmIntrinsicPerformsUnsignedOperationMessage, DiagnosticId = Obsoletions.ArmIntrinsicPerformsUnsignedOperationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static Vector64<int> ShiftRightLogicalRoundedNarrowingSaturateLower(Vector128<long> value, [ConstantExpected(Min = 1, Max = (byte)(16))] byte count) => ShiftRightLogicalRoundedNarrowingSaturateLower(value, count);

/// <summary>
/// uint8x8_t vqrshrn_n_u16 (uint16x8_t a, const int n)
/// A32: VQRSHRN.U16 Dd, Qm, #n
/// A64: UQRSHRN Vd.8B, Vn.8H, #n
/// </summary>
[Obsolete(Obsoletions.ArmIntrinsicPerformsUnsignedOperationMessage, DiagnosticId = Obsoletions.ArmIntrinsicPerformsUnsignedOperationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static Vector64<sbyte> ShiftRightLogicalRoundedNarrowingSaturateLower(Vector128<short> value, [ConstantExpected(Min = 1, Max = (byte)(64))] byte count) => ShiftRightLogicalRoundedNarrowingSaturateLower(value, count);

/// <summary>
Expand Down Expand Up @@ -15509,20 +15515,23 @@ internal Arm64() { }
/// A32: VQRSHRN.U32 Dd+1, Dn, #n
/// A64: UQRSHRN2 Vd.8H, Vn.4S, #n
/// </summary>
[Obsolete(Obsoletions.ArmIntrinsicPerformsUnsignedOperationMessage, DiagnosticId = Obsoletions.ArmIntrinsicPerformsUnsignedOperationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static Vector128<short> ShiftRightLogicalRoundedNarrowingSaturateUpper(Vector64<short> lower, Vector128<int> value, [ConstantExpected(Min = 1, Max = (byte)(32))] byte count) => ShiftRightLogicalRoundedNarrowingSaturateUpper(lower, value, count);

/// <summary>
/// uint32x4_t vqrshrn_high_n_u64 (uint32x2_t r, uint64x2_t a, const int n)
/// A32: VQRSHRN.U64 Dd+1, Dn, #n
/// A64: UQRSHRN2 Vd.4S, Vn.2D, #n
/// </summary>
[Obsolete(Obsoletions.ArmIntrinsicPerformsUnsignedOperationMessage, DiagnosticId = Obsoletions.ArmIntrinsicPerformsUnsignedOperationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static Vector128<int> ShiftRightLogicalRoundedNarrowingSaturateUpper(Vector64<int> lower, Vector128<long> value, [ConstantExpected(Min = 1, Max = (byte)(16))] byte count) => ShiftRightLogicalRoundedNarrowingSaturateUpper(lower, value, count);

/// <summary>
/// uint8x16_t vqrshrn_high_n_u16 (uint8x8_t r, uint16x8_t a, const int n)
/// A32: VQRSHRN.U16 Dd+1, Dn, #n
/// A64: UQRSHRN2 Vd.16B, Vn.8H, #n
/// </summary>
[Obsolete(Obsoletions.ArmIntrinsicPerformsUnsignedOperationMessage, DiagnosticId = Obsoletions.ArmIntrinsicPerformsUnsignedOperationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static Vector128<sbyte> ShiftRightLogicalRoundedNarrowingSaturateUpper(Vector64<sbyte> lower, Vector128<short> value, [ConstantExpected(Min = 1, Max = (byte)(64))] byte count) => ShiftRightLogicalRoundedNarrowingSaturateUpper(lower, value, count);

/// <summary>
Expand Down
Loading
Loading