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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vmx/] [3a-05.c] - Blame information for rev 774

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

Line No. Rev Author Line
1 689 jeremybenn
#include "harness.h"
2
 
3
/* Small expression involving non-overloaded specific vector intrinsics.  */
4
 
5
vector float
6
f(vector float a, vector float b, vector float c)
7
{
8
  vector float q = vec_expte(a);
9
  vector float r = vec_vsubfp(c, q);
10
  vector float s = vec_re(b);
11
  vector float t = vec_nmsub(s, c, r);
12
  return t;
13
}
14
 
15
static void test()
16
{
17
  check(vec_all_gt(f(((vector float){2,3,5,7}),
18
                     ((vector float){11,13,17,19}),
19
                     ((vector float){23,29,31,37})),
20
                   ((vector float){16.90, 18.76, -2.83, -92.95}))
21
        && vec_all_lt(f(((vector float){2,3,5,7}),
22
                     ((vector float){11,13,17,19}),
23
                     ((vector float){23,29,31,37})),
24
                   ((vector float){16.91, 18.77, -2.82, -92.94})),
25
        "f");
26
}

powered by: WebSVN 2.1.0

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