#define PPC_FLOAT_STATE 2
#define PPC_EXCEPTION_STATE 3
#define PPC_VECTOR_STATE 4
+#define PPC_THREAD_STATE64 5
+#define PPC_EXCEPTION_STATE64 6
#define THREAD_STATE_NONE 7
/*
#define VALID_THREAD_STATE_FLAVOR(x) \
((x == PPC_THREAD_STATE) || \
(x == PPC_FLOAT_STATE) || \
- (x == PPC_EXCEPTION_STATE) || \
+ (x == PPC_EXCEPTION_STATE) || \
(x == PPC_VECTOR_STATE) || \
+ (x == PPC_THREAD_STATE64) || \
+ (x == PPC_EXCEPTION_STATE64) || \
(x == THREAD_STATE_NONE))
typedef struct ppc_thread_state {
unsigned int vrsave; /* Vector Save Register */
} ppc_thread_state_t;
+#pragma pack(4) /* Make sure the structure stays as we defined it */
+typedef struct ppc_thread_state64 {
+ unsigned long long srr0; /* Instruction address register (PC) */
+ unsigned long long srr1; /* Machine state register (supervisor) */
+ unsigned long long r0;
+ unsigned long long r1;
+ unsigned long long r2;
+ unsigned long long r3;
+ unsigned long long r4;
+ unsigned long long r5;
+ unsigned long long r6;
+ unsigned long long r7;
+ unsigned long long r8;
+ unsigned long long r9;
+ unsigned long long r10;
+ unsigned long long r11;
+ unsigned long long r12;
+ unsigned long long r13;
+ unsigned long long r14;
+ unsigned long long r15;
+ unsigned long long r16;
+ unsigned long long r17;
+ unsigned long long r18;
+ unsigned long long r19;
+ unsigned long long r20;
+ unsigned long long r21;
+ unsigned long long r22;
+ unsigned long long r23;
+ unsigned long long r24;
+ unsigned long long r25;
+ unsigned long long r26;
+ unsigned long long r27;
+ unsigned long long r28;
+ unsigned long long r29;
+ unsigned long long r30;
+ unsigned long long r31;
+
+ unsigned int cr; /* Condition register */
+ unsigned long long xer; /* User's integer exception register */
+ unsigned long long lr; /* Link register */
+ unsigned long long ctr; /* Count register */
+
+ unsigned int vrsave; /* Vector Save Register */
+} ppc_thread_state64_t;
+#pragma pack()
+
/* This structure should be double-word aligned for performance */
typedef struct ppc_float_state {
*/
typedef struct ppc_exception_state {
- unsigned long dar; /* Fault registers for coredump */
+ unsigned long dar; /* Fault registers for coredump */
unsigned long dsisr;
- unsigned long exception;/* number of powerpc exception taken */
- unsigned long pad0; /* align to 16 bytes */
+ unsigned long exception; /* number of powerpc exception taken */
+ unsigned long pad0; /* align to 16 bytes */
- unsigned long pad1[4]; /* space in PCB "just in case" */
+ unsigned long pad1[4]; /* space in PCB "just in case" */
} ppc_exception_state_t;
+#pragma pack(4) /* Make sure the structure stays as we defined it */
+typedef struct ppc_exception_state64 {
+ unsigned long long dar; /* Fault registers for coredump */
+ unsigned long dsisr;
+ unsigned long exception; /* number of powerpc exception taken */
+
+ unsigned long pad1[4]; /* space in PCB "just in case" */
+} ppc_exception_state64_t;
+#pragma pack()
+
/*
* Save State Flags
*/
#define PPC_THREAD_STATE_COUNT \
(sizeof(struct ppc_thread_state) / sizeof(int))
+#define PPC_THREAD_STATE64_COUNT \
+ (sizeof(struct ppc_thread_state64) / sizeof(int))
+
#define PPC_EXCEPTION_STATE_COUNT \
(sizeof(struct ppc_exception_state) / sizeof(int))
+#define PPC_EXCEPTION_STATE64_COUNT \
+ (sizeof(struct ppc_exception_state64) / sizeof(int))
+
#define PPC_FLOAT_STATE_COUNT \
(sizeof(struct ppc_float_state) / sizeof(int))
/*
* Largest state on this machine:
*/
-#define THREAD_MACHINE_STATE_MAX PPC_VECTOR_STATE_COUNT
+#define THREAD_MACHINE_STATE_MAX THREAD_STATE_MAX
#endif /* _MACH_PPC_THREAD_STATUS_H_ */