Fix increment on Arm32 NEON VLDn/VSTn instructions with regs > 1 (#3695)

* Fix increment on Arm32 NEON VLDn/VSTn instructions with regs > 1

* PPTC version bump

* PR feedback
This commit is contained in:
gdkchan 2022-09-13 03:24:09 -03:00 committed by GitHub
parent 2492e7e808
commit 729ff5337c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 71 additions and 39 deletions

View file

@ -67,7 +67,7 @@ namespace ARMeilleure.Instructions
for (int i = 0; i < count; i++)
{
// Write an element from a double simd register.
// Accesses an element from a double simd register.
Operand address = context.Add(n, Const(offset));
if (eBytes == 8)
{
@ -131,6 +131,7 @@ namespace ARMeilleure.Instructions
{
OpCode32SimdMemPair op = (OpCode32SimdMemPair)context.CurrOp;
int increment = count > 1 ? op.Increment : 1;
int eBytes = 1 << op.Size;
Operand n = context.Copy(GetIntA32(context, op.Rn));
@ -144,7 +145,7 @@ namespace ARMeilleure.Instructions
int elemD = d + reg;
for (int i = 0; i < count; i++)
{
// Write an element from a double simd register
// Accesses an element from a double simd register,
// add ebytes for each element.
Operand address = context.Add(n, Const(offset));
int index = ((elemD & 1) << (3 - op.Size)) + elem;
@ -161,7 +162,6 @@ namespace ARMeilleure.Instructions
}
else
{
if (load)
{
EmitLoadSimd(context, address, GetVecA32(elemD >> 1), elemD >> 1, index, op.Size);
@ -173,7 +173,7 @@ namespace ARMeilleure.Instructions
}
offset += eBytes;
elemD += op.Increment;
elemD += increment;
}
}
}