diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2015-04-02 18:05:32 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2015-04-23 21:57:11 +0200 |
commit | 383ff5fc47123ab2914cffc9517df1071eb1dc6a (patch) | |
tree | d16139747cf00ce89352cf4e30e9edb70c644729 /winsup/cygwin/include/sys | |
parent | 50adb19f030d7721e2dec9dfb022b1c1aac64ca4 (diff) | |
download | cygnal-383ff5fc47123ab2914cffc9517df1071eb1dc6a.tar.gz cygnal-383ff5fc47123ab2914cffc9517df1071eb1dc6a.tar.bz2 cygnal-383ff5fc47123ab2914cffc9517df1071eb1dc6a.zip |
Try to make sure struct _mcontext is 16-byte aligned
On x86_64, RtlCaptureContext() uses fxsave to save FPU/MMX/SSE state.
fxsave requires that the destination address is 16-byte aligned, or it will
fault.
CONTEXT is already annotated __attribute__ ((aligned (16))), do the same with
struct _mcontext.
Rearrange ucontext_t so that it's struct _mcontext element is also correctly
aligned.
* include/cygwin/signal.h (struct __mcontext): 16-byte align.
* include/sys/ucontext.h (ucontext_t): Ditto.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Diffstat (limited to 'winsup/cygwin/include/sys')
-rw-r--r-- | winsup/cygwin/include/sys/ucontext.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/include/sys/ucontext.h b/winsup/cygwin/include/sys/ucontext.h index 9362d90cd..65485fbad 100644 --- a/winsup/cygwin/include/sys/ucontext.h +++ b/winsup/cygwin/include/sys/ucontext.h @@ -15,11 +15,11 @@ details. */ typedef struct __mcontext mcontext_t; -typedef struct __ucontext { +typedef __attribute__ ((aligned (16))) struct __ucontext { + mcontext_t uc_mcontext; struct __ucontext *uc_link; sigset_t uc_sigmask; stack_t uc_stack; - mcontext_t uc_mcontext; unsigned long int uc_flags; } ucontext_t; |