OSDN Git Service

* g77.dg/bprob/bprob.exp: Disable test on arm-elf configs.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.misc-tests / i386-pf-athlon-1.c
1 /* Test that the correct data prefetch instructions are generated for i386
2    variants that use 3DNow! prefetchw or SSE prefetch instructions with
3    locality hints.  */
4
5 /* { dg-do compile { target i?86-*-* } } */
6
7 char *msg = "howdy there";
8
9 void foo (char *p)
10 {
11   __builtin_prefetch (p, 0, 0);
12   __builtin_prefetch (p, 0, 1);
13   __builtin_prefetch (p, 0, 2);
14   __builtin_prefetch (p, 0, 3);
15   __builtin_prefetch (p, 1, 0);
16   __builtin_prefetch (p, 1, 1);
17   __builtin_prefetch (p, 1, 2);
18   __builtin_prefetch (p, 1, 3);
19 }
20
21 int main ()
22 {
23   foo (msg);
24   exit (0);
25 }
26
27 /* { dg-final { scan-assembler "prefetchw" } } */
28 /* { dg-final { scan-assembler "prefetchnta" } } */
29 /* { dg-final { scan-assembler "prefetcht" } } */