[py-dev] error building greenlets

Bob Ippolito bob at redivi.com
Tue Aug 30 22:55:29 CEST 2005


On Aug 29, 2005, at 2:53 AM, Armin Rigo wrote:

> Hi Alain & Bob,
>
> On Sun, Aug 28, 2005 at 03:08:56PM +0200, Alain Poirier wrote:
>
>> Hmm, I don't see why "ebx" in the clobbered is essential for a  
>> code compiled
>> without -fPIC ?
>>
>
> I believe that 'ebx' is supposed to be a callee-saved register  
> (like 'esi'
> and 'edi') in the non-PIC compilation modes.
>
> I have no clue about the PPC's 'r31' in non-PIC mode.
>
> Now maybe we can just forget about non-PIC modes for the greenlet
> extension module, with big warnings that this code needs to get the
> 'ebx' again if it is used in projects that are not compiled in this
> mode, like Stackless (where it comes from).

On OS X, non-PIC is rarely ever used and wasn't supported at all  
until relatively recently (Mac OS X 10.3 / gcc 3.3, IIRC).  I  
wouldn't worry about it.  Even if it should be saved, a sane compiler  
simply isn't going to use a reserved register for that little chunk  
of code where there's so many free GPRs to choose from.

It's especially unimportant for the greenlet extension module, of  
course, because you'd have to compile it statically into Python with - 
mdynamic-no-pic in order for it to matter.

-bob




More information about the Pytest-dev mailing list