diff --git a/src/ARMeilleure/Instructions/InstEmitSystem.cs b/src/ARMeilleure/Instructions/InstEmitSystem.cs index fbf3b4a70..11c1d0328 100644 --- a/src/ARMeilleure/Instructions/InstEmitSystem.cs +++ b/src/ARMeilleure/Instructions/InstEmitSystem.cs @@ -88,7 +88,7 @@ public static void Msr(ArmEmitterContext context) EmitSetTpidrEl0(context); return; case 0b11_011_1101_0000_101: - EmitGetTpidr2El0(context); + EmitSetTpidr2El0(context); return; default: @@ -291,5 +291,16 @@ private static void EmitSetTpidrEl0(ArmEmitterContext context) context.Store(context.Add(nativeContext, Const((ulong)NativeContext.GetTpidrEl0Offset())), value); } + + private static void EmitSetTpidr2El0(ArmEmitterContext context) + { + OpCodeSystem op = (OpCodeSystem)context.CurrOp; + + Operand value = GetIntOrZR(context, op.Rt); + + Operand nativeContext = context.LoadArgument(OperandType.I64, 0); + + context.Store(context.Add(nativeContext, Const((ulong)NativeContext.GetTpidr2El0Offset())), value); + } } }