D ASM. Program fails
userABCabc123 via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Jan 22 15:02:21 PST 2016
On Friday, 22 January 2016 at 20:54:46 UTC, Iakh wrote:
> On Friday, 22 January 2016 at 17:27:35 UTC, userABCabc123 wrote:
>> [...]
>
> Thanks. It works.
> Buth shorter version too:
>
> asm
> {
> naked;
> push RBP;
> mov RBP, RSP;
> //sub RSP, 0x10;
> //movdqa dword ptr[RBP-0x10], XMM0;
> //movdqa XMM0, dword ptr[RBP-0x10];
> pmovmskb EAX, XMM0;
> mov RSP, RBP;
> pop RBP;
> ret;
> }
>
> Looks like the SIMD param is passed by SIMD reg
Right I must be blind. So you can even remove the prelude and the
prologue:
int pmovmskb2(byte16 v)
{
asm
{
naked;
pmovmskb EAX, XMM0;
ret;
}
}
More information about the Digitalmars-d-learn
mailing list