aboutsummaryrefslogtreecommitdiff
path: root/ChocolArm64/Instructions/SoftFallback.cs
diff options
context:
space:
mode:
authorLDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com>2019-01-29 14:54:39 +0100
committergdkchan <gab.dark.100@gmail.com>2019-01-29 10:54:39 -0300
commit8f7fcede7fa98c605925dc7b9316940960543bf1 (patch)
treede8fa085c85ed8419abd25e04a707e007f180fe4 /ChocolArm64/Instructions/SoftFallback.cs
parent36b9ab0e48b6893c057a954e1ef3181b452add1c (diff)
Add Smlal_Ve, Smlsl_Ve, Smull_Ve, Umlal_Ve, Umlsl_Ve, Umull_Ve Inst.; add Tests. Add Sse Opt. for Trn1/2_V and Uzp1/2_V Inst. Nits. (#566)
* Update OpCodeTable.cs * Update InstEmitSimdArithmetic.cs * Update InstEmitSimdHelper.cs * Update CpuTestSimdRegElem.cs * Update InstEmitSimdMove.cs * Update InstEmitSimdCvt.cs * Update SoftFallback.cs * Update InstEmitSimdHelper.cs * Update SoftFloat.cs * Update CryptoHelper.cs * Update InstEmitSimdArithmetic.cs * Update InstEmitSimdCmp.cs * Address PR feedback. * Address PR feedback.
Diffstat (limited to 'ChocolArm64/Instructions/SoftFallback.cs')
-rw-r--r--ChocolArm64/Instructions/SoftFallback.cs9
1 files changed, 2 insertions, 7 deletions
diff --git a/ChocolArm64/Instructions/SoftFallback.cs b/ChocolArm64/Instructions/SoftFallback.cs
index def95343..16638894 100644
--- a/ChocolArm64/Instructions/SoftFallback.cs
+++ b/ChocolArm64/Instructions/SoftFallback.cs
@@ -664,7 +664,7 @@ namespace ChocolArm64.Instructions
for (int bit = highBit; bit >= 0; bit--)
{
- if (((value >> bit) & 0b1) != 0)
+ if (((int)(value >> bit) & 0b1) != 0)
{
return (ulong)(highBit - bit);
}
@@ -688,7 +688,7 @@ namespace ChocolArm64.Instructions
do
{
nibbleIdx -= 4;
- preCount = ClzNibbleTbl[(value >> nibbleIdx) & 0b1111];
+ preCount = ClzNibbleTbl[(int)(value >> nibbleIdx) & 0b1111];
count += preCount;
}
while (preCount == 4);
@@ -698,11 +698,6 @@ namespace ChocolArm64.Instructions
public static ulong CountSetBits8(ulong value) // "size" is 8 (SIMD&FP Inst.).
{
- if (value == 0xfful)
- {
- return 8ul;
- }
-
value = ((value >> 1) & 0x55ul) + (value & 0x55ul);
value = ((value >> 2) & 0x33ul) + (value & 0x33ul);