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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [i386/] [bmi-blsr-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
int calc_blsr_u32 (int src1, int src2)
9
{
10
  return (src1-1) & (src2);
11
}
12
 
13
static void
14
bmi_test ()
15
{
16
  unsigned i;
17
  int src = 0xfacec0ff;
18
  int res, res_ref;
19
 
20
  for (i=0; i<5; ++i) {
21
    src = i + src << i;
22
 
23
    res_ref = calc_blsr_u32 (src, src);
24
    res = __blsr_u32 (src);
25
 
26
    if (res != res_ref)
27
      abort();
28
  }
29
}

powered by: WebSVN 2.1.0

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