public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Hans-Peter Nilsson <hp@axis.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] testsuite: Handle empty assembly lines in check-function-bodies
Date: Fri, 28 Apr 2023 16:49:04 -0600	[thread overview]
Message-ID: <88f0179b-4a59-cdfb-2d39-dc81e1b6ce7f@gmail.com> (raw)
In-Reply-To: <20230428155829.F20D120438@pchp3.se.axis.com>



On 4/28/23 09:58, Hans-Peter Nilsson via Gcc-patches wrote:
> Ok to commit?
> -- >8 --
> I tried to make use of check-function-bodies for cris-elf and was a
> bit surprised to see it failing.  There's a deliberate empty line
> after the filled delay slot of the return-function which was
> mishandled.  I thought "aha" and tried to add an empty line
> (containing just a "**" prefix) to the match, but that didn't help.
> While it was added as input from the function's assembly output
> to-be-matched like any other line, it couldn't be matched: I had to
> use "...", which works but is...distracting.
> 
> Some digging shows that an empty assembly line can't be deliberately
> matched because all matcher lines (lines starting with the prefix,
> the ubiquitous "**") are canonicalized by trimming leading
> whitespace (the "string trim" in check-function-bodies) and instead
> adding a leading TAB character, thus empty lines end up containing
> just a TAB.  For usability it's better to treat empty lines as fluff
> than to uglifying the test-case and the code to properly match them.
> Double-checking, no test-case tries to match an line containing just
> TAB (by providing an a line containing just "**\s*", i.e. zero or
> more whitespace characters).
> 
> 	* lib/scanasm.exp (parse_function_bodies): Set fluff to include
> 	empty lines (besides optionally leading whitespace).
OK
jeff

      reply	other threads:[~2023-04-28 22:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-28 15:58 Hans-Peter Nilsson
2023-04-28 22:49 ` Jeff Law [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=88f0179b-4a59-cdfb-2d39-dc81e1b6ce7f@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hp@axis.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).