[gcc r14-12760] aarch64: Extend comment about saving/restoring zt0

Alice Carlotti via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:c1a9f8efda333d23cbb3463e1f9faba8735684c8

commit r14-12760-gc1a9f8efda333d23cbb3463e1f9faba8735684c8
Author: Alice Carlotti <[email protected]>
Date:   Thu Apr 16 12:37:53 2026 +0100

    aarch64: Extend comment about saving/restoring zt0
    
    Explain why aarch64_start_call_args only needs to save and restore zt0
    if the callee shares ZA state.
    
    gcc/ChangeLog:
    
            * config/aarch64/aarch64.cc (aarch64_start_call_args): Extend
            comment.

Diff:
---
 gcc/config/aarch64/aarch64.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
index 025df1ade56f..b4ac8db0a39f 100644
--- a/gcc/config/aarch64/aarch64.cc
+++ b/gcc/config/aarch64/aarch64.cc
@@ -11202,7 +11202,8 @@ aarch64_start_call_args (cumulative_args_t ca_v)
     emit_insn (gen_aarch64_start_private_za_call ());
 
   /* If this is a call to a shared-ZA function that doesn't share ZT0,
-     save and restore ZT0 around the call.  */
+     save and restore ZT0 around the call.  If ZA is not shared, then the
+     save/restore is instead emitted by aarch64_mode_emit_local_sme_state.  */
   if (aarch64_cfun_has_state ("zt0")
       && (ca->isa_mode & AARCH64_FL_ZA_ON)
       && ca->shared_zt0_flags == 0)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.