|
|
@@ -49,6 +49,9 @@ namespace ARMeilleure.Instructions
|
|
|
case 0b11_011_1101_0000_011:
|
|
|
EmitGetTpidrroEl0(context);
|
|
|
return;
|
|
|
+ case 0b11_011_1101_0000_101:
|
|
|
+ EmitGetTpidr2El0(context);
|
|
|
+ return;
|
|
|
case 0b11_011_1110_0000_000:
|
|
|
info = typeof(NativeInterface).GetMethod(nameof(NativeInterface.GetCntfrqEl0));
|
|
|
break;
|
|
|
@@ -84,6 +87,9 @@ namespace ARMeilleure.Instructions
|
|
|
case 0b11_011_1101_0000_010:
|
|
|
EmitSetTpidrEl0(context);
|
|
|
return;
|
|
|
+ case 0b11_011_1101_0000_101:
|
|
|
+ EmitGetTpidr2El0(context);
|
|
|
+ return;
|
|
|
|
|
|
default:
|
|
|
throw new NotImplementedException($"Unknown MSR 0x{op.RawOpCode:X8} at 0x{op.Address:X16}.");
|
|
|
@@ -213,6 +219,17 @@ namespace ARMeilleure.Instructions
|
|
|
SetIntOrZR(context, op.Rt, result);
|
|
|
}
|
|
|
|
|
|
+ private static void EmitGetTpidr2El0(ArmEmitterContext context)
|
|
|
+ {
|
|
|
+ OpCodeSystem op = (OpCodeSystem)context.CurrOp;
|
|
|
+
|
|
|
+ Operand nativeContext = context.LoadArgument(OperandType.I64, 0);
|
|
|
+
|
|
|
+ Operand result = context.Load(OperandType.I64, context.Add(nativeContext, Const((ulong)NativeContext.GetTpidr2El0Offset())));
|
|
|
+
|
|
|
+ SetIntOrZR(context, op.Rt, result);
|
|
|
+ }
|
|
|
+
|
|
|
private static void EmitSetNzcv(ArmEmitterContext context)
|
|
|
{
|
|
|
OpCodeSystem op = (OpCodeSystem)context.CurrOp;
|