Implement some 32-bit Thumb instructions (#3614)

* Implement some 32-bit Thumb instructions

* Optimize OpCode32MemMult using PopCount
This commit is contained in:
gdkchan 2022-08-25 06:59:34 -03:00 committed by GitHub
parent b994dafe7a
commit eba682b767
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 190 additions and 15 deletions

View file

@ -1,3 +1,5 @@
using System.Numerics;
namespace ARMeilleure.Decoders
{
class OpCode32MemMult : OpCode32, IOpCode32MemMult
@ -23,14 +25,7 @@ namespace ARMeilleure.Decoders
RegisterMask = opCode & 0xffff;
int regsSize = 0;
for (int index = 0; index < 16; index++)
{
regsSize += (RegisterMask >> index) & 1;
}
regsSize *= 4;
int regsSize = BitOperations.PopCount((uint)RegisterMask) * 4;
if (!u)
{