diff options
author | Mike Frysinger <vapier@gentoo.org> | 2023-12-14 22:34:28 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2023-12-14 22:34:28 -0500 |
commit | 2f1de74501909db76a3a0b73da9d287d7458eef1 (patch) | |
tree | 08677eec8537ed3512be6b8714b518020329ef70 | |
parent | 880530b71fbbb3e778ee70fe5623f8641e6aceb7 (diff) | |
download | fsf-binutils-gdb-2f1de74501909db76a3a0b73da9d287d7458eef1.zip fsf-binutils-gdb-2f1de74501909db76a3a0b73da9d287d7458eef1.tar.gz fsf-binutils-gdb-2f1de74501909db76a3a0b73da9d287d7458eef1.tar.bz2 |
sim: m32r: use @cpu@_fill_argbuf_tp to set trace & profile state
The mloop.in code does this, but these variants do not. Use it to
avoid unused function warnings. The fast_p logic in these files
also looks off, but that'll require a bit more work to fixup.
CC m32r/mloopx.o
m32r/mloopx.c:37:1: error: ‘m32rxf_fill_argbuf_tp’ defined but not used [-Werror=unused-function]
37 | m32rxf_fill_argbuf_tp (const SIM_CPU *cpu, ARGBUF *abuf,
| ^~~~~~~~~~~~~~~~~~~~~
CC m32r/mloop2.o
m32r/mloop2.c:37:1: error: ‘m32r2f_fill_argbuf_tp’ defined but not used [-Werror=unused-function]
37 | m32r2f_fill_argbuf_tp (const SIM_CPU *cpu, ARGBUF *abuf,
| ^~~~~~~~~~~~~~~~~~~~~
Reported-by: Simon Marchi <simon.marchi@polymtl.ca>
Tested-By: Simon Marchi <simon.marchi@polymtl.ca>
-rw-r--r-- | sim/m32r/mloop2.in | 12 | ||||
-rw-r--r-- | sim/m32r/mloopx.in | 12 |
2 files changed, 8 insertions, 16 deletions
diff --git a/sim/m32r/mloop2.in b/sim/m32r/mloop2.in index 6d83b28..e7982fc 100644 --- a/sim/m32r/mloop2.in +++ b/sim/m32r/mloop2.in @@ -90,8 +90,7 @@ emit_full16 (SIM_CPU *current_cpu, PCADDR pc, CGEN_INSN_INT insn, SCACHE *sc, @cpu@_emit_before (current_cpu, sc, pc, 1); id = emit_16 (current_cpu, pc, insn, sc + 1, 0, 0); @cpu@_emit_after (current_cpu, sc + 2, pc); - sc[1].argbuf.trace_p = trace_p; - sc[1].argbuf.profile_p = profile_p; + @cpu@_fill_argbuf_tp (current_cpu, &sc[1].argbuf, trace_p, profile_p); return id; } @@ -140,15 +139,13 @@ emit_full_parallel (SIM_CPU *current_cpu, PCADDR pc, CGEN_INSN_INT insn, /* FIXME: No need to handle this parallelly if second is nop. */ id = emit_16 (current_cpu, pc, insn >> 16, sc + 1, 0, 1); - sc[1].argbuf.trace_p = trace_p; - sc[1].argbuf.profile_p = profile_p; + @cpu@_fill_argbuf_tp (current_cpu, &sc[1].argbuf, trace_p, profile_p); @cpu@_emit_before (current_cpu, sc + 2, pc, 0); /* Note that this can never be a cti. No cti's go in the S pipeline. */ id2 = emit_16 (current_cpu, pc + 2, insn & 0x7fff, sc + 3, 0, 0); - sc[3].argbuf.trace_p = trace_p; - sc[3].argbuf.profile_p = profile_p; + @cpu@_fill_argbuf_tp (current_cpu, &sc[3].argbuf, trace_p, profile_p); /* Set sc/snc insns notion of where to skip to. */ if (IDESC_SKIP_P (id)) @@ -184,8 +181,7 @@ emit_full32 (SIM_CPU *current_cpu, PCADDR pc, CGEN_INSN_INT insn, SCACHE *sc, @cpu@_emit_before (current_cpu, sc, pc, 1); id = emit_32 (current_cpu, pc, insn, sc + 1, 0); @cpu@_emit_after (current_cpu, sc + 2, pc); - sc[1].argbuf.trace_p = trace_p; - sc[1].argbuf.profile_p = profile_p; + @cpu@_fill_argbuf_tp (current_cpu, &sc[1].argbuf, trace_p, profile_p); return id; } diff --git a/sim/m32r/mloopx.in b/sim/m32r/mloopx.in index 4f9868e..e601dca 100644 --- a/sim/m32r/mloopx.in +++ b/sim/m32r/mloopx.in @@ -90,8 +90,7 @@ emit_full16 (SIM_CPU *current_cpu, PCADDR pc, CGEN_INSN_INT insn, SCACHE *sc, @cpu@_emit_before (current_cpu, sc, pc, 1); id = emit_16 (current_cpu, pc, insn, sc + 1, 0, 0); @cpu@_emit_after (current_cpu, sc + 2, pc); - sc[1].argbuf.trace_p = trace_p; - sc[1].argbuf.profile_p = profile_p; + @cpu@_fill_argbuf_tp (current_cpu, &sc[1].argbuf, trace_p, profile_p); return id; } @@ -140,15 +139,13 @@ emit_full_parallel (SIM_CPU *current_cpu, PCADDR pc, CGEN_INSN_INT insn, /* FIXME: No need to handle this parallelly if second is nop. */ id = emit_16 (current_cpu, pc, insn >> 16, sc + 1, 0, 1); - sc[1].argbuf.trace_p = trace_p; - sc[1].argbuf.profile_p = profile_p; + @cpu@_fill_argbuf_tp (current_cpu, &sc[1].argbuf, trace_p, profile_p); @cpu@_emit_before (current_cpu, sc + 2, pc, 0); /* Note that this can never be a cti. No cti's go in the S pipeline. */ id2 = emit_16 (current_cpu, pc + 2, insn & 0x7fff, sc + 3, 0, 0); - sc[3].argbuf.trace_p = trace_p; - sc[3].argbuf.profile_p = profile_p; + @cpu@_fill_argbuf_tp (current_cpu, &sc[3].argbuf, trace_p, profile_p); /* Set sc/snc insns notion of where to skip to. */ if (IDESC_SKIP_P (id)) @@ -184,8 +181,7 @@ emit_full32 (SIM_CPU *current_cpu, PCADDR pc, CGEN_INSN_INT insn, SCACHE *sc, @cpu@_emit_before (current_cpu, sc, pc, 1); id = emit_32 (current_cpu, pc, insn, sc + 1, 0); @cpu@_emit_after (current_cpu, sc + 2, pc); - sc[1].argbuf.trace_p = trace_p; - sc[1].argbuf.profile_p = profile_p; + @cpu@_fill_argbuf_tp (current_cpu, &sc[1].argbuf, trace_p, profile_p); return id; } |