[PATCH] D12278: [X86] Add MSVC-compatible intrinsics for clac, stac, lgdt and sgdt

Michael Kuperstein via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 24 23:31:42 PDT 2015


mkuper added inline comments.

================
Comment at: lib/Headers/Intrin.h:961
@@ +960,3 @@
+static __inline__ void __DEFAULT_FN_ATTRS _lgdt(void *__ptr) {
+  __builtin_ia32_lgdt(__ptr);
+}
----------------
compnerd wrote:
> Why does this need a builtin?  Is an inline assembly block using lgdt insufficient for some reason?
I think using a builtin is, generally, cleaner.
I'm ok with using inline asm (and abandoning the LLVM part of the patch), if that's the more popular option.


http://reviews.llvm.org/D12278





More information about the cfe-commits mailing list