Changeset 628 for trunk/lib


Ignore:
Timestamp:
Sep 15, 2010, 1:39:59 PM (9 years ago)
Author:
lindanl
Message:

changes for microsoft compiler

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/lib_simd.h

    r531 r628  
    5252#endif
    5353#ifdef _MSC_VER
     54#define inline __inline
     55#include "lib/sse_simd.h"
    5456#define likely(x) (x)
    5557#define unlikely(x) (x)
     
    102104        unsigned long zeroes;
    103105        _BitScanForward(&zeroes, x);
     106        return zeroes;
     107}
     108static inline unsigned long cbzl(unsigned long x) {
     109        unsigned long zeroes;
     110        _BitScanReverse(&zeroes, x);
    104111        return zeroes;
    105112}
     
    220227  union {SIMD_type vec; unsigned char elems[8];} x;
    221228  x.vec = v;
    222   unsigned char c, bit_reversed;
     229  unsigned char c;
    223230  int i;
    224231  printf("%20s = ", var_name);
     
    233240static void print_general_register_32(const char * var_name, uint32_t v) {
    234241        unsigned char c;
    235         int i;
    236242        printf("%30s = ", var_name);
    237243        for(int i=sizeof(uint32_t)-1; i>=0; i--) {
     
    245251static void print_general_register_64(const char * var_name, uint64_t v) {
    246252        unsigned char c;
    247         int i;
    248253        printf("%30s = ", var_name);
    249254        for(int i=sizeof(uint64_t)-1; i>=0; i--) {
     
    258263  union {SIMD_type vec; unsigned char elems[8];} x;
    259264  x.vec = v;
    260   unsigned char c, bit_reversed;
    261   int i;
     265  unsigned char c;
    262266  printf("%30s = ", var_name);
    263267  for(int i=sizeof(SIMD_type)-1; i>=0; i--) {
  • trunk/lib/sse_simd.h

    r626 r628  
    1111
    1212/*------------------------------------------------------------*/
    13 #ifndef _MSC_VER
     13
    1414#include <stdint.h>
    15 #endif
     15
    1616#ifdef _MSC_VER
    17 #include "stdint.h"
    1817#define LITTLE_ENDIAN 1234
    1918#define BIG_ENDIAN 4321
Note: See TracChangeset for help on using the changeset viewer.