]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
aarch64: Add comment explaining code layout
authorAlfie Richards <alfie.richards@arm.com>
Fri, 9 Jan 2026 16:51:34 +0000 (16:51 +0000)
committerAlfie Richards <alfie.richards@arm.com>
Thu, 15 Jan 2026 14:12:05 +0000 (14:12 +0000)
gcc/ChangeLog:

* config/aarch64/aarch64-simd.md: Add comment.
* config/aarch64/aarch64-sme.md: Likewise.
* config/aarch64/aarch64-sve-builtins-base.def: Likewise.
* config/aarch64/aarch64-sve-builtins-sme.def: Likewise.
* config/aarch64/aarch64-sve-builtins-sve2.def: Likewise.
* config/aarch64/aarch64-sve-builtins.def: Likewise.
* config/aarch64/aarch64-sve.md: Likewise.
* config/aarch64/aarch64-sve2.md: Likewise.
* config/aarch64/aarch64.md: Likewise.

gcc/config/aarch64/aarch64-simd.md
gcc/config/aarch64/aarch64-sme.md
gcc/config/aarch64/aarch64-sve-builtins-base.def
gcc/config/aarch64/aarch64-sve-builtins-sme.def
gcc/config/aarch64/aarch64-sve-builtins-sve2.def
gcc/config/aarch64/aarch64-sve-builtins.def
gcc/config/aarch64/aarch64-sve.md
gcc/config/aarch64/aarch64-sve2.md
gcc/config/aarch64/aarch64.md

index a007cfe9abbfa9fae42325518a2b1706aae44568..7a38310efce85b60236dabe51d4d239e936238f9 100644 (file)
 ;; along with GCC; see the file COPYING3.  If not see
 ;; <http://www.gnu.org/licenses/>.
 
+;; Code organisation:
+;
+;; The lines of is an instruction is aarch64, simd, sve, sve2, or sme are
+;; a little blurry.
+;;
+;; Therefore code is organised by the following rough principles:
+;;
+;; - aarch64.md: For shared parts of the architecture (such as defining
+;;     registers and constants) and for instructions that operate on non-SIMD
+;;     registers.
+;; - aarch64-simd.md: For instructions that operate on non-scaling SIMD
+;;     registers.
+;; - aarch64-sve.md for SVE instructions that are pre SVE2.
+;; - aarch64-sme.md for any scalable SIMD instruction that is incompatible with
+;;     non-streaming mode. This usually means it uses the ZA or ZT register.
+;; - aarch64-sve2.md for any scalable SIMD instruction that either is
+;;     streaming compatible, or theoretically could be later.
+
 ;; The following define_subst rules are used to produce patterns representing
 ;; the implicit zeroing effect of 64-bit Advanced SIMD operations, in effect
 ;; a vec_concat with zeroes.  The order of the vec_concat operands differs
index ca3ed47165700dcc488cff55a6a788bdd98ddde6..a2faa4b2bb733f36785b9d17914ca55b3044f3a2 100644 (file)
 ;; along with GCC; see the file COPYING3.  If not see
 ;; <http://www.gnu.org/licenses/>.
 
+;; Code organisation:
+;
+;; The lines of is an instruction is aarch64, simd, sve, sve2, or sme are
+;; a little blurry.
+;;
+;; Therefore code is organised by the following rough principles:
+;;
+;; - aarch64.md: For shared parts of the architecture (such as defining
+;;     registers and constants) and for instructions that operate on non-SIMD
+;;     registers.
+;; - aarch64-simd.md: For instructions that operate on non-scaling SIMD
+;;     registers.
+;; - aarch64-sve.md for SVE instructions that are pre SVE2.
+;; - aarch64-sme.md for any scalable SIMD instruction that is incompatible with
+;;     non-streaming mode. This usually means it uses the ZA or ZT register.
+;; - aarch64-sve2.md for any scalable SIMD instruction that either is
+;;     streaming compatible, or theoretically could be later.
+
 ;; The file is organised into the following sections (search for the full
 ;; line):
 ;;
index 3ffee71d31b8d1fe5b1596d9c82955ad9746cadc..0a3a7a0e144e78a6fe8babbaa49766db74bf7353 100644 (file)
    along with GCC; see the file COPYING3.  If not see
    <http://www.gnu.org/licenses/>.  */
 
+/* Code organisation:
+
+   The lines defining if an intrinsic is for sve, sve2, sme, and sme2 can get
+   a little blurry.
+
+   Therefore code is organised by the following rough principles:
+
+   - aarch64-sve-builtins-sme.def for any intrinsic that is fundamentally
+     incompatible with non-streaming mode. This usually means it uses the ZA
+     or ZT register.
+   - aarch64-sve-builtins-sve2.def for any intrinsic that that is a streaming mode
+     intrinsic, but either is non-streaming compatible, or theoretically could
+     be later.
+   - aarch64-sve-builtins-base.def for SVE intrinsics that are pre SVE2.
+   - aarch64-sve-builtins.def for common data types and group definitions used
+     across all files.  */
+
 #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)
index 1c90983483598d1e1c3b6531f87656e80a5acafc..9f126e8647a29a07a6d646281245df11adb168be 100644 (file)
    along with GCC; see the file COPYING3.  If not see
    <http://www.gnu.org/licenses/>.  */
 
+/* Code organisation:
+
+   The lines defining if an intrinsic is for sve, sve2, sme, and sme2 can get
+   a little blurry.
+
+   Therefore code is organised by the following rough principles:
+
+   - aarch64-sve-builtins-sme.def for any intrinsic that is fundamentally
+     incompatible with non-streaming mode. This usually means it uses the ZA
+     or ZT register.
+   - aarch64-sve-builtins-sve2.def for any intrinsic that that is a streaming mode
+     intrinsic, but either is non-streaming compatible, or theoretically could
+     be later.
+   - aarch64-sve-builtins-base.def for SVE intrinsics that are pre SVE2.
+   - aarch64-sve-builtins.def for common data types and group definitions used
+     across all files.  */
 
 #ifndef DEF_SME_FUNCTION_GS
 #define DEF_SME_FUNCTION_GS(NAME, SHAPE, TYPES, GROUPS, PREDS) \
index 9329c8853864776b6d3ab647900d591c4a39cb1e..8765021d951f16f0044ec4074789c074d154352c 100644 (file)
    along with GCC; see the file COPYING3.  If not see
    <http://www.gnu.org/licenses/>.  */
 
+/* Code organisation:
+
+   The lines defining if an intrinsic is for sve, sve2, sme, and sme2 can get
+   a little blurry.
+
+   Therefore code is organised by the following rough principles:
+
+   - aarch64-sve-builtins-sme.def for any intrinsic that is fundamentally
+     incompatible with non-streaming mode. This usually means it uses the ZA
+     or ZT register.
+   - aarch64-sve-builtins-sve2.def for any intrinsic that that is a streaming mode
+     intrinsic, but either is non-streaming compatible, or theoretically could
+     be later.
+   - aarch64-sve-builtins-base.def for SVE intrinsics that are pre SVE2.
+   - aarch64-sve-builtins.def for common data types and group definitions used
+     across all files.  */
+
 #define REQUIRED_EXTENSIONS sve_and_sme (AARCH64_FL_SVE2, 0)
 DEF_SVE_FUNCTION (svaba, ternary_opt_n, all_integer, none)
 DEF_SVE_FUNCTION (svabalb, ternary_long_opt_n, hsd_integer, none)
index ecdb77c3b157f87904fac94d3c394240c177bf74..ecd434bda35ec5a358482291e86899e13d551753 100644 (file)
    along with GCC; see the file COPYING3.  If not see
    <http://www.gnu.org/licenses/>.  */
 
+/* Code organisation:
+
+   The lines defining if an intrinsic is for sve, sve2, sme, and sme2 can get
+   a little blurry.
+
+   Therefore code is organised by the following rough principles:
+
+   - aarch64-sve-builtins-sme.def for any intrinsic that is fundamentally
+     incompatible with non-streaming mode. This usually means it uses the ZA
+     or ZT register.
+   - aarch64-sve-builtins-sve2.def for any intrinsic that that is a streaming mode
+     intrinsic, but either is non-streaming compatible, or theoretically could
+     be later.
+   - aarch64-sve-builtins-base.def for SVE intrinsics that are pre SVE2.
+   - aarch64-sve-builtins.def for common data types and group definitions used
+     across all files.  */
+
 #ifndef DEF_SVE_MODE
 #define DEF_SVE_MODE(A, B, C, D)
 #endif
index cc024a81746a8fee7d3df6c609a62e2c7abb072c..b77a04cd2d2d4a56453c659609be53e61b6f2476 100644 (file)
 ;; along with GCC; see the file COPYING3.  If not see
 ;; <http://www.gnu.org/licenses/>.
 
+;; Code organisation:
+;
+;; The lines of is an instruction is aarch64, simd, sve, sve2, or sme are
+;; a little blurry.
+;;
+;; Therefore code is organised by the following rough principles:
+;;
+;; - aarch64.md: For shared parts of the architecture (such as defining
+;;     registers and constants) and for instructions that operate on non-SIMD
+;;     registers.
+;; - aarch64-simd.md: For instructions that operate on non-scaling SIMD
+;;     registers.
+;; - aarch64-sve.md for SVE instructions that are pre SVE2.
+;; - aarch64-sme.md for any scalable SIMD instruction that is incompatible with
+;;     non-streaming mode. This usually means it uses the ZA or ZT register.
+;; - aarch64-sve2.md for any scalable SIMD instruction that either is
+;;     streaming compatible, or theoretically could be later.
+
 ;; The file is organised into the following sections (search for the full
 ;; line):
 ;;
index 2df93a4ba4cdaad9aa5fffe32805df92f781c41f..f959837eca0ae5c9033d4f64ddbfa107fba49e1b 100644 (file)
 ;; You should have received a copy of the GNU General Public License
 ;; along with GCC; see the file COPYING3.  If not see
 ;; <http://www.gnu.org/licenses/>.
+; 
+;; Code organisation:
+;
+;; The lines of is an instruction is aarch64, simd, sve, sve2, or sme are
+;; a little blurry.
+;;
+;; Therefore code is organised by the following rough principles:
+;;
+;; - aarch64.md: For shared parts of the architecture (such as defining
+;;     registers and constants) and for instructions that operate on non-SIMD
+;;     registers.
+;; - aarch64-simd.md: For instructions that operate on non-scaling SIMD
+;;     registers.
+;; - aarch64-sve.md for SVE instructions that are pre SVE2.
+;; - aarch64-sme.md for any scalable SIMD instruction that is incompatible with
+;;     non-streaming mode. This usually means it uses the ZA or ZT register.
+;; - aarch64-sve2.md for any scalable SIMD instruction that either is
+;;     streaming compatible, or theoretically could be later.
 
 ;; The file is organised into the following sections (search for the full
 ;; line):
index 4445208bf92ce0e08b72fde3de0f6dbc238cac3b..58e57fd65a7933126ef9af240e6d7bc69facc0ec 100644 (file)
 ;; along with GCC; see the file COPYING3.  If not see
 ;; <http://www.gnu.org/licenses/>.
 
+;; Code organisation:
+;
+;; The lines of is an instruction is aarch64, simd, sve, sve2, or sme are
+;; a little blurry.
+;;
+;; Therefore code is organised by the following rough principles:
+;;
+;; - aarch64.md: For shared parts of the architecture (such as defining
+;;     registers and constants) and for instructions that operate on non-SIMD
+;;     registers.
+;; - aarch64-simd.md: For instructions that operate on non-scaling SIMD
+;;     registers.
+;; - aarch64-sve.md for SVE instructions that are pre SVE2.
+;; - aarch64-sme.md for any scalable SIMD instruction that is incompatible with
+;;     non-streaming mode. This usually means it uses the ZA or ZT register.
+;; - aarch64-sve2.md for any scalable SIMD instruction that either is
+;;     streaming compatible, or theoretically could be later.
+
 ;; Register numbers
 (define_constants
   [