aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/Translation/Translator.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ARMeilleure/Translation/Translator.cs')
-rw-r--r--ARMeilleure/Translation/Translator.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/ARMeilleure/Translation/Translator.cs b/ARMeilleure/Translation/Translator.cs
index 9974fb2d..4962a846 100644
--- a/ARMeilleure/Translation/Translator.cs
+++ b/ARMeilleure/Translation/Translator.cs
@@ -380,6 +380,13 @@ namespace ARMeilleure.Translation
Operand lblPredicateSkip = default;
+ if (context.IsInIfThenBlock && context.CurrentIfThenBlockCond != Condition.Al)
+ {
+ lblPredicateSkip = Label();
+
+ InstEmitFlowHelper.EmitCondBranch(context, lblPredicateSkip, context.CurrentIfThenBlockCond.Invert());
+ }
+
if (opCode is OpCode32 op && op.Cond < Condition.Al)
{
lblPredicateSkip = Label();
@@ -400,6 +407,11 @@ namespace ARMeilleure.Translation
{
context.MarkLabel(lblPredicateSkip);
}
+
+ if (context.IsInIfThenBlock && opCode.Instruction.Name != InstName.It)
+ {
+ context.AdvanceIfThenBlockState();
+ }
}
}
}