mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-07-30 16:26:33 +08:00
Merge bee85df4c672ed13af57491d487654b880f4a140 into f4a1aceb8ca7198b11447d6e1885ce70feb2dcc6
This commit is contained in:
commit
9bae68d696
@ -363,6 +363,20 @@ static unsigned long mbedtls_timing_hardclock(void)
|
||||
#endif /* !HAVE_HARDCLOCK && MBEDTLS_HAVE_ASM &&
|
||||
__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) && \
|
||||
!defined(EFIX64) && !defined(EFI32)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user