diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-06-12 13:29:02 +0545 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-06-12 04:19:45 -0400 |
commit | db7858e227f3951c665410314fca62c77349ac24 (patch) | |
tree | 01fb8b93600bc89ef86a7e883ca17e3df8387174 /sim/lm32 | |
parent | 966f0aefa6a96df2c45ec36a7ecc02419e3842db (diff) | |
download | binutils-db7858e227f3951c665410314fca62c77349ac24.zip binutils-db7858e227f3951c665410314fca62c77349ac24.tar.gz binutils-db7858e227f3951c665410314fca62c77349ac24.tar.bz2 |
sim: cgen: namespace custom trace functions
The cgen code declares some macros/funcs using the trace_xxx prefix, but
the code isn't generic and only works with cgen targets. This is blocking
the creation of new common trace functions.
Let's blindly add cgen_xxx prefixes to all these symbols. Some already
use this convention to avoid conflicts, so it makes sense to align them.
In the future we might want to move some to the common trace core, but
one thing at a time.
Diffstat (limited to 'sim/lm32')
-rw-r--r-- | sim/lm32/ChangeLog | 8 | ||||
-rw-r--r-- | sim/lm32/decode.c | 46 | ||||
-rw-r--r-- | sim/lm32/mloop.in | 6 | ||||
-rw-r--r-- | sim/lm32/sem-switch.c | 132 | ||||
-rw-r--r-- | sim/lm32/sem.c | 130 |
5 files changed, 165 insertions, 157 deletions
diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog index 4cb55c5..bd5760a 100644 --- a/sim/lm32/ChangeLog +++ b/sim/lm32/ChangeLog @@ -1,3 +1,11 @@ +2015-06-12 Mike Frysinger <vapier@gentoo.org> + + * decode.c (lm32bf_decode): Change TRACE_EXTRACT to CGEN_TRACE_EXTRACT. + * mloop.in (execute): Change TRACE_INSN_INIT to CGEN_TRACE_INSN_INIT, + TRACE_INSN to CGEN_TRACE_INSN, and TRACE_INSN_FINI to CGEN_TRACE_INSN_FINI. + * sem.c: Rename TRACE_RESULT to CGEN_TRACE_RESULT. + * sem-switch.c: Likewise. + 2015-04-18 Mike Frysinger <vapier@gentoo.org> * sim-main.h (SIM_ENGINE_HALT_HOOK, SIM_ENGINE_RESTART_HOOK): Delete. diff --git a/sim/lm32/decode.c b/sim/lm32/decode.c index 0900dca..097ead3 100644 --- a/sim/lm32/decode.c +++ b/sim/lm32/decode.c @@ -352,7 +352,7 @@ lm32bf_decode (SIM_CPU *current_cpu, IADDR pc, /* Record the fields for the semantic handler. */ - TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_empty", (char *) 0)); + CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_empty", (char *) 0)); #undef FLD return idesc; @@ -375,7 +375,7 @@ lm32bf_decode (SIM_CPU *current_cpu, IADDR pc, FLD (f_r0) = f_r0; FLD (f_r1) = f_r1; FLD (f_r2) = f_r2; - TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_add", "f_r0 0x%x", 'x', f_r0, "f_r1 0x%x", 'x', f_r1, "f_r2 0x%x", 'x', f_r2, (char *) 0)); + CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_add", "f_r0 0x%x", 'x', f_r0, "f_r1 0x%x", 'x', f_r1, "f_r2 0x%x", 'x', f_r2, (char *) 0)); #undef FLD return idesc; @@ -398,7 +398,7 @@ lm32bf_decode (SIM_CPU *current_cpu, IADDR pc, FLD (f_imm) = f_imm; FLD (f_r0) = f_r0; FLD (f_r1) = f_r1; - TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addi", "f_imm 0x%x", 'x', f_imm, "f_r0 0x%x", 'x', f_r0, "f_r1 0x%x", 'x', f_r1, (char *) 0)); + CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addi", "f_imm 0x%x", 'x', f_imm, "f_r0 0x%x", 'x', f_r0, "f_r1 0x%x", 'x', f_r1, (char *) 0)); #undef FLD return idesc; @@ -421,7 +421,7 @@ lm32bf_decode (SIM_CPU *current_cpu, IADDR pc, FLD (f_r0) = f_r0; FLD (f_uimm) = f_uimm; FLD (f_r1) = f_r1; - TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andi", "f_r0 0x%x", 'x', f_r0, "f_uimm 0x%x", 'x', f_uimm, "f_r1 0x%x", 'x', f_r1, (char *) 0)); + CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andi", "f_r0 0x%x", 'x', f_r0, "f_uimm 0x%x", 'x', f_uimm, "f_r1 0x%x", 'x', f_r1, (char *) 0)); #undef FLD return idesc; @@ -444,7 +444,7 @@ lm32bf_decode (SIM_CPU *current_cpu, IADDR pc, FLD (f_uimm) = f_uimm; FLD (f_r0) = f_r0; FLD (f_r1) = f_r1; - TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andhii", "f_uimm 0x%x", 'x', f_uimm, "f_r0 0x%x", 'x', f_r0, "f_r1 0x%x", 'x', f_r1, (char *) 0)); + CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andhii", "f_uimm 0x%x", 'x', f_uimm, "f_r0 0x%x", 'x', f_r0, "f_r1 0x%x", 'x', f_r1, (char *) 0)); #undef FLD return idesc; @@ -461,7 +461,7 @@ lm32bf_decode (SIM_CPU *current_cpu, IADDR pc, /* Record the fields for the semantic handler. */ FLD (f_r0) = f_r0; - TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_b", "f_r0 0x%x", 'x', f_r0, (char *) 0)); + CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_b", "f_r0 0x%x", 'x', f_r0, (char *) 0)); #undef FLD return idesc; @@ -478,7 +478,7 @@ lm32bf_decode (SIM_CPU *current_cpu, IADDR pc, /* Record the fields for the semantic handler. */ FLD (i_call) = f_call; - TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bi", "call 0x%x", 'x', f_call, (char *) 0)); + CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bi", "call 0x%x", 'x', f_call, (char *) 0)); #undef FLD return idesc; @@ -501,7 +501,7 @@ lm32bf_decode (SIM_CPU *current_cpu, IADDR pc, FLD (f_r0) = f_r0; FLD (f_r1) = f_r1; FLD (i_branch) = f_branch; - TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_be", "f_r0 0x%x", 'x', f_r0, "f_r1 0x%x", 'x', f_r1, "branch 0x%x", 'x', f_branch, (char *) 0)); + CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_be", "f_r0 0x%x", 'x', f_r0, "f_r1 0x%x", 'x', f_r1, "branch 0x%x", 'x', f_branch, (char *) 0)); #undef FLD return idesc; @@ -518,7 +518,7 @@ lm32bf_decode (SIM_CPU *current_cpu, IADDR pc, /* Record the fields for the semantic handler. */ FLD (f_r0) = f_r0; - TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_call", "f_r0 0x%x", 'x', f_r0, (char *) 0)); + CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_call", "f_r0 0x%x", 'x', f_r0, (char *) 0)); #undef FLD return idesc; @@ -535,7 +535,7 @@ lm32bf_decode (SIM_CPU *current_cpu, IADDR pc, /* Record the fields for the semantic handler. */ FLD (i_call) = f_call; - TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_calli", "call 0x%x", 'x', f_call, (char *) 0)); + CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_calli", "call 0x%x", 'x', f_call, (char *) 0)); #undef FLD return idesc; @@ -558,7 +558,7 @@ lm32bf_decode (SIM_CPU *current_cpu, IADDR pc, FLD (f_r0) = f_r0; FLD (f_r1) = f_r1; FLD (f_r2) = f_r2; - TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_divu", "f_r0 0x%x", 'x', f_r0, "f_r1 0x%x", 'x', f_r1, "f_r2 0x%x", 'x', f_r2, (char *) 0)); + CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_divu", "f_r0 0x%x", 'x', f_r0, "f_r1 0x%x", 'x', f_r1, "f_r2 0x%x", 'x', f_r2, (char *) 0)); #undef FLD return idesc; @@ -581,7 +581,7 @@ lm32bf_decode (SIM_CPU *current_cpu, IADDR pc, FLD (f_imm) = f_imm; FLD (f_r0) = f_r0; FLD (f_r1) = f_r1; - TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lb", "f_imm 0x%x", 'x', f_imm, "f_r0 0x%x", 'x', f_r0, "f_r1 0x%x", 'x', f_r1, (char *) 0)); + CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lb", "f_imm 0x%x", 'x', f_imm, "f_r0 0x%x", 'x', f_r0, "f_r1 0x%x", 'x', f_r1, (char *) 0)); #undef FLD return idesc; @@ -604,7 +604,7 @@ lm32bf_decode (SIM_CPU *current_cpu, IADDR pc, FLD (f_imm) = f_imm; FLD (f_r0) = f_r0; FLD (f_r1) = f_r1; - TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lh", "f_imm 0x%x", 'x', f_imm, "f_r0 0x%x", 'x', f_r0, "f_r1 0x%x", 'x', f_r1, (char *) 0)); + CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lh", "f_imm 0x%x", 'x', f_imm, "f_r0 0x%x", 'x', f_r0, "f_r1 0x%x", 'x', f_r1, (char *) 0)); #undef FLD return idesc; @@ -627,7 +627,7 @@ lm32bf_decode (SIM_CPU *current_cpu, IADDR pc, FLD (f_imm) = f_imm; FLD (f_r0) = f_r0; FLD (f_r1) = f_r1; - TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lw", "f_imm 0x%x", 'x', f_imm, "f_r0 0x%x", 'x', f_r0, "f_r1 0x%x", 'x', f_r1, (char *) 0)); + CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lw", "f_imm 0x%x", 'x', f_imm, "f_r0 0x%x", 'x', f_r0, "f_r1 0x%x", 'x', f_r1, (char *) 0)); #undef FLD return idesc; @@ -650,7 +650,7 @@ lm32bf_decode (SIM_CPU *current_cpu, IADDR pc, FLD (f_uimm) = f_uimm; FLD (f_r0) = f_r0; FLD (f_r1) = f_r1; - TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ori", "f_uimm 0x%x", 'x', f_uimm, "f_r0 0x%x", 'x', f_r0, "f_r1 0x%x", 'x', f_r1, (char *) 0)); + CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ori", "f_uimm 0x%x", 'x', f_uimm, "f_r0 0x%x", 'x', f_r0, "f_r1 0x%x", 'x', f_r1, (char *) 0)); #undef FLD return idesc; @@ -670,7 +670,7 @@ lm32bf_decode (SIM_CPU *current_cpu, IADDR pc, /* Record the fields for the semantic handler. */ FLD (f_csr) = f_csr; FLD (f_r2) = f_r2; - TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_rcsr", "f_csr 0x%x", 'x', f_csr, "f_r2 0x%x", 'x', f_r2, (char *) 0)); + CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_rcsr", "f_csr 0x%x", 'x', f_csr, "f_r2 0x%x", 'x', f_r2, (char *) 0)); #undef FLD return idesc; @@ -693,7 +693,7 @@ lm32bf_decode (SIM_CPU *current_cpu, IADDR pc, FLD (f_imm) = f_imm; FLD (f_r0) = f_r0; FLD (f_r1) = f_r1; - TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sb", "f_imm 0x%x", 'x', f_imm, "f_r0 0x%x", 'x', f_r0, "f_r1 0x%x", 'x', f_r1, (char *) 0)); + CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sb", "f_imm 0x%x", 'x', f_imm, "f_r0 0x%x", 'x', f_r0, "f_r1 0x%x", 'x', f_r1, (char *) 0)); #undef FLD return idesc; @@ -713,7 +713,7 @@ lm32bf_decode (SIM_CPU *current_cpu, IADDR pc, /* Record the fields for the semantic handler. */ FLD (f_r0) = f_r0; FLD (f_r2) = f_r2; - TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sextb", "f_r0 0x%x", 'x', f_r0, "f_r2 0x%x", 'x', f_r2, (char *) 0)); + CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sextb", "f_r0 0x%x", 'x', f_r0, "f_r2 0x%x", 'x', f_r2, (char *) 0)); #undef FLD return idesc; @@ -736,7 +736,7 @@ lm32bf_decode (SIM_CPU *current_cpu, IADDR pc, FLD (f_imm) = f_imm; FLD (f_r0) = f_r0; FLD (f_r1) = f_r1; - TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sh", "f_imm 0x%x", 'x', f_imm, "f_r0 0x%x", 'x', f_r0, "f_r1 0x%x", 'x', f_r1, (char *) 0)); + CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sh", "f_imm 0x%x", 'x', f_imm, "f_r0 0x%x", 'x', f_r0, "f_r1 0x%x", 'x', f_r1, (char *) 0)); #undef FLD return idesc; @@ -759,7 +759,7 @@ lm32bf_decode (SIM_CPU *current_cpu, IADDR pc, FLD (f_imm) = f_imm; FLD (f_r0) = f_r0; FLD (f_r1) = f_r1; - TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sw", "f_imm 0x%x", 'x', f_imm, "f_r0 0x%x", 'x', f_r0, "f_r1 0x%x", 'x', f_r1, (char *) 0)); + CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sw", "f_imm 0x%x", 'x', f_imm, "f_r0 0x%x", 'x', f_r0, "f_r1 0x%x", 'x', f_r1, (char *) 0)); #undef FLD return idesc; @@ -785,7 +785,7 @@ lm32bf_decode (SIM_CPU *current_cpu, IADDR pc, FLD (f_r1) = f_r1; FLD (f_user) = f_user; FLD (f_r2) = f_r2; - TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_user", "f_r0 0x%x", 'x', f_r0, "f_r1 0x%x", 'x', f_r1, "f_user 0x%x", 'x', f_user, "f_r2 0x%x", 'x', f_r2, (char *) 0)); + CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_user", "f_r0 0x%x", 'x', f_r0, "f_r1 0x%x", 'x', f_r1, "f_user 0x%x", 'x', f_user, "f_r2 0x%x", 'x', f_r2, (char *) 0)); #undef FLD return idesc; @@ -805,7 +805,7 @@ lm32bf_decode (SIM_CPU *current_cpu, IADDR pc, /* Record the fields for the semantic handler. */ FLD (f_csr) = f_csr; FLD (f_r1) = f_r1; - TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_wcsr", "f_csr 0x%x", 'x', f_csr, "f_r1 0x%x", 'x', f_r1, (char *) 0)); + CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_wcsr", "f_csr 0x%x", 'x', f_csr, "f_r1 0x%x", 'x', f_r1, (char *) 0)); #undef FLD return idesc; @@ -818,7 +818,7 @@ lm32bf_decode (SIM_CPU *current_cpu, IADDR pc, /* Record the fields for the semantic handler. */ - TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_break", (char *) 0)); + CGEN_TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_break", (char *) 0)); #undef FLD return idesc; diff --git a/sim/lm32/mloop.in b/sim/lm32/mloop.in index 54f433c..a8db7f5 100644 --- a/sim/lm32/mloop.in +++ b/sim/lm32/mloop.in @@ -86,8 +86,8 @@ execute (SIM_CPU *current_cpu, SCACHE *sc, int fast_p) if (PROFILE_MODEL_P (current_cpu) && ARGBUF_PROFILE_P (abuf)) @cpu@_model_insn_before (current_cpu, 1 /*first_p*/); - TRACE_INSN_INIT (current_cpu, abuf, 1); - TRACE_INSN (current_cpu, idata, + CGEN_TRACE_INSN_INIT (current_cpu, abuf, 1); + CGEN_TRACE_INSN (current_cpu, idata, (const struct argbuf *) abuf, abuf->addr); } #if WITH_SCACHE @@ -106,7 +106,7 @@ execute (SIM_CPU *current_cpu, SCACHE *sc, int fast_p) cycles = (*idesc->timing->model_fn) (current_cpu, sc); @cpu@_model_insn_after (current_cpu, 1 /*last_p*/, cycles); } - TRACE_INSN_FINI (current_cpu, abuf, 1); + CGEN_TRACE_INSN_FINI (current_cpu, abuf, 1); } #else abort (); diff --git a/sim/lm32/sem-switch.c b/sim/lm32/sem-switch.c index 7b658df..e1eace8 100644 --- a/sim/lm32/sem-switch.c +++ b/sim/lm32/sem-switch.c @@ -119,13 +119,13 @@ This file is part of the GNU simulators. /* If hyper-fast [well not unnecessarily slow] execution is selected, turn off frills like tracing and profiling. */ -/* FIXME: A better way would be to have TRACE_RESULT check for something +/* FIXME: A better way would be to have CGEN_TRACE_RESULT check for something that can cause it to be optimized out. Another way would be to emit special handlers into the instruction "stream". */ #if FAST_P -#undef TRACE_RESULT -#define TRACE_RESULT(cpu, abuf, name, type, val) +#undef CGEN_TRACE_RESULT +#define CGEN_TRACE_RESULT(cpu, abuf, name, type, val) #endif #undef GET_ATTR @@ -310,7 +310,7 @@ SWITCH (sem, SEM_ARGBUF (vpc) -> semantic.sem_case) { SI opval = ADDSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -329,7 +329,7 @@ SWITCH (sem, SEM_ARGBUF (vpc) -> semantic.sem_case) { SI opval = ADDSI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm)))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -348,7 +348,7 @@ SWITCH (sem, SEM_ARGBUF (vpc) -> semantic.sem_case) { SI opval = ANDSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -367,7 +367,7 @@ SWITCH (sem, SEM_ARGBUF (vpc) -> semantic.sem_case) { SI opval = ANDSI (CPU (h_gr[FLD (f_r0)]), ZEXTSISI (FLD (f_uimm))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -386,7 +386,7 @@ SWITCH (sem, SEM_ARGBUF (vpc) -> semantic.sem_case) { SI opval = ANDSI (CPU (h_gr[FLD (f_r0)]), SLLSI (FLD (f_uimm), 16)); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -406,7 +406,7 @@ SWITCH (sem, SEM_ARGBUF (vpc) -> semantic.sem_case) { USI opval = lm32bf_b_insn (current_cpu, CPU (h_gr[FLD (f_r0)]), FLD (f_r0)); SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } SEM_BRANCH_FINI (vpc); @@ -427,7 +427,7 @@ SWITCH (sem, SEM_ARGBUF (vpc) -> semantic.sem_case) { USI opval = EXTSISI (FLD (i_call)); SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } SEM_BRANCH_FINI (vpc); @@ -450,7 +450,7 @@ if (EQSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { USI opval = FLD (i_branch); SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); written |= (1 << 3); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } } @@ -475,7 +475,7 @@ if (GTSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { USI opval = FLD (i_branch); SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); written |= (1 << 3); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } } @@ -500,7 +500,7 @@ if (GESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { USI opval = FLD (i_branch); SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); written |= (1 << 3); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } } @@ -525,7 +525,7 @@ if (GEUSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { USI opval = FLD (i_branch); SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); written |= (1 << 3); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } } @@ -550,7 +550,7 @@ if (GTUSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { USI opval = FLD (i_branch); SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); written |= (1 << 3); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } } @@ -575,7 +575,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { USI opval = FLD (i_branch); SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); written |= (1 << 3); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } } @@ -599,12 +599,12 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = ADDSI (pc, 4); CPU (h_gr[((UINT) 29)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } { USI opval = CPU (h_gr[FLD (f_r0)]); SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } } @@ -627,12 +627,12 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = ADDSI (pc, 4); CPU (h_gr[((UINT) 29)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } { USI opval = EXTSISI (FLD (i_call)); SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } } @@ -653,7 +653,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = EQSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -672,7 +672,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = EQSI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm)))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -691,7 +691,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = GTSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -710,7 +710,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = GTSI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm)))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -729,7 +729,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = GESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -748,7 +748,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = GESI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm)))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -767,7 +767,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = GEUSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -786,7 +786,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = GEUSI (CPU (h_gr[FLD (f_r0)]), ZEXTSISI (FLD (f_uimm))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -805,7 +805,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = GTUSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -824,7 +824,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = GTUSI (CPU (h_gr[FLD (f_r0)]), ZEXTSISI (FLD (f_uimm))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -843,7 +843,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -862,7 +862,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = NESI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm)))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -882,7 +882,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { USI opval = lm32bf_divu_insn (current_cpu, pc, FLD (f_r0), FLD (f_r1), FLD (f_r2)); SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } SEM_BRANCH_FINI (vpc); @@ -902,7 +902,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = EXTQISI (GETMEMQI (current_cpu, pc, ADDSI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm)))))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -921,7 +921,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = ZEXTQISI (GETMEMQI (current_cpu, pc, ADDSI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm)))))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -940,7 +940,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = EXTHISI (GETMEMHI (current_cpu, pc, ADDSI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm)))))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -959,7 +959,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = ZEXTHISI (GETMEMHI (current_cpu, pc, ADDSI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm)))))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -978,7 +978,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = GETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm))))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -998,7 +998,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { USI opval = lm32bf_modu_insn (current_cpu, pc, FLD (f_r0), FLD (f_r1), FLD (f_r2)); SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } SEM_BRANCH_FINI (vpc); @@ -1018,7 +1018,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = MULSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -1037,7 +1037,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = MULSI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm)))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -1056,7 +1056,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = INVSI (ORSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -1075,7 +1075,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = INVSI (ORSI (CPU (h_gr[FLD (f_r0)]), ZEXTSISI (FLD (f_uimm)))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -1094,7 +1094,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = ORSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -1113,7 +1113,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = ORSI (CPU (h_gr[FLD (f_r0)]), ZEXTSISI (FLD (f_uimm))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -1132,7 +1132,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = ORSI (CPU (h_gr[FLD (f_r0)]), SLLSI (FLD (f_uimm), 16)); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -1151,7 +1151,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = CPU (h_csr[FLD (f_csr)]); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -1170,7 +1170,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { QI opval = CPU (h_gr[FLD (f_r1)]); SETMEMQI (current_cpu, pc, ADDSI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm)))), opval); - TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval); } #undef FLD @@ -1189,7 +1189,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = EXTQISI (TRUNCSIQI (CPU (h_gr[FLD (f_r0)]))); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -1208,7 +1208,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = EXTHISI (TRUNCSIHI (CPU (h_gr[FLD (f_r0)]))); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -1227,7 +1227,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { HI opval = CPU (h_gr[FLD (f_r1)]); SETMEMHI (current_cpu, pc, ADDSI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm)))), opval); - TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval); } #undef FLD @@ -1246,7 +1246,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = SLLSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -1265,7 +1265,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = SLLSI (CPU (h_gr[FLD (f_r0)]), FLD (f_imm)); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -1284,7 +1284,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = SRASI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -1303,7 +1303,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = SRASI (CPU (h_gr[FLD (f_r0)]), FLD (f_imm)); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -1322,7 +1322,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = SRLSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -1341,7 +1341,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = SRLSI (CPU (h_gr[FLD (f_r0)]), FLD (f_imm)); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -1360,7 +1360,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = SUBSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -1379,7 +1379,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = CPU (h_gr[FLD (f_r1)]); SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm)))), opval); - TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval); } #undef FLD @@ -1398,7 +1398,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { { SI opval = lm32bf_user_insn (current_cpu, CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]), FLD (f_user)); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -1432,7 +1432,7 @@ lm32bf_wcsr_insn (current_cpu, FLD (f_csr), CPU (h_gr[FLD (f_r1)])); { SI opval = XORSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -1451,7 +1451,7 @@ lm32bf_wcsr_insn (current_cpu, FLD (f_csr), CPU (h_gr[FLD (f_r1)])); { SI opval = XORSI (CPU (h_gr[FLD (f_r0)]), ZEXTSISI (FLD (f_uimm))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -1470,7 +1470,7 @@ lm32bf_wcsr_insn (current_cpu, FLD (f_csr), CPU (h_gr[FLD (f_r1)])); { SI opval = INVSI (XORSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -1489,7 +1489,7 @@ lm32bf_wcsr_insn (current_cpu, FLD (f_csr), CPU (h_gr[FLD (f_r1)])); { SI opval = INVSI (XORSI (CPU (h_gr[FLD (f_r0)]), ZEXTSISI (FLD (f_uimm)))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } #undef FLD @@ -1509,7 +1509,7 @@ lm32bf_wcsr_insn (current_cpu, FLD (f_csr), CPU (h_gr[FLD (f_r1)])); { USI opval = lm32bf_break_insn (current_cpu, pc); SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } SEM_BRANCH_FINI (vpc); @@ -1530,7 +1530,7 @@ lm32bf_wcsr_insn (current_cpu, FLD (f_csr), CPU (h_gr[FLD (f_r1)])); { USI opval = lm32bf_scall_insn (current_cpu, pc); SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } SEM_BRANCH_FINI (vpc); diff --git a/sim/lm32/sem.c b/sim/lm32/sem.c index d350521..451f9d3 100644 --- a/sim/lm32/sem.c +++ b/sim/lm32/sem.c @@ -36,8 +36,8 @@ This file is part of the GNU simulators. FAST_P, when desired, is defined on the command line, -DFAST_P=1. */ #if FAST_P #define SEM_FN_NAME(cpu,fn) XCONCAT3 (cpu,_semf_,fn) -#undef TRACE_RESULT -#define TRACE_RESULT(cpu, abuf, name, type, val) +#undef CGEN_TRACE_RESULT +#define CGEN_TRACE_RESULT(cpu, abuf, name, type, val) #else #define SEM_FN_NAME(cpu,fn) XCONCAT3 (cpu,_sem_,fn) #endif @@ -210,7 +210,7 @@ SEM_FN_NAME (lm32bf,add) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = ADDSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -231,7 +231,7 @@ SEM_FN_NAME (lm32bf,addi) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = ADDSI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm)))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -252,7 +252,7 @@ SEM_FN_NAME (lm32bf,and) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = ANDSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -273,7 +273,7 @@ SEM_FN_NAME (lm32bf,andi) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = ANDSI (CPU (h_gr[FLD (f_r0)]), ZEXTSISI (FLD (f_uimm))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -294,7 +294,7 @@ SEM_FN_NAME (lm32bf,andhii) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = ANDSI (CPU (h_gr[FLD (f_r0)]), SLLSI (FLD (f_uimm), 16)); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -316,7 +316,7 @@ SEM_FN_NAME (lm32bf,b) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { USI opval = lm32bf_b_insn (current_cpu, CPU (h_gr[FLD (f_r0)]), FLD (f_r0)); SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } SEM_BRANCH_FINI (vpc); @@ -339,7 +339,7 @@ SEM_FN_NAME (lm32bf,bi) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { USI opval = EXTSISI (FLD (i_call)); SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } SEM_BRANCH_FINI (vpc); @@ -364,7 +364,7 @@ if (EQSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { USI opval = FLD (i_branch); SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); written |= (1 << 3); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } } @@ -391,7 +391,7 @@ if (GTSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { USI opval = FLD (i_branch); SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); written |= (1 << 3); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } } @@ -418,7 +418,7 @@ if (GESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { USI opval = FLD (i_branch); SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); written |= (1 << 3); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } } @@ -445,7 +445,7 @@ if (GEUSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { USI opval = FLD (i_branch); SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); written |= (1 << 3); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } } @@ -472,7 +472,7 @@ if (GTUSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { USI opval = FLD (i_branch); SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); written |= (1 << 3); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } } @@ -499,7 +499,7 @@ if (NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))) { USI opval = FLD (i_branch); SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc); written |= (1 << 3); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } } @@ -525,12 +525,12 @@ SEM_FN_NAME (lm32bf,call) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = ADDSI (pc, 4); CPU (h_gr[((UINT) 29)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } { USI opval = CPU (h_gr[FLD (f_r0)]); SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } } @@ -555,12 +555,12 @@ SEM_FN_NAME (lm32bf,calli) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = ADDSI (pc, 4); CPU (h_gr[((UINT) 29)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } { USI opval = EXTSISI (FLD (i_call)); SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } } @@ -583,7 +583,7 @@ SEM_FN_NAME (lm32bf,cmpe) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = EQSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -604,7 +604,7 @@ SEM_FN_NAME (lm32bf,cmpei) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = EQSI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm)))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -625,7 +625,7 @@ SEM_FN_NAME (lm32bf,cmpg) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = GTSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -646,7 +646,7 @@ SEM_FN_NAME (lm32bf,cmpgi) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = GTSI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm)))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -667,7 +667,7 @@ SEM_FN_NAME (lm32bf,cmpge) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = GESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -688,7 +688,7 @@ SEM_FN_NAME (lm32bf,cmpgei) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = GESI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm)))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -709,7 +709,7 @@ SEM_FN_NAME (lm32bf,cmpgeu) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = GEUSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -730,7 +730,7 @@ SEM_FN_NAME (lm32bf,cmpgeui) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = GEUSI (CPU (h_gr[FLD (f_r0)]), ZEXTSISI (FLD (f_uimm))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -751,7 +751,7 @@ SEM_FN_NAME (lm32bf,cmpgu) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = GTUSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -772,7 +772,7 @@ SEM_FN_NAME (lm32bf,cmpgui) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = GTUSI (CPU (h_gr[FLD (f_r0)]), ZEXTSISI (FLD (f_uimm))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -793,7 +793,7 @@ SEM_FN_NAME (lm32bf,cmpne) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = NESI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -814,7 +814,7 @@ SEM_FN_NAME (lm32bf,cmpnei) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = NESI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm)))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -836,7 +836,7 @@ SEM_FN_NAME (lm32bf,divu) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { USI opval = lm32bf_divu_insn (current_cpu, pc, FLD (f_r0), FLD (f_r1), FLD (f_r2)); SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } SEM_BRANCH_FINI (vpc); @@ -858,7 +858,7 @@ SEM_FN_NAME (lm32bf,lb) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = EXTQISI (GETMEMQI (current_cpu, pc, ADDSI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm)))))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -879,7 +879,7 @@ SEM_FN_NAME (lm32bf,lbu) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = ZEXTQISI (GETMEMQI (current_cpu, pc, ADDSI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm)))))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -900,7 +900,7 @@ SEM_FN_NAME (lm32bf,lh) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = EXTHISI (GETMEMHI (current_cpu, pc, ADDSI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm)))))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -921,7 +921,7 @@ SEM_FN_NAME (lm32bf,lhu) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = ZEXTHISI (GETMEMHI (current_cpu, pc, ADDSI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm)))))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -942,7 +942,7 @@ SEM_FN_NAME (lm32bf,lw) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = GETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm))))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -964,7 +964,7 @@ SEM_FN_NAME (lm32bf,modu) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { USI opval = lm32bf_modu_insn (current_cpu, pc, FLD (f_r0), FLD (f_r1), FLD (f_r2)); SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } SEM_BRANCH_FINI (vpc); @@ -986,7 +986,7 @@ SEM_FN_NAME (lm32bf,mul) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = MULSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -1007,7 +1007,7 @@ SEM_FN_NAME (lm32bf,muli) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = MULSI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm)))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -1028,7 +1028,7 @@ SEM_FN_NAME (lm32bf,nor) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = INVSI (ORSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -1049,7 +1049,7 @@ SEM_FN_NAME (lm32bf,nori) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = INVSI (ORSI (CPU (h_gr[FLD (f_r0)]), ZEXTSISI (FLD (f_uimm)))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -1070,7 +1070,7 @@ SEM_FN_NAME (lm32bf,or) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = ORSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -1091,7 +1091,7 @@ SEM_FN_NAME (lm32bf,ori) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = ORSI (CPU (h_gr[FLD (f_r0)]), ZEXTSISI (FLD (f_uimm))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -1112,7 +1112,7 @@ SEM_FN_NAME (lm32bf,orhii) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = ORSI (CPU (h_gr[FLD (f_r0)]), SLLSI (FLD (f_uimm), 16)); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -1133,7 +1133,7 @@ SEM_FN_NAME (lm32bf,rcsr) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = CPU (h_csr[FLD (f_csr)]); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -1154,7 +1154,7 @@ SEM_FN_NAME (lm32bf,sb) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { QI opval = CPU (h_gr[FLD (f_r1)]); SETMEMQI (current_cpu, pc, ADDSI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm)))), opval); - TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval); } return vpc; @@ -1175,7 +1175,7 @@ SEM_FN_NAME (lm32bf,sextb) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = EXTQISI (TRUNCSIQI (CPU (h_gr[FLD (f_r0)]))); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -1196,7 +1196,7 @@ SEM_FN_NAME (lm32bf,sexth) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = EXTHISI (TRUNCSIHI (CPU (h_gr[FLD (f_r0)]))); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -1217,7 +1217,7 @@ SEM_FN_NAME (lm32bf,sh) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { HI opval = CPU (h_gr[FLD (f_r1)]); SETMEMHI (current_cpu, pc, ADDSI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm)))), opval); - TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval); } return vpc; @@ -1238,7 +1238,7 @@ SEM_FN_NAME (lm32bf,sl) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = SLLSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -1259,7 +1259,7 @@ SEM_FN_NAME (lm32bf,sli) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = SLLSI (CPU (h_gr[FLD (f_r0)]), FLD (f_imm)); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -1280,7 +1280,7 @@ SEM_FN_NAME (lm32bf,sr) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = SRASI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -1301,7 +1301,7 @@ SEM_FN_NAME (lm32bf,sri) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = SRASI (CPU (h_gr[FLD (f_r0)]), FLD (f_imm)); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -1322,7 +1322,7 @@ SEM_FN_NAME (lm32bf,sru) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = SRLSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -1343,7 +1343,7 @@ SEM_FN_NAME (lm32bf,srui) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = SRLSI (CPU (h_gr[FLD (f_r0)]), FLD (f_imm)); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -1364,7 +1364,7 @@ SEM_FN_NAME (lm32bf,sub) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = SUBSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -1385,7 +1385,7 @@ SEM_FN_NAME (lm32bf,sw) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = CPU (h_gr[FLD (f_r1)]); SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[FLD (f_r0)]), EXTHISI (TRUNCSIHI (FLD (f_imm)))), opval); - TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval); } return vpc; @@ -1406,7 +1406,7 @@ SEM_FN_NAME (lm32bf,user) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = lm32bf_user_insn (current_cpu, CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]), FLD (f_user)); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -1444,7 +1444,7 @@ SEM_FN_NAME (lm32bf,xor) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = XORSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)])); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -1465,7 +1465,7 @@ SEM_FN_NAME (lm32bf,xori) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = XORSI (CPU (h_gr[FLD (f_r0)]), ZEXTSISI (FLD (f_uimm))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -1486,7 +1486,7 @@ SEM_FN_NAME (lm32bf,xnor) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = INVSI (XORSI (CPU (h_gr[FLD (f_r0)]), CPU (h_gr[FLD (f_r1)]))); CPU (h_gr[FLD (f_r2)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -1507,7 +1507,7 @@ SEM_FN_NAME (lm32bf,xnori) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { SI opval = INVSI (XORSI (CPU (h_gr[FLD (f_r0)]), ZEXTSISI (FLD (f_uimm)))); CPU (h_gr[FLD (f_r1)]) = opval; - TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "gr", 'x', opval); } return vpc; @@ -1529,7 +1529,7 @@ SEM_FN_NAME (lm32bf,break) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { USI opval = lm32bf_break_insn (current_cpu, pc); SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } SEM_BRANCH_FINI (vpc); @@ -1552,7 +1552,7 @@ SEM_FN_NAME (lm32bf,scall) (SIM_CPU *current_cpu, SEM_ARG sem_arg) { USI opval = lm32bf_scall_insn (current_cpu, pc); SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc); - TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); + CGEN_TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval); } SEM_BRANCH_FINI (vpc); |