Can we kill the D calling convention already?

Alex Rønne Petersen xtzgzorex at gmail.com
Tue Apr 24 11:30:42 PDT 2012


On 24-04-2012 19:54, Paulo Pinto wrote:
> This means that in the end we have the same ABI issues between
> D compilers, as in other languages I suppose, right?
>
> --
> Paulo
>
> On Tuesday, 24 April 2012 at 14:40:05 UTC, Iain Buclaw wrote:
>> On 24 April 2012 11:29, Alex Rønne Petersen <xtzgzorex at gmail.com> wrote:
>>> On 24-04-2012 11:42, Kagamin wrote:
>>>>
>>>> Speaking about GDC, you can't link to omf files directly - so there
>>>> shouldn't be any binary incompatibility.
>>>> If the assembler code is unportable across compilers, it's a
>>>> developer's
>>>> mistake or intention.
>>>
>>>
>>> The point is just that: Right now I can write assembly that will work on
>>> GDC, LDC, and DMD on non-Windows. It will not work for DMD on Windows.
>>> Something has to change here.
>>>
>>> You're missing the point if you think this is a "developer mistake".
>>>
>>
>> Is not just Windows, the DMD calling convention on Linux differs from
>> the system calling convention. For example, some of the naked
>> functions in std.math returning floating point values assumes caller
>> clean up. Where as the C calling convention is callee clean up.
>
>

Exactly. We can do better, and we really should.

-- 
- Alex


More information about the Digitalmars-d mailing list