From patchwork Tue May 28 09:49:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165282 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp8255159ili; Tue, 28 May 2019 02:59:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqzHbN7nzUUZ7wBN4rKGthLrGYmtZ0n4NpdIPw30nD6hnB9IKOdPStMcmjFp9MJ2jKF4i+4h X-Received: by 2002:a05:620a:12ef:: with SMTP id f15mr4458466qkl.340.1559037544138; Tue, 28 May 2019 02:59:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559037544; cv=none; d=google.com; s=arc-20160816; b=j+rWQnRpPL81f5XPc9NljoYmJWf+GGaQOOrYZY+Wx3BMYpjllw4yUYkpNb/DMgTj98 6OX0mgQql5B3HU8bKPBlEtybC/EnzxptAamR37WzTAVzV7DIQCd7ZqT7C39TBfHtiZzL IdtSgDdoh3HEqhOkkY9tkHclnQ89XmdS29ztUE5rOUObpDxws+QqvZSi86B+GSQPtc1M 051Ue0p2eS5L9jVyygGaNlGU3jX2poGrTNOKbJpENVy3TXjTALNYJ1kvyk7kIU64BAG7 tDgd3QCNsGrgV+ZKexDDD8bYZoquAIkOYGEwJFskbPIRCdSlZMGc2PCHz8+e2ySgFXXP xA1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=afO8c5gpnfvt0aBAYWof1X05QoKKDVER3olU0OZ3Ft4=; b=ihOzfhXe9QulMLtoUqWKcYbhhlA+FHQNzs7UGpckcww1l0WTFJ9Rx6vs8HozFgiTjY GbZimav8fIVt1uyf8JJmdbVRFdUxXvClcewY9AKJCSXuCvDfSH/whM726j/CCpXqTePX cA1aVLvZxrV+RWuEkDusMtmW0Lg5dJz+m3vk0xDaEte51DmPVfP5wlruV74PqbLz536j x5GIU3jxNLwTfiLuK4NdYz+t5z0fr04AiMZwu9NgWEIG6j9aPvL1ubKR+0C8OpuLgxjl k8CEI5xRsECIJbQJ4z0LEbWHEQ66mHDiX3T4xgNW5QXLJZJxQmThabFZNFB5np73XvkS Bg4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=RjtP3iwa; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y5si6122062qvr.17.2019.05.28.02.59.04 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 28 May 2019 02:59:04 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=RjtP3iwa; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:60054 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVYsp-0005Hg-KC for patch@linaro.org; Tue, 28 May 2019 05:59:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVYkA-0006IF-V9 for qemu-devel@nongnu.org; Tue, 28 May 2019 05:50:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hVYk6-00007z-TH for qemu-devel@nongnu.org; Tue, 28 May 2019 05:50:06 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:45553) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hVYk6-00005p-5i for qemu-devel@nongnu.org; Tue, 28 May 2019 05:50:02 -0400 Received: by mail-wr1-x444.google.com with SMTP id b18so19436332wrq.12 for ; Tue, 28 May 2019 02:50:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=afO8c5gpnfvt0aBAYWof1X05QoKKDVER3olU0OZ3Ft4=; b=RjtP3iwasgcd5Zj+tL+Sq+/0Bj7lnX+8o2cRf0FrGkw+awiJ8U7REgfHqquOPA3Exr vibhzmDRffqt/Tk2+jM2i8l1wM+bHScxb4P/8a1N9VoeV13zqLYdRKAySXLDZOgb3Qs0 TjabRAWiwb7RCgJgNDpvKtnMDXU2JSSyfqqBkBawtTXZjmJ1OuhzGRfDUkFSM+neeWKe 3S057Es93aWlb1eyVe8FQ5qGjHgNMwE/mhS7aRUqbQ7+RrgCRu475+Q7jK/JO65rbVd9 aeS/5+iq73Bf52/3Sp8aJWOY5pZlhfbx2SQ9HfqtibBe/l8+zbGTdQRkKsnRnhtnGNyv I4xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=afO8c5gpnfvt0aBAYWof1X05QoKKDVER3olU0OZ3Ft4=; b=oUG7sFOg855lYF/75/gpgB5+8DkN7s5k3fuKfNWrXGLGOzd0vU01zjzKO9NFKONA4S AqgVkNw2hxgveiZ5PFXWd2Hq9KyXnUT+4RjeggHtOx7htwFKxo/rm/QnspAggRq8AKgP KeXsjKNij0KSRXDQ8vzuYoJvnLuCz4xSWKgPGO4QHYAXigDPEvtkvqWs8GALKzryj+hr 6JfI/5Nji4A6qdROLl9AyGFSmEBk943WReM0xB8xZfgavKlENqwdPllDLqYbRlOhbyxj mP0pcXo9Ejz6XIxnjSpvR1XgBWdmamfbPCuEUIGmJ94ps2Hdx7LxkS7C+c5NJizyCZMm uiCg== X-Gm-Message-State: APjAAAXvvg5EkR5OyjKvhDE0UGiESbGiKL1Hnf2njZaGoIOc5+F+cLkq r8dKByWxrq1hfDRgeyoa+gaQFw== X-Received: by 2002:adf:f041:: with SMTP id t1mr4698093wro.74.1559037000879; Tue, 28 May 2019 02:50:00 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id h200sm3522991wme.11.2019.05.28.02.49.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 May 2019 02:49:56 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 44D881FF87; Tue, 28 May 2019 10:49:54 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Tue, 28 May 2019 10:49:34 +0100 Message-Id: <20190528094953.14898-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190528094953.14898-1-alex.bennee@linaro.org> References: <20190528094953.14898-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::444 Subject: [Qemu-devel] [PULL 09/28] target/mips: only build mips-semi for softmmu X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aleksandar Rikalo , =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , qemu-devel@nongnu.org, Aleksandar Markovic , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , Aurelien Jarno Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic Reviewed-by: Richard Henderson -- 2.20.1 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;