GDC review process.

Manu turkeyman at gmail.com
Tue Jun 19 13:40:41 PDT 2012


On 19 June 2012 21:19, Iain Buclaw <ibuclaw at ubuntu.com> wrote:

> 1) D Inline Asm and naked function support is raising far too many alarm
> bells. So would just be easier to remove it and avoid all the other
> comments on why we need middle-end and backend headers in gdc.
>

Inline assembly has been relatively useless in GCC for years. Inline asm
interferes with the optimisers ability to do a good job, which basically
makes use of inline assembly self-defeating.
The only time I ever need to use inline-asm is to interface an arch feature
that has no API. As long as there are intrinsics for all the opcodes one
might want, then it's better to use them.

There are 2 operations that spring to mind that typically don't have
intrinsics, or high level API's, which I always use asm to interface; the
fine-grain manual manipulation of the flags register on PPC (ie, the '.'
suite of opcodes), and conditional execution opcodes on ARM. Neither of
these have high level expressions, and they are both relatively important.
That said, as stated above, if use of this stuff is for performance, then
using an inline-asm block will ruin the surrounding code anyway, so I
almost always find I'm required to write the entire function in asm to
achieve the expected result...

I see no major loss to removing the inline assembler.
I would like to know what the issue is though? Why are you compelled to
remove it?
I thought GCC optionally supported the microsoft asm syntax instead, which
should make it syntactically consistent with D?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120619/b803f7b7/attachment.html>


More information about the Digitalmars-d mailing list