Skip to content

Commit

Permalink
Update x86_64 bits/sigcontext.h from kernel 3.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hjl-tools committed Jun 4, 2012
1 parent 68e408a commit 14adcbf
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
2012-06-04 H.J. Lu <[email protected]>

[BZ #14117]
* sysdeps/unix/sysv/linux/x86_64/bits/sigcontext.h (FP_XSTATE_MAGIC1):
New macro from Linux kernel 3.4.0.
(FP_XSTATE_MAGIC2): Likewise.
(FP_XSTATE_MAGIC2_SIZE): Likewise.
(X86_FXSR_MAGIC): New macro from Linux i386 kernel.
(struct _fpx_sw_bytes): New struct.
(struct _xsave_hdr): Likewise.
(struct _ymmh_state): Likewise.
(struct _xstate): Likewise.

* sysdeps/unix/sysv/linux/i386/sys/debugreg.h: Removed.
* sysdeps/unix/sysv/linux/i386/sys/reg.h: Likewise.
* sysdeps/unix/sysv/linux/x86_64/sys/debugreg.h: Renamed to ...
Expand Down
34 changes: 34 additions & 0 deletions sysdeps/unix/sysv/linux/x86_64/bits/sigcontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,19 @@
# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
#endif

#define FP_XSTATE_MAGIC1 0x46505853U
#define FP_XSTATE_MAGIC2 0x46505845U
#define FP_XSTATE_MAGIC2_SIZE sizeof(FP_XSTATE_MAGIC2)

struct _fpx_sw_bytes
{
__uint32_t magic1;
__uint32_t extended_size;
__uint64_t xstate_bv;
__uint32_t xstate_size;
__uint32_t padding[7];
};

struct _fpreg
{
unsigned short significand[4];
Expand Down Expand Up @@ -75,6 +88,8 @@ struct _fpstate
# define sigcontext_struct sigcontext
#endif

#define X86_FXSR_MAGIC 0x0000

struct sigcontext
{
unsigned short gs, __gsh;
Expand Down Expand Up @@ -157,4 +172,23 @@ struct sigcontext

#endif /* __x86_64__ */

struct _xsave_hdr
{
__uint64_t xstate_bv;
__uint64_t reserved1[2];
__uint64_t reserved2[5];
};

struct _ymmh_state
{
__uint32_t ymmh_space[64];
};

struct _xstate
{
struct _fpstate fpstate;
struct _xsave_hdr xstate_hdr;
struct _ymmh_state ymmh;
};

#endif /* _BITS_SIGCONTEXT_H */

0 comments on commit 14adcbf

Please sign in to comment.