Changeset 414 for trunk


Ignore:
Timestamp:
Jun 16, 2010, 1:34:48 PM (9 years ago)
Author:
cameron
Message:

Library fixes

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/lib_simd.h

    r405 r414  
    1515#include <sys/types.h>
    1616#include <limits.h>
     17
     18#ifndef LONG_BIT
     19#if ULONG_MAX == 0xFFFFFFFF
     20#define LONG_BIT 32
     21#endif
     22#if ULONG_MAX == 0xFFFFFFFFFFFFFFFF
     23#define LONG_BIT 64
     24#endif
     25#endif
    1726
    1827#if (defined(__i386) || defined(__x86_64))
  • trunk/lib/sse_simd.h

    r404 r414  
    2020#define BYTE_ORDER LITTLE_ENDIAN
    2121#endif
    22 #include <limits.h>
    23 #ifndef LONG_BIT
    24 #define LONG_BIT (8* sizeof(unsigned long))
    25 #endif
     22
    2623#include <emmintrin.h>
    2724#ifdef USE_LDDQU
     
    4340
    4441/*  Specific constants. */
    45 #define simd_himask_2 _mm_set1_epi8(0xAA)
    46 #define simd_himask_4 _mm_set1_epi8(0xCC)
    47 #define simd_himask_8 _mm_set1_epi8(0xF0)
     42#define simd_himask_2 _mm_set1_epi32(0xAAAAAAAA)
     43#define simd_himask_4 _mm_set1_epi32(0xCCCCCCCC)
     44#define simd_himask_8 _mm_set1_epi32(0xF0F0F0F0)
    4845/* Little-endian */
    49 #define simd_himask_16 _mm_set1_epi16(0xFF00)
     46#define simd_himask_16 _mm_set1_epi32(0xFF00FF00)
    5047#define simd_himask_32 _mm_set1_epi32(0xFFFF0000)
    5148#define simd_himask_64 _mm_set_epi32(-1,0,-1,0)
Note: See TracChangeset for help on using the changeset viewer.