mdbx-test: avoid looping on MIPS under QEMU.

Change-Id: I0e91bdd21441634dd1a6cfcd00a2e8b9f99034aa
This commit is contained in:
Leonid Yuriev 2020-09-21 15:31:47 +03:00
parent a7a8631bc3
commit e86bc5b901

View File

@ -222,7 +222,11 @@ uint64_t entropy_ticks(void) {
return pmccntr; return pmccntr;
#endif #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; unsigned count;
__asm __volatile("rdhwr %0, $2" : "=r"(count)); __asm __volatile("rdhwr %0, $2" : "=r"(count));
return count; return count;