10 lines
157 B
C
10 lines
157 B
C
|
#ifndef _UTILS_H_
|
||
|
#define _UTILS_H_
|
||
|
|
||
|
#define read_csr(reg) ({ unsigned long __tmp; \
|
||
|
asm volatile ("csrr %0, " #reg : "=r"(__tmp)); \
|
||
|
__tmp; })
|
||
|
|
||
|
|
||
|
#endif
|