Can I get a more in-depth guide about the inline assembler?

Era Scarecrow via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jun 1 18:06:40 PDT 2016


On Thursday, 2 June 2016 at 00:52:48 UTC, ZILtoid1991 wrote:
> On Thursday, 2 June 2016 at 00:51:15 UTC, ZILtoid1991 wrote:
>> I could get the code working with a bug after replacing 
>> pmulhuw with pmullw, but due to integer overflow I get a 
>> glitched image. I try to get around the fact that pmulhuw 
>> stores the high bits of the result either with multiplication 
>> or with bit shifting.
>
> I forgot to mention that I had to make pointers for the arrays 
> I used in order to be able to load them.

  I'm not familiar with the MMX instruction set, however glancing 
at the source again I notice the const registers are (of course) 
arrays. Those two where you're loading the constants you should 
probably create/convert the pointers as appropriate, or if they 
are an Enum value I think they will be dropped in and work fine. 
(the value being 0x0100_0100_0100_0100 and 0x0001_0001_0001_0001 
I believe, based on the short layout).

  Maybe you already had that solved or the compiler does something 
I don't know...


More information about the Digitalmars-d-learn mailing list