소스 검색

Merge pull request #13 from Hunter522/swap64-fix

Fix SWAP64 implementation to work on more platforms
Michał Słomkowski 8 년 전
부모
커밋
c5fc079b4c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/CryptState.cpp

+ 1 - 1
src/CryptState.cpp

@@ -181,7 +181,7 @@ bool mumlib::CryptState::decrypt(const unsigned char *source, unsigned char *dst
 #define SHIFTBITS 63
 typedef uint64_t subblock;
 
-#define SWAP64(x) ({register uint64_t __out, __in = (x); __asm__("bswap %q0" : "=r"(__out) : "0"(__in)); __out;})
+#define SWAP64(x) (__builtin_bswap64(x))
 #define SWAPPED(x) SWAP64(x)
 
 typedef subblock keyblock[BLOCKSIZE];