Debian Codegraph @

gcc/testsuite/gcc.target/i386/movdir64b.c

raw
1 /* { dg-do run { target movdir } } */
2 /* { dg-options "-mmovdir64b -O2" } */
3
4 #include <x86intrin.h>
5 #include <string.h>
6
7 unsigned long long int src[8] = {1, 2, 3, 4, 5, 6, 7, 8};
8 unsigned long long int dest[8] __attribute__ ((aligned (64)))
9 = {-1, -1, -1, -1, -1, -1, -1, -1};
10
11 int
12 main ()
13 {
14 if (!__builtin_cpu_supports ("movdir64b"))
15 return 0;
16
17 _movdir64b (dest, src);
18
19 if (memcmp (dest, src, sizeof (dest)) != 0)
20 abort ();
21
22 return 0;
23 }