Inline ASM in D
BCS
ao at pathlink.com
Sun Apr 27 13:37:21 PDT 2008
Reply to Sascha,
> Frits van Bommel wrote:
>
>> That would be why both Phobos and Tango have "uint bswap(uint)"
>> (Phobos in std.intrinsic, Tango in tango.core.BitManip). It's a
>> compiler intrinsic, meaning it should compile down to the 'bswap' asm
>> instruction on x86.
>>
> Nice, I've completely overlooked this module until now, thanks! :-)
>
> ...but nevertheless I'm missing a way to build inline asm functions by
> myself. There are *A LOT* intrinsics that I'm missing.
>
> LLAP,
> Sascha
one option would be to have a "mixin function" that would be used something
like this:
mixin(SomthingInASM!(op1.stringof,op2.stringof)));
it would expand to a sting with some static type checking if's and a block
of asm.
not clean but it would work.
More information about the Digitalmars-d
mailing list