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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.misc-tests/] [i386-pf-sse-1.c] - Rev 714

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

/* Test that the correct data prefetch instructions are generated for i386
   variants that use SSE prefetch instructions.  */
 
/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
 
extern void exit (int);
 
char *msg = "howdy there";
 
void foo (char *p)
{
  __builtin_prefetch (p, 0, 0);
  __builtin_prefetch (p, 0, 1);
  __builtin_prefetch (p, 0, 2);
  __builtin_prefetch (p, 0, 3);
  __builtin_prefetch (p, 1, 0);
  __builtin_prefetch (p, 1, 1);
  __builtin_prefetch (p, 1, 2);
  __builtin_prefetch (p, 1, 3);
}
 
int main ()
{
  foo (msg);
  exit (0);
}
 
/* { dg-final { scan-assembler "prefetchnta" } } */
/* { dg-final { scan-assembler "prefetcht0" } } */
/* { dg-final { scan-assembler "prefetcht1" } } */
/* { dg-final { scan-assembler "prefetcht2" } } */
/* { dg-final { scan-assembler-not "prefetchw" } } */
 

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

powered by: WebSVN 2.1.0

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