]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V: testsuite: fix target selector for sync_char_short
authorEdwin Lu <ewlu@rivosinc.com>
Thu, 9 Jan 2025 18:32:07 +0000 (10:32 -0800)
committerEdwin Lu <ewlu@rivosinc.com>
Thu, 9 Jan 2025 22:11:00 +0000 (14:11 -0800)
The effective-target selector for riscv on sync_char_short did not
check to see if atomics were enabled. As a result, these test cases were
ran on targets without the a extension. Add additional checks for zalrsc
or zabha extensions.

gcc/testsuite/ChangeLog:

* lib/target-supports.exp: Fix effective target sync_char_short
for riscv*-*-*

Signed-off-by: Edwin Lu <ewlu@rivosinc.com>
gcc/testsuite/lib/target-supports.exp

index a89f531f887629191c6b42c56d4c56af4f9ae814..939ef3a41196c0d6ae9248687aec4c7ad1d9c83a 100644 (file)
@@ -10080,7 +10080,9 @@ proc check_effective_target_sync_char_short { } {
             || ([istarget sparc*-*-*] && [check_effective_target_sparc_v9])
             || ([istarget arc*-*-*] && [check_effective_target_arc_atomic])
             || [istarget loongarch*-*-*]
-            || [istarget riscv*-*-*]
+            || ([istarget riscv*-*-*]
+                && ([check_effective_target_riscv_zalrsc]
+                    || [check_effective_target_riscv_zabha]))
             || [check_effective_target_mips_llsc] }}]
 }