diff options
author | gdkchan <gab.dark.100@gmail.com> | 2022-08-25 06:59:34 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-25 09:59:34 +0000 |
commit | eba682b767a60db51ff624ae48a3ca0124634705 (patch) | |
tree | 7b78dff774d67a41bb51bd42f661b7556a5d6b40 /ARMeilleure/Decoders/OpCode32MemMult.cs | |
parent | b994dafe7aa8c49fe8de69b7b81401aaeeed8c59 (diff) |
Implement some 32-bit Thumb instructions (#3614)1.1.229
* Implement some 32-bit Thumb instructions
* Optimize OpCode32MemMult using PopCount
Diffstat (limited to 'ARMeilleure/Decoders/OpCode32MemMult.cs')
-rw-r--r-- | ARMeilleure/Decoders/OpCode32MemMult.cs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/ARMeilleure/Decoders/OpCode32MemMult.cs b/ARMeilleure/Decoders/OpCode32MemMult.cs index cc726196..522b96bb 100644 --- a/ARMeilleure/Decoders/OpCode32MemMult.cs +++ b/ARMeilleure/Decoders/OpCode32MemMult.cs @@ -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) { |