Inter-compiler portability of asm between gdc and ldc2 (and dmd)
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Sat Oct 3 15:16:21 UTC 2020
On Saturday, 3 October 2020 at 14:21:25 UTC, Paulo Pinto wrote:
> The PC / Amiga way of
[…]
> Versus the clunky way of
>
> void myfunc (int data)
> {
> asm("weird Assembly pseudo syntax", data);
> }
Yes, yes, I totally agree! I haven't found the desire to write
much assembly in many years now as intrinsics are good enough for
me at this point, but when I did I would rather just write a
function in C, disassemble it and modify the code. It was more
pleasant and flexible than dealing with the "clunky way".
(Besides the built compiler-assembler didn't support the new SIMD
instructions I wanted to use anyway.)
What I meant was, why do they think that it difficult to
integrate non-AT&T syntax with the compiler? Makes no sense to me.
Also, assembly is usually defined with the intent to be easy to
parse. If you don't have to support macros (or other advanced
features) one can write the core parts of an assembly parser in a
weekend and having fun while doing it.
More information about the Digitalmars-d
mailing list