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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [vmx/] [bug-1.c] - Rev 826

Compare with Previous | Blame | View Log

#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
#include <altivec.h>
 
#define NPAGES 20
#define NSKIP 10
static vector float big[NPAGES*4096/16] = { {1,1,1,1} };
/* NPAGES pages worth.  */
 
static int failed;
 
static void f(vector float *p)
{
  int i = 1;
  p = (vector float *)(((ptrdiff_t)p + 4095) & ~4095);
 
  i += NSKIP;
  p += NSKIP*4096/16;
 
  while (i < NPAGES)
    {
      if (!vec_all_eq(*p,((vector float){0,0,0,0})))
	{
	  printf("*p isn't zero at 0x%p, page %d\n", p, i);
	  failed++;
	}
      i++;
      p += 4096/16;
    }
}
 
int main(void)
{
  f(big);
  if (failed)
    abort ();
  return 0;
}
 

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.