Commit 7ed2d6cb by Richard Sandiford

testsuite: Tweak check-function-bodies interface

In g:2171a920 I'd tried to fix
various ILP32 testsuite failures by restricting some tests to LP64.
Unfortunately, I messed up the check-function-bodies syntax and passed
the target selector as the "option" parameter, which had the effect of
disabling the tests for both ILP32 and LP64.

The fix ought to have been to add "" as the option parameter.  However,
check-function-bodies wasn't treating "" in the same way as an omitted
argument.  The easiest fix seemed to be turn the argument into a list of
options, which also makes the interface a bit more general.

Having done that, it seemed a good idea to check for things that look
like target/xfail selectors, so that the mistake isn't silent next time.

2020-04-09  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* doc/sourcebuild.texi (check-function-bodies): Treat the third
	parameter as a list of option regexps and require each regexp
	to match.

gcc/testsuite/
	* lib/scanasm.exp (check-function-bodies): Treat the third
	parameter as a list of option regexps and require each regexp
	to match.  Check for cases in which a target/xfail selector
	was mistakenly passed to the options argument.
	* gcc.target/aarch64/sve/pcs/args_1.c: Add an empty options list
	to the invocation of check-function-bodies.
	* gcc.target/aarch64/sve/pcs/args_2.c: Likewise.
	* gcc.target/aarch64/sve/pcs/args_3.c: Likewise.
	* gcc.target/aarch64/sve/pcs/args_4.c: Likewise.
	* gcc.target/aarch64/sve/pcs/return_1.c: Likewise.
	* gcc.target/aarch64/sve/pcs/return_1_1024.c: Likewise.
	* gcc.target/aarch64/sve/pcs/return_1_128.c: Likewise.
	* gcc.target/aarch64/sve/pcs/return_1_2048.c: Likewise.
	* gcc.target/aarch64/sve/pcs/return_1_256.c: Likewise.
	* gcc.target/aarch64/sve/pcs/return_1_512.c: Likewise.
	* gcc.target/aarch64/sve/pcs/return_2.c: Likewise.
	* gcc.target/aarch64/sve/pcs/return_3.c: Likewise.
	* gcc.target/aarch64/sve/pcs/return_4.c: Likewise.
	* gcc.target/aarch64/sve/pcs/return_4_1024.c: Likewise.
	* gcc.target/aarch64/sve/pcs/return_4_128.c: Likewise.
	* gcc.target/aarch64/sve/pcs/return_4_2048.c: Likewise.
	* gcc.target/aarch64/sve/pcs/return_4_256.c: Likewise.
	* gcc.target/aarch64/sve/pcs/return_4_512.c: Likewise.
	* gcc.target/aarch64/sve/pcs/return_5.c: Likewise.
	* gcc.target/aarch64/sve/pcs/return_5_1024.c: Likewise.
	* gcc.target/aarch64/sve/pcs/return_5_128.c: Likewise.
	* gcc.target/aarch64/sve/pcs/return_5_2048.c: Likewise.
	* gcc.target/aarch64/sve/pcs/return_5_256.c: Likewise.
	* gcc.target/aarch64/sve/pcs/return_5_512.c: Likewise.
	* gcc.target/aarch64/sve/pcs/return_6.c: Likewise.
	* gcc.target/aarch64/sve/pcs/return_6_1024.c: Likewise.
	* gcc.target/aarch64/sve/pcs/return_6_128.c: Likewise.
	* gcc.target/aarch64/sve/pcs/return_6_2048.c: Likewise.
	* gcc.target/aarch64/sve/pcs/return_6_256.c: Likewise.
	* gcc.target/aarch64/sve/pcs/return_6_512.c: Likewise.
	* gcc.target/aarch64/sve/pcs/saves_2_be_nowrap.c: Likewise.
	* gcc.target/aarch64/sve/pcs/saves_2_be_wrap.c: Likewise.
	* gcc.target/aarch64/sve/pcs/saves_2_le_nowrap.c: Likewise.
	* gcc.target/aarch64/sve/pcs/saves_2_le_wrap.c: Likewise.
	* gcc.target/aarch64/sve/pcs/saves_3.c: Likewise.
	* gcc.target/aarch64/sve/pcs/saves_4_be.c: Likewise.
	* gcc.target/aarch64/sve/pcs/saves_4_le.c: Likewise.
	* gcc.target/aarch64/sve/pcs/stack_clash_2_128.c: Likewise.
	* gcc.target/aarch64/sve/pcs/varargs_1.c: Likewise.
	* gcc.target/aarch64/sve/pcs/varargs_2_f16.c: Likewise.
	* gcc.target/aarch64/sve/pcs/varargs_2_f32.c: Likewise.
	* gcc.target/aarch64/sve/pcs/varargs_2_f64.c: Likewise.
	* gcc.target/aarch64/sve/pcs/varargs_2_s16.c: Likewise.
	* gcc.target/aarch64/sve/pcs/varargs_2_s32.c: Likewise.
	* gcc.target/aarch64/sve/pcs/varargs_2_s64.c: Likewise.
	* gcc.target/aarch64/sve/pcs/varargs_2_s8.c: Likewise.
	* gcc.target/aarch64/sve/pcs/varargs_2_u16.c: Likewise.
	* gcc.target/aarch64/sve/pcs/varargs_2_u32.c: Likewise.
	* gcc.target/aarch64/sve/pcs/varargs_2_u64.c: Likewise.
	* gcc.target/aarch64/sve/pcs/varargs_2_u8.c: Likewise.
parent bb404606
2020-04-09 Richard Sandiford <richard.sandiford@arm.com>
* doc/sourcebuild.texi (check-function-bodies): Treat the third
parameter as a list of option regexps and require each regexp
to match.
2020-04-09 Andrea Corallo <andrea.corallo@arm.com> 2020-04-09 Andrea Corallo <andrea.corallo@arm.com>
PR target/94530 PR target/94530
......
...@@ -2754,17 +2754,19 @@ assembly output. ...@@ -2754,17 +2754,19 @@ assembly output.
Passes if @var{symbol} is not defined as a hidden symbol in the test's Passes if @var{symbol} is not defined as a hidden symbol in the test's
assembly output. assembly output.
@item check-function-bodies @var{prefix} @var{terminator} [@var{option} [@{ target/xfail @var{selector} @}]] @item check-function-bodies @var{prefix} @var{terminator} [@var{options} [@{ target/xfail @var{selector} @}]]
Looks through the source file for comments that give the expected assembly Looks through the source file for comments that give the expected assembly
output for selected functions. Each line of expected output starts with the output for selected functions. Each line of expected output starts with the
prefix string @var{prefix} and the expected output for a function as a whole prefix string @var{prefix} and the expected output for a function as a whole
is followed by a line that starts with the string @var{terminator}. is followed by a line that starts with the string @var{terminator}.
Specifying an empty terminator is equivalent to specifying @samp{"*/"}. Specifying an empty terminator is equivalent to specifying @samp{"*/"}.
If @var{option} is specified, the test only applies to command lines @var{options}, if specified, is a list of regular expressions, each of
that contain @var{option}. This can be useful if a source file is compiled which matches a full command-line option. A non-empty list prevents
both with and without optimization, since it is rarely useful to check the the test from running unless all of the given options are present on the
assembly output for unoptimized code. command line. This can help if a source file is compiled both with
and without optimization, since it is rarely useful to check the full
function body for unoptimized code.
The first line of the expected output for a function @var{fn} has the form: The first line of the expected output for a function @var{fn} has the form:
......
2020-04-09 Richard Sandiford <richard.sandiford@arm.com>
* lib/scanasm.exp (check-function-bodies): Treat the third
parameter as a list of option regexps and require each regexp
to match. Check for cases in which a target/xfail selector
was mistakenly passed to the options argument.
* gcc.target/aarch64/sve/pcs/args_1.c: Add an empty options list
to the invocation of check-function-bodies.
* gcc.target/aarch64/sve/pcs/args_2.c: Likewise.
* gcc.target/aarch64/sve/pcs/args_3.c: Likewise.
* gcc.target/aarch64/sve/pcs/args_4.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_1.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_1_1024.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_1_128.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_1_2048.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_1_256.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_1_512.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_2.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_3.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_4.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_4_1024.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_4_128.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_4_2048.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_4_256.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_4_512.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_5.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_5_1024.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_5_128.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_5_2048.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_5_256.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_5_512.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_6.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_6_1024.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_6_128.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_6_2048.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_6_256.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_6_512.c: Likewise.
* gcc.target/aarch64/sve/pcs/saves_2_be_nowrap.c: Likewise.
* gcc.target/aarch64/sve/pcs/saves_2_be_wrap.c: Likewise.
* gcc.target/aarch64/sve/pcs/saves_2_le_nowrap.c: Likewise.
* gcc.target/aarch64/sve/pcs/saves_2_le_wrap.c: Likewise.
* gcc.target/aarch64/sve/pcs/saves_3.c: Likewise.
* gcc.target/aarch64/sve/pcs/saves_4_be.c: Likewise.
* gcc.target/aarch64/sve/pcs/saves_4_le.c: Likewise.
* gcc.target/aarch64/sve/pcs/stack_clash_2_128.c: Likewise.
* gcc.target/aarch64/sve/pcs/varargs_1.c: Likewise.
* gcc.target/aarch64/sve/pcs/varargs_2_f16.c: Likewise.
* gcc.target/aarch64/sve/pcs/varargs_2_f32.c: Likewise.
* gcc.target/aarch64/sve/pcs/varargs_2_f64.c: Likewise.
* gcc.target/aarch64/sve/pcs/varargs_2_s16.c: Likewise.
* gcc.target/aarch64/sve/pcs/varargs_2_s32.c: Likewise.
* gcc.target/aarch64/sve/pcs/varargs_2_s64.c: Likewise.
* gcc.target/aarch64/sve/pcs/varargs_2_s8.c: Likewise.
* gcc.target/aarch64/sve/pcs/varargs_2_u16.c: Likewise.
* gcc.target/aarch64/sve/pcs/varargs_2_u32.c: Likewise.
* gcc.target/aarch64/sve/pcs/varargs_2_u64.c: Likewise.
* gcc.target/aarch64/sve/pcs/varargs_2_u8.c: Likewise.
2020-04-09 Richard Biener <rguenther@suse.de> 2020-04-09 Richard Biener <rguenther@suse.de>
PR testsuite/93369 PR testsuite/93369
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -g" } */ /* { dg-options "-O -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <arm_sve.h> #include <arm_sve.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -fno-stack-clash-protection -g" } */ /* { dg-options "-O -fno-stack-clash-protection -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <arm_sve.h> #include <arm_sve.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -fno-stack-clash-protection -g" } */ /* { dg-options "-O -fno-stack-clash-protection -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <arm_sve.h> #include <arm_sve.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -fno-stack-clash-protection -g" } */ /* { dg-options "-O -fno-stack-clash-protection -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <arm_sve.h> #include <arm_sve.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -g" } */ /* { dg-options "-O -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
/* /*
** callee_pred: ** callee_pred:
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -msve-vector-bits=1024 -g" } */ /* { dg-options "-O -msve-vector-bits=1024 -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
/* /*
** callee_pred: ** callee_pred:
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -msve-vector-bits=128 -g" } */ /* { dg-options "-O -msve-vector-bits=128 -g" } */
/* { dg-final { check-function-bodies "**" "" { target { aarch64_little_endian && lp64 } } } } */ /* { dg-final { check-function-bodies "**" "" "" { target { aarch64_little_endian && lp64 } } } } */
/* /*
** callee_pred: ** callee_pred:
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -msve-vector-bits=2048 -g" } */ /* { dg-options "-O -msve-vector-bits=2048 -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
/* /*
** callee_pred: ** callee_pred:
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -msve-vector-bits=256 -g" } */ /* { dg-options "-O -msve-vector-bits=256 -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
/* /*
** callee_pred: ** callee_pred:
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -msve-vector-bits=512 -g" } */ /* { dg-options "-O -msve-vector-bits=512 -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
/* /*
** callee_pred: ** callee_pred:
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -g" } */ /* { dg-options "-O -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <arm_sve.h> #include <arm_sve.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -g" } */ /* { dg-options "-O -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <arm_sve.h> #include <arm_sve.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -g" } */ /* { dg-options "-O -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#define CALLEE(SUFFIX, TYPE) \ #define CALLEE(SUFFIX, TYPE) \
TYPE __attribute__((noipa)) \ TYPE __attribute__((noipa)) \
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -msve-vector-bits=1024 -g" } */ /* { dg-options "-O -msve-vector-bits=1024 -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#define CALLEE(SUFFIX, TYPE) \ #define CALLEE(SUFFIX, TYPE) \
TYPE __attribute__((noipa)) \ TYPE __attribute__((noipa)) \
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -msve-vector-bits=128 -g" } */ /* { dg-options "-O -msve-vector-bits=128 -g" } */
/* { dg-final { check-function-bodies "**" "" { target { aarch64_little_endian && lp64 } } } } */ /* { dg-final { check-function-bodies "**" "" "" { target { aarch64_little_endian && lp64 } } } } */
#define CALLEE(SUFFIX, TYPE) \ #define CALLEE(SUFFIX, TYPE) \
TYPE __attribute__((noipa)) \ TYPE __attribute__((noipa)) \
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -msve-vector-bits=2048 -g" } */ /* { dg-options "-O -msve-vector-bits=2048 -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#define CALLEE(SUFFIX, TYPE) \ #define CALLEE(SUFFIX, TYPE) \
TYPE __attribute__((noipa)) \ TYPE __attribute__((noipa)) \
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -msve-vector-bits=256 -g" } */ /* { dg-options "-O -msve-vector-bits=256 -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#define CALLEE(SUFFIX, TYPE) \ #define CALLEE(SUFFIX, TYPE) \
TYPE __attribute__((noipa)) \ TYPE __attribute__((noipa)) \
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -msve-vector-bits=512 -g" } */ /* { dg-options "-O -msve-vector-bits=512 -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#define CALLEE(SUFFIX, TYPE) \ #define CALLEE(SUFFIX, TYPE) \
TYPE __attribute__((noipa)) \ TYPE __attribute__((noipa)) \
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -g" } */ /* { dg-options "-O -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <arm_sve.h> #include <arm_sve.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -msve-vector-bits=1024 -g" } */ /* { dg-options "-O -msve-vector-bits=1024 -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <arm_sve.h> #include <arm_sve.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -msve-vector-bits=128 -g" } */ /* { dg-options "-O -msve-vector-bits=128 -g" } */
/* { dg-final { check-function-bodies "**" "" { target { aarch64_little_endian && lp64 } } } } */ /* { dg-final { check-function-bodies "**" "" "" { target { aarch64_little_endian && lp64 } } } } */
#include <arm_sve.h> #include <arm_sve.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -msve-vector-bits=2048 -g" } */ /* { dg-options "-O -msve-vector-bits=2048 -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <arm_sve.h> #include <arm_sve.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -msve-vector-bits=256 -g" } */ /* { dg-options "-O -msve-vector-bits=256 -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <arm_sve.h> #include <arm_sve.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -msve-vector-bits=512 -g" } */ /* { dg-options "-O -msve-vector-bits=512 -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <arm_sve.h> #include <arm_sve.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -g" } */ /* { dg-options "-O -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <stdint.h> #include <stdint.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -msve-vector-bits=1024 -g" } */ /* { dg-options "-O -msve-vector-bits=1024 -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <stdint.h> #include <stdint.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -msve-vector-bits=128 -g" } */ /* { dg-options "-O -msve-vector-bits=128 -g" } */
/* { dg-final { check-function-bodies "**" "" { target { aarch64_little_endian && lp64 } } } } */ /* { dg-final { check-function-bodies "**" "" "" { target { aarch64_little_endian && lp64 } } } } */
#include <stdint.h> #include <stdint.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -msve-vector-bits=2048 -g" } */ /* { dg-options "-O -msve-vector-bits=2048 -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <stdint.h> #include <stdint.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -msve-vector-bits=256 -g" } */ /* { dg-options "-O -msve-vector-bits=256 -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <stdint.h> #include <stdint.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -msve-vector-bits=512 -g" } */ /* { dg-options "-O -msve-vector-bits=512 -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <stdint.h> #include <stdint.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -mbig-endian -fno-shrink-wrap -fno-stack-clash-protection -g" } */ /* { dg-options "-O -mbig-endian -fno-shrink-wrap -fno-stack-clash-protection -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
void standard_callee (void); void standard_callee (void);
__attribute__((aarch64_vector_pcs)) void vpcs_callee (void); __attribute__((aarch64_vector_pcs)) void vpcs_callee (void);
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -mbig-endian -fshrink-wrap -fno-stack-clash-protection -g" } */ /* { dg-options "-O -mbig-endian -fshrink-wrap -fno-stack-clash-protection -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
void standard_callee (void); void standard_callee (void);
__attribute__((aarch64_vector_pcs)) void vpcs_callee (void); __attribute__((aarch64_vector_pcs)) void vpcs_callee (void);
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -mlittle-endian -fno-shrink-wrap -fno-stack-clash-protection -g" } */ /* { dg-options "-O -mlittle-endian -fno-shrink-wrap -fno-stack-clash-protection -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
void standard_callee (void); void standard_callee (void);
__attribute__((aarch64_vector_pcs)) void vpcs_callee (void); __attribute__((aarch64_vector_pcs)) void vpcs_callee (void);
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -mlittle-endian -fshrink-wrap -fno-stack-clash-protection -g" } */ /* { dg-options "-O -mlittle-endian -fshrink-wrap -fno-stack-clash-protection -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
void standard_callee (void); void standard_callee (void);
__attribute__((aarch64_vector_pcs)) void vpcs_callee (void); __attribute__((aarch64_vector_pcs)) void vpcs_callee (void);
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -g" } */ /* { dg-options "-O -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <arm_sve.h> #include <arm_sve.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -mbig-endian -fno-stack-clash-protection -g" } */ /* { dg-options "-O -mbig-endian -fno-stack-clash-protection -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
void standard_callee (__SVInt8_t *); void standard_callee (__SVInt8_t *);
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -mlittle-endian -fno-stack-clash-protection -g" } */ /* { dg-options "-O -mlittle-endian -fno-stack-clash-protection -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
void standard_callee (__SVInt8_t *); void standard_callee (__SVInt8_t *);
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -fshrink-wrap -fstack-clash-protection -msve-vector-bits=128 -g" } */ /* { dg-options "-O -fshrink-wrap -fstack-clash-protection -msve-vector-bits=128 -g" } */
/* { dg-final { check-function-bodies "**" "" { target { aarch64_little_endian && lp64 } } } } */ /* { dg-final { check-function-bodies "**" "" "" { target { aarch64_little_endian && lp64 } } } } */
#pragma GCC aarch64 "arm_sve.h" #pragma GCC aarch64 "arm_sve.h"
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -fno-stack-clash-protection -g" } */ /* { dg-options "-O2 -fno-stack-clash-protection -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <arm_sve.h> #include <arm_sve.h>
#include <stdarg.h> #include <stdarg.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -fno-stack-clash-protection -g" } */ /* { dg-options "-O2 -fno-stack-clash-protection -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <arm_sve.h> #include <arm_sve.h>
#include <stdarg.h> #include <stdarg.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -fno-stack-clash-protection -g" } */ /* { dg-options "-O2 -fno-stack-clash-protection -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <arm_sve.h> #include <arm_sve.h>
#include <stdarg.h> #include <stdarg.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -fno-stack-clash-protection -g" } */ /* { dg-options "-O2 -fno-stack-clash-protection -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <arm_sve.h> #include <arm_sve.h>
#include <stdarg.h> #include <stdarg.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -fno-stack-clash-protection -g" } */ /* { dg-options "-O2 -fno-stack-clash-protection -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <arm_sve.h> #include <arm_sve.h>
#include <stdarg.h> #include <stdarg.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -fno-stack-clash-protection -g" } */ /* { dg-options "-O2 -fno-stack-clash-protection -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <arm_sve.h> #include <arm_sve.h>
#include <stdarg.h> #include <stdarg.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -fno-stack-clash-protection -g" } */ /* { dg-options "-O2 -fno-stack-clash-protection -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <arm_sve.h> #include <arm_sve.h>
#include <stdarg.h> #include <stdarg.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -fno-stack-clash-protection -g" } */ /* { dg-options "-O2 -fno-stack-clash-protection -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <arm_sve.h> #include <arm_sve.h>
#include <stdarg.h> #include <stdarg.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -fno-stack-clash-protection -g" } */ /* { dg-options "-O2 -fno-stack-clash-protection -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <arm_sve.h> #include <arm_sve.h>
#include <stdarg.h> #include <stdarg.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -fno-stack-clash-protection -g" } */ /* { dg-options "-O2 -fno-stack-clash-protection -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <arm_sve.h> #include <arm_sve.h>
#include <stdarg.h> #include <stdarg.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -fno-stack-clash-protection -g" } */ /* { dg-options "-O2 -fno-stack-clash-protection -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <arm_sve.h> #include <arm_sve.h>
#include <stdarg.h> #include <stdarg.h>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -fno-stack-clash-protection -g" } */ /* { dg-options "-O2 -fno-stack-clash-protection -g" } */
/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
#include <arm_sve.h> #include <arm_sve.h>
#include <stdarg.h> #include <stdarg.h>
......
...@@ -617,7 +617,7 @@ proc check-function-bodies { args } { ...@@ -617,7 +617,7 @@ proc check-function-bodies { args } {
} }
if { [llength $args] >= 3 } { if { [llength $args] >= 3 } {
set required_flag [lindex $args 2] set required_flags [lindex $args 2]
upvar 2 dg-extra-tool-flags extra_tool_flags upvar 2 dg-extra-tool-flags extra_tool_flags
set flags $extra_tool_flags set flags $extra_tool_flags
...@@ -626,8 +626,18 @@ proc check-function-bodies { args } { ...@@ -626,8 +626,18 @@ proc check-function-bodies { args } {
if { [info exists torture_current_flags] } { if { [info exists torture_current_flags] } {
append flags " " $torture_current_flags append flags " " $torture_current_flags
} }
if { ![regexp " $required_flag " $flags] } { foreach required_flag $required_flags {
return switch -- $required_flag {
target -
xfail {
error "misplaced $required_flag in check-function-bodies"
}
}
}
foreach required_flag $required_flags {
if { ![regexp " $required_flag " $flags] } {
return
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment