On Sun, Nov 24, 2024 at 3:58 PM Andreas Schwab <sch...@linux-m68k.org> wrote:
> > https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#Goto-Labels
> >
> > “
> > GCC assumes that asm execution falls through to the next statement (if
> > this is not the case, consider using the __builtin_unreachable intrinsic
> > after the asm statement)
> > ”
> >
> > so it's the documented way to make it so, but apparently it does more
> > than this and affects the fs-segmented store.
>
> This is only about asm goto.

So are you saying that we always must mark any asm statement that
might transfer control somewhere else w/o returning as 'asm goto',
even if we don't actually need to jump to any of the C-level labels?

How would I even write something like that at the syntax level? asm
goto ("blah" :::: ); results in "error: expected identifier before ‘)’
token". Do I need to make up a label that I never actually use just to
put something there? If I do that, will GCC assume that the asm
statement only ever jumps to that dummy label (as opposed to jumping
out)?

Thanks,
Sergey

Reply via email to