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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [simd-3.c] - Blame information for rev 715

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

Line No. Rev Author Line
1 688 jeremybenn
#include <float.h>
2
 
3
/* If double is not wider than float, we probably don't have DFmode,
4
   or at least it's not as wide as double.  */
5
#if DBL_MANT_DIG > FLT_MANT_DIG
6
typedef double floatvect2 __attribute__((vector_size (16)));
7
 
8
typedef union
9
{
10
    floatvect2 vector;
11
    double f[2];
12
}resfloatvect2;
13
 
14
void tempf(double *x, double *y)
15
{
16
        floatvect2 temp={x[0],x[1]};
17
        floatvect2 temp1={y[0],y[1]};
18
        resfloatvect2 temp2;
19
        temp2.vector=temp+temp1;
20
        x[0]=temp2.f[0];
21
        x[1]=temp2.f[1];
22
}
23
#endif

powered by: WebSVN 2.1.0

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