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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [powerpc/] [paired-2.c] - Blame information for rev 325

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

Line No. Rev Author Line
1 322 jeremybenn
/* { dg-do compile { target { powerpc-*-linux*paired* && ilp32 } } } */
2
/* { dg-options "-mpaired -ffinite-math-only" } */
3
 
4
/* Test PowerPC PAIRED extensions.  */
5
 
6
#include <paired.h>
7
#include <stdlib.h>
8
 
9
static float out[2] __attribute__ ((aligned (8)));
10
 
11
vector float b = { 3.0, 8.0 };
12
vector float c = { 3.0, 5.0 };
13
 
14
vector float a = { 0.0, 0.0 };
15
void
16
test_api ()
17
{
18
 
19
  if (paired_cmpu0_eq (b, c))
20
    {
21
      a = paired_sub (b, c);
22
      paired_stx (a, 0, out);
23
    }
24
 
25
  if ((out[1]) != 3.0)
26
    abort ();
27
}
28
 
29
int
30
main ()
31
{
32
  test_api ();
33
  return (0);
34
}
35
 

powered by: WebSVN 2.1.0

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