diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2018-08-06 06:25:28 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2018-08-06 06:25:43 -0700 |
commit | fb4c32aef64500c65c7fc95ca06d7e17d467be45 (patch) | |
tree | eef59c6f48555419272cc88b68fbce8d42d6a001 /sysdeps/x86/sysdep.h | |
parent | e5721f45f6377c27ccb2572001dc98f7a2e6a146 (diff) | |
download | glibc-fb4c32aef64500c65c7fc95ca06d7e17d467be45.tar.gz glibc-fb4c32aef64500c65c7fc95ca06d7e17d467be45.tar.xz glibc-fb4c32aef64500c65c7fc95ca06d7e17d467be45.zip |
x86: Move STATE_SAVE_OFFSET/STATE_SAVE_MASK to sysdep.h
Move STATE_SAVE_OFFSET and STATE_SAVE_MASK to sysdep.h to make sysdeps/x86/cpu-features.h a C header file. * sysdeps/x86/cpu-features.h (STATE_SAVE_OFFSET): Removed. (STATE_SAVE_MASK): Likewise. Don't check __ASSEMBLER__ to include <cpu-features-offsets.h>. * sysdeps/x86/sysdep.h (STATE_SAVE_OFFSET): New. (STATE_SAVE_MASK): Likewise. * sysdeps/x86_64/dl-trampoline.S: Include <cpu-features-offsets.h> instead of <cpu-features.h>.
Diffstat (limited to 'sysdeps/x86/sysdep.h')
-rw-r--r-- | sysdeps/x86/sysdep.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sysdeps/x86/sysdep.h b/sysdeps/x86/sysdep.h index 8776ad8374..f41f4ebd42 100644 --- a/sysdeps/x86/sysdep.h +++ b/sysdeps/x86/sysdep.h @@ -48,6 +48,15 @@ enum cf_protection_level # define SHSTK_ENABLED 0 #endif +/* Offset for fxsave/xsave area used by _dl_runtime_resolve. Also need + space to preserve RCX, RDX, RSI, RDI, R8, R9 and RAX. It must be + aligned to 16 bytes for fxsave and 64 bytes for xsave. */ +#define STATE_SAVE_OFFSET (8 * 7 + 8) + +/* Save SSE, AVX, AVX512, mask and bound registers. */ +#define STATE_SAVE_MASK \ + ((1 << 1) | (1 << 2) | (1 << 3) | (1 << 5) | (1 << 6) | (1 << 7)) + #ifdef __ASSEMBLER__ /* Syntactic details of assembler. */ |