]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
asm-hard-reg-2.c: Compile for x86 !ia32 and scan x86
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 9 Aug 2025 21:49:19 +0000 (14:49 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Sun, 10 Aug 2025 13:02:54 +0000 (06:02 -0700)
Since i?86 and x86_64 GCC can generate codes for ia32, x32 and lp64,
compile asm-hard-reg-2.c for x86 !ia32 and scan x86.

PR testsuite/121205
* gcc.dg/asm-hard-reg-2.c: Compile for x86 !ia32 and scan x86.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
gcc/testsuite/gcc.dg/asm-hard-reg-2.c

index 7dabf9657cb4c929bc9db7c8ac55c89500951637..5a60f9be4f22cccf83ae21ff11ce01eda6c5e23e 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target aarch64*-*-* powerpc64*-*-* riscv64-*-* s390*-*-* x86_64-*-* } } */
+/* { dg-do compile { target { { aarch64*-*-* powerpc64*-*-* riscv64-*-* s390*-*-* } || { { i?86-*-* x86_64-*-* } && { ! ia32 } } } } } */
 /* { dg-options "-std=c99" } we need long long */
 
 #if defined (__aarch64__)
@@ -15,7 +15,7 @@
 /* { dg-final { scan-assembler-times "foo\t%r4" 2 { target { s390*-*-* } } } } */
 #elif defined (__x86_64__)
 # define GPR "{rcx}"
-/* { dg-final { scan-assembler-times "foo\t%rcx" 2 { target { x86_64-*-* } } } } */
+/* { dg-final { scan-assembler-times "foo\t%rcx" 2 { target { i?86-*-* x86_64-*-* } } } } */
 #endif
 
 long long