> compile NEMU
ysyx_22040000 李心杨 Linux calcite 6.6.19 #1-NixOS SMP PREEMPT_DYNAMIC Fri Mar 1 12:35:11 UTC 2024 x86_64 GNU/Linux 17:01:04 up 6:37, 2 users, load average: 0.28, 0.37, 0.53
This commit is contained in:
parent
802fcb0846
commit
aa7b91b900
2 changed files with 7 additions and 0 deletions
|
@ -156,6 +156,11 @@ config ITRACE_BUFFER
|
|||
int "Buffer size for intruction trace (unit: number of instructions)"
|
||||
default 10
|
||||
|
||||
config MTRACE
|
||||
depends on TRACE && TARGET_NATIVE_ELF && ENGINE_INTERPRETER
|
||||
bool "Enable memory tracer"
|
||||
default n
|
||||
|
||||
config DIFFTEST
|
||||
depends on TARGET_NATIVE_ELF
|
||||
bool "Enable differential testing"
|
||||
|
|
|
@ -53,6 +53,7 @@ void init_mem() {
|
|||
word_t paddr_read(paddr_t addr, int len) {
|
||||
if (likely(in_pmem(addr))) return pmem_read(addr, len);
|
||||
IFDEF(CONFIG_DEVICE, return mmio_read(addr, len));
|
||||
IFDEF(CONFIG_MTRACE, printf("R " FMT_WORD "%d\n", addr, len));
|
||||
out_of_bound(addr);
|
||||
return 0;
|
||||
}
|
||||
|
@ -60,5 +61,6 @@ word_t paddr_read(paddr_t addr, int len) {
|
|||
void paddr_write(paddr_t addr, int len, word_t data) {
|
||||
if (likely(in_pmem(addr))) { pmem_write(addr, len, data); return; }
|
||||
IFDEF(CONFIG_DEVICE, mmio_write(addr, len, data); return);
|
||||
IFDEF(CONFIG_MTRACE, printf("W " FMT_WORD "%d D" FMT_WORD "\n", addr, len, data));
|
||||
out_of_bound(addr);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue