diff options
author | Matthew Malcomson <matthew.malcomson@arm.com> | 2020-03-11 14:06:21 +0000 |
---|---|---|
committer | Matthew Malcomson <matthew.malcomson@arm.com> | 2020-03-11 14:06:21 +0000 |
commit | d564c5e254df744a470a658690753dc193a4fa78 (patch) | |
tree | 19d081578a058fce5f9fb07e527218f896af87e0 /gcc | |
parent | e835226bab5b3575c8a55c048dcfed3d4cde5e0e (diff) | |
download | gcc-d564c5e254df744a470a658690753dc193a4fa78.zip gcc-d564c5e254df744a470a658690753dc193a4fa78.tar.gz gcc-d564c5e254df744a470a658690753dc193a4fa78.tar.bz2 |
[testsuite] Add @ lines to check-function-bodies fluff
When using `check-function-bodies`, the subroutine `parse_function_bodies` uses
the `fluff` regexp to remove uninteresting assembly lines.
Arm targets generate assembly with some lines prefixed by `@`, these lines are
left by this process.
As an example of some lines prefixed by `@': the assembly output from the
`stacktest1` function in "bfloat16_simd_3_1.c" is:
.align 2
.global stacktest1
.arch armv8.2-a
.syntax unified
.arm
.fpu neon-fp-armv8
.type stacktest1, %function
stacktest1:
@ args = 0, pretend = 0, frame = 8
@ frame_needed = 0, uses_anonymous_args = 0
@ link register save eliminated.
sub sp, sp, #8
add r3, sp, #6
vst1.16 {d0[0]}, [r3]
vld1.16 {d0[0]}, [r3]
add sp, sp, #8
@ sp needed
bx lr
.size stacktest1, .-stacktest1
It seems that previous uses of `check-function-bodies` in the arm backend have
avoided problems with such lines since they use the `...` regexp in each place
such fluff occurs.
I'm currently writing a patch that I'd like to match the entire function body,
so I'd like to remove such `@` lines automatically.
gcc/testsuite/ChangeLog:
2020-03-11 Matthew Malcomson <matthew.malcomson@arm.com>
* lib/scanasm.exp (parse_function_bodies): Lines starting with '@' also
counted as fluff.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/lib/scanasm.exp | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f43da84..0e8d77a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-03-11 Matthew Malcomson <matthew.malcomson@arm.com> + + * lib/scanasm.exp (parse_function_bodies): Lines starting with '@' also + counted as fluff. + 2020-03-11 Richard Wai <richard@annexi-strayline.com> * gnat.dg/subpools1.adb: New test. diff --git a/gcc/testsuite/lib/scanasm.exp b/gcc/testsuite/lib/scanasm.exp index 5ca58d4..f7d2773 100644 --- a/gcc/testsuite/lib/scanasm.exp +++ b/gcc/testsuite/lib/scanasm.exp @@ -569,7 +569,7 @@ proc parse_function_bodies { filename result } { set terminator {^\s*\.size} # Regexp for lines that aren't interesting. - set fluff {^\s*(?:\.|//)} + set fluff {^\s*(?:\.|//|@)} set fd [open $filename r] set in_function 0 |