base/asm-common.h, *.S: Use consistent little-endian notation for SIMD regs.
[catacomb] / base / asm-common.h
index b4d4a90..9257d76 100644 (file)
@@ -222,11 +222,11 @@ name:
 #  define INTADDR__1(addr, got) addr
 #endif
 
-// Permutations for SIMD instructions.  SHUF(A, B, C, D) is an immediate,
+// Permutations for SIMD instructions.  SHUF(D, C, B, A) is an immediate,
 // suitable for use in `pshufd' or `shufpd', which copies element A
 // (0 <= A < 4) of the source to element 0 of the destination, element B to
 // element 1, element C to element 2, and element D to element 3.
-#define SHUF(a, b, c, d) ((a) + 4*(b) + 16*(c) + 64*(d))
+#define SHUF(d, c, b, a) (64*(d) + 16*(c) + 4*(b) + (a))
 
 // Map register names to their individual pieces.