#OTHER
authorClaus Gittinger <cg@exept.de>
Mon, 01 Feb 2016 15:25:15 +0100
changeset 19133 63ef07879231
parent 19132 0c0046873268
child 19134 eaa91cb0ef1b
#OTHER class: SmallInteger changed: #byteSwapped32 bswap macro seems to not work with clang
SmallInteger.st
--- a/SmallInteger.st	Mon Feb 01 15:24:23 2016 +0100
+++ b/SmallInteger.st	Mon Feb 01 15:25:15 2016 +0100
@@ -961,7 +961,6 @@
 ! !
 
 
-
 !SmallInteger methodsFor:'bit operators'!
 
 bitAnd:anInteger
@@ -2119,45 +2118,46 @@
 #   define HAVE_BSWAP
 
     _asm {
-	mov eax, v
-	bswap eax
-	mov swapped, eax
+        mov eax, v
+        bswap eax
+        mov swapped, eax
     };
 #  endif
 #  if defined(USE_BSWAP) && defined(__VISUALC__)
 #   define HAVE_BSWAP
 
     _asm {
-	mov eax, v
-	xchg al, ah
-	rol eax, 16
-	xchg al, ah
-	mov swapped, eax
+        mov eax, v
+        xchg al, ah
+        rol eax, 16
+        xchg al, ah
+        mov swapped, eax
     };
 #  endif
 #  if defined(USE_BSWAP) && defined(__GNUC__)
 #   define HAVE_BSWAP
 
     asm("movl %1, %%eax \n\
-	 bswap %%eax    \n\
-	 movl %%eax, %0 \n\
-	"
-	: "=rm"  (swapped)
-	: "rm"   (v));
+         bswap %%eax    \n\
+         movl %%eax, %0 \n\
+        "
+        : "=rm"  (swapped)
+        : "rm"   (v));
 #  endif
 # endif /* __POINTER_SIZE__ == 4 */
 
 # if __POINTER_SIZE__ == 8
     v &= 0xFFFFFFFF;
 
-#  if defined(__x86_64__) && defined(__GNUC__)
+#  if defined(__x86_64__) && defined(__GNUC__) && !defined(__clang__)
 #   define HAVE_BSWAP
+
     asm("movq %1, %%rax \n\
-	 bswap %%eax    \n\
-	 movq %%rax, %0 \n\
-	"
-	: "=rm"  (swapped)
-	: "rm"   (v));
+         bswap %%eax    \n\
+         movq %%rax, %0 \n\
+        "
+        : "=rm"  (swapped)
+        : "rm"   (v));
 #  endif
 # endif