Fix/Add 10 Shift Right and Mls_Ve Instructions; add 14 Tests. (#407)

* Update AOpCodeTable.cs

* Update AInstEmitSimdShift.cs

* Update ASoftFallback.cs

* Update AOpCodeSimdShImm.cs

* Update ABitUtils.cs

* Update AInstEmitSimdArithmetic.cs

* Update AInstEmitSimdHelper.cs

* Create CpuTestSimdShImm.cs

* Create CpuTestSimdRegElem.cs

* Address PR feedback.

* Nit.

* Nit.
This commit is contained in:
LDj3SNuD 2018-09-08 19:24:29 +02:00 committed by gdkchan
parent ca1e37a295
commit a0c78f7920
9 changed files with 742 additions and 98 deletions

View file

@ -27,6 +27,10 @@ namespace ChocolArm64
return -1;
}
private static readonly sbyte[] HbsNibbleTbl = { -1, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3 };
public static int HighestBitSetNibble(int Value) => HbsNibbleTbl[Value & 0b1111];
public static long Replicate(long Bits, int Size)
{
long Output = 0;
@ -54,4 +58,4 @@ namespace ChocolArm64
return Value != 0 && (Value & (Value - 1)) == 0;
}
}
}
}