]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: i386: Fix gcc.target/i386/bt-cmov-1.c on Solaris
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Tue, 30 Jun 2026 19:49:26 +0000 (21:49 +0200)
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Tue, 30 Jun 2026 19:49:26 +0000 (21:49 +0200)
The new gcc.target/i386/bt-cmov-1.c FAILs on Solaris:

FAIL: gcc.target/i386/bt-cmov-1.c scan-assembler-times cmov[n]*c 4

The Solaris assembler uses a slightly different syntax:

cmovl.c %edx, %eax
cmovl.nc %edx, %eax

instead of

cmovc %edx, %eax
cmovnc %edx, %eax

This patch allows for both forms.  At the same time, it avoids escaping
by using brace quoting.  The character sets with a single character
aren't necessary.  'l' in "btl" isn't optional or does 'c' in "cmov"
occur more than one.

Tested on i386-pc-solaris2.11 (as and gas, 32 and 64-bit), and
x86_64-pc-linux-gnu (32 and 64-bit).

2026-06-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

gcc/testsuite:
* gcc.target/i386/bt-cmov-1.c (scan-assembler-times): Simplify
patterns.  Allow for Solaris as syntax.

gcc/testsuite/gcc.target/i386/bt-cmov-1.c

index 07234c2a9a02c38e444e15840660460fe29a7650..9305997eb82614d36674788e7a0bc4627cb485e3 100644 (file)
@@ -27,7 +27,7 @@ unsigned f3 (unsigned a, unsigned b, unsigned c)
   return ((a >> b) & 1) ? 2 : c;
 }
 
-/* { dg-final { scan-assembler-times "bt\[l\]?\[ \\t\]+" 4 } } */
-/* { dg-final { scan-assembler-times "cmov\[n\]*c" 4 } } */
+/* { dg-final { scan-assembler-times {btl[ \t]+} 4 } } */
+/* { dg-final { scan-assembler-times {cmov(l\.)?n?c} 4 } } */
 /* { dg-final { scan-assembler-not "sal" } } */
 /* { dg-final { scan-assembler-not "shr" } } */