From: Spencer Abson Date: Thu, 31 Jul 2025 13:53:08 +0000 (+0000) Subject: aarch64: testsuite: Fix do-assemble tests for SME X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e84a4552dd90ad2d15bd56ea168d945b4b71b98;p=thirdparty%2Fgcc.git aarch64: testsuite: Fix do-assemble tests for SME GCC doesn't support SME without SVE2, so the -march=armv8-a+ argument to check_no_compiler_messages causes aarch64_asm__ok to return zero for SME and any that implies it. This patch changes the baseline architecure to armv9-a for these extensions. gcc/testsuite/ChangeLog: * lib/target-supports.exp: Split the extensions that require SME into a separate set, and use armv9-a as their baseline. (cherry picked from commit 9793ffce9332349441b5c83f8c1809ac4264a0f2) --- diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 35dca396f4e..c0376b04551 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -12367,12 +12367,20 @@ proc check_effective_target_aarch64_tiny { } { # Create functions to check that the AArch64 assembler supports the # various architecture extensions via the .arch_extension pseudo-op. -foreach { aarch64_ext } { "fp" "simd" "crypto" "crc" "lse" "dotprod" "sve" - "i8mm" "f32mm" "f64mm" "bf16" "sb" "sve2" "ls64" - "lut" "sme" "sme-i16i64" "sme2" "sve-b16b16" - "sme-b16b16" "sme-f16f16" "sme2p1" "fp8" "fp8fma" - "ssve-fp8fma" "fp8dot2" "ssve-fp8dot2" "fp8dot4" - "ssve-fp8dot4"} { +set exts { + "bf16" "crc" "crypto" "dotprod" "f32mm" "f64mm" "fp" "fp8" + "fp8dot2" "fp8dot4" "fp8fma" "i8mm" "ls64" "lse" "lut" "sb" "simd" + "sve-b16b16" "sve" "sve2" +} + +# We don't support SME without SVE2, so we'll use armv9 as the base +# archiecture for SME and the features that require it. +set exts_sve2 { + "sme-b16b16" "sme-f16f16" "sme-i16i64" "sme" "sme2" "sme2p1" + "ssve-fp8dot2" "ssve-fp8dot4" "ssve-fp8fma" +} + +foreach { aarch64_ext } $exts { eval [string map [list FUNC $aarch64_ext] { proc check_effective_target_aarch64_asm_FUNC_ok { } { if { [istarget aarch64*-*-*] } { @@ -12386,6 +12394,20 @@ foreach { aarch64_ext } { "fp" "simd" "crypto" "crc" "lse" "dotprod" "sve" }] } +foreach { aarch64_ext } $exts_sve2 { + eval [string map [list FUNC $aarch64_ext] { + proc check_effective_target_aarch64_asm_FUNC_ok { } { + if { [istarget aarch64*-*-*] } { + return [check_no_compiler_messages aarch64_FUNC_assembler object { + __asm__ (".arch_extension FUNC"); + } "-march=armv9-a+FUNC"] + } else { + return 0 + } + } + }] +} + proc check_effective_target_aarch64_asm_sve2p1_ok { } { if { [istarget aarch64*-*-*] } { return [check_no_compiler_messages aarch64_sve2p1_assembler object {