Ignore:
Timestamp:
Jun 30, 2020, 1:21:39 PM (18 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast, new-ast-unique-expr
Children:
398e8e9, 9f7fff4
Parents:
bdce852
Message:

Fixed errors and warning with x86 build

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/bits/random.hfa

    rbdce852 r7812a7b5  
    44
    55//--------------------------------------------------
    6 typedef __uint128_t __lehmer64_state_t;
    7 static inline uint64_t __lehmer64( __lehmer64_state_t & state ) {
    8         state *= 0xda942042e4dd58b5;
    9         return state >> 64;
    10 }
     6#if defined(__SIZEOF_INT128__)
     7        typedef __uint128_t __lehmer64_state_t;
     8        static inline uint64_t __lehmer64( __lehmer64_state_t & state ) {
     9                state *= 0xda942042e4dd58b5;
     10                return state >> 64;
     11        }
    1112
    1213//--------------------------------------------------
    13 typedef uint64_t __wyhash64_state_t;
    14 static inline uint64_t __wyhash64( __wyhash64_state_t & state ) {
    15         state += 0x60bee2bee120fc15;
    16         __uint128_t tmp;
    17         tmp = (__uint128_t) state * 0xa3b195354a39b70d;
    18         uint64_t m1 = (tmp >> 64) ^ tmp;
    19         tmp = (__uint128_t)m1 * 0x1b03738712fad5c9;
    20         uint64_t m2 = (tmp >> 64) ^ tmp;
    21         return m2;
    22 }
     14        typedef uint64_t __wyhash64_state_t;
     15        static inline uint64_t __wyhash64( __wyhash64_state_t & state ) {
     16                state += 0x60bee2bee120fc15;
     17                __uint128_t tmp;
     18                tmp = (__uint128_t) state * 0xa3b195354a39b70d;
     19                uint64_t m1 = (tmp >> 64) ^ tmp;
     20                tmp = (__uint128_t)m1 * 0x1b03738712fad5c9;
     21                uint64_t m2 = (tmp >> 64) ^ tmp;
     22                return m2;
     23        }
     24#endif
    2325
    2426//--------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.