[phobos] 64-bit

Walter Bright walter at digitalmars.com
Wed Jun 30 21:39:39 PDT 2010



Sean Kelly wrote:
>
>
> What about the ABI changes for 64-bit?  Will function calls simply switch to stuffing the first arg into RAX instead of EAX and continue as-is?  Or is it too early to say?  I know the C calling convention is significantly different.
>
>   

I intend to match the C 64 bit ABI. But that shouldn't affect D source 
code other than inline asm. The only problems D source code should have are:

1. failure to account for changes in size_t and pointers
2. use of int and unsigned as indices for arrays that might get large
3. inline assembler (of course)
4. C header differences and differences in the C runtime library

If someone wants to get a head start on this, I'd start by reviewing the 
D files that interface with C, such as core.stdc.* and core.sys.* The 
system structs like _iobuf are surely different.


More information about the phobos mailing list