using ARMeilleure.State; using System; namespace Ryujinx.Cpu { /// /// CPU register state interface. /// public interface IExecutionContext : IDisposable { /// /// Current Program Counter. /// /// /// In some implementations, this value might not be accurate and might not point to the last instruction executed. /// ulong Pc { get; } /// /// Thread ID Register (EL0). /// long TpidrEl0 { get; set; } /// /// Thread ID Register (read-only) (EL0). /// long TpidrroEl0 { get; set; } /// /// Processor State Register. /// uint Pstate { get; set; } /// /// Floating-point Control Register. /// uint Fpcr { get; set; } /// /// Floating-point Status Register. /// uint Fpsr { get; set; } /// /// Indicates whenever the CPU is running 64-bit (AArch64 mode) or 32-bit (AArch32 mode) code. /// bool IsAarch32 { get; set; } /// /// Indicates whenever the CPU is still running code. /// /// /// Even if this is false, the guest code might be still exiting. /// One must not assume that the code is no longer running from this property alone. /// bool Running { get; } /// /// Gets the value of a general purpose register. /// /// /// The special of 31 can be used to access the SP (Stack Pointer) register. /// /// Index of the register, in the range 0-31 (inclusive) /// The register value ulong GetX(int index); /// /// Sets the value of a general purpose register. /// /// /// The special of 31 can be used to access the SP (Stack Pointer) register. /// /// Index of the register, in the range 0-31 (inclusive) /// Value to be set void SetX(int index, ulong value); /// /// Gets the value of a FP/SIMD register. /// /// Index of the register, in the range 0-31 (inclusive) /// The register value V128 GetV(int index); /// /// Sets the value of a FP/SIMD register. /// /// Index of the register, in the range 0-31 (inclusive) /// Value to be set void SetV(int index, V128 value); /// /// Requests the thread to stop running temporarily and call . /// /// /// The thread might not pause immediately. /// One must not assume that guest code is no longer being executed by the thread after calling this function. /// void RequestInterrupt(); /// /// Requests the thread to stop running guest code and return as soon as possible. /// /// /// The thread might not stop immediately. /// One must not assume that guest code is no longer being executed by the thread after calling this function. /// After a thread has been stopped, it can't be restarted with the same . /// If you only need to pause the thread temporarily, use instead. /// void StopRunning(); } }