Call Flag as int on A32

This commit is contained in:
riperiperi 2020-02-20 22:54:22 +00:00
parent 61c29e6cdf
commit edc34a7180
2 changed files with 3 additions and 3 deletions

View file

@ -68,7 +68,7 @@ namespace ARMeilleure.Instructions
Operand addr = GetIntA32(context, op.Rm);
Operand bitOne = context.BitwiseAnd(addr, Const(1));
addr = context.BitwiseOr(addr, Const(CallFlag)); // Set call flag.
addr = context.BitwiseOr(addr, Const((int)CallFlag)); // Set call flag.
bool isThumb = IsThumb(context.CurrOp);

View file

@ -155,11 +155,11 @@ namespace ARMeilleure.Instructions
context.BranchIfTrue(lblArmMode, mode);
// Make this count as a call, the translator will ignore the low bit for the address.
context.Return(context.ZeroExtend32(OperandType.I64, context.BitwiseOr(pc, Const(InstEmitFlowHelper.CallFlag))));
context.Return(context.ZeroExtend32(OperandType.I64, context.BitwiseOr(pc, Const((int)InstEmitFlowHelper.CallFlag))));
context.MarkLabel(lblArmMode);
context.Return(context.ZeroExtend32(OperandType.I64, context.BitwiseOr(context.BitwiseAnd(pc, Const(~3)), Const(InstEmitFlowHelper.CallFlag))));
context.Return(context.ZeroExtend32(OperandType.I64, context.BitwiseOr(context.BitwiseAnd(pc, Const(~3)), Const((int)InstEmitFlowHelper.CallFlag))));
}
public static Operand GetIntOrZR(ArmEmitterContext context, int regIndex)