Inline assembly question
Dibyendu Majumdar
d.majumdar at gmail.com
Mon Nov 13 20:26:50 UTC 2017
On Monday, 13 November 2017 at 18:40:42 UTC, Basile B. wrote:
> TBH I wonder if this is not worth a enhancement (or even a DIP)
> to have in asm blocks a special alias syntax...
>
> {
> asm
> {
> version(...)
> {
> alias First = RDI;
> alias Second = RSI;
> // ...
> }
> else
> {
> alias First = RCX;
> alias Second = RDX;
> }
> mov First, Second;
> call aFunctionWithOneParam; // called with 2nd parent
> param as 1st param
> }
> }
>
> since the whole mixin solution make the custom asm unreadable
> just because of this problem.
>
Hi, that would be nice but I won't be holding my breath for such
a feature to appear. I have a simple solution - I will just run
it past a C pre-processor or maybe a custom one.
Regards
Dibyendu
More information about the Digitalmars-d-learn
mailing list