[PATCH] D24330: Add some MS aliases for existing intrinsics
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 8 10:23:20 PDT 2016
rnk added a comment.
+Richard for ideas on how to navigate the intel intrinsics
Comment at: include/clang/Basic/BuiltinsX86.def:304
@@ -303,2 +303,3 @@
TARGET_BUILTIN(__builtin_ia32_ldmxcsr, "vUi", "", "sse")
+TARGET_BUILTIN(_mm_setcsr, "vUi", "", "sse")
TARGET_BUILTIN(__builtin_ia32_stmxcsr, "Ui", "", "sse")
Part of the idea behind the Intel *mmintrin.h headers is that they define symbols outside of the implementor's namespace. Users should be able to write code that uses these _mm_* names if they don't include those headers. Having this builtin always be available on x86 makes that impossible.
That said, I can see that winnt.h uses these directly, rather than including xmmintrin.h, so we need them to be builtins in MSVC mode, and it's annoying to have them sometimes be builtins and sometimes be functions.
More information about the cfe-commits