cbb8e958cabae496b61ac916f1ec2d124cd796ae
1 #ifndef _RISCV_COMMON_H
2 #define _RISCV_COMMON_H
10 # define print_and_die(s) throw std::runtime_error(s)
12 # define print_and_die(s) do { fprintf(stderr,"%s\n",s); abort(); } while(0)
15 #define demand(cond,str,...) \
18 snprintf(__str,256,"in %s, line %d: " str, \
19 __FILE__,__LINE__,##__VA_ARGS__); \
20 print_and_die(__str); \
23 #define static_assert(x) switch (x) case 0: case (x):