aboutsummaryrefslogtreecommitdiff
path: root/ci-tests/customcsr.c
blob: 7d02689ddbddebe0c0713fe84f527b81f367668f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#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;
}