2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _DOLPHIN_OSCONTEXT
|
|
|
|
#define _DOLPHIN_OSCONTEXT
|
2022-09-10 20:32:26 +00:00
|
|
|
|
|
|
|
#include <types.h>
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef struct OSContext {
|
2022-09-18 06:05:46 +00:00
|
|
|
u32 gpr[32];
|
|
|
|
u32 cr;
|
|
|
|
u32 lr;
|
|
|
|
u32 ctr;
|
|
|
|
u32 xer;
|
2022-09-10 20:32:26 +00:00
|
|
|
|
2022-09-18 06:05:46 +00:00
|
|
|
f64 fpr[32];
|
2022-09-10 20:32:26 +00:00
|
|
|
|
2022-09-18 06:05:46 +00:00
|
|
|
u32 fpscr_pad;
|
|
|
|
u32 fpscr;
|
2022-09-10 20:32:26 +00:00
|
|
|
|
2022-09-18 06:05:46 +00:00
|
|
|
u32 srr0;
|
|
|
|
u32 srr1;
|
2022-09-10 20:32:26 +00:00
|
|
|
|
2022-09-18 06:05:46 +00:00
|
|
|
u16 mode;
|
|
|
|
u16 state;
|
2022-09-10 20:32:26 +00:00
|
|
|
|
2022-09-18 06:05:46 +00:00
|
|
|
u32 gqr[8];
|
|
|
|
u32 psf_pad;
|
|
|
|
f64 psf[32];
|
2022-09-10 20:32:26 +00:00
|
|
|
|
|
|
|
} OSContext;
|
|
|
|
|
2022-09-29 23:09:11 +00:00
|
|
|
void OSSaveContext(OSContext* context);
|
|
|
|
void OSClearContext(OSContext* context);
|
2022-10-16 05:53:55 +00:00
|
|
|
OSContext* OSGetCurrentContext();
|
2022-09-29 23:09:11 +00:00
|
|
|
void OSSetCurrentContext(OSContext* context);
|
|
|
|
|
2022-09-10 20:32:26 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _DOLPHIN_OSCONTEXT
|