mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-11-09 23:00:03 +08:00
Merge bee85df4c672ed13af57491d487654b880f4a140 into 4fdb917aae2fb5876e04f88621630712a906a067
This commit is contained in:
commit
b807fcef5e
@ -363,6 +363,20 @@ static unsigned long mbedtls_timing_hardclock(void)
|
|||||||
#endif /* !HAVE_HARDCLOCK && MBEDTLS_HAVE_ASM &&
|
#endif /* !HAVE_HARDCLOCK && MBEDTLS_HAVE_ASM &&
|
||||||
__GNUC__ && __ia64__ */
|
__GNUC__ && __ia64__ */
|
||||||
|
|
||||||
|
#if !defined(HAVE_HARDCLOCK) && defined(MBEDTLS_HAVE_ASM) && \
|
||||||
|
defined(__GNUC__) && defined(__xtensa__)
|
||||||
|
|
||||||
|
#define HAVE_HARDCLOCK
|
||||||
|
|
||||||
|
static unsigned long mbedtls_timing_hardclock(void)
|
||||||
|
{
|
||||||
|
unsigned int ccount;
|
||||||
|
asm volatile ("rsr %0, ccount" : "=r" (ccount));
|
||||||
|
return ccount;
|
||||||
|
}
|
||||||
|
#endif /* !HAVE_HARDCLOCK && MBEDTLS_HAVE_ASM &&
|
||||||
|
__GNUC__ && __xtensa__ */
|
||||||
|
|
||||||
#if !defined(HAVE_HARDCLOCK) && defined(_WIN32) && \
|
#if !defined(HAVE_HARDCLOCK) && defined(_WIN32) && \
|
||||||
!defined(EFIX64) && !defined(EFI32)
|
!defined(EFIX64) && !defined(EFI32)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user