public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug inline-asm/98096] New: Inconsistent operand numbering for asm goto with in-out operands
@ 2020-12-02 13:43 jwjagersma at gmail dot com
  2020-12-02 23:37 ` [Bug inline-asm/98096] " pinskia at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: jwjagersma at gmail dot com @ 2020-12-02 13:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98096

            Bug ID: 98096
           Summary: Inconsistent operand numbering for asm goto with
                    in-out operands
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: inline-asm
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jwjagersma at gmail dot com
  Target Milestone: ---

For the following code:

    asm goto ("# %0 %1 %2" : "+r" (i) ::: jmp);

Two registers are printed before the label name, because the in-out operand is
split internally.  This is somewhat surprising from a user perspective.

But then:

    asm goto ("# %l[jmp]" : "+r" (i) ::: jmp);

Produces an error: '%l' operand isn't a label.

So label operands are numbered after the in-out operand is split, but %l is
evaluated without this split taken into account.  Docs suggest it should be
possible to use asm goto with both in-outs and %l operands simultaneously.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-01-05 17:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-02 13:43 [Bug inline-asm/98096] New: Inconsistent operand numbering for asm goto with in-out operands jwjagersma at gmail dot com
2020-12-02 23:37 ` [Bug inline-asm/98096] " pinskia at gcc dot gnu.org
2021-02-16 15:30 ` cvs-commit at gcc dot gnu.org
2021-09-14  7:48 ` pinskia at gcc dot gnu.org
2021-12-10  1:46 ` pinskia at gcc dot gnu.org
2021-12-10 23:33 ` ndesaulniers at google dot com
2021-12-11  0:13 ` pinskia at gcc dot gnu.org
2022-01-05 17:50 ` foom at fuhm dot net
2022-01-05 17:54 ` jakub at gcc dot gnu.org

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).