]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Fix up toplevel-asm-1.c for LoongArch
authorXi Ruoyao <xry111@xry111.site>
Mon, 3 Feb 2025 03:15:22 +0000 (11:15 +0800)
committerXi Ruoyao <xry111@xry111.site>
Sat, 1 Mar 2025 03:37:38 +0000 (11:37 +0800)
Like RISC-V, on LoongArch we don't really support %cN for SYMBOL_REFs
even with -fno-pic.

gcc/testsuite/ChangeLog:

* c-c++-common/toplevel-asm-1.c: Use %cc3 %cc4 instead of %c3
%c4 on LoongArch.

gcc/testsuite/c-c++-common/toplevel-asm-1.c

index d6766b00e724778c35a3e7d4326f156924e10e81..e1687d28e0b9cec479744b3167a82046c481e50b 100644 (file)
@@ -9,7 +9,7 @@ int v[42];
 void foo (void) {}
 
 /* Not all targets can use %cN even in non-pic code.  */
-#if defined(__riscv)
+#if defined(__riscv) || defined(__loongarch__)
 asm ("# %0 %1 %2 %cc3 %cc4 %5 %% %="
 #else
 asm ("# %0 %1 %2 %c3 %c4 %5 %% %="