April 27, 2008 Re: Inline ASM in D | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Sascha Katzner | 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. | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply