HvExecutionContextShadow.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using ARMeilleure.State;
  2. namespace Ryujinx.Cpu.AppleHv
  3. {
  4. unsafe class HvExecutionContextShadow : IHvExecutionContext
  5. {
  6. public ulong Pc { get; set; }
  7. public ulong ElrEl1 { get; set; }
  8. public ulong EsrEl1 { get; set; }
  9. public long TpidrEl0 { get; set; }
  10. public long TpidrroEl0 { get; set; }
  11. public uint Pstate { get; set; }
  12. public uint Fpcr { get; set; }
  13. public uint Fpsr { get; set; }
  14. public bool IsAarch32 { get; set; }
  15. private readonly ulong[] _x;
  16. private readonly V128[] _v;
  17. public HvExecutionContextShadow()
  18. {
  19. _x = new ulong[32];
  20. _v = new V128[32];
  21. }
  22. public ulong GetX(int index)
  23. {
  24. return _x[index];
  25. }
  26. public void SetX(int index, ulong value)
  27. {
  28. _x[index] = value;
  29. }
  30. public V128 GetV(int index)
  31. {
  32. return _v[index];
  33. }
  34. public void SetV(int index, V128 value)
  35. {
  36. _v[index] = value;
  37. }
  38. public void RequestInterrupt()
  39. {
  40. }
  41. public bool GetAndClearInterruptRequested()
  42. {
  43. return false;
  44. }
  45. }
  46. }