Changeset 531 for trunk/lib


Ignore:
Timestamp:
Jul 22, 2010, 2:01:46 PM (9 years ago)
Author:
cameron
Message:

More cbzl fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/lib_simd.h

    r530 r531  
    9393#ifdef __GNUC__
    9494#define cfzl __builtin_ctzl
    95 #define cbzl __builtin_cfzl
     95#define cbzl __builtin_clzl
    9696#endif
    9797#ifdef _MSC_VER
     
    130130  v.vec = bits;
    131131#if LONG_BIT == 64
    132   if (v.elems[1] != 0) return 2*LONG_BIT + cbzl(v.elems[1]);
    133   else if (v.elems[0] != 0) return 3*LONG_BIT + cbzl(v.elems[0]);
     132  if (v.elems[1] != 0) return cbzl(v.elems[1]);
     133  else if (v.elems[0] != 0) return LONG_BIT + cbzl(v.elems[0]);
    134134#endif
    135135#if LONG_BIT < 64
Note: See TracChangeset for help on using the changeset viewer.