• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 // Set up the 256-bit shadow memory test, by defining the
3 // required vector-copy function, and then including the
4 // template.
5 
6 #define VECTOR_BYTES 32
7 
8 static __attribute__((noinline))
vector_copy(void * dst,void * src)9 void vector_copy ( void* dst, void* src )
10 {
11   /* Note: Verions of GCC through 4.8.1 do not allow "ymm7" in the
12      clobber list. (See http://stackoverflow.com/a/15767111/768469).
13      Simulate it with "xmm7". */
14   __asm__ __volatile__(
15      "vmovupd (%1), %%ymm7 ; vmovupd %%ymm7, (%0)"
16      : /*OUT*/ : /*IN*/ "r"(dst), "r"(src) : "memory","xmm7"
17   );
18 }
19 
20 // Include the test body, which refers to the above function
21 #include "../common/sh-mem-vec128.tmpl.c"
22