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

Subversion Repositories openrisc

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

Go to most recent revision | 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
/* To fool compiler, so it not generate blsi here. */
9
int calc_blsi_u32 (int src1, int src2)
10
{
11
  return (-src1) & (src2);
12
}
13
 
14
static void
15
bmi_test()
16
{
17
  unsigned i;
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_blsi_u32 (src, src);
25
    res = __blsi_u32 (src);
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.