[dmd-beta] dmd 1.063 and 2.048 beta

Walter Bright walter at digitalmars.com
Mon Aug 9 13:08:33 PDT 2010



Fawzi Mohamed wrote:
> On 9-ago-10, at 16:29, Fawzi Mohamed wrote:
>
>> [...]
>> Yes osx needs position independent code, I have tried to replace 
>> D_PIC with IS_PIC and add
>
> from experimenting with gdc and the atomic module I remember that I 
> had to completly free up ebx, as it holds the Position-independent 
> code base register.
> Even pushing & popping it would not satisfy the gdc compiler (not sure 
> why, maybe becuase signal handlers might need it?)
>
> In any case the abi is here
>
> http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/LowLevelABI/130-IA-32_Function_Calling_Conventions/IA32.html#//apple_ref/doc/uid/TP40002492-SW4 
>
>

The EBX must be preserved across function calls. That's the only 
restriction on its use. Whether within a function it is used as a base 
register or not is relevant only to that function, and is not part of 
the ABI.

dmd regenerates the base register contents as required.


More information about the dmd-beta mailing list