Message ID | 8cd89f8f-675a-4def-7e94-8c594c686afe@foss.arm.com |
---|---|
State | New |
Headers | show |
Series | [GCC/testsuite/ARM] Rework expectation for call to Armv8-M nonsecure function | expand |
On 15/11/17 17:04, Thomas Preudhomme wrote: > Hi, > > Testcase gcc.target/arm/cmse/cmse-14.c checks whether bar is called via > __gnu_cmse_nonsecure_call libcall and not via a direct call. However the > pattern is a bit surprising in that it needs to explicitely allow "by" > due to allowing anything before the 'b'. > > This patch rewrites the logic to look for b as a first non-whitespace > letter followed iby anything (to match bl and conditional branches) > followed by some spaces and then bar. > > ChangeLog entry is as follows: > > *** gcc/ChangeLog *** > > 2017-11-01 Thomas Preud'homme <thomas.preudhomme@arm.com> > > * gcc.target/arm/cmse/cmse-14.c: Change logic to match branch > instruction to bar. > > Testing: Test still passes for both Armv8-M Baseline and Mainline. > > Is this ok for trunk? > Ok. Thanks, Kyrill > Best regards, > > Thomas
diff --git a/gcc/testsuite/gcc.target/arm/cmse/cmse-14.c b/gcc/testsuite/gcc.target/arm/cmse/cmse-14.c index 701e9ee7e318a07278099548f9b7042a1fde1204..df1ea52bec533c36a738d7d3b2b2ff749b0f3713 100644 --- a/gcc/testsuite/gcc.target/arm/cmse/cmse-14.c +++ b/gcc/testsuite/gcc.target/arm/cmse/cmse-14.c @@ -10,4 +10,4 @@ int foo (void) } /* { dg-final { scan-assembler "bl\t__gnu_cmse_nonsecure_call" } } */ -/* { dg-final { scan-assembler-not "b\[^ y\n\]*\\s+bar" } } */ +/* { dg-final { scan-assembler-not "^(.*\\s)?bl?\[^\\s]*\\s+bar" } } */