System programming in D (Was: The God Language)

Iain Buclaw ibuclaw at ubuntu.com
Thu Jan 5 14:10:32 PST 2012


On 5 January 2012 22:01, Manu <turkeyman at gmail.com> wrote:
> On 5 January 2012 23:50, Iain Buclaw <ibuclaw at ubuntu.com> wrote:
>>
>> >   * inline asm supporting pseudo regs - As an extension of using the
>> > vector
>> > hardware, I'll need inline asm, and inline assembly without pseudo regs
>> > is
>> > pretty useless... it's mandatory that the compiler shedule the register
>> > allocation otherwise inline asm will most likely be an un-optimisation.
>> > If D
>> > had pseudo regs in its inline assembler, it would make it REALLY
>> > attractive
>> > for embedded systems programmers.
>> >     In lieu of that, I need to use opcode intrinsics instead, which I
>> > believe GDC exposes, but again, I'm done with C and versioning
>> > (#ifdef-ing)
>> > every compiler I intend to use. Why not standardise these things? At
>> > least
>> > put the intrinsics in the standard lib...
>> >
>>
>> This is only possible using GDC extended asm - which is really GCC asm
>> but encapsulated in {} instead of ();
>
>
> ... shit.
> I fear this is a VERY serious problem that needs discussion and resolution.
> Now we have 2 competing standards of asm syntax in D...
> We're exactly in the same place as VisualC and GCC now. Epic fail.

Why?

The reasoning behind is more so that you can write asm statements on
all architectures, not just x86. And with GDC being a frontend of GCC,
seems a natural thing to support (this has actually been in GDC since
2004, so I'm not sure why you should through all arms up about it
now).


-- 
Iain Buclaw

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


More information about the Digitalmars-d mailing list