From: Xi Ruoyao Date: Mon, 3 Feb 2025 03:15:22 +0000 (+0800) Subject: testsuite: Fix up toplevel-asm-1.c for LoongArch X-Git-Tag: basepoints/gcc-16~1786 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20d95bfa29057104b352e5d82699edede8658499;p=thirdparty%2Fgcc.git testsuite: Fix up toplevel-asm-1.c for LoongArch 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. --- diff --git a/gcc/testsuite/c-c++-common/toplevel-asm-1.c b/gcc/testsuite/c-c++-common/toplevel-asm-1.c index d6766b00e72..e1687d28e0b 100644 --- a/gcc/testsuite/c-c++-common/toplevel-asm-1.c +++ b/gcc/testsuite/c-c++-common/toplevel-asm-1.c @@ -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 %% %="