Compare commits

...

2 commits

Author SHA1 Message Date
Daenorth
acf8ec2359
Merge a81871ab96 into 17483aad24 2024-12-02 20:54:10 +00:00
Luke Warner
17483aad24
ARMeilleure: Allow TPIDR2_EL0 to be set properly (#339)
Some checks are pending
Canary release job / Release for linux-x64 (push) Waiting to run
Canary release job / Create tag (push) Waiting to run
Canary release job / Release for linux-arm64 (push) Waiting to run
Canary release job / Release for win-x64 (push) Waiting to run
Canary release job / Release MacOS universal (push) Waiting to run
2024-12-02 14:42:07 -06:00

View file

@ -88,7 +88,7 @@ namespace ARMeilleure.Instructions
EmitSetTpidrEl0(context); EmitSetTpidrEl0(context);
return; return;
case 0b11_011_1101_0000_101: case 0b11_011_1101_0000_101:
EmitGetTpidr2El0(context); EmitSetTpidr2El0(context);
return; return;
default: default:
@ -291,5 +291,16 @@ namespace ARMeilleure.Instructions
context.Store(context.Add(nativeContext, Const((ulong)NativeContext.GetTpidrEl0Offset())), value); 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);
}
} }
} }