Update ASoftFallback.cs

This commit is contained in:
LDj3SNuD 2018-10-13 22:39:32 +02:00 committed by GitHub
commit 38b021410c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -406,14 +406,6 @@ namespace ChocolArm64.Instruction
private static readonly byte[] ClzNibbleTbl = { 4, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 };
public static ulong CountLeadingZeros(ulong Value, int Size) // Size is 8, 16, 32 or 64 (SIMD&FP or Base Inst.).
{
if (Lzcnt.IsSupported && Size >= 32)
{
return Size == 32
? (ulong)Lzcnt.LeadingZeroCount((uint)Value)
: Lzcnt.LeadingZeroCount(Value);
}
else
{
if (Value == 0ul)
{
@ -433,15 +425,8 @@ namespace ChocolArm64.Instruction
return (ulong)Count;
}
}
public static ulong CountSetBits8(ulong Value) // "Size" is 8 (SIMD&FP Inst.).
{
if (Popcnt.IsSupported)
{
return (ulong)Popcnt.PopCount(Value);
}
else
{
if (Value == 0xfful)
{
@ -453,7 +438,6 @@ namespace ChocolArm64.Instruction
return (Value >> 4) + (Value & 0x0ful);
}
}
#endregion
#region "Crc32"