aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sim/lm32/Makefile.in3
-rw-r--r--sim/lm32/cpu.h11
-rw-r--r--sim/lm32/dv-lm32cpu.c3
-rw-r--r--sim/lm32/user.c3
4 files changed, 17 insertions, 3 deletions
diff --git a/sim/lm32/Makefile.in b/sim/lm32/Makefile.in
index d827b71..db15bef 100644
--- a/sim/lm32/Makefile.in
+++ b/sim/lm32/Makefile.in
@@ -24,9 +24,6 @@ SIM_EXTRA_DEPS = $(CGEN_INCLUDE_DEPS) $(srcdir)/../../opcodes/lm32-desc.h \
SIM_EXTRA_CLEAN = lm32-clean
-# Some modules don't build cleanly yet.
-dv-lm32cpu.o mloop.o sem.o traps.o user.o: SIM_WERROR_CFLAGS =
-
## COMMON_POST_CONFIG_FRAG
arch = lm32
diff --git a/sim/lm32/cpu.h b/sim/lm32/cpu.h
index 05b98be..d025065 100644
--- a/sim/lm32/cpu.h
+++ b/sim/lm32/cpu.h
@@ -163,6 +163,17 @@ struct scache {
struct argbuf argbuf;
};
+/* From traps.c. */
+extern USI lm32bf_b_insn (SIM_CPU * current_cpu, USI r0, USI f_r0);
+extern USI lm32bf_divu_insn (SIM_CPU * current_cpu, IADDR pc, USI r0, USI r1, USI r2);
+extern USI lm32bf_modu_insn (SIM_CPU * current_cpu, IADDR pc, USI r0, USI r1, USI r2);
+extern void lm32bf_wcsr_insn (SIM_CPU * current_cpu, USI f_csr, USI r1);
+extern USI lm32bf_break_insn (SIM_CPU * current_cpu, IADDR pc);
+extern USI lm32bf_scall_insn (SIM_CPU * current_cpu, IADDR pc);
+
+/* From user.c. */
+extern UINT lm32bf_user_insn (SIM_CPU * current_cpu, INT r0, INT r1, UINT imm);
+
/* Macros to simplify extraction, reading and semantic code.
These define and assign the local vars that contain the insn's fields. */
diff --git a/sim/lm32/dv-lm32cpu.c b/sim/lm32/dv-lm32cpu.c
index b97580e..15a08ee 100644
--- a/sim/lm32/dv-lm32cpu.c
+++ b/sim/lm32/dv-lm32cpu.c
@@ -18,6 +18,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#define WANT_CPU lm32bf
+#define WANT_CPU_LM32BF
+
/* This must come before any other includes. */
#include "defs.h"
diff --git a/sim/lm32/user.c b/sim/lm32/user.c
index 3cc21a2..d301d48 100644
--- a/sim/lm32/user.c
+++ b/sim/lm32/user.c
@@ -21,6 +21,9 @@
/* This must come before any other includes. */
#include "defs.h"
+#define WANT_CPU lm32bf
+#define WANT_CPU_LM32BF
+
#include "sim-main.h"
/* Handle user defined instructions. */