This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: noreturn function attribute and ret asm instruction
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: Jim Wilson <wilson at tuliptree dot org>, Kristis Makris <kristis dot makris at asu dot edu>, <gcc-bugs at gcc dot gnu dot org>
- Date: Wed, 1 Oct 2003 03:26:28 -0400 (EDT)
- Subject: Re: noreturn function attribute and ret asm instruction
On Wed, 1 Oct 2003, Zack Weinberg wrote:
> Hans-Peter Nilsson <hp@bitrange.com> writes:
> > Though an attribute on the asm would be simpler syntax-wise,
>
> I dunno. Attribute handling is one of the hairiest parts of the
> syntax.
For variables and functions, but surely not for statement asms?
For the "stmt" rule, there's nothing between ')' and ';', so we
can't intrude on previous syntax.
> > Using an asm to terminate a function is common in kernel-like
> > code so the request seems reasonable. (But still not trivial to
> > implement, flow-wise.)
>
> It really is trivial at the RTL level - I know, I implemented it.
> (You just emit a BARRIER insn right after the ASM_OPERANDS insn.)
Ah, right you are. Cool. Good news. Maybe this would be a
nice beginner's project? Perhaps I can volunteer someone to
actually do it.
> It might be harder at the tree level; I'm not sure how noreturn is
> being represented in tree-ssa.
Bah! :-)
(Seriously, this will have to be considered before such a change.)
brgds, H-P