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-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
long long calc_andn_u64 (long long src1,
9
                         long long src2,
10
                         long long dummy)
11
{
12
  return (~src1 + dummy) & (src2);
13
}
14
 
15
static void
16
bmi_test()
17
{
18
  unsigned i;
19
 
20
  long long src = 0xfacec0ffeefacec0;
21
  long long res, res_ref;
22
 
23
  for (i=0; i<5; ++i) {
24
    src = i + src << i;
25
 
26
    res_ref = calc_andn_u64 (src, src+i, 0);
27
    res = __andn_u64 (src, src+i);
28
 
29
    if (res != res_ref)
30
      abort();
31
  }
32
}

powered by: WebSVN 2.1.0

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