mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-03-03 08:02:41 +00:00
Added _rdtsc intrinsics by Robert Khasanov
Differential Revision: http://llvm-reviews.chandlerc.com/D3212 llvm-svn: 205172
This commit is contained in:
parent
23aaf2a182
commit
ae43aae96a
@ -976,12 +976,6 @@ _xgetbv(unsigned int __xcr_no) {
|
||||
__asm__ ("xgetbv" : "=a" (__eax), "=d" (__edx) : "c" (__xcr_no));
|
||||
return ((unsigned __int64)__edx << 32) | __eax;
|
||||
}
|
||||
static __inline__ unsigned __int64 __attribute__((__always_inline__, __nodebug__))
|
||||
__rdtsc(void) {
|
||||
unsigned int __eax, __edx;
|
||||
__asm__ ("rdtsc" : "=a" (__eax), "=d" (__edx));
|
||||
return ((unsigned __int64)__edx << 32) | __eax;
|
||||
}
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||
__halt(void) {
|
||||
__asm__ volatile ("hlt");
|
||||
|
@ -79,4 +79,14 @@ __writeeflags(unsigned int __f)
|
||||
}
|
||||
#endif /* !__x86_64__ */
|
||||
|
||||
/* __rdtsc */
|
||||
static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__))
|
||||
__rdtsc(void) {
|
||||
unsigned int __eax, __edx;
|
||||
__asm__ ("rdtsc" : "=a" (__eax), "=d" (__edx));
|
||||
return ((unsigned long long)__edx << 32) | __eax;
|
||||
}
|
||||
|
||||
#define _rdtsc() __rdtsc()
|
||||
|
||||
#endif /* __IA32INTRIN_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user