OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [gcc.misc-tests/] [i386-pf-sse-1.c] - Blame information for rev 20

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
/* Test that the correct data prefetch instructions are generated for i386
2
   variants that use SSE prefetch instructions.  */
3
 
4
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
5
/* { dg-require-effective-target ilp32 } */
6
 
7
extern void exit (int);
8
 
9
char *msg = "howdy there";
10
 
11
void foo (char *p)
12
{
13
  __builtin_prefetch (p, 0, 0);
14
  __builtin_prefetch (p, 0, 1);
15
  __builtin_prefetch (p, 0, 2);
16
  __builtin_prefetch (p, 0, 3);
17
  __builtin_prefetch (p, 1, 0);
18
  __builtin_prefetch (p, 1, 1);
19
  __builtin_prefetch (p, 1, 2);
20
  __builtin_prefetch (p, 1, 3);
21
}
22
 
23
int main ()
24
{
25
  foo (msg);
26
  exit (0);
27
}
28
 
29
/* { dg-final { scan-assembler "prefetchnta" } } */
30
/* { dg-final { scan-assembler "prefetcht0" } } */
31
/* { dg-final { scan-assembler "prefetcht1" } } */
32
/* { dg-final { scan-assembler "prefetcht2" } } */
33
/* { dg-final { scan-assembler-not "prefetchw" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.