mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-12-23 06:55:48 +00:00
Do not emit StoreToContext before Return (#1537)
* Do not emit StoreToContext before Return * Set PPTC version
This commit is contained in:
parent
6aef271661
commit
4c7bebf3e6
3 changed files with 10 additions and 3 deletions
|
@ -118,9 +118,13 @@ namespace ARMeilleure.Instructions
|
||||||
|
|
||||||
if (IsThumb(context.CurrOp))
|
if (IsThumb(context.CurrOp))
|
||||||
{
|
{
|
||||||
context.StoreToContext();
|
|
||||||
bool isReturn = IsA32Return(context);
|
bool isReturn = IsA32Return(context);
|
||||||
|
|
||||||
|
if (!isReturn)
|
||||||
|
{
|
||||||
|
context.StoreToContext();
|
||||||
|
}
|
||||||
|
|
||||||
Operand addr = context.BitwiseOr(value, Const(1));
|
Operand addr = context.BitwiseOr(value, Const(1));
|
||||||
|
|
||||||
InstEmitFlowHelper.EmitVirtualJump(context, addr, isReturn);
|
InstEmitFlowHelper.EmitVirtualJump(context, addr, isReturn);
|
||||||
|
|
|
@ -55,8 +55,11 @@ namespace ARMeilleure.Instructions
|
||||||
public static void SetIntA32(ArmEmitterContext context, int regIndex, Operand value)
|
public static void SetIntA32(ArmEmitterContext context, int regIndex, Operand value)
|
||||||
{
|
{
|
||||||
if (regIndex == RegisterAlias.Aarch32Pc)
|
if (regIndex == RegisterAlias.Aarch32Pc)
|
||||||
|
{
|
||||||
|
if (!IsA32Return(context))
|
||||||
{
|
{
|
||||||
context.StoreToContext();
|
context.StoreToContext();
|
||||||
|
}
|
||||||
|
|
||||||
EmitBxWritePc(context, value);
|
EmitBxWritePc(context, value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ namespace ARMeilleure.Translation.PTC
|
||||||
{
|
{
|
||||||
private const string HeaderMagic = "PTChd";
|
private const string HeaderMagic = "PTChd";
|
||||||
|
|
||||||
private const int InternalVersion = 1522; //! To be incremented manually for each change to the ARMeilleure project.
|
private const int InternalVersion = 1537; //! To be incremented manually for each change to the ARMeilleure project.
|
||||||
|
|
||||||
private const string ActualDir = "0";
|
private const string ActualDir = "0";
|
||||||
private const string BackupDir = "1";
|
private const string BackupDir = "1";
|
||||||
|
|
Loading…
Reference in a new issue