2020-06-18 12:15:52 +02:00
|
|
|
#include "platform.h"
|
2024-03-24 21:10:19 +01:00
|
|
|
#ifndef ITERATIONS
|
|
|
|
#define ITERATIONS 20000
|
|
|
|
#endif
|
2020-06-18 12:15:52 +02:00
|
|
|
|
|
|
|
/* 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)
|
|
|
|
{
|
2024-03-24 21:10:19 +01:00
|
|
|
*n = ITERATIONS;
|
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
|
|
|
|
2023-12-02 17:41:14 +01:00
|
|
|
void exit(int n){
|
2020-06-18 12:15:52 +02:00
|
|
|
tohost = 0x1;
|
|
|
|
for (;;);
|
|
|
|
}
|