aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/Instructions/InstEmitFlow32.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ARMeilleure/Instructions/InstEmitFlow32.cs')
-rw-r--r--ARMeilleure/Instructions/InstEmitFlow32.cs14
1 files changed, 5 insertions, 9 deletions
diff --git a/ARMeilleure/Instructions/InstEmitFlow32.cs b/ARMeilleure/Instructions/InstEmitFlow32.cs
index cbb9ad5b..47233eb9 100644
--- a/ARMeilleure/Instructions/InstEmitFlow32.cs
+++ b/ARMeilleure/Instructions/InstEmitFlow32.cs
@@ -21,8 +21,7 @@ namespace ARMeilleure.Instructions
}
else
{
- context.StoreToContext();
- context.Return(Const(op.Immediate));
+ EmitTailContinue(context, Const(op.Immediate));
}
}
@@ -57,7 +56,7 @@ namespace ARMeilleure.Instructions
SetFlag(context, PState.TFlag, Const(isThumb ? 0 : 1));
}
- InstEmitFlowHelper.EmitCall(context, (ulong)op.Immediate);
+ EmitCall(context, (ulong)op.Immediate);
}
public static void Blxr(ArmEmitterContext context)
@@ -66,9 +65,8 @@ namespace ARMeilleure.Instructions
uint pc = op.GetPc();
- Operand addr = GetIntA32(context, op.Rm);
+ Operand addr = context.Copy(GetIntA32(context, op.Rm));
Operand bitOne = context.BitwiseAnd(addr, Const(1));
- addr = context.BitwiseOr(addr, Const((int)CallFlag)); // Set call flag.
bool isThumb = IsThumb(context.CurrOp);
@@ -80,16 +78,14 @@ namespace ARMeilleure.Instructions
SetFlag(context, PState.TFlag, bitOne);
- context.Return(addr); // Call.
+ EmitVirtualCall(context, addr);
}
public static void Bx(ArmEmitterContext context)
{
IOpCode32BReg op = (IOpCode32BReg)context.CurrOp;
- context.StoreToContext();
-
- EmitBxWritePc(context, GetIntA32(context, op.Rm));
+ EmitBxWritePc(context, GetIntA32(context, op.Rm), op.Rm);
}
}
} \ No newline at end of file