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

            Bug ID: 94522
           Summary: Enhancement request: asm goto with outputs
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bp at alien8 dot de
  Target Milestone: ---

Hi all,

this came up recently on the kernel ML (see
https://lkml.kernel.org/r/20200402134051.gc9...@zn.tnic) and we thought it
might be a good idea to support it. In the same "fallthrough" fashion like
clang:

https://reviews.llvm.org/rG50cac248773

Micha (CCed) says that it should be relatively easy to do that in gcc too so in
case someone feels bored in the future... :)

Some other useful scenarios, courtesy of Linus, would be exception handling, to
avoid register pressure and in the alternatives patching we do in the kernel.
And in general, an output value from the asm goto("") in the fallthrough case
might come in handy.

Thx.

Reply via email to