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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [vmx/] [pr27842.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
#include <altivec.h>
2
 
3
extern void abort (void);
4
extern int memcmp (const void *, const void *, __SIZE_TYPE__);
5
 
6
void test (vector float *p, int n)
7
{
8
  int i;
9
  for (i = 0; i < n; i++)
10
    p[i] = vec_abs (p[i]);
11
}
12
 
13
int
14
main (void)
15
{
16
  vector float p = (vector float){ 0.5, 0.5, 0.5, 0.5 };
17
  vector float q = p;
18
 
19
  test (&p, 1);
20
 
21
  if (memcmp (&p, &q, sizeof (p)))
22
    abort ();
23
 
24
  return 0;
25
}
26
 

powered by: WebSVN 2.1.0

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