Update ASoftFallback.cs
This commit is contained in:
parent
abdab83bf3
commit
123ed36b8c
1 changed files with 9 additions and 1 deletions
|
@ -20,6 +20,14 @@ namespace ChocolArm64.Instruction
|
||||||
Context.EmitCall(typeof(ASoftFallback), MthdName);
|
Context.EmitCall(typeof(ASoftFallback), MthdName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static uint CountLeadingSigns32(uint Value) => (uint)CountLeadingSigns(Value, 32);
|
||||||
|
public static ulong CountLeadingSigns64(ulong Value) => (ulong)CountLeadingSigns(Value, 64);
|
||||||
|
|
||||||
|
private static ulong CountLeadingSigns(ulong Value, int Size)
|
||||||
|
{
|
||||||
|
return CountLeadingZeros((Value >> 1) ^ Value, Size - 1);
|
||||||
|
}
|
||||||
|
|
||||||
public static uint CountLeadingZeros32(uint Value) => (uint)CountLeadingZeros(Value, 32);
|
public static uint CountLeadingZeros32(uint Value) => (uint)CountLeadingZeros(Value, 32);
|
||||||
public static ulong CountLeadingZeros64(ulong Value) => (ulong)CountLeadingZeros(Value, 64);
|
public static ulong CountLeadingZeros64(ulong Value) => (ulong)CountLeadingZeros(Value, 64);
|
||||||
|
|
||||||
|
@ -398,4 +406,4 @@ namespace ChocolArm64.Instruction
|
||||||
throw new ArgumentOutOfRangeException(nameof(Size));
|
throw new ArgumentOutOfRangeException(nameof(Size));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue