On Tue, 2020-03-10 at 17:22 +0000, Matthew Malcomson wrote:
> 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-10  Matthew Malcomson  <matthew.malcom...@arm.com>
> 
>       * lib/scanasm.exp (parse_function_bodies): Lines starting with '@' also
>       counted as fluff.
I could see wanting to look at those lines in an ARM specific test.  For example
if there was a test that required a frame, but it was eliminated for some reason
or vice-versa.  Looking at the @ lines might make writing that kind of test
easier.

But I don't mind ACKing this now.  We could come back to the issue in the 
future.

WRT matching a whole function, I'd be leery of such tests in general, but there
may be times when they're appropriate.  I'll defer to the ARM maintainers on
whether or not they want such tests.

Jeff
> 

Reply via email to