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: libgcc: strange optimization


On Thu, Aug 4, 2011 at 11:50 AM, Andrew Haley <aph@redhat.com> wrote:
> On 08/04/2011 01:19 AM, Hans-Peter Nilsson wrote:
>
>> To make sure, it'd be nice if someone could perhaps grep an
>> entire GNU/Linux-or-other distribution including the kernel for
>> uses of asm-declared *local* registers that don't directly feed
>> into asms and not being the stack-pointer? ?Or can we get away
>> with just saying that local asm registers haven't had any other
>> documented meaning for the last seven years?
>
> It's the sort of thing that gets done in threaded interpreters,
> where you really need to keep a few pointers in registers and
> the interpreter itself is a very long function. ?gcc has always
> done a dreadful job of register allocation in such cases.

Sure, but what I have seen people use global register variables
for this (which means they get taken away from the register allocator).

Richard.

> Andrew.
>


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