[PATCH] [RFC] PR target/52813 and target/11807
Segher Boessenkool
segher@kernel.crashing.org
Fri Jan 11 12:26:00 GMT 2019
On Thu, Jan 10, 2019 at 09:56:28PM +0000, Richard Sandiford wrote:
> Jakub Jelinek <jakub@redhat.com> writes:
> > On Thu, Jan 10, 2019 at 09:23:27PM +0000, Richard Sandiford wrote:
> >> > "noreturn"... What would that mean, *exactly*? It cannot execute any
> >> > code the compiler can see, so such asm is better off as real asm anyway
> >> > (not inline asm).
> >>
> >> "Exactly" is a strong word, and this wasn't my proposal, but...
> >> I think it would act like a noreturn call to an unknown function.
> >> Output operands wouldn't make sense, and arguably clobbers wouldn't
> >> either.
> >
> > "noreturn" asm can be done already now, just use
> > asm volatile ("..." ...);
> > __builtin_unreachable ();
> >
> > I think there is no need to add a new syntax for that.
Ah yes, the volatile makes this work. Cool. And as Richard says such
asm shouldn't have outputs anyway, so it will always be volatile.
> ISTR the point was that the PowerPC ABI places requirements on functions
> with noreturn calls
I don't think any of our ABIs do that? Is this about the back chain?
> and the attribute would help GCC do the right thing
> in those circumstances. So "noreturn" would imply a call that doesn't
> return, rather than just an infinite loop.
Segher
More information about the Gcc-patches
mailing list