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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [i386/] [bmi-andn-2.c] - Blame information for rev 691

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do run { target { bmi } } } */
2
/* { dg-options "-O2 -mbmi -fno-inline" } */
3
 
4
#include <x86intrin.h>
5
 
6
#include "bmi-check.h"
7
 
8
long long calc_andn_u32 (int src1, int src2, int dummy)
9
{
10
  return (~src1+dummy) & (src2);
11
}
12
 
13
static void
14
bmi_test()
15
{
16
  unsigned i;
17
 
18
  int src = 0xfacec0ff;
19
  int res, res_ref;
20
 
21
  for (i=0; i<5; ++i) {
22
    src = i + src << i;
23
 
24
    res_ref = calc_andn_u32 (src, src+i, 0);
25
    res = __andn_u32 (src, src+i);
26
 
27
    if (res != res_ref)
28
      abort();
29
  }
30
}

powered by: WebSVN 2.1.0

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