OLD | NEW |
1 /* Copyright (c) 2008, Google Inc. | 1 /* Copyright (c) 2008, Google Inc. |
2 * All rights reserved. | 2 * All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 // these types are the same in ppc64 & ppc | 83 // these types are the same in ppc64 & ppc |
84 typedef MDFloatingSaveAreaPPC MDFloatingSaveAreaPPC64; | 84 typedef MDFloatingSaveAreaPPC MDFloatingSaveAreaPPC64; |
85 typedef MDVectorSaveAreaPPC MDVectorSaveAreaPPC64; | 85 typedef MDVectorSaveAreaPPC MDVectorSaveAreaPPC64; |
86 | 86 |
87 #define MD_CONTEXT_PPC64_GPR_COUNT MD_CONTEXT_PPC_GPR_COUNT | 87 #define MD_CONTEXT_PPC64_GPR_COUNT MD_CONTEXT_PPC_GPR_COUNT |
88 | 88 |
89 typedef struct { | 89 typedef struct { |
90 /* context_flags is not present in ppc_thread_state, but it aids | 90 /* context_flags is not present in ppc_thread_state, but it aids |
91 * identification of MDRawContextPPC among other raw context types, | 91 * identification of MDRawContextPPC among other raw context types, |
92 * and it guarantees alignment when we get to float_save. */ | 92 * and it guarantees alignment when we get to float_save. */ |
93 u_int64_t context_flags; | 93 uint64_t context_flags; |
94 | 94 |
95 u_int64_t srr0; /* Machine status save/restore: stores pc | 95 uint64_t srr0; /* Machine status save/restore: stores pc |
96 * (instruction) */ | 96 * (instruction) */ |
97 u_int64_t srr1; /* Machine status save/restore: stores msr | 97 uint64_t srr1; /* Machine status save/restore: stores msr |
98 * (ps, program/machine state) */ | 98 * (ps, program/machine state) */ |
99 /* ppc_thread_state contains 32 fields, r0 .. r31. Here, an array is | 99 /* ppc_thread_state contains 32 fields, r0 .. r31. Here, an array is |
100 * used for brevity. */ | 100 * used for brevity. */ |
101 u_int64_t gpr[MD_CONTEXT_PPC64_GPR_COUNT]; | 101 uint64_t gpr[MD_CONTEXT_PPC64_GPR_COUNT]; |
102 u_int64_t cr; /* Condition */ | 102 uint64_t cr; /* Condition */ |
103 u_int64_t xer; /* Integer (fiXed-point) exception */ | 103 uint64_t xer; /* Integer (fiXed-point) exception */ |
104 u_int64_t lr; /* Link */ | 104 uint64_t lr; /* Link */ |
105 u_int64_t ctr; /* Count */ | 105 uint64_t ctr; /* Count */ |
106 u_int64_t vrsave; /* Vector save */ | 106 uint64_t vrsave; /* Vector save */ |
107 | 107 |
108 /* float_save and vector_save aren't present in ppc_thread_state, but | 108 /* float_save and vector_save aren't present in ppc_thread_state, but |
109 * are represented in separate structures that still define a thread's | 109 * are represented in separate structures that still define a thread's |
110 * context. */ | 110 * context. */ |
111 MDFloatingSaveAreaPPC float_save; | 111 MDFloatingSaveAreaPPC float_save; |
112 MDVectorSaveAreaPPC vector_save; | 112 MDVectorSaveAreaPPC vector_save; |
113 } MDRawContextPPC64; /* Based on ppc_thread_state */ | 113 } MDRawContextPPC64; /* Based on ppc_thread_state */ |
114 | 114 |
115 /* For (MDRawContextPPC).context_flags. These values indicate the type of | 115 /* For (MDRawContextPPC).context_flags. These values indicate the type of |
116 * context stored in the structure. MD_CONTEXT_PPC is Breakpad-defined. Its | 116 * context stored in the structure. MD_CONTEXT_PPC is Breakpad-defined. Its |
117 * value was chosen to avoid likely conflicts with MD_CONTEXT_* for other | 117 * value was chosen to avoid likely conflicts with MD_CONTEXT_* for other |
118 * CPUs. */ | 118 * CPUs. */ |
119 #define MD_CONTEXT_PPC 0x20000000 | 119 #define MD_CONTEXT_PPC 0x20000000 |
120 #define MD_CONTEXT_PPC_BASE (MD_CONTEXT_PPC | 0x00000001) | 120 #define MD_CONTEXT_PPC_BASE (MD_CONTEXT_PPC | 0x00000001) |
121 #define MD_CONTEXT_PPC_FLOATING_POINT (MD_CONTEXT_PPC | 0x00000008) | 121 #define MD_CONTEXT_PPC_FLOATING_POINT (MD_CONTEXT_PPC | 0x00000008) |
122 #define MD_CONTEXT_PPC_VECTOR (MD_CONTEXT_PPC | 0x00000020) | 122 #define MD_CONTEXT_PPC_VECTOR (MD_CONTEXT_PPC | 0x00000020) |
123 | 123 |
124 #define MD_CONTEXT_PPC_FULL MD_CONTEXT_PPC_BASE | 124 #define MD_CONTEXT_PPC_FULL MD_CONTEXT_PPC_BASE |
125 #define MD_CONTEXT_PPC_ALL (MD_CONTEXT_PPC_FULL | \ | 125 #define MD_CONTEXT_PPC_ALL (MD_CONTEXT_PPC_FULL | \ |
126 MD_CONTEXT_PPC_FLOATING_POINT | \ | 126 MD_CONTEXT_PPC_FLOATING_POINT | \ |
127 MD_CONTEXT_PPC_VECTOR) | 127 MD_CONTEXT_PPC_VECTOR) |
128 | 128 |
129 #endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC64_H__ */ | 129 #endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC64_H__ */ |
OLD | NEW |