gcc/ * common/config/i386/i386-common.c (OPTION_MASK_ISA_SHA_SET): New. (OPTION_MASK_ISA_SHA_UNSET): Ditto. (ix86_handle_option): Handle OPT_msha. * config.gcc (extra_headers): Add shaintrin.h. * config/i386/cpuid.h (bit_SHA): New. * config/i386/driver-i386.c (host_detect_local_cpu): Detect SHA instructions. * config/i386/i386-c.c (ix86_target_macros_internal): Handle OPTION_MASK_ISA_SHA. * config/i386/i386.c (ix86_target_string): Add -msha. (ix86_option_override_internal): Add PTA_SHA. (ix86_valid_target_attribute_inner_p): Handle OPT_msha. (enum ix86_builtins): Add IX86_BUILTIN_SHA1MSG1, IX86_BUILTIN_SHA1MSG2, IX86_BUILTIN_SHA1NEXTE, IX86_BUILTIN_SHA1RNDS4, IX86_BUILTIN_SHA256MSG1, IX86_BUILTIN_SHA256MSG2, IX86_BUILTIN_SHA256RNDS2. (bdesc_args): Add BUILTINS defined above. (ix86_init_mmx_sse_builtins): Add __builtin_ia32_sha1msg1, __builtin_ia32_sha1msg2, __builtin_ia32_sha1nexte, __builtin_ia32_sha1rnds4, __builtin_ia32_sha256msg1, __builtin_ia32_sha256msg2, __builtin_ia32_sha256rnds2. (ix86_expand_args_builtin): Handle V4SI_FTYPE_V4SI_V4SI_V4SI, add warning for CODE_FOR_sha1rnds4. * config/i386/i386.h (TARGET_SHA): New. (TARGET_SHA_P): Ditto. * config/i386/i386.opt (-msha): Document it. * config/i386/immintrin.h: Add shaintrin.h. * config/i386/shaintrin.h: New. * config/i386/sse.md (unspec): Add UNSPEC_SHA1MSG1, UNSPEC_SHA1MSG2, UNSPEC_SHA1NEXTE, UNSPEC_SHA1RNDS4, UNSPEC_SHA256MSG1, UNSPEC_SHA256MSG2, UNSPEC_SHA256RNDS2. (sha1msg1): New. (sha1msg2): Ditto. (sha1nexte): Ditto. (sha1rnds4): Ditto. (sha256msg1): Ditto. (sha256msg2): Ditto. (sha256rnds2): Ditto. * doc/invoke.texi: Add -msha. testsuite/ * gcc.target/i386/avx-1.c: Add define for __builtin_ia32_sha1rnds4. * gcc.target/i386/i386.exp (check_effective_target_sha): New. * gcc.target/i386/sha-check.h: New file. * gcc.target/i386/sha1msg1-1.c: Ditto. * gcc.target/i386/sha1msg1-2.c: Ditto. * gcc.target/i386/sha1msg2-1.c: Ditto. * gcc.target/i386/sha1msg2-2.c: Ditto. * gcc.target/i386/sha1nexte-1: Ditto. * gcc.target/i386/sha1nexte-2: Ditto. * gcc.target/i386/sha1rnds4-1.c: Ditto. * gcc.target/i386/sha1rnds4-2.c: Ditto. * gcc.target/i386/sha256msg1-1.c: Ditto. * gcc.target/i386/sha256msg1-2.c: Ditto. * gcc.target/i386/sha256msg2-1.c: Ditto. * gcc.target/i386/sha256msg2-2.c: Ditto. * gcc.target/i386/sha256rnds2-1.c: Ditto. * gcc.target/i386/sha256rnds2-2.c: Ditto. * gcc.target/i386/sse-13.c: Add __builtin_ia32_sha1rnds4. * gcc.target/i386/sse-14.c: Add _mm_sha1rnds4_epu32. * gcc.target/i386/sse-22.c: Ditto. * gcc.target/i386/sse-23.c: Add __builtin_ia32_sha1rnds4. Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com> Co-Authored-By: Anna Tikhonova <anna.tikhonova@intel.com> Co-Authored-By: Ilya Tocar <ilya.tocar@intel.com> Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com> Co-Authored-By: Kirill Yukhin <kirill.yukhin@intel.com> Co-Authored-By: Maxim Kuznetsov <maxim.kuznetsov@intel.com> Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com> Co-Authored-By: Sergey Lega <sergey.s.lega@intel.com> From-SVN: r206263
Name |
Last commit
|
Last update |
---|---|---|
INSTALL | Loading commit data... | |
boehm-gc | Loading commit data... | |
config | Loading commit data... | |
contrib | Loading commit data... | |
fixincludes | Loading commit data... | |
gcc | Loading commit data... | |
gnattools | Loading commit data... | |
include | Loading commit data... | |
intl | Loading commit data... | |
libada | Loading commit data... | |
libatomic | Loading commit data... | |
libbacktrace | Loading commit data... | |
libcilkrts | Loading commit data... | |
libcpp | Loading commit data... | |
libdecnumber | Loading commit data... | |
libffi | Loading commit data... | |
libgcc | Loading commit data... | |
libgfortran | Loading commit data... | |
libgo | Loading commit data... | |
libgomp | Loading commit data... | |
libiberty | Loading commit data... | |
libitm | Loading commit data... | |
libjava | Loading commit data... | |
libobjc | Loading commit data... | |
libquadmath | Loading commit data... | |
libsanitizer | Loading commit data... | |
libssp | Loading commit data... | |
libstdc++-v3 | Loading commit data... | |
libvtv | Loading commit data... | |
lto-plugin | Loading commit data... | |
maintainer-scripts | Loading commit data... | |
zlib | Loading commit data... | |
.dir-locals.el | Loading commit data... | |
.gitignore | Loading commit data... | |
ABOUT-NLS | Loading commit data... | |
COPYING | Loading commit data... | |
COPYING.LIB | Loading commit data... | |
COPYING.RUNTIME | Loading commit data... | |
COPYING3 | Loading commit data... | |
COPYING3.LIB | Loading commit data... | |
ChangeLog | Loading commit data... | |
ChangeLog.tree-ssa | Loading commit data... | |
MAINTAINERS | Loading commit data... | |
Makefile.def | Loading commit data... | |
Makefile.in | Loading commit data... | |
Makefile.tpl | Loading commit data... | |
README | Loading commit data... | |
compile | Loading commit data... | |
config-ml.in | Loading commit data... | |
config.guess | Loading commit data... | |
config.rpath | Loading commit data... | |
config.sub | Loading commit data... | |
configure | Loading commit data... | |
configure.ac | Loading commit data... | |
depcomp | Loading commit data... | |
install-sh | Loading commit data... | |
libtool-ldflags | Loading commit data... | |
libtool.m4 | Loading commit data... | |
ltgcc.m4 | Loading commit data... | |
ltmain.sh | Loading commit data... | |
ltoptions.m4 | Loading commit data... | |
ltsugar.m4 | Loading commit data... | |
ltversion.m4 | Loading commit data... | |
lt~obsolete.m4 | Loading commit data... | |
missing | Loading commit data... | |
mkdep | Loading commit data... | |
mkinstalldirs | Loading commit data... | |
move-if-change | Loading commit data... | |
symlink-tree | Loading commit data... | |
ylwrap | Loading commit data... |