aboutsummaryrefslogtreecommitdiff
path: root/gdb/common/i386-xstate.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/common/i386-xstate.h')
-rw-r--r--gdb/common/i386-xstate.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/gdb/common/i386-xstate.h b/gdb/common/i386-xstate.h
index ed0a683..e76ecc1 100644
--- a/gdb/common/i386-xstate.h
+++ b/gdb/common/i386-xstate.h
@@ -24,19 +24,31 @@
#define I386_XSTATE_X87 (1ULL << 0)
#define I386_XSTATE_SSE (1ULL << 1)
#define I386_XSTATE_AVX (1ULL << 2)
+#define I386_XSTATE_BNDREGS (1ULL << 3)
+#define I386_XSTATE_BNDCFG (1ULL << 4)
/* Supported mask and size of the extended state. */
#define I386_XSTATE_X87_MASK I386_XSTATE_X87
#define I386_XSTATE_SSE_MASK (I386_XSTATE_X87 | I386_XSTATE_SSE)
#define I386_XSTATE_AVX_MASK (I386_XSTATE_SSE_MASK | I386_XSTATE_AVX)
+#define I386_XSTATE_MPX_MASK (I386_XSTATE_AVX_MASK \
+ | I386_XSTATE_BNDREGS \
+ | I386_XSTATE_BNDCFG)
+
+#define I386_XSTATE_ALL_MASK I386_XSTATE_MPX_MASK
#define I386_XSTATE_SSE_SIZE 576
#define I386_XSTATE_AVX_SIZE 832
-#define I386_XSTATE_MAX_SIZE 832
+#define I386_XSTATE_BNDREGS_SIZE 1024
+#define I386_XSTATE_BNDCFG_SIZE 1088
+
+#define I386_XSTATE_MAX_SIZE 1088
/* Get I386 XSAVE extended state size. */
-#define I386_XSTATE_SIZE(XCR0) \
- (((XCR0) & I386_XSTATE_AVX) != 0 \
- ? I386_XSTATE_AVX_SIZE : I386_XSTATE_SSE_SIZE)
+#define I386_XSTATE_SIZE(XCR0) \
+ (((XCR0) & I386_XSTATE_BNDCFG) != 0 ? I386_XSTATE_BNDCFG_SIZE \
+ : (((XCR0) & I386_XSTATE_BNDREGS) != 0 ? I386_XSTATE_BNDCFG_SIZE \
+ : (((XCR0) & I386_XSTATE_AVX_SIZE) != 0 ? I386_XSTATE_AVX_SIZE \
+ : I386_XSTATE_SSE_SIZE)))
#endif /* I386_XSTATE_H */