This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]