aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Headers/ia32intrin.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-01-06 20:02:26 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-01-06 20:02:26 +0000
commit97b17066aaac3f1590a809d79abe98fde03821ec (patch)
tree955a1295c3fd4378a49478ad5835ca21b769417e /lib/Headers/ia32intrin.h
parent45b533945f0851ec234ca846e1af5ee1e4df0b6e (diff)
downloadsrc-97b17066aaac3f1590a809d79abe98fde03821ec.tar.gz
src-97b17066aaac3f1590a809d79abe98fde03821ec.zip
Vendor import of clang trunk r256945:vendor/clang/clang-trunk-r256945
Notes
Notes: svn path=/vendor/clang/dist/; revision=293250 svn path=/vendor/clang/clang-trunk-r256945/; revision=293252; tag=vendor/clang/clang-trunk-r256945
Diffstat (limited to 'lib/Headers/ia32intrin.h')
-rw-r--r--lib/Headers/ia32intrin.h32
1 files changed, 4 insertions, 28 deletions
diff --git a/lib/Headers/ia32intrin.h b/lib/Headers/ia32intrin.h
index 5adf3f1f5d83..b2f82bb59e38 100644
--- a/lib/Headers/ia32intrin.h
+++ b/lib/Headers/ia32intrin.h
@@ -32,50 +32,26 @@
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__))
__readeflags(void)
{
- unsigned long long __res = 0;
- __asm__ __volatile__ ("pushf\n\t"
- "popq %0\n"
- :"=r"(__res)
- :
- :
- );
- return __res;
+ return __builtin_ia32_readeflags_u64();
}
static __inline__ void __attribute__((__always_inline__, __nodebug__))
__writeeflags(unsigned long long __f)
{
- __asm__ __volatile__ ("pushq %0\n\t"
- "popf\n"
- :
- :"r"(__f)
- :"flags"
- );
+ __builtin_ia32_writeeflags_u64(__f);
}
#else /* !__x86_64__ */
static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
__readeflags(void)
{
- unsigned int __res = 0;
- __asm__ __volatile__ ("pushf\n\t"
- "popl %0\n"
- :"=r"(__res)
- :
- :
- );
- return __res;
+ return __builtin_ia32_readeflags_u32();
}
static __inline__ void __attribute__((__always_inline__, __nodebug__))
__writeeflags(unsigned int __f)
{
- __asm__ __volatile__ ("pushl %0\n\t"
- "popf\n"
- :
- :"r"(__f)
- :"flags"
- );
+ __builtin_ia32_writeeflags_u32(__f);
}
#endif /* !__x86_64__ */