Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
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
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@
<Compile Include="$(MSBuildThisFileDirectory)System\Resources\UltimateResourceFallbackLocation.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\CompilerServices\AccessedThroughPropertyAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\CompilerServices\AsyncIteratorMethodBuilder.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\CompilerServices\AsyncIteratorStateMachineAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\CompilerServices\AsyncMethodBuilderAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\CompilerServices\AsyncStateMachineAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\CompilerServices\AsyncValueTaskMethodBuilder.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace System.Runtime.CompilerServices
{
/// <summary>Indicates whether a method is an asynchronous iterator.</summary>
[AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)]
public sealed class AsyncIteratorStateMachineAttribute : StateMachineAttribute
{
/// <summary>Initializes a new instance of the <see cref="AsyncIteratorStateMachineAttribute"/> class.</summary>
/// <param name="stateMachineType">The type object for the underlying state machine type that's used to implement a state machine method.</param>
public AsyncIteratorStateMachineAttribute(Type stateMachineType)
: base(stateMachineType)
{
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,18 @@ internal X64() { }
/// <summary>
/// unsigned __int64 _mulx_u64 (unsigned __int64 a, unsigned __int64 b, unsigned __int64* hi)
/// MULX r64a, r64b, reg/m64
/// The above native signature does not directly correspond to the managed signature.
/// This intrinisc is only available on 64-bit processes
/// </summary>
public static unsafe ulong MultiplyNoFlags(ulong left, ulong right, ulong* high) { throw new PlatformNotSupportedException(); }
public static ulong MultiplyNoFlags(ulong left, ulong right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// unsigned __int64 _mulx_u64 (unsigned __int64 a, unsigned __int64 b, unsigned __int64* hi)
/// MULX r64a, r64b, reg/m64
/// The above native signature does not directly correspond to the managed signature.
/// This intrinisc is only available on 64-bit processes
/// </summary>
public static unsafe ulong MultiplyNoFlags(ulong left, ulong right, ulong* low) { throw new PlatformNotSupportedException(); }

/// <summary>
/// unsigned __int64 _pdep_u64 (unsigned __int64 a, unsigned __int64 mask)
Expand All @@ -61,8 +70,16 @@ internal X64() { }
/// <summary>
/// unsigned int _mulx_u32 (unsigned int a, unsigned int b, unsigned int* hi)
/// MULX r32a, r32b, reg/m32
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static uint MultiplyNoFlags(uint left, uint right) { throw new PlatformNotSupportedException(); }

/// <summary>
/// unsigned int _mulx_u32 (unsigned int a, unsigned int b, unsigned int* hi)
/// MULX r32a, r32b, reg/m32
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static unsafe uint MultiplyNoFlags(uint left, uint right, uint* high) { throw new PlatformNotSupportedException(); }
public static unsafe uint MultiplyNoFlags(uint left, uint right, uint* low) { throw new PlatformNotSupportedException(); }

/// <summary>
/// unsigned int _pdep_u32 (unsigned int a, unsigned int mask)
Expand Down
21 changes: 19 additions & 2 deletions src/Common/src/CoreLib/System/Runtime/Intrinsics/X86/Bmi2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,18 @@ internal X64() { }
/// <summary>
/// unsigned __int64 _mulx_u64 (unsigned __int64 a, unsigned __int64 b, unsigned __int64* hi)
/// MULX r64a, r64b, reg/m64
/// The above native signature does not directly correspond to the managed signature.
/// This intrinisc is only available on 64-bit processes
/// </summary>
public static unsafe ulong MultiplyNoFlags(ulong left, ulong right, ulong* high) => MultiplyNoFlags(left, right, high);
public static ulong MultiplyNoFlags(ulong left, ulong right) => MultiplyNoFlags(left, right);

/// <summary>
/// unsigned __int64 _mulx_u64 (unsigned __int64 a, unsigned __int64 b, unsigned __int64* hi)
/// MULX r64a, r64b, reg/m64
/// The above native signature does not directly correspond to the managed signature.
/// This intrinisc is only available on 64-bit processes
/// </summary>
public static unsafe ulong MultiplyNoFlags(ulong left, ulong right, ulong* low) => MultiplyNoFlags(left, right, low);

/// <summary>
/// unsigned __int64 _pdep_u64 (unsigned __int64 a, unsigned __int64 mask)
Expand All @@ -61,8 +70,16 @@ internal X64() { }
/// <summary>
/// unsigned int _mulx_u32 (unsigned int a, unsigned int b, unsigned int* hi)
/// MULX r32a, r32b, reg/m32
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static uint MultiplyNoFlags(uint left, uint right) => MultiplyNoFlags(left, right);

/// <summary>
/// unsigned int _mulx_u32 (unsigned int a, unsigned int b, unsigned int* hi)
/// MULX r32a, r32b, reg/m32
/// The above native signature does not directly correspond to the managed signature.
/// </summary>
public static unsafe uint MultiplyNoFlags(uint left, uint right, uint* high) => MultiplyNoFlags(left, right, high);
public static unsafe uint MultiplyNoFlags(uint left, uint right, uint* low) => MultiplyNoFlags(left, right, low);

/// <summary>
/// unsigned int _pdep_u32 (unsigned int a, unsigned int mask)
Expand Down