public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Petr Tesarik <ptesarik@suse.cz>
Cc: gcc@gcc.gnu.org
Subject: Re: Branch instructions that depend on target distance
Date: Mon, 24 Feb 2020 11:51:00 -0000	[thread overview]
Message-ID: <mvmv9nww6dd.fsf@suse.de> (raw)
In-Reply-To: <20200224124149.08bd18ac@ezekiel.suse.cz> (Petr Tesarik's message	of "Mon, 24 Feb 2020 12:41:49 +0100")

On Feb 24 2020, Petr Tesarik wrote:

> On Mon, 24 Feb 2020 12:29:40 +0100
> Andreas Schwab <schwab@suse.de> wrote:
>
>> On Feb 24 2020, Petr Tesarik wrote:
>> 
>> > This works great ... until there's some inline asm() statement, for
>> > which gcc cannot keep track of the length attribute, so it is probably
>> > taken as zero.  
>> 
>> GCC computes it by counting the number of asm insns.  You can use
>> ADJUST_INSN_LENGTH to adjust this as needed.
>
> Hmm, that's interesting, but does it work for inline asm() statements?

Yes, for a suitable definition of work.

> The argument is essentially a free-form string (with some
> substitution), and the compiler cannot know how many bytes they occupy.

That's why ADJUST_INSN_LENGTH can adjust it.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

  reply	other threads:[~2020-02-24 11:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-24 11:05 Petr Tesarik
2020-02-24 11:14 ` Jozef Lawrynowicz
2020-02-24 11:36   ` Petr Tesarik
2020-02-24 15:12     ` Jeff Law
2020-02-24 11:29 ` Andreas Schwab
2020-02-24 11:41   ` Petr Tesarik
2020-02-24 11:51     ` Andreas Schwab [this message]
2020-02-24 12:03       ` Alexander Monakov
2020-02-24 12:24         ` Julian Brown
2020-02-24 12:32         ` Petr Tesarik
2020-02-24 11:43 ` Andrew Stubbs

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=mvmv9nww6dd.fsf@suse.de \
    --to=schwab@suse.de \
    --cc=gcc@gcc.gnu.org \
    --cc=ptesarik@suse.cz \
    /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).