diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2018-02-24 11:19:28 -0300 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2018-02-24 11:19:28 -0300 |
| commit | 035efc913e7f2a68315d4206cef46672005b8442 (patch) | |
| tree | eeb130850da914eb18e50ab5106db801b2eb4b14 /ChocolArm64/Translation | |
| parent | 3936c934482a587635bc5a1e47962551aeb53aeb (diff) | |
Fix cpu issue with cmp optimization, add HINT and FRINTX (scalar) instructions, fix for NvFlinger sometimes missing free buffers
Diffstat (limited to 'ChocolArm64/Translation')
| -rw-r--r-- | ChocolArm64/Translation/AILEmitterCtx.cs | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/ChocolArm64/Translation/AILEmitterCtx.cs b/ChocolArm64/Translation/AILEmitterCtx.cs index cf644540..9199eddc 100644 --- a/ChocolArm64/Translation/AILEmitterCtx.cs +++ b/ChocolArm64/Translation/AILEmitterCtx.cs @@ -18,8 +18,8 @@ namespace ChocolArm64.Translation private AILBlock ILBlock; - private AOpCode LastCmpOp; - private AOpCode LastFlagOp; + private AOpCode OptOpLastCompare; + private AOpCode OptOpLastFlagSet; private int BlkIndex; private int OpcIndex; @@ -75,6 +75,9 @@ namespace ChocolArm64.Translation BlkIndex++; OpcIndex = -1; + OptOpLastFlagSet = null; + OptOpLastCompare = null; + ILBlock = Emitter.GetILBlock(BlkIndex); } @@ -120,7 +123,7 @@ namespace ChocolArm64.Translation public void TryOptMarkCondWithoutCmp() { - LastCmpOp = CurrOp; + OptOpLastCompare = CurrOp; AInstEmitAluHelper.EmitDataLoadOpers(this); @@ -146,14 +149,15 @@ namespace ChocolArm64.Translation { OpCode ILOp; - int IntCond = (int)Cond; + int IntCond = (int)Cond; - if (LastCmpOp != null && LastFlagOp == LastCmpOp && BranchOps.ContainsKey(Cond)) + if (OptOpLastCompare != null && + OptOpLastCompare == OptOpLastFlagSet && BranchOps.ContainsKey(Cond)) { - Ldloc(Tmp3Index, AIoType.Int, LastCmpOp.RegisterSize); - Ldloc(Tmp4Index, AIoType.Int, LastCmpOp.RegisterSize); + Ldloc(Tmp3Index, AIoType.Int, OptOpLastCompare.RegisterSize); + Ldloc(Tmp4Index, AIoType.Int, OptOpLastCompare.RegisterSize); - if (LastCmpOp.Emitter == AInstEmit.Adds) + if (OptOpLastCompare.Emitter == AInstEmit.Adds) { Emit(OpCodes.Neg); } @@ -356,7 +360,7 @@ namespace ChocolArm64.Translation public void EmitLdflg(int Index) => Ldloc(Index, AIoType.Flag); public void EmitStflg(int Index) { - LastFlagOp = CurrOp; + OptOpLastFlagSet = CurrOp; Stloc(Index, AIoType.Flag); } |
