On 19-06-2012 22:40, Manu wrote:
On 19 June 2012 21:19, Iain Buclaw <ibuc...@ubuntu.com
<mailto:ibuc...@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?

Not "Microsoft", but Intel syntax.

But GDC's inline assembly syntax is very different from DMD's: https://bitbucket.org/goshawk/gdc/wiki/UserDocumentation#!extended-assembler

--
Alex Rønne Petersen
a...@lycus.org
http://lycus.org

Reply via email to