This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] sim: mips: fix dv-tx3904cpu build error
- From: Michael Frysinger <vapier at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 11 Nov 2016 06:34:30 -0000
- Subject: [binutils-gdb] sim: mips: fix dv-tx3904cpu build error
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=91588b3af8e026ba11c7368476cc1f3fa8c2e2b1
commit 91588b3af8e026ba11c7368476cc1f3fa8c2e2b1
Author: Mike Frysinger <vapier@gentoo.org>
Date: Fri Nov 11 01:29:21 2016 -0500
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>
Diff:
---
sim/mips/ChangeLog | 5 +++++
sim/mips/dv-tx3904cpu.c | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog
index dae00e7..2b1a032 100644
--- a/sim/mips/ChangeLog
+++ b/sim/mips/ChangeLog
@@ -1,5 +1,10 @@
2016-11-11 Mike Frysinger <vapier@gentoo.org>
+ * dv-tx3904cpu.c (deliver_tx3904cpu_interrupt): Define CPU to cpu
+ and SD to sd.
+
+2016-11-11 Mike Frysinger <vapier@gentoo.org>
+
* mips.igen (check_u64): Enable for `r3900'.
2016-02-05 Mike Frysinger <vapier@gentoo.org>
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
}