diff options
author | Robert Norton <rmn30@cam.ac.uk> | 2019-06-26 17:33:16 +0100 |
---|---|---|
committer | Robert Norton <rmn30@cam.ac.uk> | 2019-06-26 17:33:16 +0100 |
commit | 57694dc5a53d84a0d9299b59c45676eacf121bc7 (patch) | |
tree | 60aec2beba1e0e5f03e483e60afca4349bcb1d02 /c_emulator/riscv_prelude.c | |
parent | c4260c12c978866d8701156695140cfaf7c6dc68 (diff) | |
download | sail-riscv-57694dc5a53d84a0d9299b59c45676eacf121bc7.zip sail-riscv-57694dc5a53d84a0d9299b59c45676eacf121bc7.tar.gz sail-riscv-57694dc5a53d84a0d9299b59c45676eacf121bc7.tar.bz2 |
Add command line option in c_emulator for disabling tracing. Add builtins for getting values of config_print_xxx variables to speed up emulation when not tracing.
Diffstat (limited to 'c_emulator/riscv_prelude.c')
-rw-r--r-- | c_emulator/riscv_prelude.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/c_emulator/riscv_prelude.c b/c_emulator/riscv_prelude.c index 1621913..92f8415 100644 --- a/c_emulator/riscv_prelude.c +++ b/c_emulator/riscv_prelude.c @@ -30,3 +30,23 @@ unit print_platform(sail_string s) if (config_print_platform) printf("%s\n", s); return UNIT; } + +bool get_config_print_instr(unit u) +{ + return (config_print_instr) ? true : false; +} + +bool get_config_print_reg(unit u) +{ + return (config_print_reg) ? true : false; +} + +bool get_config_print_mem(unit u) +{ + return (config_print_mem_access) ? true : false; +} + +bool get_config_print_platform(unit u) +{ + return (config_print_platform) ? true : false; +} |