X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/catacomb/blobdiff_plain/70bc6059902c30dcbd1cddbdb628e4bcbd9cc6f5..a13b573023a59dc1e2febef1142aa4b1d1af67b7:/base/asm-common.h diff --git a/base/asm-common.h b/base/asm-common.h index 0d32ccf9..20a1d6a8 100644 --- a/base/asm-common.h +++ b/base/asm-common.h @@ -170,6 +170,12 @@ name: # define INTADDR__1(addr, got) addr #endif +// Permutations for SIMD instructions. SHUF(D, C, B, A) is an immediate, +// suitable for use in `pshufd' or `shufpd', which copies element D +// (0 <= D < 4) of the source to element 3 of the destination, element C to +// element 2, element B to element 1, and element A to element 0. +#define SHUF(d, c, b, a) (64*(d) + 16*(c) + 4*(b) + (a)) + #endif ///--------------------------------------------------------------------------