Signed-off-by: André Hentschel nerv@dawncrow.de --- include/winnt.h | 115 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 114 insertions(+), 1 deletion(-)
diff --git a/include/winnt.h b/include/winnt.h index b102208039a..c8d07c3e328 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -2138,8 +2138,121 @@ typedef struct _CONTEXT
#endif /* _MIPS_ */
+/* PowerPC 64-bit context definitions */ +#ifdef __powerpc64__ + +#define CONTEXT_POWERPC64 0x00800000 +#define CONTEXT_CONTROL 0x0001 +#define CONTEXT_FLOATING_POINT 0x0002 +#define CONTEXT_INTEGER 0x0004 +#define CONTEXT_DEBUG_REGISTERS 0x0008 +#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER) +#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | \ + CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS) + +#define EXCEPTION_READ_FAULT 0 +#define EXCEPTION_WRITE_FAULT 1 +#define EXCEPTION_EXECUTE_FAULT 8 + +typedef struct +{ + /* These are selected by CONTEXT_FLOATING_POINT */ + double Fpr0; + double Fpr1; + double Fpr2; + double Fpr3; + double Fpr4; + double Fpr5; + double Fpr6; + double Fpr7; + double Fpr8; + double Fpr9; + double Fpr10; + double Fpr11; + double Fpr12; + double Fpr13; + double Fpr14; + double Fpr15; + double Fpr16; + double Fpr17; + double Fpr18; + double Fpr19; + double Fpr20; + double Fpr21; + double Fpr22; + double Fpr23; + double Fpr24; + double Fpr25; + double Fpr26; + double Fpr27; + double Fpr28; + double Fpr29; + double Fpr30; + double Fpr31; + double Fpscr; + + /* These are selected by CONTEXT_INTEGER */ + DWORD64 Gpr0; + DWORD64 Gpr1; + DWORD64 Gpr2; + DWORD64 Gpr3; + DWORD64 Gpr4; + DWORD64 Gpr5; + DWORD64 Gpr6; + DWORD64 Gpr7; + DWORD64 Gpr8; + DWORD64 Gpr9; + DWORD64 Gpr10; + DWORD64 Gpr11; + DWORD64 Gpr12; + DWORD64 Gpr13; + DWORD64 Gpr14; + DWORD64 Gpr15; + DWORD64 Gpr16; + DWORD64 Gpr17; + DWORD64 Gpr18; + DWORD64 Gpr19; + DWORD64 Gpr20; + DWORD64 Gpr21; + DWORD64 Gpr22; + DWORD64 Gpr23; + DWORD64 Gpr24; + DWORD64 Gpr25; + DWORD64 Gpr26; + DWORD64 Gpr27; + DWORD64 Gpr28; + DWORD64 Gpr29; + DWORD64 Gpr30; + DWORD64 Gpr31; + + DWORD64 Cr; + DWORD64 Xer; + + /* These are selected by CONTEXT_CONTROL */ + DWORD64 Msr; + DWORD64 Iar; /* Instruction Address Register , aka PC ... */ + DWORD64 Lr; + DWORD64 Ctr; + + DWORD64 ContextFlags; + + DWORD64 Dar; /* Fault registers for coredump */ + DWORD64 Dsisr; + DWORD64 Trap; /* number of powerpc exception taken */ + + /* These are selected by CONTEXT_DEBUG_REGISTERS */ + DWORD64 Dr0; + DWORD64 Dr1; + DWORD64 Dr2; + DWORD64 Dr3; + DWORD64 Dr4; + DWORD64 Dr5; + DWORD64 Dr6; + DWORD64 Dr7; +} CONTEXT, *PCONTEXT; + /* PowerPC context definitions */ -#ifdef __powerpc__ +#elif defined(__powerpc__)
#define CONTEXT_CONTROL 0x0001 #define CONTEXT_FLOATING_POINT 0x0002