Fix ucontext structure for Android on x86
authorulan@chromium.org <ulan@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 15 May 2012 09:19:00 +0000 (09:19 +0000)
committerulan@chromium.org <ulan@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 15 May 2012 09:19:00 +0000 (09:19 +0000)
Review URL: https://chromiumcodereview.appspot.com/10310116
Patch from Lijuan Xiao <lijuan.xiao@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11559 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/platform-linux.cc

index 5c05a3a..f6db423 100644 (file)
@@ -966,43 +966,22 @@ typedef struct ucontext {
 
 #elif !defined(__GLIBC__) && defined(__i386__)
 // x86 version for Android.
-struct _libc_fpreg {
-  uint16_t significand[4];
-  uint16_t exponent;
-};
-
-struct _libc_fpstate {
-  uint64_t cw;
-  uint64_t sw;
-  uint64_t tag;
-  uint64_t ipoff;
-  uint64_t cssel;
-  uint64_t dataoff;
-  uint64_t datasel;
-  struct _libc_fpreg _st[8];
-  uint64_t status;
+struct sigcontext {
+  uint32_t gregs[19];
+  void* fpregs;
+  uint32_t oldmask;
+  uint32_t cr2;
 };
 
-typedef struct _libc_fpstate *fpregset_t;
-
-typedef struct mcontext {
-  int32_t gregs[19];
-  fpregset_t fpregs;
-  int64_t oldmask;
-  int64_t cr2;
-} mcontext_t;
-
-typedef uint64_t __sigset_t;
-
+typedef uint32_t __sigset_t;
+typedef struct sigcontext mcontext_t;
 typedef struct ucontext {
-  uint64_t uc_flags;
-  struct ucontext *uc_link;
+  uint32_t uc_flags;
+  struct ucontextuc_link;
   stack_t uc_stack;
   mcontext_t uc_mcontext;
   __sigset_t uc_sigmask;
-  struct _libc_fpstate __fpregs_mem;
 } ucontext_t;
-
 enum { REG_EBP = 6, REG_ESP = 7, REG_EIP = 14 };
 #endif