i386-common.c (OPTION_MASK_ISA_WAITPKG_SET, [...]): New defines.
2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
gcc/
* common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
(ix86_handle_option): Handle -mwaitpkg.
* config.gcc: New header.
* config/i386/cpuid.h (bit_WAITPKG): New bit.
* config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
* config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
function type.
* config/i386/i386-c.c (ix86_target_macros_internal): Handle
OPTION_MASK_ISA_WAITPKG.
* config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
(ix86_option_override_internal): Add PTA_WAITPKG.
(ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
(enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
IX86_BUILTIN_TPAUSE.
(ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
__builtin_ia32_umwait and __builtin_ia32_tpause.
(ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
* config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
* config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
UNSPECV_TPAUSE): New.
(umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
* config/i386/i386.opt: Add -mwaitpkg.
* config/i386/waitpkgintrin.h: New file.
* config/i386/x86intrin.h: New header.
* doc/invoke.texi: Add -mwaitpkg.
gcc/testsuite/
* gcc.target/i386/tpause-1.c: New test.
* gcc.target/i386/umonitor-1.c: New test.
From-SVN: r260161
17 files changed: