# Assembly-based regression-test driver for the SME ACLE. # Copyright (C) 2009-2025 Free Software Foundation, Inc. # # This file is part of GCC. # # GCC is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # # GCC is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GCC; see the file COPYING3. If not see # . */ # GCC testsuite that uses the `dg.exp' driver. # Exit immediately if this isn't an AArch64 target. if {![istarget aarch64*-*-*] } { return } # Load support procs. load_lib gcc-dg.exp # Initialize `dg'. dg-init # Force SME if we're not testing it already. if { [check_effective_target_aarch64_sme] } { set sme_flags "" } else { set sme_flags "-march=armv9-a+sme" } # Turn off any codegen tweaks by default that may affect expected assembly. # Tests relying on those should turn them on explicitly. set sme_flags "$sme_flags -mtune=generic -moverride=tune=none" global gcc_runtest_parallelize_limit_minor if { [info exists gcc_runtest_parallelize_limit_minor] } { set old_limit_minor $gcc_runtest_parallelize_limit_minor set gcc_runtest_parallelize_limit_minor 1 } torture-init set-torture-options { "-std=c90 -O0 -g" "-std=c99 -Og -g" "-std=c11 -Os -g" "-std=c23 -O2 -fno-schedule-insns -fno-schedule-insns2 -DCHECK_ASM --save-temps" "-std=gnu90 -O3 -g" "-std=gnu23 -Ofast -g" } { "-DTEST_FULL" "-DTEST_OVERLOADS" } # Main loop. set files [glob -nocomplain $srcdir/$subdir/acle-asm/*.c] set save-dg-do-what-default ${dg-do-what-default} if { [check_effective_target_aarch64_asm_sme-i16i64_ok] } { set dg-do-what-default assemble } else { set dg-do-what-default compile } gcc-dg-runtest [lsort $files] "" "$sme_flags -fno-ipa-icf" set dg-do-what-default ${save-dg-do-what-default} torture-finish if { [info exists gcc_runtest_parallelize_limit_minor] } { set gcc_runtest_parallelize_limit_minor $old_limit_minor } # All done. dg-finish