This is the mail archive of the
mailing list for the GCC project.
Re: Merging gdc (GNU D Compiler) into gcc
On 4 October 2011 20:36, Andrew Pinski <email@example.com> wrote:
> On Tue, Oct 4, 2011 at 12:30 PM, Iain Buclaw <firstname.lastname@example.org> 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
> 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.
*(p < e ? p++ : p) = (c & 0x0f) + '0';