bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: x86_64-gnu 14.2.0 cross-compiler -O2 removes THREAD_SETMEM in glibc


From: Sergey Bugaev
Subject: Re: x86_64-gnu 14.2.0 cross-compiler -O2 removes THREAD_SETMEM in glibc sigreturn.c
Date: Sun, 24 Nov 2024 16:45:34 +0300

On Sun, Nov 24, 2024 at 3:58 PM Andreas Schwab <schwab@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

[Prev in Thread] Current Thread [Next in Thread]