aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-04-10 20:58:32 -0300
committergdkchan <gab.dark.100@gmail.com>2018-04-10 20:58:32 -0300
commitcb29b4303cb0e0cbd6541943e63392ebe7b83554 (patch)
tree86582221ebb9fcee4dee06ce837885e105fdcf15
parent7b2f471d4ff07bc811bbd84919c6708ab0f399f4 (diff)
[CPU] Fix CNT instruction
-rw-r--r--ChocolArm64/Instruction/ASoftFallback.cs10
-rw-r--r--Ryujinx.Core/OsHle/Services/Nv/INvDrvServices.cs2
2 files changed, 5 insertions, 7 deletions
diff --git a/ChocolArm64/Instruction/ASoftFallback.cs b/ChocolArm64/Instruction/ASoftFallback.cs
index c0594413..64f539fc 100644
--- a/ChocolArm64/Instruction/ASoftFallback.cs
+++ b/ChocolArm64/Instruction/ASoftFallback.cs
@@ -121,7 +121,7 @@ namespace ChocolArm64.Instruction
Value = ((Value & 0xcccccccccccccccc) >> 2) | ((Value & 0x3333333333333333) << 2);
Value = ((Value & 0xf0f0f0f0f0f0f0f0) >> 4) | ((Value & 0x0f0f0f0f0f0f0f0f) << 4);
Value = ((Value & 0xff00ff00ff00ff00) >> 8) | ((Value & 0x00ff00ff00ff00ff) << 8);
- Value = ((Value & 0xffff0000ffff0000) >> 16) | ((Value & 0x0000ffff0000ffff) << 16);
+ Value = ((Value & 0xffff0000ffff0000) >> 16) | ((Value & 0x0000ffff0000ffff) << 16);
return (Value >> 32) | (Value << 32);
}
@@ -250,10 +250,10 @@ namespace ChocolArm64.Instruction
public static int CountSetBits8(byte Value)
{
- return (Value >> 0) & 1 + (Value >> 1) & 1 +
- (Value >> 2) & 1 + (Value >> 3) & 1 +
- (Value >> 4) & 1 + (Value >> 5) & 1 +
- (Value >> 6) & 1 + (Value >> 7);
+ return ((Value >> 0) & 1) + ((Value >> 1) & 1) +
+ ((Value >> 2) & 1) + ((Value >> 3) & 1) +
+ ((Value >> 4) & 1) + ((Value >> 5) & 1) +
+ ((Value >> 6) & 1) + (Value >> 7);
}
public static float RoundF(float Value, int Fpcr)
diff --git a/Ryujinx.Core/OsHle/Services/Nv/INvDrvServices.cs b/Ryujinx.Core/OsHle/Services/Nv/INvDrvServices.cs
index 800926df..e41f03a4 100644
--- a/Ryujinx.Core/OsHle/Services/Nv/INvDrvServices.cs
+++ b/Ryujinx.Core/OsHle/Services/Nv/INvDrvServices.cs
@@ -316,8 +316,6 @@ namespace Ryujinx.Core.OsHle.Services.Nv
int Padding = Reader.ReadInt32();
int Offset = Reader.ReadInt32();
int Pages = Reader.ReadInt32();
-
- System.Console.WriteLine("remap " + Offset.ToString("x8") + " " + Pages.ToString("x8"));
}
//TODO