Inter-compiler portability of asm between gdc and ldc2 (and dmd)

Cecil Ward cecil at cecilward.com
Fri Jul 17 03:34:14 UTC 2020


On Thursday, 16 July 2020 at 15:08:39 UTC, Iain Buclaw wrote:
> I am open to improving the syntax if that helps with 
> interoperability between GDC and LDC.
>
> https://issues.dlang.org/show_bug.cgi?id=20594

Some very interesting ideas brought up there, Iain. Good stuff. I 
would very much welcome some of those developments. Would it be 
possible to be possible to have multiple alternative syntaxes so 
we don’t have to deprecate anything just because of its age?

I must say I do like the power of the GCC/GDC asm binding 
interface / ‘glue’ system that connects the high level language 
to the asm. The notation is hard to understand in places though 
and your ideas provide a way to go even further and make big 
improvements in readability and learning curve. I keep having to 
reread the docs concerning returned / modified input registers 
and so on.

Idea. Perhaps someone could write an asm binding system notation 
-> english decoder, a tool that you could run to tell you what 
your asm binding interface definition is doing. Output in 
long-winded and explicit english and including things such as 
lists of possibilities for registers you are selecting or 
restricting an operand to bind to. I haven’t expressed myself 
very well here but I hope someone gets the drift.

Perhaps I should do binding definitions for every x86-64 
instruction. That would keep me busy.


More information about the Digitalmars-d mailing list