aboutsummaryrefslogtreecommitdiff
path: root/ChocolArm64/Instruction/AInstEmitSimdMemory.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-07-14 13:13:02 -0300
committerGitHub <noreply@github.com>2018-07-14 13:13:02 -0300
commit514218ab98acc1f0ace2e2cc0b8c1091ffccc6ce (patch)
treece7c44f11aa1dad7143678b2444bc297b98e5bff /ChocolArm64/Instruction/AInstEmitSimdMemory.cs
parent2f37583ab3b49aa5064a72c8d3b4e8245ebb6b5b (diff)
Add SMLSL, SQRSHRN and SRSHR (Vector) cpu instructions, nits (#225)
* Add SMLSL, SQRSHRN and SRSHR (Vector) cpu instructions * Address PR feedback * Address PR feedback * Remove another useless temp var * nit: Alignment * Replace Context.CurrOp.GetBitsCount() with Op.GetBitsCount() * Fix encodings and move flag bit test out of the loop
Diffstat (limited to 'ChocolArm64/Instruction/AInstEmitSimdMemory.cs')
-rw-r--r--ChocolArm64/Instruction/AInstEmitSimdMemory.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/ChocolArm64/Instruction/AInstEmitSimdMemory.cs b/ChocolArm64/Instruction/AInstEmitSimdMemory.cs
index d98ec012..368b014f 100644
--- a/ChocolArm64/Instruction/AInstEmitSimdMemory.cs
+++ b/ChocolArm64/Instruction/AInstEmitSimdMemory.cs
@@ -105,13 +105,14 @@ namespace ChocolArm64.Instruction
throw new InvalidOperationException();
}
- int Bytes = Context.CurrOp.GetBitsCount() >> 3;
+ int Bytes = Op.GetBitsCount() >> 3;
+ int Elems = Bytes >> Op.Size;
for (int SElem = 0; SElem < Op.SElems; SElem++)
{
int Rt = (Op.Rt + SElem) & 0x1f;
- for (int Index = 0; Index < (Bytes >> Op.Size); Index++)
+ for (int Index = 0; Index < Elems; Index++)
{
EmitMemAddress();