Inter-compiler portability of asm between gdc and ldc2 (and dmd)
Cecil Ward
cecil at cecilward.com
Fri Jul 17 21:51:48 UTC 2020
On Friday, 17 July 2020 at 21:03:46 UTC, Iain Buclaw wrote:
>
>
> On 17/07/2020 05:14, Cecil Ward via Digitalmars-d wrote:
>> [...]
>
> There's nothing magical going on in order to resolve symbolic
> names. Each output, input and label operand has an index value
> from 0 to N, and you just need to replace "%[symbol]" with "%3".
>
> https://github.com/gcc-mirror/gcc/blob/f1b6e46c417224887c2f21baa6d4c538a25fe9fb/gcc/stmt.c#L528-L603 https://github.com/gcc-mirror/gcc/blob/f1b6e46c417224887c2f21baa6d4c538a25fe9fb/gcc/stmt.c#L605-L663
>
> This could even be done in the semantic pass of GccAsmStatement
> (dmd/iasmgcc.d), so no need for LDC to duplicate this locally
> (plus, you are in the safe land of D to do the required string
> manipulation).
Many thanks Iain, that’s good of you. Your work is much
appreciated as always.
More information about the Digitalmars-d
mailing list