0
0
Fork 0

Use normal memory store path for DC ZVA (#2693)

Seems like this is used as an optimized way to clear memory in homebrew applications. Unfortunately, calling the software fallback method every 8 bytes was not very optimal.

The existing EmitStore is used by passing in ZR as the register to get a 0 write.
This commit is contained in:
riperiperi 2021-09-29 00:21:30 +01:00 committed by GitHub
parent 33dc4c9ce4
commit 1ae690ba2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -91,7 +91,7 @@ namespace ARMeilleure.Instructions
{
Operand address = context.Add(t, Const(offset));
context.Call(typeof(NativeInterface).GetMethod(nameof(NativeInterface.WriteUInt64)), address, Const(0L));
InstEmitMemoryHelper.EmitStore(context, address, RegisterConsts.ZeroIndex, 3);
}
break;

View file

@ -27,7 +27,7 @@ namespace ARMeilleure.Translation.PTC
private const string OuterHeaderMagicString = "PTCohd\0\0";
private const string InnerHeaderMagicString = "PTCihd\0\0";
private const uint InternalVersion = 2571; //! To be incremented manually for each change to the ARMeilleure project.
private const uint InternalVersion = 2693; //! To be incremented manually for each change to the ARMeilleure project.
private const string ActualDir = "0";
private const string BackupDir = "1";