Firmwares/benchmarks/dhrystone/dhry_stubs.c

23 lines
414 B
C
Raw Permalink Normal View History

2020-06-18 12:15:52 +02:00
#include "platform.h"
/* The functions in this file are only meant to support Dhrystone on an
* embedded RV32 system and are obviously incorrect in general. */
long time(void)
{
2023-08-20 15:00:51 +02:00
return get_timer_value();
2020-06-18 12:15:52 +02:00
}
// set the number of dhrystone iterations
void __wrap_scanf(const char* fmt, int* n)
{
2023-08-20 15:00:51 +02:00
*n = 200000;
2020-06-18 12:15:52 +02:00
}
2023-08-20 15:00:51 +02:00
extern volatile uint32_t tohost;
2020-06-18 12:15:52 +02:00
void __wrap_exit(int n){
tohost = 0x1;
for (;;);
}