[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 09/28] target/mips: only build mips-semi for softmmu
From: |
Alex Bennée |
Subject: |
[Qemu-devel] [PULL 09/28] target/mips: only build mips-semi for softmmu |
Date: |
Tue, 28 May 2019 10:49:34 +0100 |
The is_uhi gates all semihosting calls and always returns false for
CONFIG_USER_ONLY builds. There is no reason to build and link
mips-semi for these builds so lets fix that.
Signed-off-by: Alex Bennée <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Aleksandar Markovic <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
diff --git a/target/mips/Makefile.objs b/target/mips/Makefile.objs
index 651f36f5176..3448ad5e193 100644
--- a/target/mips/Makefile.objs
+++ b/target/mips/Makefile.objs
@@ -1,4 +1,5 @@
obj-y += translate.o dsp_helper.o op_helper.o lmi_helper.o helper.o cpu.o
-obj-y += gdbstub.o msa_helper.o mips-semi.o
+obj-y += gdbstub.o msa_helper.o
+obj-$(CONFIG_SOFTMMU) += mips-semi.o
obj-$(CONFIG_SOFTMMU) += machine.o cp0_timer.o
obj-$(CONFIG_KVM) += kvm.o
diff --git a/target/mips/helper.h b/target/mips/helper.h
index a6d687e3405..90ab03b76e3 100644
--- a/target/mips/helper.h
+++ b/target/mips/helper.h
@@ -2,7 +2,9 @@ DEF_HELPER_3(raise_exception_err, noreturn, env, i32, int)
DEF_HELPER_2(raise_exception, noreturn, env, i32)
DEF_HELPER_1(raise_exception_debug, noreturn, env)
+#ifndef CONFIG_USER_ONLY
DEF_HELPER_1(do_semihosting, void, env)
+#endif
#ifdef TARGET_MIPS64
DEF_HELPER_4(sdl, void, env, tl, tl, int)
diff --git a/target/mips/translate.c b/target/mips/translate.c
index 3cd5b11b16b..fb905c88b57 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -13726,6 +13726,14 @@ static inline bool is_uhi(int sdbbp_code)
#endif
}
+#ifdef CONFIG_USER_ONLY
+/* The above should dead-code away any calls to this..*/
+static inline void gen_helper_do_semihosting(void *env)
+{
+ g_assert_not_reached();
+}
+#endif
+
static int decode_mips16_opc (CPUMIPSState *env, DisasContext *ctx)
{
int rx, ry;
--
2.20.1
- [Qemu-devel] [PULL 00/28] testing/next (system tests, docker, iotests), Alex Bennée, 2019/05/28
- [Qemu-devel] [PULL 05/28] target/arm: fixup some of the commentary for arm-semi, Alex Bennée, 2019/05/28
- [Qemu-devel] [PULL 07/28] target/arm: add LOG_UNIMP messages to arm-semi, Alex Bennée, 2019/05/28
- [Qemu-devel] [PULL 01/28] semihosting: move semihosting configuration into its own directory, Alex Bennée, 2019/05/28
- [Qemu-devel] [PULL 02/28] semihosting: introduce CONFIG_SEMIHOSTING, Alex Bennée, 2019/05/28
- [Qemu-devel] [PULL 08/28] target/arm: correct return values for WRITE/READ in arm-semi, Alex Bennée, 2019/05/28
- [Qemu-devel] [PULL 04/28] semihosting: enable chardev backed output for console, Alex Bennée, 2019/05/28
- [Qemu-devel] [PULL 03/28] semihosting: implement a semihosting console, Alex Bennée, 2019/05/28
- [Qemu-devel] [PULL 10/28] target/mips: convert UHI_plog to use common semihosting code, Alex Bennée, 2019/05/28
- [Qemu-devel] [PULL 09/28] target/mips: only build mips-semi for softmmu,
Alex Bennée <=
- [Qemu-devel] [PULL 11/28] MAINTAINERS: update for semihostings new home, Alex Bennée, 2019/05/28
- [Qemu-devel] [PULL 06/28] target/arm: use the common interface for WRITE0/WRITEC in arm-semi, Alex Bennée, 2019/05/28
- [Qemu-devel] [PULL 12/28] tests/docker: add ubuntu 18.04, Alex Bennée, 2019/05/28
- [Qemu-devel] [PULL 24/28] Makefile: include per-target build directories in coverage report, Alex Bennée, 2019/05/28
- [Qemu-devel] [PULL 14/28] tests/tcg/multiarch: add support for multiarch system tests, Alex Bennée, 2019/05/28
- [Qemu-devel] [PULL 17/28] tests/tcg/aarch64: add system boot.S, Alex Bennée, 2019/05/28
- [Qemu-devel] [PULL 13/28] tests/docker: Test more components on the Fedora default image, Alex Bennée, 2019/05/28