Hi Iain,
> ---- implementation/design
>
> As noted, case 1 remains "you have to edit the tests to prepend _?
> to symbols". Some tests in case 3 also need editing since the asm
> for a PIC-only platform can differ significantly from statically-
> linked.
>
> The strategy for automating a substantial part of the remainder
> is:
>
> - Allow the target to skip some lines of the input regex (for
> example, on Darwin we would skip .cfi_xxx since those insns
> are not used at present).
I've always wondered if those are actually necessary in the general
case. Judging from the aarch64 tests using check-function-bodies, only
24 out of almost 5000 actually check for them. I strongly suspect they
are only present on x86 because they are included on Linux/x86 in the
default assembler output.
> ---- TODO:
[...]
> 2. I wonder if we can make some cases more efficient by allowing
> more that one start key for the reg-exes, thus:
>
> /* { dg-final { check-function-bodies {"**" "*E"} "" "" { target { !
> *-*-darwin* } } {^\t?\.} } } */
> /* { dg-final { check-function-bodies {"**" "*M"} "" "" { target *-*-darwin*
> } {^\t?\.} } } */
>
> /*
> **foo:
> **...
> *E elf asm
> ** asm that's the same for both
> *M mach-o asm
> **...
> */
Nice. I wonder if we couldn't move this into check-function-bodies
itself. Besides, right now out of 8128 instances of
check-function-bodies the vast majority uses "**". Only 28 tests (a
subset of the nvptx ones) use "** " instead, which could easily be
changed to the common form. This way, the PREFIX argument could just go
in the tests themselves.
I also wonder if we could do away with the second arg (TERMINATOR)? It
is uses in exactly one test out of 8000+. This would further improve
readability.
> 3. I note that the 5th entry in the dg- command seems to be {^\t?\.} in
> the vast number of cases, perhaps this should be moved into the code?
This arg is only used rarely used (165 out of 8000+). I doubt this is
worth the effort.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University