aboutsummaryrefslogtreecommitdiff
path: root/sim/mips/dv-tx3904cpu.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-11-11 01:29:21 -0500
committerMike Frysinger <vapier@gentoo.org>2016-11-11 01:29:21 -0500
commit91588b3af8e026ba11c7368476cc1f3fa8c2e2b1 (patch)
treeab1d3301a65afb2ddadf42f92fcbfe9e58f49660 /sim/mips/dv-tx3904cpu.c
parente04659e8607bfed6995fd2ced9aaab55e2143302 (diff)
downloadgdb-91588b3af8e026ba11c7368476cc1f3fa8c2e2b1.zip
gdb-91588b3af8e026ba11c7368476cc1f3fa8c2e2b1.tar.gz
gdb-91588b3af8e026ba11c7368476cc1f3fa8c2e2b1.tar.bz2
sim: mips: fix dv-tx3904cpu build error
When building for mipstx39-rtems4.12 targets, some funcs use SD and CPU implicitly. Restore the defines for these to the local sd and cpu vars. This was broken by the clean up in commit d47f5b30d8481272e9480118bdcb. Reported-by: Joel Sherrill <joel.sherrill@oarcorp.com>
Diffstat (limited to 'sim/mips/dv-tx3904cpu.c')
-rw-r--r--sim/mips/dv-tx3904cpu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sim/mips/dv-tx3904cpu.c b/sim/mips/dv-tx3904cpu.c
index da28a49..4a0ec44 100644
--- a/sim/mips/dv-tx3904cpu.c
+++ b/sim/mips/dv-tx3904cpu.c
@@ -143,6 +143,9 @@ deliver_tx3904cpu_interrupt (struct hw *me,
sim_cpu *cpu = STATE_CPU (sd, 0); /* NB: fix CPU 0. */
address_word cia = CPU_PC_GET (cpu);
+#define CPU cpu
+#define SD sd
+
if (controller->pending_reset)
{
controller->pending_reset = 0;
@@ -187,6 +190,8 @@ deliver_tx3904cpu_interrupt (struct hw *me,
}
} /* interrupt set */
}
+#undef CPU
+#undef SD
}