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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [i386/] [bmi-blsmsk-1.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 && { ! ia32 } } } } */
2
/* { dg-options "-O2 -mbmi -fno-inline" } */
3
 
4
#include <x86intrin.h>
5
 
6
#include "bmi-check.h"
7
 
8
/*  Trick compiler in order not to generate target insn here. */
9
long long calc_blsmsk_u64 (long long src1, long long src2)
10
{
11
  return (src1-1) ^ (src2);
12
}
13
 
14
static void
15
bmi_test ()
16
{
17
  unsigned i;
18
  long long src = 0xfacec0ffeefacec0;
19
  long long res, res_ref;
20
 
21
  for (i=0; i<5; ++i) {
22
    src = i + src << i;
23
 
24
    res_ref = calc_blsmsk_u64 (src, src);
25
    res = __blsmsk_u64 (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.