https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121414
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Richard Sandiford <rsand...@gcc.gnu.org>: https://gcc.gnu.org/g:851cbdca8848525b35cbea8d02ba75a167fc11c1 commit r16-3068-g851cbdca8848525b35cbea8d02ba75a167fc11c1 Author: Richard Sandiford <richard.sandif...@arm.com> Date: Thu Aug 7 15:15:00 2025 +0100 aarch64: Mark SME functions as .variant_pcs [PR121414] Unlike base PCS functions, __arm_streaming and __arm_streaming_compatible functions allow/require PSTATE.SM to be 1 on entry, so they need to be treated as STO_AARCH64_VARIANT_PCS. Similarly, functions that share ZA or ZT0 with their callers require ZA to be active on entry, whereas the base PCS requires ZA to be dormant or off. These functions too need to be marked as having a variant PCS. gcc/ PR target/121414 * config/aarch64/aarch64.cc (aarch64_is_variant_pcs): New function, split out from... (aarch64_asm_output_variant_pcs): ...here. Handle various types of SME function type. gcc/testsuite/ PR target/121414 * gcc.target/aarch64/sme/pr121414_1.c: New test.