qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 74/74] tests/tcg/rx: Enable semihosting multiarch tests


From: Richard Henderson
Subject: [PATCH v2 74/74] tests/tcg/rx: Enable semihosting multiarch tests
Date: Tue, 3 May 2022 12:48:43 -0700

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 tests/tcg/rx/outc.c                  | 15 +++++++++++++++
 tests/tcg/rx/Makefile.softmmu-target | 24 ++++++++++++++++++++++++
 2 files changed, 39 insertions(+)
 create mode 100644 tests/tcg/rx/outc.c
 create mode 100644 tests/tcg/rx/Makefile.softmmu-target

diff --git a/tests/tcg/rx/outc.c b/tests/tcg/rx/outc.c
new file mode 100644
index 0000000000..3f8720d7ca
--- /dev/null
+++ b/tests/tcg/rx/outc.c
@@ -0,0 +1,15 @@
+/*
+ * minilib.h compatibility code
+ *
+ * Copyright Linaro Ltd 2022
+ *
+ * Rely on newlib/libgloss for functionality.
+ */
+
+#include "minilib.h"
+#include <sys/unistd.h>
+
+void __sys_outc(char c)
+{
+    write(1, &c, 1);
+}
diff --git a/tests/tcg/rx/Makefile.softmmu-target 
b/tests/tcg/rx/Makefile.softmmu-target
new file mode 100644
index 0000000000..aaa1cebb92
--- /dev/null
+++ b/tests/tcg/rx/Makefile.softmmu-target
@@ -0,0 +1,24 @@
+#
+# RX system tests
+#
+
+RX_SYSTEM_SRC = $(SRC_PATH)/tests/tcg/rx
+VPATH += $(RX_SYSTEM_SRC)
+
+TESTS += $(MULTIARCH_TESTS)
+
+CFLAGS += -Og -g $(MINILIB_INC)
+LDFLAGS += -msim
+
+MINILIB_OBJS += outc.o
+.PRECIOUS: $(MINILIB_OBJS)
+
+%.o: %.c
+       $(call quiet-command, $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@, CC, 
$@)
+
+%: %.o $(LINK_SCRIPT) $(MINILIB_OBJS)
+       $(call quiet-command, $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ 
$(LDFLAGS) $(MINILIB_OBJS), LD, $@)
+
+QEMU_OPTS = -M gdbsim-r5f562n7 -m 128 -semihosting-config 
enable=on,target=native,chardev=output -kernel
+
+memory: CFLAGS+=-DCHECK_UNALIGNED=0
-- 
2.34.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]