Remove legacy 64-bit intrinsic APIs
[platform/upstream/coreclr.git] / src / System.Private.CoreLib / shared / System / Runtime / Intrinsics / X86 / Lzcnt.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 LZCNT hardware instructions via intrinsics
12     /// </summary>
13     [CLSCompliant(false)]
14     public abstract class Lzcnt
15     {
16         internal Lzcnt() { }
17
18         public static bool IsSupported { get => IsSupported; }
19
20         public abstract class X64
21         {
22             internal X64() { }
23
24             public static bool IsSupported { get => IsSupported; }
25
26             /// <summary>
27             /// unsigned __int64 _lzcnt_u64 (unsigned __int64 a)
28             ///   LZCNT reg, reg/m64
29             /// This intrinisc is only available on 64-bit processes
30             /// </summary>
31             public static ulong LeadingZeroCount(ulong value) => LeadingZeroCount(value);
32         }
33
34         /// <summary>
35         /// unsigned int _lzcnt_u32 (unsigned int a)
36         ///   LZCNT reg, reg/m32
37         /// </summary>
38         public static uint LeadingZeroCount(uint value) => LeadingZeroCount(value);
39     }
40 }