zvi updated this revision to Diff 60217. zvi added a comment. Following David Majnemer's suggestion on cfe-commits: I would just use the __attribute__ spelling, no need for two definitions
Repository: rL LLVM http://reviews.llvm.org/D21173 Files: lib/Headers/xmmintrin.h test/Headers/xmmintrin.c Index: test/Headers/xmmintrin.c =================================================================== --- test/Headers/xmmintrin.c +++ test/Headers/xmmintrin.c @@ -7,6 +7,9 @@ // REQUIRES: x86-registered-target #include <xmmintrin.h> +// CHECK: @c = common global i8 0, align 16 +_MM_ALIGN16 char c; + // Make sure the last step of _mm_cvtps_pi16 converts <4 x i32> to <4 x i16> by // checking that clang emits PACKSSDW instead of PACKSSWB. Index: lib/Headers/xmmintrin.h =================================================================== --- lib/Headers/xmmintrin.h +++ lib/Headers/xmmintrin.h @@ -2821,9 +2821,7 @@ } -#ifdef _MSC_VER -#define _MM_ALIGN16 __declspec(align(16)) -#endif +#define _MM_ALIGN16 __attribute__((aligned(16))) #define _MM_SHUFFLE(z, y, x, w) (((z) << 6) | ((y) << 4) | ((x) << 2) | (w))
Index: test/Headers/xmmintrin.c =================================================================== --- test/Headers/xmmintrin.c +++ test/Headers/xmmintrin.c @@ -7,6 +7,9 @@ // REQUIRES: x86-registered-target #include <xmmintrin.h> +// CHECK: @c = common global i8 0, align 16 +_MM_ALIGN16 char c; + // Make sure the last step of _mm_cvtps_pi16 converts <4 x i32> to <4 x i16> by // checking that clang emits PACKSSDW instead of PACKSSWB. Index: lib/Headers/xmmintrin.h =================================================================== --- lib/Headers/xmmintrin.h +++ lib/Headers/xmmintrin.h @@ -2821,9 +2821,7 @@ } -#ifdef _MSC_VER -#define _MM_ALIGN16 __declspec(align(16)) -#endif +#define _MM_ALIGN16 __attribute__((aligned(16))) #define _MM_SHUFFLE(z, y, x, w) (((z) << 6) | ((y) << 4) | ((x) << 2) | (w))
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits