The following adds a skeleton for documenting internal function details.
Without such a place it's quite difficult to tell people to document
things when they add new internal functions. We might want to split
the table into two, separating direct internal functions from others.
I've placed the contents after the GENERIC/GIMPLE chapters.
Any comments? I hope to expand it a bit before formally asking for OK.
Thanks,
Richard.
PR middle-end/124634
* ifn.texi: New file.
* gccint.texi: Include ifn.texi.
---
gcc/doc/gccint.texi | 1 +
gcc/doc/ifn.texi | 32 ++++++++++++++++++++++++++++++++
2 files changed, 33 insertions(+)
create mode 100644 gcc/doc/ifn.texi
diff --git a/gcc/doc/gccint.texi b/gcc/doc/gccint.texi
index 9d3b2f23428..be752db3cd4 100644
--- a/gcc/doc/gccint.texi
+++ b/gcc/doc/gccint.texi
@@ -155,6 +155,7 @@ Additional tutorial information is linked to from
@include poly-int.texi
@include generic.texi
@include gimple.texi
+@include ifn.texi
@include tree-ssa.texi
@include rtl.texi
@include cfg.texi
diff --git a/gcc/doc/ifn.texi b/gcc/doc/ifn.texi
new file mode 100644
index 00000000000..c8a44a08ed0
--- /dev/null
+++ b/gcc/doc/ifn.texi
@@ -0,0 +1,32 @@
+@c Copyright (C) 1988-2026 Free Software Foundation, Inc.
+@c This is part of the GCC manual.
+@c For copying conditions, see the file gcc.texi.
+
+@node Internal Functions
+@chapter Internal Functions in GENERIC and GIMPLE
+@cindex internal functions
+@cindex @file{internal-fn.def}
+
+In addition to builtin functions specified in @file{builtins.def} and
+friends the GENERIC and GIMPLE intermediate languages use calls with
+pre-defined semantics that are inline expanded to RTL rather than to
+calls. Those functions are listed in @file{internal-fn.def}.
+
+@menu
+* Internal Function API:: The internal function related API.
+* Internal Functions:: Table of internal functions.
+@end menu
+
+@node Internal Function API
+@section The internal function related API
+
+@node Internal Functions
+@section Table of internal functions
+
+@table @asis
+@cindex @code{CRC} internal function
+@item @samp{CRC}
+The @code{CRC} internal function directly maps to the @code{crc@var{m}@var{n}4}
+instruction pattern.
+
+@end table
--
2.51.0