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

Iain Buclaw ibuclaw at gdcproject.org
Thu Jul 16 15:08:39 UTC 2020


On 15/07/2020 14:51, Cecil Ward via Digitalmars-d wrote:
> On Wednesday, 15 July 2020 at 08:17:06 UTC, kinke wrote:
>> On Wednesday, 15 July 2020 at 00:26:13 UTC, 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.
>>>
>>> It’s a shame about the huge syntactic differences between the asm syntax of GDC and LDC; both have their merits, but GDC seems to me to be the most powerful, although I don’t pretend to have studied LDC’s approach just glanced at it once very briefly.
>>
>> You're not up-to-date, LDC supports gdc/gcc-style inline asm since version 1.21.
> 
> Thank you Kinke! I am indeed very much out of date. That’s such excellent news, very welcome.

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

I am aware that one of the pet peeves of LDC adopting GDC-style was that it's perhaps not the most intuitive or aesthetic syntax (stems back to before D 1.0, has changed very little since its introduction).


More information about the Digitalmars-d mailing list