Remove legacy 64-bit intrinsic APIs
[platform/upstream/coreclr.git] / src / System.Private.CoreLib / shared / System / Runtime / Intrinsics / X86 / Popcnt.cs
1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
4
5 using System;
6 using System.Runtime.Intrinsics;
7
8 namespace System.Runtime.Intrinsics.X86
9 {
10     /// <summary>
11     /// This class provides access to Intel POPCNT hardware instructions via intrinsics
12     /// </summary>
13     [CLSCompliant(false)]
14     public abstract class Popcnt : Sse42
15     {
16         internal Popcnt() { }
17
18         public new static bool IsSupported { get => IsSupported; }
19
20         public new abstract class X64 : Sse41.X64
21         {
22             internal X64() { }
23             public new static bool IsSupported { get => IsSupported; }
24             /// <summary>
25             /// __int64 _mm_popcnt_u64 (unsigned __int64 a)
26             ///   POPCNT reg64, reg/m64
27             /// This intrinisc is only available on 64-bit processes
28             /// </summary>
29             public static ulong PopCount(ulong value) => PopCount(value);
30         }
31
32         /// <summary>
33         /// int _mm_popcnt_u32 (unsigned int a)
34         ///   POPCNT reg, reg/m32
35         /// </summary>
36         public static uint PopCount(uint value) => PopCount(value);
37     }
38 }