diff options
Diffstat (limited to 'src/ARMeilleure/Instructions/InstEmitMemory.cs')
-rw-r--r-- | src/ARMeilleure/Instructions/InstEmitMemory.cs | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/src/ARMeilleure/Instructions/InstEmitMemory.cs b/src/ARMeilleure/Instructions/InstEmitMemory.cs index 7baed14c..840099f9 100644 --- a/src/ARMeilleure/Instructions/InstEmitMemory.cs +++ b/src/ARMeilleure/Instructions/InstEmitMemory.cs @@ -26,7 +26,7 @@ namespace ARMeilleure.Instructions SetIntOrZR(context, op.Rd, Const(address)); } - public static void Ldr(ArmEmitterContext context) => EmitLdr(context, signed: false); + public static void Ldr(ArmEmitterContext context) => EmitLdr(context, signed: false); public static void Ldrs(ArmEmitterContext context) => EmitLdr(context, signed: true); private static void EmitLdr(ArmEmitterContext context, bool signed) @@ -89,7 +89,7 @@ namespace ARMeilleure.Instructions Operand address = GetAddress(context); Operand address2 = GetAddress(context, 1L << op.Size); - EmitLoad(op.Rt, address); + EmitLoad(op.Rt, address); EmitLoad(op.Rt2, address2); EmitWBackIfNeeded(context, address); @@ -113,7 +113,7 @@ namespace ARMeilleure.Instructions Operand address = GetAddress(context); Operand address2 = GetAddress(context, 1L << op.Size); - EmitStore(context, address, op.Rt, op.Size); + EmitStore(context, address, op.Rt, op.Size); EmitStore(context, address2, op.Rt2, op.Size); EmitWBackIfNeeded(context, address); @@ -126,42 +126,42 @@ namespace ARMeilleure.Instructions switch (context.CurrOp) { case OpCodeMemImm op: - { - address = context.Copy(GetIntOrSP(context, op.Rn)); - - // Pre-indexing. - if (!op.PostIdx) - { - address = context.Add(address, Const(op.Immediate + addend)); - } - else if (addend != 0) { - address = context.Add(address, Const(addend)); + address = context.Copy(GetIntOrSP(context, op.Rn)); + + // Pre-indexing. + if (!op.PostIdx) + { + address = context.Add(address, Const(op.Immediate + addend)); + } + else if (addend != 0) + { + address = context.Add(address, Const(addend)); + } + + break; } - break; - } - case OpCodeMemReg op: - { - Operand n = GetIntOrSP(context, op.Rn); + { + Operand n = GetIntOrSP(context, op.Rn); - Operand m = GetExtendedM(context, op.Rm, op.IntType); + Operand m = GetExtendedM(context, op.Rm, op.IntType); - if (op.Shift) - { - m = context.ShiftLeft(m, Const(op.Size)); - } + if (op.Shift) + { + m = context.ShiftLeft(m, Const(op.Size)); + } - address = context.Add(n, m); + address = context.Add(n, m); - if (addend != 0) - { - address = context.Add(address, Const(addend)); - } + if (addend != 0) + { + address = context.Add(address, Const(addend)); + } - break; - } + break; + } } return address; @@ -181,4 +181,4 @@ namespace ARMeilleure.Instructions } } } -}
\ No newline at end of file +} |