Use q modifier for XMM portion of an YMM register?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all,

This seems to work:

#include <stdint.h>

typedef uint64_t u64x4_t __attribute__ ((vector_size (32)));

int main(void) {
  register u64x4_t abcd asm("ymm0");
  register u64x4_t efgh asm("ymm1");

  asm volatile ("vextractf128 $1, %1, %q0" : "=x" (abcd) : "x" (efgh));
}

$ gcc-snapshot.sh -O3 -mavx q-modifier.c
$ objdump -d -m i386:x86-64:intel a.out |less
...
c4 e3 7d 19 c8 01       vextractf128 xmm0,ymm1,0x1
...

If the approach is correct I could inform the clang project of the syntax 
(it's an internal compiler error in clang-3.9).

Regards,
Adam Warner




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux