Skip to content

Commit

Permalink
c_emulator: Use enum rather than arbitrary #define'ed OPT_*
Browse files Browse the repository at this point in the history
  • Loading branch information
jrtc27 committed Jul 1, 2024
1 parent 1711385 commit 0b8935e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions c_emulator/riscv_sim.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ const char *RV32ISA = "RV32IMAC";
#define CSR_MTVAL 0x343
#define CSR_MIP 0x344

#define OPT_TRACE_OUTPUT 1000
#define OPT_ENABLE_WRITABLE_FIOM 1001
#define OPT_PMP_COUNT 1002
#define OPT_PMP_GRAIN 1003
#define OPT_ENABLE_SVINVAL 1004
#define OPT_ENABLE_ZCB 10014
enum {
OPT_TRACE_OUTPUT = 1000,
OPT_ENABLE_WRITABLE_FIOM,
OPT_PMP_COUNT,
OPT_PMP_GRAIN,
OPT_ENABLE_SVINVAL,
OPT_ENABLE_ZCB,
};

static bool do_dump_dts = false;
static bool do_show_times = false;
Expand Down

0 comments on commit 0b8935e

Please sign in to comment.