From nobody Tue Feb 10 20:28:22 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1565342633; cv=none; d=zoho.com; s=zohoarc; b=Fz0SHQW0Qpr7NWGl7aOU8teDNfZ3Org1S2Fpc1adQ+f1P0eQqljUmSdkfw3PJtzYg/ASkJ+pacgYSWmUlJAK+DbXlZT+g5fZGZ5KQPIQRz58iNd6TUtihJOywmkAgvUR6I3ZrbYy9oxw7WK0T/AwzCdkBh6SUTQJt3UL/GWhE6k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565342633; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=pH6yorJSkceA3ksBNVomDICRxgnjhzqlXkTAbU0+vbc=; b=naEXWBHZQRXFP+Esz0ehgOwdttNW76VPubEm+m6wDyN9HGQYM6UNutPN0ceplxlbnBRSYY8xT7FGaBPsCFg/oWJDHV9K/XvI0R/qEBxQU3s8XuciFW4Il31m/8P02wgb13nwxaA+t1/P14dAKHo7jGhNdL865Z+dgMnLdWUCsBQ= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1565342633806472.78275438394496; Fri, 9 Aug 2019 02:23:53 -0700 (PDT) Received: from localhost ([::1]:57610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hw17o-0005eW-T4 for importer@patchew.org; Fri, 09 Aug 2019 05:23:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48094) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hw13s-000617-Vd for qemu-devel@nongnu.org; Fri, 09 Aug 2019 05:19:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hw13r-0007f9-RK for qemu-devel@nongnu.org; Fri, 09 Aug 2019 05:19:48 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:52109) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hw13r-0007e9-Ki for qemu-devel@nongnu.org; Fri, 09 Aug 2019 05:19:47 -0400 Received: by mail-wm1-x344.google.com with SMTP id 207so4988819wma.1 for ; Fri, 09 Aug 2019 02:19:47 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id c1sm5763943wmc.40.2019.08.09.02.19.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Aug 2019 02:19:43 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 57FBA1FF92; Fri, 9 Aug 2019 10:19:41 +0100 (BST) 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=pH6yorJSkceA3ksBNVomDICRxgnjhzqlXkTAbU0+vbc=; b=x/BNiUQzc0YrqGXyzZG3EF3SNKeDkn9sPFKWkj0CqUHXxg12JF2xdeGcFCmOlFgzbD P8NpEYutEUxYMi6tw3p5BdVsunTJPK6VVbkNB1CIxlr7Ge0c3PZiB0nCbaR5i9ymnq9o Vgr6tlkn13fs69Rm8a/nOKospOI6s3lnie5BE8qlAK6HseIg33ZkT7NI3teAH+q+qyOS FZ57kcKuWcDcuOpc1JE3dsKnXfPF17z4s13RYcbFnSHeuBDeKCn9qmxERQwklU7ByyYW smChdcp1b7Re2GxHKZiEZVzDxWaL4sMi3zAExFNlLRY1OmJepBCoTAlTkpj+DoxBs1qD sxEQ== 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=pH6yorJSkceA3ksBNVomDICRxgnjhzqlXkTAbU0+vbc=; b=ouCCfl6jYeKiDTDSGvxLq2rKhoNS6Ene/+JMe/gHNQswUSxt65NsenmGHbQFO7bvML oXIwDVPix1fiX5KyyOpz7BA7LHWtL6QQSJifI0pBZ8dyGAc4DDO6E//gDedpIzgcfipC FlefA7ctQvVSh6h9XUaa209kqHUHlSwelZA/twEHOcYhU5bRz1x+qdKxBI0ggzr3G74L LUb8TVm6PD0YCjAetURNmcDZmqxL6lA60VxWNOqEKDwjk2Ayvn/LICe8QjkeBiG1MTg2 50PKIMJ5h6zmnpNI+zDJmmwsokleO2bFcmsnp/NWxKKtEKw4mFQifxznbWw2nQM6vYoU pSow== X-Gm-Message-State: APjAAAX9k5mVXwco3JrAOd3s//Dh0zYLJAdTO509G15BeXwD/C3dOinP pnBD+/iWUbJqaGSGw8G+WACRcw== X-Google-Smtp-Source: APXvYqxiF+dCi8jtuMIR2xz/Hm5iWrUNkxqDStJkMFlfyMCNtnllEIjhM6AR5QH9v4AqL45yUXNO6A== X-Received: by 2002:a1c:721a:: with SMTP id n26mr1142246wmc.88.1565342386500; Fri, 09 Aug 2019 02:19:46 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Fri, 9 Aug 2019 10:19:38 +0100 Message-Id: <20190809091940.1223-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190809091940.1223-1-alex.bennee@linaro.org> References: <20190809091940.1223-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 Subject: [Qemu-devel] [PATCH v2 5/7] target/mips: rationalise softfloat includes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aleksandar Rikalo , Riku Voipio , armbru@redhat.com, Laurent Vivier , Aleksandar Markovic , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) We should avoid including the whole of softfloat headers in cpu.h and explicitly include it only where we will be calling softfloat functions. We can use the -types.h in cpu.h for the few bits that are global. We also move the restore_snan_bit_mode into internal.h and include -helpers.h there. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Aleksandar Markovic --- v2 - move restore_snan_bit_mode to internal.h --- linux-user/mips/cpu_loop.c | 1 + target/mips/cpu.h | 8 +------- target/mips/internal.h | 7 +++++++ target/mips/msa_helper.c | 1 + target/mips/op_helper.c | 1 + 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/linux-user/mips/cpu_loop.c b/linux-user/mips/cpu_loop.c index 0ba894fa7aa..39915b3fde2 100644 --- a/linux-user/mips/cpu_loop.c +++ b/linux-user/mips/cpu_loop.c @@ -22,6 +22,7 @@ #include "qemu.h" #include "cpu_loop-common.h" #include "elf.h" +#include "internal.h" =20 # ifdef TARGET_ABI_MIPSO32 # define MIPS_SYS(name, args) args, diff --git a/target/mips/cpu.h b/target/mips/cpu.h index 21c0615e020..d235117dab3 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -5,7 +5,7 @@ =20 #include "cpu-qom.h" #include "exec/cpu-defs.h" -#include "fpu/softfloat.h" +#include "fpu/softfloat-types.h" #include "mips-defs.h" =20 #define TCG_GUEST_DEFAULT_MO (0) @@ -1195,12 +1195,6 @@ void itc_reconfigure(struct MIPSITUState *tag); /* helper.c */ target_ulong exception_resume_pc(CPUMIPSState *env); =20 -static inline void restore_snan_bit_mode(CPUMIPSState *env) -{ - set_snan_bit_is_one((env->active_fpu.fcr31 & (1 << FCR31_NAN2008)) =3D= =3D 0, - &env->active_fpu.fp_status); -} - static inline void cpu_get_tb_cpu_state(CPUMIPSState *env, target_ulong *p= c, target_ulong *cs_base, uint32_t *f= lags) { diff --git a/target/mips/internal.h b/target/mips/internal.h index b2b41a51ab4..49a7a7d8f56 100644 --- a/target/mips/internal.h +++ b/target/mips/internal.h @@ -7,6 +7,7 @@ #ifndef MIPS_INTERNAL_H #define MIPS_INTERNAL_H =20 +#include "fpu/softfloat-helpers.h" =20 /* MMU types, the first four entries have the same layout as the CP0C0_MT field. */ @@ -226,6 +227,12 @@ static inline void restore_flush_mode(CPUMIPSState *en= v) &env->active_fpu.fp_status); } =20 +static inline void restore_snan_bit_mode(CPUMIPSState *env) +{ + set_snan_bit_is_one((env->active_fpu.fcr31 & (1 << FCR31_NAN2008)) =3D= =3D 0, + &env->active_fpu.fp_status); +} + static inline void restore_fp_status(CPUMIPSState *env) { restore_rounding_mode(env); diff --git a/target/mips/msa_helper.c b/target/mips/msa_helper.c index a5a86572b4a..f24061e2af7 100644 --- a/target/mips/msa_helper.c +++ b/target/mips/msa_helper.c @@ -22,6 +22,7 @@ #include "internal.h" #include "exec/exec-all.h" #include "exec/helper-proto.h" +#include "fpu/softfloat.h" =20 /* Data format min and max values */ #define DF_BITS(df) (1 << ((df) + 3)) diff --git a/target/mips/op_helper.c b/target/mips/op_helper.c index 9e2e02f8586..f88a3ab9043 100644 --- a/target/mips/op_helper.c +++ b/target/mips/op_helper.c @@ -25,6 +25,7 @@ #include "exec/exec-all.h" #include "exec/cpu_ldst.h" #include "sysemu/kvm.h" +#include "fpu/softfloat.h" =20 /*************************************************************************= ****/ /* Exceptions processing helpers */ --=20 2.20.1