diff --git a/uvm32/uvm32.c b/uvm32/uvm32.c index 02c3eba..b66842b 100644 --- a/uvm32/uvm32.c +++ b/uvm32/uvm32.c @@ -9,6 +9,12 @@ #include "mini-rv32ima.h" +#define X(name) #name, +static const char *errNames[] = { + LIST_OF_UVM32_ERRS +}; +#undef X + static void setup_err_evt(uvm32_state_t *vmst, uvm32_evt_t *evt) { evt->typ = UVM32_EVT_ERR; evt->data.err.errcode = vmst->err; diff --git a/uvm32/uvm32.h b/uvm32/uvm32.h index dc9b3a8..4caaa7b 100644 --- a/uvm32/uvm32.h +++ b/uvm32/uvm32.h @@ -85,12 +85,6 @@ void uvm32_HandleOtherCSRWrite(void *userdata, uint16_t csrno, uint32_t value); #endif #include "mini-rv32ima.h" -#define X(name) #name, -static const char *errNames[] = { - LIST_OF_UVM32_ERRS -}; -#undef X - typedef enum { UVM32_STATUS_PAUSED, UVM32_STATUS_RUNNING,