https://gcc.gnu.org/g:00dafc5b715e0ba6adb42356addd6859e72b094b
commit r17-3876-g00dafc5b715e0ba6adb42356addd6859e72b094b Author: Iain Sandoe <[email protected]> Date: Wed Aug 19 14:10:59 2026 +0100 testsuite, x86: Match multi-word contants explictly. These tests now pass the function body scans on Darwin, but fail the scanasms for 16bye literals. This because these scan separately for .long 0 appearing 3 times, with no constraint on sequence. A bare .long 0 can also match other code (e.g. eh_frame literals) which leads to a fail everywhere on Darwin. Match these multi-word literals explicitly - which actually is better even on cfi-asm targets since it checks the literal and its memory order rather than the two parts independently. gcc/testsuite/ChangeLog: * gcc.target/i386/builtin-copysign-2.c: Check 16 byte literal explicitly. * gcc.target/i386/builtin-copysign-3.c: Likewise. * gcc.target/i386/builtin-copysign-5.c: Likewise. * gcc.target/i386/builtin-fabs-1.c: Likewise. Signed-off-by: Iain Sandoe <[email protected]> Diff: --- gcc/testsuite/gcc.target/i386/builtin-copysign-2.c | 3 +-- gcc/testsuite/gcc.target/i386/builtin-copysign-3.c | 3 +-- gcc/testsuite/gcc.target/i386/builtin-copysign-5.c | 3 +-- gcc/testsuite/gcc.target/i386/builtin-fabs-1.c | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/gcc/testsuite/gcc.target/i386/builtin-copysign-2.c b/gcc/testsuite/gcc.target/i386/builtin-copysign-2.c index d90c5a49a3a7..54d6863254b1 100644 --- a/gcc/testsuite/gcc.target/i386/builtin-copysign-2.c +++ b/gcc/testsuite/gcc.target/i386/builtin-copysign-2.c @@ -18,5 +18,4 @@ foo (float x) return __builtin_copysignf (x, 0.0); } -/* { dg-final { scan-assembler-times ".long 0" 3 { target { ! ia32 } } } } */ -/* { dg-final { scan-assembler-times ".long 2147483647" 1 { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-times {.long\s2147483647[\n\r]+\s.long\s0[\n\r]+\s.long\s0[\n\r]+\s.long\s0} 1 { target { ! ia32 } } } } */ diff --git a/gcc/testsuite/gcc.target/i386/builtin-copysign-3.c b/gcc/testsuite/gcc.target/i386/builtin-copysign-3.c index d3b4dd5a4af0..c7de3935cae3 100644 --- a/gcc/testsuite/gcc.target/i386/builtin-copysign-3.c +++ b/gcc/testsuite/gcc.target/i386/builtin-copysign-3.c @@ -18,5 +18,4 @@ foo (float x) return __builtin_copysignf (x, -3.0); } -/* { dg-final { scan-assembler-times ".long 0" 3 { target { ! ia32 } } } } */ -/* { dg-final { scan-assembler-times ".long -2147483648" 1 { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-times {.long\s-2147483648[\n\r]+\s.long\s0[\n\r]+\s.long\s0[\n\r]+\s.long\s0} 1 { target { ! ia32 } } } } */ diff --git a/gcc/testsuite/gcc.target/i386/builtin-copysign-5.c b/gcc/testsuite/gcc.target/i386/builtin-copysign-5.c index 48897bea9822..ae9bbca231a0 100644 --- a/gcc/testsuite/gcc.target/i386/builtin-copysign-5.c +++ b/gcc/testsuite/gcc.target/i386/builtin-copysign-5.c @@ -18,5 +18,4 @@ foo (__float128 x) return __builtin_copysignq (0.0, x); } -/* { dg-final { scan-assembler-times ".long 0" 3 { target { ! ia32 } } } } */ -/* { dg-final { scan-assembler-times ".long -2147483648" 1 { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-times {.long\s0[\n\r]+\s.long\s0[\n\r]+\s.long\s0[\n\r]+\s.long\s-2147483648} 1 { target { ! ia32 } } } } */ diff --git a/gcc/testsuite/gcc.target/i386/builtin-fabs-1.c b/gcc/testsuite/gcc.target/i386/builtin-fabs-1.c index a9a25f6bd4be..c53628a4ed0b 100644 --- a/gcc/testsuite/gcc.target/i386/builtin-fabs-1.c +++ b/gcc/testsuite/gcc.target/i386/builtin-fabs-1.c @@ -19,5 +19,4 @@ foo (float x) return -__builtin_fabsf (x); } -/* { dg-final { scan-assembler-times ".long 0" 3 { target { ! ia32 } } } } */ -/* { dg-final { scan-assembler-times ".long -2147483648" 1 { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-times {.long\s-2147483648[\n\r]+\s.long\s0[\n\r]+\s.long\s0[\n\r]+\s.long\s0} 1 { target { ! ia32 } } } } */
