aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/Instructions
diff options
context:
space:
mode:
Diffstat (limited to 'ARMeilleure/Instructions')
-rw-r--r--ARMeilleure/Instructions/InstEmitFlowHelper.cs11
-rw-r--r--ARMeilleure/Instructions/InstEmitMemoryExHelper.cs2
-rw-r--r--ARMeilleure/Instructions/InstEmitMemoryHelper.cs4
3 files changed, 9 insertions, 8 deletions
diff --git a/ARMeilleure/Instructions/InstEmitFlowHelper.cs b/ARMeilleure/Instructions/InstEmitFlowHelper.cs
index 6906f782..1ce0cdaa 100644
--- a/ARMeilleure/Instructions/InstEmitFlowHelper.cs
+++ b/ARMeilleure/Instructions/InstEmitFlowHelper.cs
@@ -163,17 +163,18 @@ namespace ARMeilleure.Instructions
context.LoadFromContext();
- // Note: The return value of a translated function is always an Int64 with the
- // address execution has returned to. We expect this address to be immediately after the
- // current instruction, if it isn't we keep returning until we reach the dispatcher.
+ // Note: The return value of a translated function is always an Int64 with the address execution has
+ // returned to. We expect this address to be immediately after the current instruction, if it isn't we
+ // keep returning until we reach the dispatcher.
Operand nextAddr = Const((long)op.Address + op.OpCodeSizeInBytes);
// Try to continue within this block.
- // If the return address isn't to our next instruction, we need to return so the JIT can figure out what to do.
+ // If the return address isn't to our next instruction, we need to return so the JIT can figure out
+ // what to do.
Operand lblContinue = context.GetLabel(nextAddr.Value);
// We need to clear out the call flag for the return address before comparing it.
- context.BranchIfTrue(lblContinue, context.ICompareEqual(context.BitwiseAnd(returnAddress, Const(~CallFlag)), nextAddr));
+ context.BranchIf(lblContinue, context.BitwiseAnd(returnAddress, Const(~CallFlag)), nextAddr, Comparison.Equal);
context.Return(returnAddress);
}
diff --git a/ARMeilleure/Instructions/InstEmitMemoryExHelper.cs b/ARMeilleure/Instructions/InstEmitMemoryExHelper.cs
index a22cd235..5b890dd3 100644
--- a/ARMeilleure/Instructions/InstEmitMemoryExHelper.cs
+++ b/ARMeilleure/Instructions/InstEmitMemoryExHelper.cs
@@ -92,7 +92,7 @@ namespace ARMeilleure.Instructions
Operand exAddr = context.Load(address.Type, exAddrPtr);
// STEP 1: Check if we have exclusive access to this memory region. If not, fail and skip store.
- Operand maskedAddress = context.BitwiseAnd(address, Const(GetExclusiveAddressMask()));
+ Operand maskedAddress = context.BitwiseAnd(address, Const(address.Type, GetExclusiveAddressMask()));
Operand exFailed = context.ICompareNotEqual(exAddr, maskedAddress);
diff --git a/ARMeilleure/Instructions/InstEmitMemoryHelper.cs b/ARMeilleure/Instructions/InstEmitMemoryHelper.cs
index 1fe82b62..9b6476dd 100644
--- a/ARMeilleure/Instructions/InstEmitMemoryHelper.cs
+++ b/ARMeilleure/Instructions/InstEmitMemoryHelper.cs
@@ -403,7 +403,7 @@ namespace ARMeilleure.Instructions
if (lblSlowPath != null)
{
- context.BranchIfTrue(lblSlowPath, context.ICompareLessOrEqual(pte, Const(0L)));
+ context.BranchIf(lblSlowPath, pte, Const(0L), Comparison.LessOrEqual);
}
else
{
@@ -414,7 +414,7 @@ namespace ARMeilleure.Instructions
Operand lblNotWatched = Label();
// Is the page currently being monitored for modifications? If so we need to call MarkRegionAsModified.
- context.BranchIfTrue(lblNotWatched, context.ICompareGreaterOrEqual(pte, Const(0L)));
+ context.BranchIf(lblNotWatched, pte, Const(0L), Comparison.GreaterOrEqual);
// Mark the region as modified. Size here doesn't matter as address is assumed to be size aligned here.
context.Call(typeof(NativeInterface).GetMethod(nameof(NativeInterface.MarkRegionAsModified)), address, Const(1UL));