Merging gdc (GNU D Compiler) into gcc

Iain Buclaw ibuclaw@ubuntu.com
Tue Oct 4 20:13:00 GMT 2011


On 4 October 2011 20:36, Andrew Pinski <pinskia@gmail.com> wrote:
> On Tue, Oct 4, 2011 at 12:30 PM, Iain Buclaw <ibuclaw@ubuntu.com> wrote:
>> These patches address two areas of the D language:
>> 1) D calling convention.
>> 2) Naked functions on i386 and x86_64
>>
>> Some work would need to be done on naked functions at least first so
>> that changes required are only to gcc/config. I would be grateful if I
>> could get pointed in the right direction for implementing naked as a
>> function attribute for i386 so all frontends could benefit.
>
> Does D really require a new calling convention?  Also does it really
> require naked support?  I think naked support is a bad idea and people
> who require naked support should be writing an assembly function
> wrapper.
>
> Thanks,
> Andrew Pinski
>

Naked functions are part of the D spec, and I would have to remove a
few areas of the D runtime library if they were to go (I may get a
number emails from D users too asking where it has gone).

The D calling convention is one thing I can cope just fine without. It
is needed more for use with some naked functions in the D runtime
library.  The major quirk of the D ABI really is that routines will
return floating point return values on the FPU stack, and expects this
to be cleaned off by the caller, even if they are not used. I can
instead fix the D runtime library if it is that much of a problem.

Regards
-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';



More information about the Gcc mailing list