diff options
author | Calin Juravle <calin@google.com> | 2014-05-13 20:29:01 +0100 |
---|---|---|
committer | Calin Juravle <calin@google.com> | 2014-05-15 10:34:06 +0100 |
commit | a6ab968ca0af18d84620a692f76af0d8e857c9c8 (patch) | |
tree | 5e76a11b60e29b9ef1ebc847cbea2d8036c1030a | |
parent | d0a899215b27254661ef9af90aea31343ffc4367 (diff) | |
download | bionic-a6ab968ca0af18d84620a692f76af0d8e857c9c8.zip bionic-a6ab968ca0af18d84620a692f76af0d8e857c9c8.tar.gz bionic-a6ab968ca0af18d84620a692f76af0d8e857c9c8.tar.bz2 |
Fill in missing bits in x86(_64) ucontext_t
Bug: 12828904
Bug: 12875898
Change-Id: I0ec0dfe16af80bfb3153f3c3b1b3d180eff30f39
-rw-r--r-- | libc/include/sys/ucontext.h | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/libc/include/sys/ucontext.h b/libc/include/sys/ucontext.h index 9060ab7..f150ac7 100644 --- a/libc/include/sys/ucontext.h +++ b/libc/include/sys/ucontext.h @@ -150,7 +150,8 @@ typedef struct ucontext { stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; - /* TODO: __fpregs_mem? */ + char __padding[128 - sizeof(sigset_t)]; + struct _libc_fpstate __fpregs_mem; } ucontext_t; #elif defined(__mips__) @@ -238,7 +239,31 @@ enum { typedef long greg_t; typedef greg_t gregset_t[NGREG]; -typedef struct user_fpregs_struct* fpregset_t; +struct _libc_fpxreg { + unsigned short significand[4]; + unsigned short exponent; + unsigned short padding[3]; +}; + +struct _libc_xmmreg { + uint32_t element[4]; +}; + +struct _libc_fpstate { + uint16_t cwd; + uint16_t swd; + uint16_t ftw; + uint16_t fop; + uint64_t rip; + uint64_t rdp; + uint32_t mxcsr; + uint32_t mxcr_mask; + struct _libc_fpxreg _st[8]; + struct _libc_xmmreg _xmm[16]; + uint32_t padding[24]; +}; + +typedef struct _libc_fpstate* fpregset_t; typedef struct { gregset_t gregs; @@ -252,7 +277,8 @@ typedef struct ucontext { stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; - /* TODO: __fpregs_mem? */ + char __padding[128 - sizeof(sigset_t)]; + struct _libc_fpstate __fpregs_mem; } ucontext_t; #endif |