mirror of
https://github.com/isar/libmdbx.git
synced 2024-10-30 11:29:19 +08:00
mdbx-test: avoid looping on MIPS under QEMU.
Change-Id: I0e91bdd21441634dd1a6cfcd00a2e8b9f99034aa
This commit is contained in:
parent
a7a8631bc3
commit
e86bc5b901
@ -222,12 +222,16 @@ uint64_t entropy_ticks(void) {
|
||||
return pmccntr;
|
||||
#endif
|
||||
}
|
||||
#elif defined(__mips__) || defined(__mips) || defined(_R4000)
|
||||
#elif ((defined(_MIPS_ISA) && defined(_MIPS_ISA_MIPS2) && \
|
||||
_MIPS_ISA >= _MIPS_ISA_MIPS2) || \
|
||||
(defined(__mips) && __mips >= 2) || defined(_R4000)) && \
|
||||
!defined(MDBX_SAFE4QEMU) /* QEMU may not emulate the CC register \
|
||||
(High-resolution cycle counter) */
|
||||
unsigned count;
|
||||
__asm __volatile("rdhwr %0, $2" : "=r"(count));
|
||||
return count;
|
||||
#endif /* arch selector */
|
||||
#endif /* __GNUC__ || __clang__ */
|
||||
#endif /* arch selector */
|
||||
#endif /* __GNUC__ || __clang__ */
|
||||
|
||||
#if defined(__e2k__) || defined(__ia32__)
|
||||
return __rdtsc();
|
||||
|
Loading…
Reference in New Issue
Block a user