This is the mail archive of the gcc@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: asm in inline function invalidating function attributes?


On Mon, Oct 17, 2011 at 02:57, Richard Guenther
<richard.guenther@gmail.com> > It would simply be an alternate ABI
that makes all registers callee-saved?
> I suppose that would be not too hard to add.

That would be great.  There are quite a few interfaces which have a
trivial normal case and only in special situations you need something
more.  These interfaces could be translated into:

retval fct(sometype arg) { return cond ? somevalue : complexfct(); }

These would be candidates for this new ABI.  The compiler might have
to do minimal spilling to implement the 'cond' expression but the new
ABI would be used unwise if this is expensive.

Note that I would want registers used for passing parameters to also
be preserved (except, of course, when they are needed for the return
value).  This proved really useful in the kernel syscall interface
which behaves like that.


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