Spike, a RISC-V ISA Simulator
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
235 B

#include <stdio.h>
int main() {
int x = 1;
// dummycsr
asm("csrr %0, 0xfff" : "=r"(x));
if (x == 42)
printf("Executed successfully\n");
else
printf("FAIL. Got value: %d instead of 42\n", x);
return 0;
}