aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorKelvin Nilsen <kelvin@gcc.gnu.org>2020-05-11 15:10:24 -0500
committerBill Schmidt <wschmidt@linux.ibm.com>2020-05-11 15:27:24 -0500
commit9acfb58a46ffe88ebaae0eeb341cb924702fe20c (patch)
tree5956b34f8ef95abdab04d443874ea8fac25ddb43 /gcc/doc
parent52c5933f5838adb7bf6035e648b770b4958d137f (diff)
downloadgcc-9acfb58a46ffe88ebaae0eeb341cb924702fe20c.zip
gcc-9acfb58a46ffe88ebaae0eeb341cb924702fe20c.tar.gz
gcc-9acfb58a46ffe88ebaae0eeb341cb924702fe20c.tar.bz2
rs6000: Add cntlzdm and cnttzdm
Add support for new scalar instructions for counting leading or trailing zeros under control of a bitmask. [gcc] 2020-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org> * config/rs6000/rs6000-builtin.def (__builtin_cntlzdm): New built-in function definition. (__builtin_cnttzdm): Likewise. * config/rs6000/rs6000.md (UNSPEC_CNTLZDM): New constant. (UNSPEC_CNTTZDM): Likewise. (cntlzdm): New insn. (cnttzdm): Likewise. * doc/extend.texi (Basic PowerPC Built-in Functions available for a Future Architecture): Add descriptions of __builtin_cntlzdm and __builtin_cnttzdm functions. [gcc/testsuite] 2020-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org> * gcc.target/powerpc/cntlzdm-0.c: New test. * gcc.target/powerpc/cntlzdm-1.c: New test. * gcc.target/powerpc/cnttzdm-0.c: New test. * gcc.target/powerpc/cnttzdm-1.c: New test.
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/extend.texi16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index f7b30c7..8c833d3 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -17556,6 +17556,22 @@ Perform a 64-bit centrifuge operation, as if implemented by the Future
@code{cfuged} instruction.
@findex __builtin_cfuged
+@smallexample
+@exdent unsigned long long int
+@exdent __builtin_cntlzdm (unsigned long long int, unsigned long long int)
+@end smallexample
+Perform a 64-bit count leading zeros operation under mask, as if
+implemented by the future @code{cntlzdm} instruction.
+@findex __builtin_cntlzdm
+
+@smallexample
+@exdent unsigned long long int
+@exdent __builtin_cnttzdm (unsigned long long int, unsigned long long int)
+@end smallexample
+Perform a 64-bit count trailing zeros operation under mask, as if
+implemented by the future @code{cnttzdm} instruction.
+@findex __builtin_cnttzdm
+
@node PowerPC AltiVec/VSX Built-in Functions
@subsection PowerPC AltiVec/VSX Built-in Functions