LCD inline assembly expressions

kinke noone at nowhere.com
Sun Dec 23 12:54:01 UTC 2018


On Sunday, 23 December 2018 at 01:27:40 UTC, NaN wrote:
> int4 _mm_cmpgt_epi32(int4 a, int4 b) {
>   return __asm!int4("pcmpgtd $1,$0", "=&r,r,r", a, b);
> }

This is a working variant (`r` is a GP register, `x` a vector 
register for x86, see 
https://llvm.org/docs/LangRef.html#supported-constraint-code-list):

int4 _mm_cmpgt_epi32(int4 a, int4 b) {
   int4 r = void;
   __asm("pcmpgtd $1,$0; movdqa $0,$2", "x,x,*m", a, b, &r);
   return r;
}


More information about the digitalmars-d-ldc mailing list