Skip to content

Commit 2c41a70

Browse files
Andrew HsiehGerrit Code Review
authored andcommitted
Merge "Fix sys/ucontext.h for mips64"
2 parents 04aaa12 + ae55796 commit 2c41a70

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

ndk/platforms/android-21/include/sys/ucontext.h

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,25 @@ typedef struct fpregset {
180180
} fp_r;
181181
} fpregset_t;
182182

183+
#ifdef __LP64__
184+
typedef struct {
185+
gregset_t gregs;
186+
fpregset_t fpregs;
187+
greg_t mdhi;
188+
greg_t hi1;
189+
greg_t hi2;
190+
greg_t hi3;
191+
greg_t mdlo;
192+
greg_t lo1;
193+
greg_t lo2;
194+
greg_t lo3;
195+
greg_t pc;
196+
uint32_t fpc_csr;
197+
uint32_t used_math;
198+
uint32_t dsp;
199+
uint32_t reserved;
200+
} mcontext_t;
201+
#else
183202
typedef struct {
184203
unsigned regmask;
185204
unsigned status;
@@ -200,6 +219,7 @@ typedef struct {
200219
unsigned long hi3;
201220
unsigned long lo3;
202221
} mcontext_t;
222+
#endif
203223

204224
typedef struct ucontext {
205225
unsigned long uc_flags;
@@ -209,10 +229,6 @@ typedef struct ucontext {
209229
sigset_t uc_sigmask;
210230
} ucontext_t;
211231

212-
#elif defined(__mips64__)
213-
214-
#error TODO
215-
216232
#elif defined(__x86_64__)
217233

218234
enum {

0 commit comments

Comments
 (0)