From patchwork Tue May 14 15:52:59 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: 164224 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp2804031ili; Tue, 14 May 2019 09:04:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqzQezaP3sr9+gQM1avo6f7MfDfUG4Gf9sN8xXPDyOtlyUJ6i4XqaLPTD9JauKNR4QDV4lg4 X-Received: by 2002:a50:87ab:: with SMTP id a40mr36010404eda.188.1557849852555; Tue, 14 May 2019 09:04:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557849852; cv=none; d=google.com; s=arc-20160816; b=H5DFLdbGUzszI0gPu0v+f3D1NW+Rh+Qx1jFpMAvMJhwzhwFtE9BnaNbSihj9ikp0a9 LKRd/jcNPPLM8S3z9d5Ys8ZBCtzD3474JmnA/vdsq3nZ+eXiQGw0c/g16UzknSd9oYzf FOrffSI36Awl5EHJ19+FCPLmwEMHXmJ6QU2T/FJqFjlF404Yhyz5VOhzWsAVLGvm0Jej 0AlGggltJh4nzIH4CL6mX2+Ro5r1bDePLkdI6CWWEiH+iXHwMDuxEQuFxNzfwWWIqv8h jF2UrEGDntsNlkboPslr8uXxR0BpRag4ujbLxPtn3pejbE6n4Y6aRPw0bMEb5JULKSdZ Wf3w== 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=U06wLwXAasasiurhZZxcEyeJ76fELq2p37jmN4PgTWk=; b=naWCIrEmBkucbfOyjw7/3aDVrF9nqGHDBB3VfVVYKCxXkjDY4CWiGAcMmiaNmmjyi1 ZF5XB2akGdfAfz1rAaBVQpc2qytXGILzcgd91/GkXicD0+shlEH8oTU6BRinWAe/dI6L V6wAh4xrsLUJPyLjjsx1kE2wVau3/T4KNF/J7qx04WDMHmyNEdbKTHFm9Hd9zLvrZwrE VPMXIEBGBC0bst75BkHg9qCcVnB25q3vLTrWKNn00XKwnp/f5fNYyLdaZSgVqKiGVCQ9 NkH95NcE0TLdcRrRD/+kTZsa1I6dPiS/RgU8oACNgNcVwn5o2Z8gp8C6hoYcl+6yEXbs ntYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=VDpoQjdj; 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 g29si1030088eda.138.2019.05.14.09.04.12 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 14 May 2019 09:04:12 -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=VDpoQjdj; 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]:50419 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQZuV-000608-HU for patch@linaro.org; Tue, 14 May 2019 12:04:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60487) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQZjr-0004p4-Qz for qemu-devel@nongnu.org; Tue, 14 May 2019 11:53:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQZjq-0006Ll-IY for qemu-devel@nongnu.org; Tue, 14 May 2019 11:53:11 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:51782) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hQZjq-0006Iq-BT for qemu-devel@nongnu.org; Tue, 14 May 2019 11:53:10 -0400 Received: by mail-wm1-x342.google.com with SMTP id o189so3432238wmb.1 for ; Tue, 14 May 2019 08:53:10 -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=U06wLwXAasasiurhZZxcEyeJ76fELq2p37jmN4PgTWk=; b=VDpoQjdjJpqv+U5DNs7MC4BPRsNXGv0ozijKDokDNKL0x3caANIo9R84k8QzHa0QCh 6BmLy8z17jQKiHV5Hj7HYPHQAfqkrmgqiIqSIRUdg1+8B5QfmU1fq7b6OFyg5BvjnKHT VwJscLuuHnH5ZNUiGQ+v253h+gJFc7ukG0zmFxLSOQjYgIZyDzCJNPolJ+L60B/Vew4S UFmhECwyWsh/AcafCy6xEJ96z1df/tLcKc5G70iees5sNm2TnjWd/owiN1twiwQR3Aqv EZQ9ihWHt573Qqc/6IG/J0udH7GQERlCqO+6CLCP/SNQlC4V38LPnRIVD7j9hB+nmHHb 7VLw== 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=U06wLwXAasasiurhZZxcEyeJ76fELq2p37jmN4PgTWk=; b=VQnD88UKEM9aR9vEiN8dVBRSf7JIBuJZ/2wJuKSNFi46VQVJYXX4g2C+zcVZR8UVBk GadYAq9dlkmElyR0iEhLpylr9hMD3A3PWE+zkAY5OGwaJtwfo2kZffOHL/wykqzrj1ek bfNMP5mh2duC8Xq/64dMujanmA0MUy9VQkJAlXuA+TdmGoLHu5868xTEqCsTvkdczXCY 4QIgpkuYOFkVazegSbM3ysBswCnhko6DxrrT9WbB5oYwHjPO29LDhQ/H2Ua6P6UoIzL4 RZ1xVTdCx33/qCa347iQTu4nzU4SAfr3ADENSpZerQ4V8254XSwL/pOD8OB1ullXiH+t qzxQ== X-Gm-Message-State: APjAAAVXqga9qe5Wf7OrGHSldc7fRd7D/PHJg466VdH5vFh3gl2aUDbi Mtrbl7YcFvBHJxTgsTQfnOITsg== X-Received: by 2002:a1c:2c89:: with SMTP id s131mr19508380wms.142.1557849189250; Tue, 14 May 2019 08:53:09 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id y40sm19431367wrd.96.2019.05.14.08.53.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 May 2019 08:53:05 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id CF5701FF99; Tue, 14 May 2019 16:53:02 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 14 May 2019 16:52:59 +0100 Message-Id: <20190514155301.16123-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190514155301.16123-1-alex.bennee@linaro.org> References: <20190514155301.16123-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::342 Subject: [Qemu-devel] [RFC PATCH 09/11] 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 , qemu-arm@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Aleksandar Markovic , 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 --- target/mips/Makefile.objs | 3 ++- target/mips/helper.h | 2 ++ target/mips/translate.c | 8 ++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic 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;