public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@suse.de>
To: Alan Modra <amodra@gmail.com>
Cc: binutils@sourceware.org
Subject: Re: x86: Do not dump DS/CS segment overrides for branch hints
Date: Wed, 2 Dec 2020 11:45:19 +0100	[thread overview]
Message-ID: <20201202104519.GB25881@zn.tnic> (raw)
In-Reply-To: <20201202071955.GJ22649@bubble.grove.modra.org>

On Wed, Dec 02, 2020 at 05:49:55PM +1030, Alan Modra wrote:
> i386-bsd  +FAIL: i386 branch

Ok, found the first one - that's a --target=i386-bsd build AFAICT.

The first failure I can trigger here is:

FAIL: gas/i386/align-branch-9

Debug output from the test run says:

...
regexp "^  1e:  39 c5                   cmp    %eax,%ebp$"
line   "  1e:   39 c5                   cmp    %eax,%ebp"
regexp "^  20:  70 62                   jo     84 <foo\+0x84>$"
line   "  20:   70 62                   jo     84 <.L_2>"
regexp_diff match failure

because the test has:

  cmp  %eax, %ebp
  jo  .L_2

it disassembles to

  1e:   39 c5                   cmp    %eax,%ebp
  20:   70 62                   jo     84 <.L_2>

but the .d file has

  1e:	39 c5                	cmp    %eax,%ebp
  20:	70 62                	jo     84 <foo\+0x84>

i.e., it has that local label .L_2 instead of the offset foo+0x84.

Now I've checked out master before my patch:

9f1212394fa2 (HEAD -> refs/heads/master, refs/remotes/origin/master, refs/remotes/origin/HEAD) Fix Value.format_string docu for static members argument
96fb90861a4e Don't delete the locator win info
632ee6fd822f x86: Do not dump DS/CS segment overrides for branch hints

<--- HERE

568cbddc710f gold: Convert x86-64 GOTPCRELX only if addend == -4

and it fails the same way.

So I'm thinking for this particular case, I should simply fix
align-branch-9.d to match the local label

	[0-9]+ <.L_2>

because we show local labels now in .o disassembly.

Yes?

> i386-darwin  +FAIL: i386 branch
> i386-darwin  +FAIL: x86-64 branch
> i386-msdos  +FAIL: i386 branch
> x86_64-w64-mingw32  +FAIL: x86-64 branch

I'll analyze the rest later.

Thx.

-- 
Regards/Gruss,
    Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg

  parent reply	other threads:[~2020-12-02 10:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-02  7:19 Alan Modra
2020-12-02  9:44 ` Borislav Petkov
2020-12-02 10:45 ` Borislav Petkov [this message]
2020-12-02 11:10   ` Borislav Petkov
2020-12-07 14:15     ` Maciej W. Rozycki
2020-12-07 22:16       ` Alan Modra
2020-12-07 22:38         ` Borislav Petkov
2020-12-11 23:12           ` Borislav Petkov
2020-12-13  3:35             ` Alan Modra
2020-12-13 11:56               ` Borislav Petkov

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=20201202104519.GB25881@zn.tnic \
    --to=bp@suse.de \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    /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).