[PATCH] D21959: [X86] Add xgetbv xsetbv intrinsics
Guy Blank via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 20 01:53:05 PDT 2016
guyblank added a comment.
the <x86intrin.h> include is because i added calls to the intrinsics themselves in the test, no just the builtins.
================
Comment at: lib/Headers/intrin.h:905
@@ -906,9 +904,3 @@
}
-static __inline__ unsigned __int64 __cdecl __DEFAULT_FN_ATTRS
-_xgetbv(unsigned int __xcr_no) {
- unsigned int __eax, __edx;
- __asm__ ("xgetbv" : "=a" (__eax), "=d" (__edx) : "c" (__xcr_no));
- return ((unsigned __int64)__edx << 32) | __eax;
-}
static __inline__ void __DEFAULT_FN_ATTRS
__halt(void) {
----------------
delena wrote:
> I'm not sure that we can move it from one file to another. And what was wrong with current implementation.
it can't be left here since it will conflict with non-windows implementation.
my impression was that it is generally better to use "regular" lowering flow, over using inline asm.
https://reviews.llvm.org/D21959
More information about the cfe-commits
mailing list