-1, -1, -1, -1, -1, -1, -1, -1, /* k0 ... k7 (AVX512) */
-1, -1, -1, -1, -1, -1, -1, -1, /* zmm0 ... zmm7 (AVX512) */
-1, /* PKEYS register PKRU */
+#ifdef HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE
+ FS_BASE * 8, GS_BASE * 8, /* fs_base and gs_base */
+#else
+ -1, -1, /* fs_base and gs_base */
+#endif
ORIG_RAX * 8 /* "orig_eax" */
};
\f
-1, /* PKEYS register pkru */
/* End of hardware registers */
+#ifdef HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE
21 * 8, 22 * 8, /* fs_base and gs_base. */
+#else
+ -1, -1, /* fs_base and gs_base. */
+#endif
15 * 8 /* "orig_rax" */
};
\f
[(xcr0_features_bit & X86_XSTATE_PKRU) ? 1 : 0];
}
+#ifdef HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE
+ const bool segment = true;
+#else
+ const bool segment = false;
+#endif
+
if (*tdesc == NULL)
*tdesc = amd64_create_target_description (xcr0_features_bit, is_x32,
- true, true);
+ true, segment);
return *tdesc;
}
-1, -1, -1, -1, -1, -1, -1, -1, /* k0 ... k7 (AVX512) */
-1, -1, -1, -1, -1, -1, -1, -1, /* zmm0 ... zmm7 (AVX512) */
-1, /* PKRU register */
+ -1, -1, /* fs_base and gs_base. */
11 * 4, /* "orig_eax" */
};
[(xcr0 & X86_XSTATE_AVX512) ? 1 : 0]
[(xcr0 & X86_XSTATE_PKRU) ? 1 : 0];
+#ifdef HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE
+ const bool segment = true;
+#else
+ const bool segment = false;
+#endif
+
if (*tdesc == NULL)
- *tdesc = i386_create_target_description (xcr0, true, false);
+ *tdesc = i386_create_target_description (xcr0, true, segment);
return *tdesc;
}
/* Register number for the "orig_eax" pseudo-register. If this
pseudo-register contains a value >= 0 it is interpreted as the
system call number that the kernel is supposed to restart. */
-#define I386_LINUX_ORIG_EAX_REGNUM (I386_PKRU_REGNUM + 1)
+#define I386_LINUX_ORIG_EAX_REGNUM (I386_GSBASE_REGNUM + 1)
/* Total number of registers for GNU/Linux. */
#define I386_LINUX_NUM_REGS (I386_LINUX_ORIG_EAX_REGNUM + 1)