Inter-compiler portability of asm between gdc and ldc2 (and dmd)
Paulo Pinto
pjmlp at progtools.org
Sat Oct 3 08:51:58 UTC 2020
On Friday, 2 October 2020 at 22:01:53 UTC, Walter Bright wrote:
> On 7/14/2020 5:26 PM, Cecil Ward wrote:
>> I have a fair amount of code written in D which uses GDC’s
>> syntax for inline asm and currently it is therefore GDC-only.
>> It would like people to be able to build it alternatively
>> using LDC as well, and maybe even DMD.
>
> DMD's inline assembler syntax is what is used in Intel's CPU
> manuals. I sometimes wonder why other compilers don't do the
> same. It can be a bit wacky, but it's not that much code to
> implement and it makes following the code along with the
> manuals much easier.
It is also what I favour, the excuse those other compilers vendor
give is that the clunky syntax they use is easier to integrate
with the compiler backend for the optimiser's understanding of
what is going on.
Having studied compiler design as part of my major subjects, I
say that the inline Assembly parser could build that information
just as easily.
More information about the Digitalmars-d
mailing list