No mixin inside asm blocks

Philippe Sigaud philippe.sigaud at gmail.com
Wed Jan 30 11:08:26 PST 2013


On Wed, Jan 30, 2013 at 4:01 PM, Ali Çehreli <acehreli at yahoo.com> wrote:
> A friend of mine is trying to figure out the D equivalent of using macros
> with asm blocks in C:
>
> #define NEXT() __asm__("jmp *%0"::"r"((++ip)->jmp)); goto *ip->jmp
>
> D's asm blocks are very restrictive: mixins are not allowed. What do you do
> in D?

Is it possible to enclose an asm statement into a mixin?

mixin("
asm {

....

code to include

}");


More information about the Digitalmars-d-learn mailing list