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

kinke noone at nowhere.com
Fri Jul 17 00:38:23 UTC 2020


On Thursday, 16 July 2020 at 23:06:24 UTC, Cecil Ward wrote:
> The serious problem though is the error
>     "Error: symbolic names for operands in GCC-style assembly 
> are not supported yet"
> I use symbolic names for registers everywhere, for readability 
> and for order-independence. So that means I am dead.

Or hopefully motivated enough to open a PR with a little 
extension to [1] - all that should be needed from the LDC side is 
replacing all occurrences of the symbolic names in the template 
string by their according operand index (LLVM has no implicit 
support for these symbolic names). And of course getting rid of 
the error msg in [2].

[1] 
https://github.com/ldc-developers/ldc/blob/424064438ec7f3ab202da982227e95660eca7c3e/gen/asm-gcc.cpp#L24-L53
[2] 
https://github.com/ldc-developers/ldc/blob/424064438ec7f3ab202da982227e95660eca7c3e/gen/asm-gcc.cpp#L186-L194


More information about the Digitalmars-d mailing list