From: Karl Meakin <[email protected]>

Document all the `DEF_*` macros and their arguments.

gcc/ChangeLog:

        * config/aarch64/aarch64-neon-sve-bridge-builtins.def 
(DEF_NEON_SVE_FUNCTION): Document.
        * config/aarch64/aarch64-simd-builtin-types.def (DEF_SIMD_TYPE): 
Likewise.
        * config/aarch64/aarch64-sve-builtins-base.def 
(DEF_SVE_FUNCTION_GS_FPM): Likewise.
        (DEF_SVE_FUNCTION_GS): Likewise.
        (DEF_SVE_FUNCTION): Likewise.
        * config/aarch64/aarch64-sve-builtins-sme.def (DEF_SME_FUNCTION): 
Likewise.
        (DEF_SME_FUNCTION_GS): Likewise.
        (DEF_SME_ZA_FUNCTION_GS): Likewise.
        (DEF_SME_ZA_FUNCTION): Likewise.
        * config/aarch64/aarch64-sve-builtins.def (DEF_SVE_MODE): Likewise.
        (DEF_SVE_TYPE): Likewise.
        (DEF_SVE_TYPE_SUFFIX): Likewise.
        (DEF_SME_ZA_SUFFIX): Likewise.
        (DEF_SVE_GROUP_SUFFIX): Likewise.
        (DEF_SVE_FUNCTION_GS_FPM): Likewise.
        (DEF_SVE_FUNCTION_GS): Likewise.
        (DEF_SVE_NEON_TYPE_SUFFIX): Likewise.
        (DEF_SVE_FUNCTION): Likewise.
---
 .../aarch64-neon-sve-bridge-builtins.def      |  4 +-
 .../aarch64/aarch64-simd-builtin-types.def    |  4 +-
 .../aarch64/aarch64-sve-builtins-base.def     | 18 ++++++++
 .../aarch64/aarch64-sve-builtins-sme.def      | 20 ++++++---
 gcc/config/aarch64/aarch64-sve-builtins.def   | 42 +++++++++++++------
 5 files changed, 68 insertions(+), 20 deletions(-)

diff --git a/gcc/config/aarch64/aarch64-neon-sve-bridge-builtins.def b/gcc/config/aarch64/aarch64-neon-sve-bridge-builtins.def
index a28d219a2d73..2935a2f832ef 100644
--- a/gcc/config/aarch64/aarch64-neon-sve-bridge-builtins.def
+++ b/gcc/config/aarch64/aarch64-neon-sve-bridge-builtins.def
@@ -17,8 +17,10 @@
    along with GCC; see the file COPYING3.  If not see
    <http://www.gnu.org/licenses/>.  */
 
+/* Define an SVE function with a Neon bridge.
+   See the fields in `function_group_info` for the meaning of each argument.  */
 #ifndef DEF_NEON_SVE_FUNCTION
-#define DEF_NEON_SVE_FUNCTION(A, B, C, D, E)
+#define DEF_NEON_SVE_FUNCTION(NAME, SHAPE, TYPES, GROUPS, PREDS)
 #endif
 
 DEF_NEON_SVE_FUNCTION (svset_neonq, set_neonq, all_data, none, none)
diff --git a/gcc/config/aarch64/aarch64-simd-builtin-types.def b/gcc/config/aarch64/aarch64-simd-builtin-types.def
index 57099993080c..65e129fa1a52 100644
--- a/gcc/config/aarch64/aarch64-simd-builtin-types.def
+++ b/gcc/config/aarch64/aarch64-simd-builtin-types.def
@@ -18,8 +18,10 @@
    along with GCC; see the file COPYING3.  If not see
    <http://www.gnu.org/licenses/>.  */
 
+/* Define an AdvSIMD (NEON) type.
+   See `aarch64_simd_type_info` for the meaning of each argument.  */
 #ifndef DEF_SIMD_TYPE
-#define DEF_SIMD_TYPE(A, B, C, D)
+#define DEF_SIMD_TYPE(NAME, MODE, QUALIFIERS, LEN)
 #endif
 
 DEF_SIMD_TYPE (Int8x8_t, V8QI, none, 10)
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.def b/gcc/config/aarch64/aarch64-sve-builtins-base.def
index 4c8d9a62d716..013772ecca7b 100644
--- a/gcc/config/aarch64/aarch64-sve-builtins-base.def
+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.def
@@ -17,6 +17,24 @@
    along with GCC; see the file COPYING3.  If not see
    <http://www.gnu.org/licenses/>.  */
 
+/* Define an SVE function group.
+   See the fields in `function_group_info` for the meaning of each argument.  */
+#ifndef DEF_SVE_FUNCTION_GS_FPM
+#define DEF_SVE_FUNCTION_GS_FPM(NAME, SHAPE, TYPES, GROUPS, PREDS, FPM_MODE)
+#endif
+
+/* Same as `DEF_SVE_FUNCTION_GS_FPM` above, but with FPM = unused.  */
+#ifndef DEF_SVE_FUNCTION_GS
+#define DEF_SVE_FUNCTION_GS(NAME, SHAPE, TYPES, GROUPS, PREDS) \
+   DEF_SVE_FUNCTION_GS_FPM (NAME, SHAPE, TYPES, GROUPS, PREDS, unused)
+#endif
+
+/* Same as `DEF_SVE_FUNCTION_GS` above, but with GROUPS = none.  */
+#ifndef DEF_SVE_FUNCTION
+#define DEF_SVE_FUNCTION(NAME, SHAPE, TYPES,       PREDS) \
+    DEF_SVE_FUNCTION_GS (NAME, SHAPE, TYPES, none, PREDS)
+#endif
+
 #define REQUIRED_EXTENSIONS ssve (0)
 DEF_SVE_FUNCTION (svabd, binary_opt_n, all_arith, mxz)
 DEF_SVE_FUNCTION (svabs, unary, all_float_and_signed, mxz)
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-sme.def b/gcc/config/aarch64/aarch64-sve-builtins-sme.def
index 978a74f438de..04d46cfcb389 100644
--- a/gcc/config/aarch64/aarch64-sve-builtins-sme.def
+++ b/gcc/config/aarch64/aarch64-sve-builtins-sme.def
@@ -17,19 +17,27 @@
    along with GCC; see the file COPYING3.  If not see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef DEF_SME_FUNCTION
-#define DEF_SME_FUNCTION(NAME, SHAPE, TYPES, PREDS) \
-  DEF_SME_FUNCTION_GS (NAME, SHAPE, TYPES, none, PREDS)
+/* Define an SME function.
+   See `function_group_info` for the meaning of each argument.  */
+#ifndef DEF_SME_FUNCTION_GS
+#define DEF_SME_FUNCTION_GS(NAME, SHAPE, TYPES, GROUPS, PREDS)
 #endif
 
+/* Same as `DEF_SME_FUNCTION_GS` above, but with GROUPS = none.  */
+#define DEF_SME_FUNCTION(NAME, SHAPE, TYPES,       PREDS) \
+    DEF_SME_FUNCTION_GS (NAME, SHAPE, TYPES, none, PREDS)
+
+/* Define an SME function that operates on ZA.
+   See `function_group_info` for the meaning of each argument.  */
 #ifndef DEF_SME_ZA_FUNCTION_GS
 #define DEF_SME_ZA_FUNCTION_GS(NAME, SHAPE, TYPES, GROUP, PREDS) \
-  DEF_SME_FUNCTION_GS (NAME, SHAPE, TYPES, GROUP, PREDS)
+	  DEF_SME_FUNCTION_GS (NAME, SHAPE, TYPES, GROUP, PREDS)
 #endif
 
+/* Same as `DEF_SME_ZA_FUNCTION_GS` above, but with GROUPS = none.  */
 #ifndef DEF_SME_ZA_FUNCTION
-#define DEF_SME_ZA_FUNCTION(NAME, SHAPE, TYPES, PREDS) \
-  DEF_SME_ZA_FUNCTION_GS (NAME, SHAPE, TYPES, none, PREDS)
+#define DEF_SME_ZA_FUNCTION(NAME, SHAPE, TYPES,       PREDS) \
+    DEF_SME_ZA_FUNCTION_GS (NAME, SHAPE, TYPES, none, PREDS)
 #endif
 
 #define REQUIRED_EXTENSIONS streaming_compatible (0)
diff --git a/gcc/config/aarch64/aarch64-sve-builtins.def b/gcc/config/aarch64/aarch64-sve-builtins.def
index df77497abaea..b4af21ee5140 100644
--- a/gcc/config/aarch64/aarch64-sve-builtins.def
+++ b/gcc/config/aarch64/aarch64-sve-builtins.def
@@ -17,43 +17,61 @@
    along with GCC; see the file COPYING3.  If not see
    <http://www.gnu.org/licenses/>.  */
 
+/* Define an SVE mode suffix.
+   See the fields in `mode_suffix_info` for the meaning of each argument.  */
 #ifndef DEF_SVE_MODE
-#define DEF_SVE_MODE(A, B, C, D)
+#define DEF_SVE_MODE(NAME, BASE, DISPLACEMENT, UNITS)
 #endif
 
+/* Define an SVE vector or predicate type.
+   See the fields in `vector_type_info` for the meaning of each argument.  */
 #ifndef DEF_SVE_TYPE
-#define DEF_SVE_TYPE(A, B, C, D)
+#define DEF_SVE_TYPE(ACLE_NAME, NCHARS, ABI_NAME, SCALAR_TYPE)
 #endif
 
+/* Define an SVE type suffix.
+   See the fields in `type_suffix_info` for the meaning of each argument.  */
 #ifndef DEF_SVE_TYPE_SUFFIX
-#define DEF_SVE_TYPE_SUFFIX(A, B, C, D, E)
+#define DEF_SVE_TYPE_SUFFIX(NAME, ACLE_TYPE, CLASS, BITS, MODE)
 #endif
 
+/* Define an SME ZA type suffix.
+   See the fields in `type_suffix_info` for the meaning of each argument.  */
 #ifndef DEF_SME_ZA_SUFFIX
-#define DEF_SME_ZA_SUFFIX(A, B, C)
+#define DEF_SME_ZA_SUFFIX(NAME, BITS, MODE)
 #endif
 
+/* Define an SVE group suffix.
+   See the fields in `group_suffix_info` for the meaning of each argument.  */
 #ifndef DEF_SVE_GROUP_SUFFIX
-#define DEF_SVE_GROUP_SUFFIX(A, B, C)
+#define DEF_SVE_GROUP_SUFFIX(NAME, VG, VECTORS_PER_TUPLE)
 #endif
 
+/* Define an SVE function group.
+   See the fields in `function_group_info` for the meaning of each argument.  */
 #ifndef DEF_SVE_FUNCTION_GS_FPM
-#define DEF_SVE_FUNCTION_GS_FPM(A, B, C, D, E, F)
+#define DEF_SVE_FUNCTION_GS_FPM(NAME, SHAPE, TYPES, GROUPS, PREDS, FPM_MODE)
 #endif
 
+/* Same as `DEF_SVE_FUNCTION_GS_FPM` above, but with FPM = unused.  */
 #ifndef DEF_SVE_FUNCTION_GS
-#define DEF_SVE_FUNCTION_GS(A, B, C, D, E) \
-  DEF_SVE_FUNCTION_GS_FPM(A, B, C, D, E, unused)
+#define DEF_SVE_FUNCTION_GS(NAME, SHAPE, TYPES, GROUPS, PREDS) \
+   DEF_SVE_FUNCTION_GS_FPM (NAME, SHAPE, TYPES, GROUPS, PREDS, unused)
 #endif
 
+/* Define an SVE type suffix, with associated 64-bit and 128-bit types for
+   compatability with Neon.
+   See the fields in `type_suffix_info` for the meaning of each argument.  */
 #ifndef DEF_SVE_NEON_TYPE_SUFFIX
-#define DEF_SVE_NEON_TYPE_SUFFIX(A, B, C, D, E, F, G) \
-  DEF_SVE_TYPE_SUFFIX(A, B, C, D, E)
+#define DEF_SVE_NEON_TYPE_SUFFIX(NAME, ACLE_TYPE, CLASS, BITS, MODE, NEON64,  \
+								     NEON128) \
+	    DEF_SVE_TYPE_SUFFIX (NAME, ACLE_TYPE, CLASS, BITS, MODE)
 #endif
 
+/* Same as `DEF_SVE_FUNCTION_GS` above, but with GROUPS = none.  */
 #ifndef DEF_SVE_FUNCTION
-#define DEF_SVE_FUNCTION(NAME, SHAPE, TYPES, PREDS) \
-  DEF_SVE_FUNCTION_GS (NAME, SHAPE, TYPES, none, PREDS)
+#define DEF_SVE_FUNCTION(NAME, SHAPE, TYPES,       PREDS) \
+    DEF_SVE_FUNCTION_GS (NAME, SHAPE, TYPES, none, PREDS)
 #endif
 
 DEF_SVE_MODE (n, none, none, none)

Reply via email to