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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [i386/] [avx-vtestps-1.c] - Blame information for rev 691

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do run } */
2
/* { dg-require-effective-target avx } */
3
/* { dg-options "-O2 -mavx -DNEED_IEEE754_FLOAT" } */
4
/* { dg-warning "attribute ignored" "" { target default_packed } 150 } */
5
/* { dg-message " from " "include chain" { target default_packed } 0 } */
6
 
7
#include "avx-check.h"
8
 
9
static void
10
avx_test ()
11
{
12
    int i;
13
    union128 source1, source2;
14
    float s1[4] = {0, -5463, 86456, 0};
15
    float s2[4] = {0, -1223, 0,     0};
16
    int   d[1];
17
    int   e[1];
18
 
19
    source1.x = _mm_loadu_ps(s1);
20
    source2.x = _mm_loadu_ps(s2);
21
    d[0] = _mm_testz_ps(source1.x, source2.x);
22
 
23
    e[0] = 1;
24
    for (i = 0; i < 4; i++) {
25
        union ieee754_float u1, u2;
26
        u1.d = s1[i];
27
        u2.d = s2[i];
28
        if (u1.bits.sign && u2.bits.sign)
29
            e[0] = 0;
30
    }
31
 
32
    if (checkVi (d, e, 1))
33
      abort ();
34
}
35
 

powered by: WebSVN 2.1.0

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