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

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 26 20:08:24 PDT 2015


compnerd 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);
+}
----------------
mkuper wrote:
> 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.
Yes, that is the preference in my experience.  Please do switch to the inline asm option.


http://reviews.llvm.org/D12278





More information about the cfe-commits mailing list