[PATCH] Add implementations of _cpuid and _xgetbv to Intrin.h

Hans Wennborg hans at chromium.org
Thu Jan 16 15:45:04 PST 2014



================
Comment at: lib/Headers/Intrin.h:783
@@ +782,3 @@
+#if __i386__
+  __asm__ ("  pushl  %%ebx\n"
+           "  cpuid\n"
----------------
Reid Kleckner wrote:
> This ebx preservation is only necessary for ELF PIC stuff.  Can we just use "b"(__info[1]) below and kill the pushing?
Ah, right. This certainly makes the asm nice and simple :)


http://llvm-reviews.chandlerc.com/D2564



More information about the cfe-commits mailing list