public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Use q modifier for XMM portion of an YMM register?
@ 2016-09-01  8:11 Adam Warner
  0 siblings, 0 replies; only message in thread
From: Adam Warner @ 2016-09-01  8:11 UTC (permalink / raw)
  To: gcc-help

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-09-01  8:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-01  8:11 Use q modifier for XMM portion of an YMM register? Adam Warner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).