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?


Ulrich Drepper <drepper@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.

-Andi
-- 
ak@linux.intel.com -- Speaking for myself only


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