summaryrefslogtreecommitdiff
path: root/gcc/doc/extend.texi
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2008-04-04 16:10:52 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2008-04-04 09:10:52 -0700
commit8b96a312a0dbbfb84f5162a8a1cca553edac6fa8 (patch)
tree25211283997297a5a20cd8a102186f545171ee39 /gcc/doc/extend.texi
parente892493899b225a21746d24221d7dc45fc19fed2 (diff)
downloadgcc-8b96a312a0dbbfb84f5162a8a1cca553edac6fa8.tar.gz
config.gcc (extra_headers): Add wmmintrin.h for x86 and x86-64.
gcc/ 2008-04-04 H.J. Lu <hongjiu.lu@intel.com> * config.gcc (extra_headers): Add wmmintrin.h for x86 and x86-64. * config/i386/cpuid.h (bit_AES): New. (bit_PCLMUL): Likewise. * config/i386/i386.c (pta_flags): Add PTA_AES and PTA_PCLMUL. (override_options): Handle PTA_AES and PTA_PCLMUL. Enable SSE2 if AES or PCLMUL is enabled. (ix86_builtins): Add IX86_BUILTIN_AESENC128, IX86_BUILTIN_AESENCLAST128, IX86_BUILTIN_AESDEC128, IX86_BUILTIN_AESDECLAST128, IX86_BUILTIN_AESIMC128, IX86_BUILTIN_AESKEYGENASSIST128 and IX86_BUILTIN_PCLMULQDQ128. (bdesc_sse_3arg): Add IX86_BUILTIN_PCLMULQDQ128. (bdesc_2arg): Add IX86_BUILTIN_AESENC128, IX86_BUILTIN_AESENCLAST128, IX86_BUILTIN_AESDEC128, IX86_BUILTIN_AESDECLAST128 and IX86_BUILTIN_AESKEYGENASSIST128. (bdesc_1arg): Add IX86_BUILTIN_AESIMC128. (ix86_init_mmx_sse_builtins): Define __builtin_ia32_aesenc128, __builtin_ia32_aesenclast128, __builtin_ia32_aesdec128, __builtin_ia32_aesdeclast128,__builtin_ia32_aesimc128, __builtin_ia32_aeskeygenassist128 and __builtin_ia32_pclmulqdq128. * config/i386/i386.c (ix86_expand_binop_imm_builtin): New. (ix86_expand_builtin): Use it for IX86_BUILTIN_PSLLDQI128 and IX86_BUILTIN_PSRLDQI128. Handle IX86_BUILTIN_AESKEYGENASSIST128. * config/i386/i386.h (TARGET_AES): New. (TARGET_PCLMUL): Likewise. (TARGET_CPU_CPP_BUILTINS): Handle TARGET_AES and TARGET_PCLMUL. * config/i386/i386.md (UNSPEC_AESENC): New. (UNSPEC_AESENCLAST): Likewise. (UNSPEC_AESDEC): Likewise. (UNSPEC_AESDECLAST): Likewise. (UNSPEC_AESIMC): Likewise. (UNSPEC_AESKEYGENASSIST): Likewise. (UNSPEC_PCLMULQDQ): Likewise. * config/i386/i386.opt (maes): New. (mpclmul): Likewise. * config/i386/sse.md (aesenc): New pattern. (aesenclast): Likewise. (aesdec): Likewise. (aesdeclast): Likewise. (aesimc): Likewise. (aeskeygenassist): Likewise. (pclmulqdq): Likewise. * config/i386/wmmintrin.h: New. * doc/extend.texi: Document AES and PCLMUL built-in function. * doc/invoke.texi: Document -maes and -mpclmul. gcc/testsuite/ 2008-04-04 H.J. Lu <hongjiu.lu@intel.com> * g++.dg/other/i386-2.C: Include <wmmintrin.h>. * g++.dg/other/i386-3.C: Likewise. * gcc.target/i386/sse-13.c: Likewise. * gcc.target/i386/sse-14.c: Likewise. * gcc.target/i386/aes-check.h: New. * gcc.target/i386/aesdec.c: Likewise. * gcc.target/i386/aesdeclast.c: Likewise. * gcc.target/i386/aesenc.c: Likewise. * gcc.target/i386/aesenclast.c: Likewise. * gcc.target/i386/aesimc.c: Likewise. * gcc.target/i386/aeskeygenassist.c: Likewise. * gcc.target/i386/pclmulqdq.c: Likewise. * gcc.target/i386/pclmul-check.h: Likewise. * gcc.target/i386/i386.exp (check_effective_target_aes): New. (check_effective_target_pclmul): Likewise. From-SVN: r133902
Diffstat (limited to 'gcc/doc/extend.texi')
-rw-r--r--gcc/doc/extend.texi21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 1fa7fc2bcf7..7cae1a4e070 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -8013,6 +8013,27 @@ depending on the size of @code{unsigned long}.
Generates the @code{popcntq} machine instruction.
@end table
+The following built-in functions are available when @option{-maes} is
+used. All of them generate the machine instruction that is part of the
+name.
+
+@smallexample
+v2di __builtin_ia32_aesenc128 (v2di, v2di)
+v2di __builtin_ia32_aesenclast128 (v2di, v2di)
+v2di __builtin_ia32_aesdec128 (v2di, v2di)
+v2di __builtin_ia32_aesdeclast128 (v2di, v2di)
+v2di __builtin_ia32_aeskeygenassist128 (v2di, const int)
+v2di __builtin_ia32_aesimc128 (v2di)
+@end smallexample
+
+The following built-in function is available when @option{-mpclmul} is
+used.
+
+@table @code
+@item v2di __builtin_ia32_pclmulqdq128 (v2di, v2di, const int)
+Generates the @code{pclmulqdq} machine instruction.
+@end table
+
The following built-in functions are available when @option{-msse4a} is used.
All of them generate the machine instruction that is part of the name.