On Mon, Oct 17, 2011 at 1:36 AM, Andi Kleen <a...@firstfloor.org> wrote: > Ulrich Drepper <drep...@gmail.com> writes: >> >> It's not guaranteed to work in general. The problem to solve is that >> I know the function which is called is not clobbering any registers. >> If I leave it with the normal function call gcc has to spill >> registers. If I can hide the function call the generated code can be >> significantly better. > > iirc the new shrink wrapping support that just went in was to address > problems like that. Perhaps try a mainline compiler? > > But I agree that such an attribute would be useful. I would use it. > > At least the Linux kernel has a couple such cases ("nasty inline asm to > hide register clobbering in calls") and it's always ugly and hard to > maintain.
It would simply be an alternate ABI that makes all registers callee-saved? I suppose that would be not too hard to add. Richard. > -Andi > -- > a...@linux.intel.com -- Speaking for myself only >