]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
btf: Fix up btf-datasec-1.c test on x86
authorJakub Jelinek <jakub@redhat.com>
Wed, 27 Mar 2024 19:22:02 +0000 (20:22 +0100)
committerJakub Jelinek <jakub@redhat.com>
Wed, 27 Mar 2024 19:22:02 +0000 (20:22 +0100)
> -/* The offset entry for each variable in a DATSEC should be 0 at compile time.  */
> -/* { dg-final { scan-assembler-times "0\[\t \]+\[^\n\]*bts_offset" 7 } } */
> +/* The offset entry for each variable in a DATSEC should contain a label.  */
> +/* { dg-final { scan-assembler-times ".4byte\[\t \]\[a-e\]\[\t \]+\[^\n\]*bts_offset" 5 } } */

4byte is used only on some targets, what exact assembler directive is used
for 4byte unaligned data is heavily target dependent.

2024-03-27  Jakub Jelinek  <jakub@redhat.com>

* gcc.dg/debug/btf/btf-cvr-quals-1.c: Use dg-additional-options
instead of multiple dg-options.
* gcc.dg/debug/btf/btf-datasec-1.c: Likewise.  Accept all supported
unaligned 4 byte assembler directives rather than assuming it must
be .4byte.

gcc/testsuite/gcc.dg/debug/btf/btf-cvr-quals-1.c
gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c

index 33e2f649935e6e33101eaac5ae9e33e39ba04193..b7c99bf475a4e9343466625625b1c704ae81a632 100644 (file)
@@ -23,7 +23,7 @@
 
 /* { dg-do compile } */
 /* { dg-options "-O0 -gbtf -dA" } */
-/* { dg-options "-O0 -gbtf -gdwarf-4 -dA" { target { *-*-darwin* } } } */
+/* { dg-additional-options "-gdwarf-4" { target { *-*-darwin* } } } */
 
 /* { dg-final { scan-assembler-times "ascii \"int.0\"\[\t \]+\[^\n\]*btf_string" 1 } } */
 
index 8557c38c20d8d2569e3d01fc97ebc6b753000437..782216d3cb12df8542bd04d6f2bb6c7e6d1f62c6 100644 (file)
 
 /* { dg-do compile )  */
 /* { dg-options "-O0 -gbtf -dA" } */
-/* { dg-options "-O0 -gbtf -dA -msdata=none" { target { { powerpc*-*-* } && ilp32 } } } */
-/* { dg-options "-O0 -gbtf -dA -msmall-data-limit=0" { target { riscv*-*-* } } } */
-/* { dg-options "-O0 -gbtf -dA -G0" { target { nios2-*-* } } } */
+/* { dg-additional-options "-msdata=none" { target { { powerpc*-*-* } && ilp32 } } } */
+/* { dg-additional-options "-msmall-data-limit=0" { target { riscv*-*-* } } } */
+/* { dg-additional-options "-G0" { target { nios2-*-* } } } */
 
 /* Check for two DATASEC entries with vlen 3, and one with vlen 1.  */
 /* { dg-final { scan-assembler-times "0xf000003\[\t \]+\[^\n\]*btt_info" 2 } } */
 /* { dg-final { scan-assembler-times "0xf000001\[\t \]+\[^\n\]*btt_info" 1 } } */
 
 /* The offset entry for each variable in a DATSEC should contain a label.  */
-/* { dg-final { scan-assembler-times ".4byte\[\t \]\[a-e\]\[\t \]+\[^\n\]*bts_offset" 5 } } */
+/* { dg-final { scan-assembler-times "(?:(?:\\.4byte|\\.long|data4\\.ua|\\.ualong|\\.uaword|\\.dword|long|dc\\.l|\\.word)\[\t \]|\\.vbyte\t4,\[\t \]?)\[a-e\]\[\t \]+\[^\n\]*bts_offset" 5 } } */
 /* { dg-final { scan-assembler-times "my_cstruct\[\t \]+\[^\n\]*bts_offset" 1 } } */
 /* { dg-final { scan-assembler-times "bigarr\[\t \]+\[^\n\]*bts_offset" 1 } } */