From patchwork Thu Aug 8 16:41:11 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: 170817 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp8813593ile; Thu, 8 Aug 2019 09:41:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqwv01JcnbIgeJjR1VvXeMzvbeYVXCfivj7UVefG5gNm12C5HtGjNfT/2YqKZGFqnU8mWb8A X-Received: by 2002:ac8:23cc:: with SMTP id r12mr10224882qtr.241.1565282497630; Thu, 08 Aug 2019 09:41:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565282497; cv=none; d=google.com; s=arc-20160816; b=SybxoHTi9bNMdTSjTNwOdm1/FmgJZFeK0HLYoL8iiIpG/F5n1RZibxKqcDvs6KLS+k ZhJe3Qhs9LyzfW9xpaD6Hu/3+IvArUTTyJD8dDwXjZ7l8HuRb3xavn1LnbiOAnwgpzpZ fGMrqoxngaafoaTkFaJLhVYFknSa9q3fwMiHrWPs+eVEp+33Tszv3y+AaBH4XLQokwOa MfWiUbuHjtMgpHl97Agow2BVFsXj6gma9GMyqn/c9Xo++pqKAg8hSG0NhIqEEEhUaMYu NFMbTRASjUWvgzRUoqBsTpR4mMil0dGx6Iyq9QDjgz72FqDUVfMAP4xYc+TIKoZ7//ZS pS/Q== 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=hDv32oe4BfXiw2BHcRVZz1ojHlvhasaJvI/EtnY/8lY=; b=UhtP7NKgLm3GgZLlbCfaAgJZUpVgbLQjUW+uaxHKKQz1XjkuqkoT9BEoykiDPO1DS+ SD23NPFKTKS3/FNNlH5FVEbSbgM/U5t9hT554HTwu80UJ70BnMvqEwvOC1KpvprdJ0ax 1+6b+AkBn9pEGeDtk0xKrK2Kf/yw+Age5beJ5YKgnUX8AreiJlpp4IJsE8U+cZXulFeu C4mF8y7EHTYfMAEzX9s8B+d2doamR8t8EU15chTyv1GyCIJq1qLCPC/tFLrvmWlxncwK iK1nYrhKvjkAWKA6HNuQVuMSORk3y3x9WzHhi9Ce2CChUNUOwZxKqXEvtxEyb7Tco4n2 /orA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=A25eAQcw; 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 j1si4099601qkk.273.2019.08.08.09.41.37 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Aug 2019 09:41:37 -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=A25eAQcw; 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 ([::1]:54076 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvlTt-0004TI-8P for patch@linaro.org; Thu, 08 Aug 2019 12:41:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55068) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvlTe-0004Sn-Ba for qemu-devel@nongnu.org; Thu, 08 Aug 2019 12:41:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hvlTd-0007SO-1t for qemu-devel@nongnu.org; Thu, 08 Aug 2019 12:41:22 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:40365) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hvlTc-0007RQ-SQ for qemu-devel@nongnu.org; Thu, 08 Aug 2019 12:41:21 -0400 Received: by mail-wr1-x444.google.com with SMTP id r1so95538927wrl.7 for ; Thu, 08 Aug 2019 09:41:20 -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=hDv32oe4BfXiw2BHcRVZz1ojHlvhasaJvI/EtnY/8lY=; b=A25eAQcwD93kvb2oHHXf0hTq1oWW0jP1Ts28fDn+SwSx54U0fr9H58IoQm/mSz0uON eqA2Aq59bqLEvg4Ixu/ukqSeFDbb7dWfOm8TGHy+BvS3/TQgdQoT/G07S5YsH4Szsaim 5OL55EkUCspbfQyagEUI/mmM9SA5qYm1Hs8+FlqpZNV+ScLPmDSae2pc0IND2SxUFIQI v3/9KXjOhCTtdiWSjAaFYqgxJzF/tkpn2p+Q6+ut1DOLoCMCcPxEwExWEk7GJqBEaEeS 9kD+ErwWvTJfU3JGVcbflR3Tp5WJ37R0eIklTccNasDYDEU2t1jPF0XtA6YS/1tR9Dit dqGA== 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=hDv32oe4BfXiw2BHcRVZz1ojHlvhasaJvI/EtnY/8lY=; b=UbGSCcbKUEqKDN/2NlUTk/IQejpG2rKXA9gTQLXePBQr+bizRezroEAUE3xGdCdSxx lK3jUGczXu2rcJ0hZrSRGiQ1yyGhvQmabmf5vWX7kJeQFX+x9ZFrarMjUA28qmERR+Ed Of7acr4gAUzQiNvG4VC4jQCqZglG77vg5ceJ9GTyV5LQvrNFZI7vk6Lyl5BHRBe8Xv9w tQOTPYtPLynuQPEUSLWRfwV3BXgHocNb8svl0qBd/KbZQQGcn27h3LctniW0jGEpoOpn A32KcxLbPeJgSsC9c+WQu7JwtlE3cdYrUOXKhiO7IFwi5oXQZtT24j1dKROqOh8z/goJ uEQg== X-Gm-Message-State: APjAAAXFsYBIiq7AwI1a5U2K2Tz7988ODrm4tw3IGHg+B507QiiDI5q+ bcTn3v8cMWYtHlicrSzMB7TeEw== X-Received: by 2002:adf:f591:: with SMTP id f17mr18650558wro.119.1565282479691; Thu, 08 Aug 2019 09:41:19 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id a6sm2729198wmj.15.2019.08.08.09.41.18 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 08 Aug 2019 09:41:19 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 406841FF8C; Thu, 8 Aug 2019 17:41:18 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 8 Aug 2019 17:41:11 +0100 Message-Id: <20190808164117.23348-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190808164117.23348-1-alex.bennee@linaro.org> References: <20190808164117.23348-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] [PATCH v1 1/7] fpu: move LIT64 helper to softfloat-types 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: Peter Maydell , =?utf-8?q?Alex_Benn=C3=A9e?= , armbru@redhat.com, Aurelien Jarno Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This simple pasting helper can be used by those who don't need the entire softfloat api. Move it to the smaller types header. Signed-off-by: Alex Bennée --- include/fpu/softfloat-types.h | 2 ++ include/fpu/softfloat.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 Acked-by: Richard Henderson diff --git a/include/fpu/softfloat-types.h b/include/fpu/softfloat-types.h index 2aae6a89b19..7e88152dfc4 100644 --- a/include/fpu/softfloat-types.h +++ b/include/fpu/softfloat-types.h @@ -80,6 +80,8 @@ this code that are retained. #ifndef SOFTFLOAT_TYPES_H #define SOFTFLOAT_TYPES_H +#define LIT64( a ) a##LL + /* This 'flag' type must be able to hold at least 0 and 1. It should * probably be replaced with 'bool' but the uses would need to be audited * to check that they weren't accidentally relying on it being a larger type. diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h index 3ff3fa52245..d9333eb65b8 100644 --- a/include/fpu/softfloat.h +++ b/include/fpu/softfloat.h @@ -82,8 +82,6 @@ this code that are retained. #ifndef SOFTFLOAT_H #define SOFTFLOAT_H -#define LIT64( a ) a##LL - /*---------------------------------------------------------------------------- | Software IEC/IEEE floating-point ordering relations *----------------------------------------------------------------------------*/ From patchwork Thu Aug 8 16:41:12 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: 170818 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp8813692ile; Thu, 8 Aug 2019 09:41:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqx8morbClJYf+qS7jMzRyyLSaw6X8X7/pEjsUoGDJ7zvwPLXsyn8xY1ywO21JL5aCx3KWF0 X-Received: by 2002:a37:749:: with SMTP id 70mr14128621qkh.399.1565282503251; Thu, 08 Aug 2019 09:41:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565282503; cv=none; d=google.com; s=arc-20160816; b=vokkZG/1FOx833EKLDXjBkBRJldITuX4I3XU/Ic8e4Shg/ISec0wR8ftTZJ7srXtQV /6/0gsY/HJ23KJi1xZFwnbVrS9JCWrwgw6SfIEB0tC7AI0s+xRNLHQamZrZm31e7UOr4 dDN609ZDcxT+1yOS72B8CLJNNgRU6DFn+ihgJMgCLaY3/RR6faeHFDM6ZSY7YmjQ/40o TqdZhAqbE36DV3LEzMPtYEUsPr2xq9+PBmnc2ZL65fvB/5rj3l9Km1mz6myiGCQeREqt va6hGnLrO0kuqyC3CgbUhKpK2YMeWCL7fcD15ThMm5mMMj5B+Yfnw9I6OgnJCAIgqM5A 4fsQ== 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=1gvB+brx8aoGNUz43r6/Ya3+3uUFPyvcnU6yrAo83jo=; b=BI872FrHSEaHyU2LddBuWFQgU05/S1+/TBpE45kSY2LrWqfzRvl3NC54ebt8D+raWp XEtfFvZXi+k2zlPOVE+GP14Qts6bVZgJxM2Os+QeAKyvI947WZlUYzUYzgy0G1Ktfqhe wizDQCDYYoEb/3h7jRNr8JNGhB9Jxt9/psySxRrsOIHykULzadjEKM2ll07qkeie4aoa Bm7BNlYporjbdfUn4+zKpbLNbyHfZu1ptMvLx/jinwijPnVWj43auD/JRsXonJIivnXd W72yGgHDdvBuvjGSQd+5KHKgSm6iolVQyw9NrngtcchYxB3w3RBjjuNuQe3bhMTaejov TnRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=cKL0KCnm; 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 p28si1204616qve.83.2019.08.08.09.41.43 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Aug 2019 09:41:43 -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=cKL0KCnm; 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 ([::1]:54080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvlTx-0004U3-3D for patch@linaro.org; Thu, 08 Aug 2019 12:41:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55092) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvlTf-0004So-CT for qemu-devel@nongnu.org; Thu, 08 Aug 2019 12:41:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hvlTd-0007UR-Kt for qemu-devel@nongnu.org; Thu, 08 Aug 2019 12:41:23 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:41535) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hvlTd-0007Rz-EQ for qemu-devel@nongnu.org; Thu, 08 Aug 2019 12:41:21 -0400 Received: by mail-wr1-x434.google.com with SMTP id c2so92354616wrm.8 for ; Thu, 08 Aug 2019 09:41:21 -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=1gvB+brx8aoGNUz43r6/Ya3+3uUFPyvcnU6yrAo83jo=; b=cKL0KCnmywhdx/f2oTbYxWfMLu+NRa857pk2czdhnZkzODQzD4Tvde4hRjE1VLawkk QBLixHzf4wGKIS9XJLLe072v2p6wjuIm0sLKExMsX7zzX6mInj4YYMf2/hWSRVm38sEJ pQv2HBucNsvUQfiI7gukZdRNUFUJcfOcHk5aj0MZWBsOG0NwqjYpEmNfy5bpXuCl143T Pd3MKAVyI3LIji9OdcqXBeHTmoPiCzaM8LD6goOBxxRqyjTa8p8FPL6bDHK1degV7/yL 5JpKOLUcWiJvNBC8bM4PLMVLI29MH+o3OOXUqHhu8jTA3Wkqh8a0tvGNgCo4mlJOusnz syTg== 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=1gvB+brx8aoGNUz43r6/Ya3+3uUFPyvcnU6yrAo83jo=; b=W63pGCmr7iXyx4R5+JEYH2zJT649T+aOHgpgalpiU6FqdvvdpITNremu1zqgSfg8iR 75yl7DmZezTggwA8D2/nDiXjyE8GRXZSLG9TzsxkrANV8Hpa5mDDItMwAlu49KIsU71u NFK6Q2aN9p8zIYXDeAogefWpVSchetlSMdkdPVMrQaw4IWeD8cSRraLPcpDdl7kqdi0g RjP+M2r7WOWiV62V5Hh7NxNRS/BioKPMmY2TrlpuLgZpQKwlVLC/h5yMfCdsN97YPmsn HStfdgeuWMERT5EGvXmpil/LwAjrclhPWluwzNOIZD6doJgCFx1+5giigODTlVyydIjT CvPw== X-Gm-Message-State: APjAAAXHp1bIM8PHobLEIMUGIR3K9Uyj+0Oz/6Pll1lvSEc/ccu3bp6v 2SWGbJPvb+GKV8NsPs5LAPxJmg== X-Received: by 2002:a5d:50d1:: with SMTP id f17mr16926831wrt.124.1565282480288; Thu, 08 Aug 2019 09:41:20 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id g8sm2028576wme.20.2019.08.08.09.41.18 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 08 Aug 2019 09:41:19 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 711811FF8F; Thu, 8 Aug 2019 17:41:18 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 8 Aug 2019 17:41:12 +0100 Message-Id: <20190808164117.23348-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190808164117.23348-1-alex.bennee@linaro.org> References: <20190808164117.23348-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::434 Subject: [Qemu-devel] [PATCH v1 2/7] fpu: move inline helpers into a separate header 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: Peter Maydell , =?utf-8?q?Alex_Benn=C3=A9e?= , armbru@redhat.com, Aurelien Jarno Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" There are a bunch of users of the inline helpers who do not need access to the entire softfloat API. Move those inline helpers into a new header file which can be included without bringing in the rest of the world. Signed-off-by: Alex Bennée --- include/fpu/softfloat-helpers.h | 118 ++++++++++++++++++++++++++++++++ include/fpu/softfloat.h | 63 +---------------- 2 files changed, 119 insertions(+), 62 deletions(-) create mode 100644 include/fpu/softfloat-helpers.h -- 2.20.1 Reviewed-by: Richard Henderson diff --git a/include/fpu/softfloat-helpers.h b/include/fpu/softfloat-helpers.h new file mode 100644 index 00000000000..de90663d384 --- /dev/null +++ b/include/fpu/softfloat-helpers.h @@ -0,0 +1,118 @@ +/* + * QEMU float support - standalone helpers + * + * This is provided for files that don't need the access to the full + * set of softfloat functions. Typically this is cpu initialisation + * code which wants to set default rounding and exceptions modes. + * + * The code in this source file is derived from release 2a of the SoftFloat + * IEC/IEEE Floating-point Arithmetic Package. Those parts of the code (and + * some later contributions) are provided under that license, as detailed below. + * It has subsequently been modified by contributors to the QEMU Project, + * so some portions are provided under: + * the SoftFloat-2a license + * the BSD license + * GPL-v2-or-later + * + * Any future contributions to this file after December 1st 2014 will be + * taken to be licensed under the Softfloat-2a license unless specifically + * indicated otherwise. + */ + +/* +=============================================================================== +This C header file is part of the SoftFloat IEC/IEEE Floating-point +Arithmetic Package, Release 2a. + +Written by John R. Hauser. This work was made possible in part by the +International Computer Science Institute, located at Suite 600, 1947 Center +Street, Berkeley, California 94704. Funding was partially provided by the +National Science Foundation under grant MIP-9311980. The original version +of this code was written as part of a project to build a fixed-point vector +processor in collaboration with the University of California at Berkeley, +overseen by Profs. Nelson Morgan and John Wawrzynek. More information +is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ +arithmetic/SoftFloat.html'. + +THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort +has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT +TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO +PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY +AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. + +Derivative works are acceptable, even for commercial purposes, so long as +(1) they include prominent notice that the work is derivative, and (2) they +include prominent notice akin to these four paragraphs for those parts of +this code that are retained. + +=============================================================================== +*/ + +#ifndef _SOFTFLOAT_HELPERS_H_ +#define _SOFTFLOAT_HELPERS_H_ + +#include "fpu/softfloat-types.h" + +static inline void set_float_detect_tininess(int val, float_status *status) +{ + status->float_detect_tininess = val; +} +static inline void set_float_rounding_mode(int val, float_status *status) +{ + status->float_rounding_mode = val; +} +static inline void set_float_exception_flags(int val, float_status *status) +{ + status->float_exception_flags = val; +} +static inline void set_floatx80_rounding_precision(int val, + float_status *status) +{ + status->floatx80_rounding_precision = val; +} +static inline void set_flush_to_zero(flag val, float_status *status) +{ + status->flush_to_zero = val; +} +static inline void set_flush_inputs_to_zero(flag val, float_status *status) +{ + status->flush_inputs_to_zero = val; +} +static inline void set_default_nan_mode(flag val, float_status *status) +{ + status->default_nan_mode = val; +} +static inline void set_snan_bit_is_one(flag val, float_status *status) +{ + status->snan_bit_is_one = val; +} +static inline int get_float_detect_tininess(float_status *status) +{ + return status->float_detect_tininess; +} +static inline int get_float_rounding_mode(float_status *status) +{ + return status->float_rounding_mode; +} +static inline int get_float_exception_flags(float_status *status) +{ + return status->float_exception_flags; +} +static inline int get_floatx80_rounding_precision(float_status *status) +{ + return status->floatx80_rounding_precision; +} +static inline flag get_flush_to_zero(float_status *status) +{ + return status->flush_to_zero; +} +static inline flag get_flush_inputs_to_zero(float_status *status) +{ + return status->flush_inputs_to_zero; +} +static inline flag get_default_nan_mode(float_status *status) +{ + return status->default_nan_mode; +} + +#endif /* _SOFTFLOAT_HELPERS_H_ */ diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h index d9333eb65b8..ecb8ba01149 100644 --- a/include/fpu/softfloat.h +++ b/include/fpu/softfloat.h @@ -93,68 +93,7 @@ enum { }; #include "fpu/softfloat-types.h" - -static inline void set_float_detect_tininess(int val, float_status *status) -{ - status->float_detect_tininess = val; -} -static inline void set_float_rounding_mode(int val, float_status *status) -{ - status->float_rounding_mode = val; -} -static inline void set_float_exception_flags(int val, float_status *status) -{ - status->float_exception_flags = val; -} -static inline void set_floatx80_rounding_precision(int val, - float_status *status) -{ - status->floatx80_rounding_precision = val; -} -static inline void set_flush_to_zero(flag val, float_status *status) -{ - status->flush_to_zero = val; -} -static inline void set_flush_inputs_to_zero(flag val, float_status *status) -{ - status->flush_inputs_to_zero = val; -} -static inline void set_default_nan_mode(flag val, float_status *status) -{ - status->default_nan_mode = val; -} -static inline void set_snan_bit_is_one(flag val, float_status *status) -{ - status->snan_bit_is_one = val; -} -static inline int get_float_detect_tininess(float_status *status) -{ - return status->float_detect_tininess; -} -static inline int get_float_rounding_mode(float_status *status) -{ - return status->float_rounding_mode; -} -static inline int get_float_exception_flags(float_status *status) -{ - return status->float_exception_flags; -} -static inline int get_floatx80_rounding_precision(float_status *status) -{ - return status->floatx80_rounding_precision; -} -static inline flag get_flush_to_zero(float_status *status) -{ - return status->flush_to_zero; -} -static inline flag get_flush_inputs_to_zero(float_status *status) -{ - return status->flush_inputs_to_zero; -} -static inline flag get_default_nan_mode(float_status *status) -{ - return status->default_nan_mode; -} +#include "fpu/softfloat-helpers.h" /*---------------------------------------------------------------------------- | Routine to raise any or all of the software IEC/IEEE floating-point From patchwork Thu Aug 8 16:41:13 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: 170819 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp8813882ile; Thu, 8 Aug 2019 09:41:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxZY71sw5gQf9qn1E5pwTK/g5HXHyQp/VqIcvdz06FpX0em6UiWXFrl2h9V5rzhXlf1VnmG X-Received: by 2002:ac8:2e5d:: with SMTP id s29mr14245239qta.70.1565282513832; Thu, 08 Aug 2019 09:41:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565282513; cv=none; d=google.com; s=arc-20160816; b=XaJpuHnD8BVWmyNHSC5PV1s4SCqgu/nhIfOTiGqoWQbvUy2UodOXaQIQY3JAds/vLL c67LBVT/1t/rhSo7vVblZS596J+Bg77y5GA32VtQ4KDhwI/crw+VRHNMOov54CJAhlTw 4eN37M4LwIe4FoUJ9SOpuIUxCboKmHrFhDy7zVz/iQgB1QB+HUQTZWd1fltHGeBCYyya IHxoygJoG5gHrHWZ7fx+UyeR5HvSNtAVATuIE6oqiGLwD8bA5568hJmSAegCKYyQPeas BHS2QgvApJ0rqwrfvGdZDwbluO0EDWUImFGUYZEfyZaEM0o2QW58/YkcKTj0qCSrQ/7a vo1w== 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=2RSOSRsqssKleRulrR8mChIVkJMA0GRBzSuPGfLK1Fk=; b=hRj6cl1yj4M3cA1sIwCRPK0d0LmZFIBX4szT+RhRFJpuZYRi8tsxhKkraySNpZglsl hDM0heUmpwkSqkpXV0yHkp5Lm6L290mHDCSJfUBmaiFPd08YXzvLSr7/iqU3sVNdCwHa +VE5kHJj4njoeD4vQ2SXgKvAxko8o3Hr+y3rAk8Q/sY2aoSmJdRZXzJ6ZPSX3r+RT1hM ujLJ95rK/02IN18HvY29mafdokoRqjuGyjNlbQfSIZMK3kk83MYxCrwUB7qNqH7gtImu 1MUyYABuxRbWpScZ7XWi7FtVOJ+fDAfApo1Nc2PYkJbG3wAPz1yO6yj30VOuBT9+5sSU mmfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=tCDcC8la; 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 d23si3531924qvc.119.2019.08.08.09.41.53 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Aug 2019 09:41:53 -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=tCDcC8la; 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 ([::1]:54082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvlU9-0004bT-EX for patch@linaro.org; Thu, 08 Aug 2019 12:41:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55098) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvlTg-0004Sz-BZ for qemu-devel@nongnu.org; Thu, 08 Aug 2019 12:41:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hvlTe-0007W2-Gf for qemu-devel@nongnu.org; Thu, 08 Aug 2019 12:41:24 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:37641) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hvlTe-0007TI-Ag for qemu-devel@nongnu.org; Thu, 08 Aug 2019 12:41:22 -0400 Received: by mail-wr1-x442.google.com with SMTP id b3so3192693wro.4 for ; Thu, 08 Aug 2019 09:41:21 -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=2RSOSRsqssKleRulrR8mChIVkJMA0GRBzSuPGfLK1Fk=; b=tCDcC8laVqLxCvaFMM6CIe/d7HNAEQucF6h+x1wIpjnXFQeOabnDmL6aiPDByye1wO jWXXJ0l5Br5iyPVSjgKPeQ568YznWqbckDoc3cKvDju//eEACZwy/FT2k711v84VUlXp MQGQC8qElNG0Kjmjt5ElTm3XbaSganeutq12/1OWRxpRrvYol4XRJwVpO54dnRCxB/rr uV5BjlHKq4Y8cpuiav0/2Jp0szW6gwdqfYCZsVCyA+V6OoUXlz2ItRbMyZc9MZwbopHy ZtgnxhKohEgLNKNn4PE2cWBPoTnXAp/5lcUKJ3b7+n6XpuOfTmGVPmBks73WR7ChVKHF ling== 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=2RSOSRsqssKleRulrR8mChIVkJMA0GRBzSuPGfLK1Fk=; b=rFkO1trohX6hbdB0K0/BywB1751mCw5TL5BiS+uNwZhXSLpEMeHuPwpdqVIHN6ejHL BO62ofEvIDlXpkyEfBvS4wXBMT+dVF9glhb69KU9MPJHkCxOptD9BQASpxlHz0L6EDk7 192Ilz0sveLWCv1XFWWEO1f7Oo0QzxVviLp7PKYUC5chLbcGcZemTK04bX0CKSgJRVSF m/MPyfarAbP1YrOfpvmkTfRgjvUGo+EvJEIiXEQo7RF/lKWvMlimW9I0iuPdsQCGvzB8 hKD2kMST2wsunz5NTQcEx2XzGpn+5wiKUlYKGTQYpfk2LmlwOg+K284wQGHTB2WoWUK8 4Ipw== X-Gm-Message-State: APjAAAVRtrgVXwGGQDQlyG5ev0hqT8hG5xtZkr/dGS/2rt1wcWzFvF/U u/qCZ63kdzeDjsDEI0FdvZr4kA== X-Received: by 2002:adf:f2c4:: with SMTP id d4mr17797029wrp.3.1565282480941; Thu, 08 Aug 2019 09:41:20 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id l3sm4724788wrb.41.2019.08.08.09.41.18 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 08 Aug 2019 09:41:19 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9224F1FF90; Thu, 8 Aug 2019 17:41:18 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 8 Aug 2019 17:41:13 +0100 Message-Id: <20190808164117.23348-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190808164117.23348-1-alex.bennee@linaro.org> References: <20190808164117.23348-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::442 Subject: [Qemu-devel] [PATCH v1 3/7] fpu: make softfloat-macros "self-contained" 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: Peter Maydell , =?utf-8?q?Alex_Benn=C3=A9e?= , armbru@redhat.com, Aurelien Jarno Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The macros use the "flags" type and to be consistent if anyone just needs the macros we should bring in the header we need. There is an outstanding TODO to audit the use of "flags" and replace with bool at which point this include could be dropped. Signed-off-by: Alex Bennée --- include/fpu/softfloat-macros.h | 2 ++ 1 file changed, 2 insertions(+) -- 2.20.1 Acked-by: Richard Henderson diff --git a/include/fpu/softfloat-macros.h b/include/fpu/softfloat-macros.h index c55aa6d1742..e698bca4e1d 100644 --- a/include/fpu/softfloat-macros.h +++ b/include/fpu/softfloat-macros.h @@ -82,6 +82,8 @@ this code that are retained. #ifndef FPU_SOFTFLOAT_MACROS_H #define FPU_SOFTFLOAT_MACROS_H +#include "fpu/softfloat-types.h" + /*---------------------------------------------------------------------------- | Shifts `a' right by the number of bits given in `count'. If any nonzero | bits are shifted off, they are ``jammed'' into the least significant bit of From patchwork Thu Aug 8 16:41:14 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: 170822 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp8816203ile; Thu, 8 Aug 2019 09:44:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqzl46dVYVaw8qpcGh3fanFx9XQQXIYdmdn2jk9/HVWMc+SkeesDiWD6WGnBo80NC4a2Opok X-Received: by 2002:aa7:c3d8:: with SMTP id l24mr17447224edr.58.1565282643168; Thu, 08 Aug 2019 09:44:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565282643; cv=none; d=google.com; s=arc-20160816; b=XMcPwjnNk+SqCrnp7kG1NMUoWuWZSnVuEguTVxy3jdUjU3FqLKeki8fUqjFv7XXByn h6EoSwC6OGqNu3DcA1if3nAgu2OPBz/GlcXdk1yRDbaBi67OCgOKVrYn69nFcN6+xmLX lR/9pTPVguMdkELnFVMoYXFKXv0WZSuWKk2jfmYmSLeL36T9yo+SOz/3n+XE5XHe/7zK nga4bnFtB5o+rw25bXMt+ZlN3qMy1VPJhpEnEJQd7EMRirSU/+RSP3fNCS0FLeGWHqfd rb0qVV2o8a1lxCqMLI0j0ocWJrDGOEi0i041nNOLHrrdSIL6f81caBITHosyurD7MWDo e3nQ== 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=tUBhSG6/x7Tr0aypyO/Nit66ev0ekNFuf88g/cOO/o4=; b=QYXd2w3JsJlBk8tRz3KrP9RDUuZsgiimpvFS7bjkaqT7/oI/AgPgtBWpnt4c5DtoMf IjpRca+yp+5ftiDekYA6zcc4vS9Cz67YqPda4d5az8YHkM2zfsmmDpIMgsmb1H4IpZ/o Rb1UQkV6hOgIBtQQPlqlKRoCGgozPrU4kTc7glHRTOgejB5EUzcaz71MvK79Q2GyPw7K sueZA43ro5Zhz56jloHmjh9MnuEFoH3/gqiWerFpd+b2ibA55tZdfJE8n2/mfuRtz+5x kMqpAGwl26Ii+KUSXUrf1+sdNV3OaDarPGCwRjPLMJm1N6DtiP63N+nsVei71IwQNXth VsTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hDy8FIj+; 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 gf13si30539929ejb.228.2019.08.08.09.44.02 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Aug 2019 09:44:03 -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=hDy8FIj+; 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 ([::1]:54102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvlWE-0007zs-4g for patch@linaro.org; Thu, 08 Aug 2019 12:44:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55100) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvlTg-0004T0-C5 for qemu-devel@nongnu.org; Thu, 08 Aug 2019 12:41:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hvlTf-0007Wa-1G for qemu-devel@nongnu.org; Thu, 08 Aug 2019 12:41:24 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:35460) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hvlTe-0007VQ-RM for qemu-devel@nongnu.org; Thu, 08 Aug 2019 12:41:22 -0400 Received: by mail-wm1-x341.google.com with SMTP id l2so3081714wmg.0 for ; Thu, 08 Aug 2019 09:41:22 -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=tUBhSG6/x7Tr0aypyO/Nit66ev0ekNFuf88g/cOO/o4=; b=hDy8FIj+EEmT7XM2OtG08Jp5V2Be9XnKMPqQUqSxtupoN6GaNYTMkzS1g3Xc4cM/a/ lvHaunTJ9BqdVO83EXB16qPzL1sQmy5ciVTFpuGySpWttb7GWfN96dtjG3S7Jg2vo1HY p03oyVjqTxxzzu5q48AUfgEcPStkE4JpNFNV/t38w+o68r7g9WbSil5bCXwA/b4LMBXU GFZYkfb8wzgDtJzujtJfGrYShfHXnL7jOCAWkx3OVvGvIX7Hh2ScpLNHr6IJ0DCryTN8 fd+i5VJikLWu2vtCakrlP+ncByaxRpgVsxFd/axzvVrtpd8WNiI0j6d6eC45Q0vPdfv2 U5vA== 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=tUBhSG6/x7Tr0aypyO/Nit66ev0ekNFuf88g/cOO/o4=; b=OgE8+GEN7jfwqi9DjRJyub7aak5KmayG6bzv/huzFFiyz8do2Sb0H5byK5IS9RVGPy p56NjRkD7/qhrVYDiJzkzYfzRgt7YXLmlRwN3YWXtidh44SJp9yyE3cyYPDG+xo+ALip CIESzFD5IikcPSJlUgjFOepfzU3+W9LhvIYkY+0m+qanpbgcTCDlGQDrkR8ET1bUi6X9 s4ox5CcIOIBaaVeneMPBogLQHGv80fU/GhrSNWkYcd1TYn5jBHrdGV72UmocLPMrQLN9 VVT159KMVwPpc9zzexpCemylKJ1lyrYu4V/ovvwiUdc5RbZF8LvAUb3fuE6cRa3Ddyxm GDIw== X-Gm-Message-State: APjAAAUpsgqQ1FniH0J9zh5nNX6N2r5N+KeyiLRizKw9Yk8M3vwh2CtJ idx8O8ejXJvNU/4VY8FM8nMnoyIHtgk= X-Received: by 2002:a1c:2ec6:: with SMTP id u189mr5288225wmu.67.1565282481732; Thu, 08 Aug 2019 09:41:21 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id x20sm209525398wrg.10.2019.08.08.09.41.19 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 08 Aug 2019 09:41:19 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B49FF1FF91; Thu, 8 Aug 2019 17:41:18 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 8 Aug 2019 17:41:14 +0100 Message-Id: <20190808164117.23348-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190808164117.23348-1-alex.bennee@linaro.org> References: <20190808164117.23348-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::341 Subject: [Qemu-devel] [PATCH v1 4/7] fpu: rename softfloat-specialize.h -> .inc.c 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: Peter Maydell , =?utf-8?q?Alex_Benn=C3=A9e?= , armbru@redhat.com, Aurelien Jarno Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This is not a normal header and should only be included in the main softfloat.c file to bring in the various target specific specialisations. Indeed as it contains non-inlined C functions it is not even a legal header. Rename it to match our included C convention. Signed-off-by: Alex Bennée --- fpu/{softfloat-specialize.h => softfloat-specialize.inc.c} | 0 fpu/softfloat.c | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename fpu/{softfloat-specialize.h => softfloat-specialize.inc.c} (100%) -- 2.20.1 Reviewed-by: Richard Henderson diff --git a/fpu/softfloat-specialize.h b/fpu/softfloat-specialize.inc.c similarity index 100% rename from fpu/softfloat-specialize.h rename to fpu/softfloat-specialize.inc.c diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 2ba36ec3703..80a16458304 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -652,7 +652,7 @@ static inline float64 float64_pack_raw(FloatParts p) | are propagated from function inputs to output. These details are target- | specific. *----------------------------------------------------------------------------*/ -#include "softfloat-specialize.h" +#include "softfloat-specialize.inc.c" /* Canonicalize EXP and FRAC, setting CLS. */ static FloatParts sf_canonicalize(FloatParts part, const FloatFmt *parm, From patchwork Thu Aug 8 16:41:15 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: 170823 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp8817610ile; Thu, 8 Aug 2019 09:45:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqxI4TNWbB3igmHX2QSgeoWEtX7MduUB+agWXC53wgpQj6RNNX5XEAHrlr5EZX0mIwVNt5yK X-Received: by 2002:aa7:ca54:: with SMTP id j20mr17072236edt.50.1565282722956; Thu, 08 Aug 2019 09:45:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565282722; cv=none; d=google.com; s=arc-20160816; b=YEzU9u+tSA/damgKrTgtaM11K369bFNXFuw20M34hnqn5rvniBGf2pnS+BmAKlyDev V8swPYJMt+QyC47tMKU8HIU931DJrDriXkwkLp/tuesKBlAuJAf7hDoepPRtTHBRn908 1iFZBBiunVv/nKpL1lviMljLBZkGHdwuqCEbQqPOEZCCfgo5MKqOGHEqTdIIDQuZvKhD FP/zXjk0eczpXgHjLoJNmb2tWjuFzS9GZ1CFK2HZ65b9JbHpxP6w7bsLMHy4aDpD0/Wa n0Xa0gfScjbLV0Hf6iUTHrcOtCMTxkqTmJPHscDhvGD3xuZU1+EP88Gux9370GQBJtGq fWGA== 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=LIEv4P2C0/9YawvAT5IGyHCWDJnkHqheUeFneAyCCc4=; b=okTmCiAFRGiwIuSbYyVO0nq4CEcIDRvwjq+OVaq5XfFlXnftVIYFncukTX88FeqsAz mox2B+JE84wewoVDmlX/9Yn4TVilwNfpwA5/eXPlBtoceqzM2mJ0/zR7Tg3POrJSK/Ik DYbcIUGr8OCWkj5ej5JCQtoo2X4CfnZ8zlBMZOAJ+GUBeFbiMEqea64GQ/mmewKBXKr1 3Fpi5Pkx4HvKHsP38hwtKA+E21s66uH1FGDgC4t8zCyaqae7Di7dggRbjSfcnpn+TtIf 0yeysB0uuUhOQJNcIZTozGbs3B2OYddIMB/RFnggy1G4AaCmvI4rxFB/HvrM7eZmsaLL s/PA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="EKyvj/8+"; 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 m22si31840567ejx.164.2019.08.08.09.45.22 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Aug 2019 09:45:22 -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="EKyvj/8+"; 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 ([::1]:54118 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvlXV-0001Xi-Tm for patch@linaro.org; Thu, 08 Aug 2019 12:45:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55154) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvlTi-0004TJ-HX for qemu-devel@nongnu.org; Thu, 08 Aug 2019 12:41:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hvlTg-0007aj-H8 for qemu-devel@nongnu.org; Thu, 08 Aug 2019 12:41:26 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:51178) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hvlTg-0007WT-Aa for qemu-devel@nongnu.org; Thu, 08 Aug 2019 12:41:24 -0400 Received: by mail-wm1-x343.google.com with SMTP id v15so3054017wml.0 for ; Thu, 08 Aug 2019 09:41:23 -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=LIEv4P2C0/9YawvAT5IGyHCWDJnkHqheUeFneAyCCc4=; b=EKyvj/8+60PxD75cfBZDjxeJr/WUJFAsLaDwf7Ub5i3HIyCVIrtlNXVuQ/WDivflGV sRyYFmWy8hERER1LXm6YAtRNcwSR6EBZgx/Uz69nOfJUyUiZJU3oqGZEJyxy1KGlLpcG CEt7Q6LcN4wgfWspEVynO7vJJ0yjv0yH9mLy1im/j9dpt6EsDR82zkwe86NHIzkFkTaG r7xt6n0Hr4th50lpdcdRLq/mSFA9GhowVGvKMhE1/+bUmz16KFC0dBw649XbsSyHlUlV HEoAwhcobzcK8xDiLv6ehqWFIuSAerWuY5Ewq2QeSdv2OLFEHYNZuPE37Sjt0rvm6EBu 6hCQ== 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=LIEv4P2C0/9YawvAT5IGyHCWDJnkHqheUeFneAyCCc4=; b=npdrHADPa2VmiyG461HPynu0Eln5n5SHc1LZ+jWW1HWojo/n8Tvk+aPFKkb4KY1QfK cQ2x7z9xMBckFL7ir1j/JLC7ojXf2AWCgzJ9hWFjuBsR1VkkE56ZvV8cGn5tRdOn5imh mO+cQ9iDUNfqLoedS9OWB6NpGSo3ddR1F43B2ocQ384FSV+KnP1FDXbg6uGp9exM0zk7 /9RdN+Oq1WMlPvT8aYvsAqycBWtiTU035CQ6c/STXAosAGd8BlVvZUogoLpLxikvxeLP j1N61vVfSTk57BHdHoare9L4DIDQOuznQ/OK0GMcIdxUYTKh1jMt35C71RM1JAvXSuzo dk7Q== X-Gm-Message-State: APjAAAXS3RvDxWN9hEaT7JDlvzVarGHnj+QgUCZm5xg35KOHGZwplqEI k6UIXmjvxj8WVe/lVCxvOe4eyfdwlxw= X-Received: by 2002:a7b:c4c1:: with SMTP id g1mr5591465wmk.14.1565282482437; Thu, 08 Aug 2019 09:41:22 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id h8sm3438803wmf.12.2019.08.08.09.41.19 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 08 Aug 2019 09:41:21 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E3A721FF92; Thu, 8 Aug 2019 17:41:18 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 8 Aug 2019 17:41:15 +0100 Message-Id: <20190808164117.23348-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190808164117.23348-1-alex.bennee@linaro.org> References: <20190808164117.23348-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::343 Subject: [Qemu-devel] [PATCH v1 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 , Aleksandar Markovic , =?utf-8?q?Alex_Benn=C3=A9e?= , armbru@redhat.com, Aurelien Jarno Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 and -helpers.h in cpu.h for the few bits that are global. Signed-off-by: Alex Bennée --- target/mips/cpu.h | 3 ++- target/mips/msa_helper.c | 1 + target/mips/op_helper.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) -- 2.20.1 diff --git a/target/mips/cpu.h b/target/mips/cpu.h index 21c0615e020..f146924623c 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -5,7 +5,8 @@ #include "cpu-qom.h" #include "exec/cpu-defs.h" -#include "fpu/softfloat.h" +#include "fpu/softfloat-types.h" +#include "fpu/softfloat-helpers.h" #include "mips-defs.h" #define TCG_GUEST_DEFAULT_MO (0) 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" /* 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" /*****************************************************************************/ /* Exceptions processing helpers */ From patchwork Thu Aug 8 16:41:16 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: 170821 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp8816196ile; Thu, 8 Aug 2019 09:44:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqy4yN67y8qlnzcs2e3/IlF1R9mIGql7exFG3xYW7fpRb1qT5NvCPQ1/rNTDIDOrjlgXQfou X-Received: by 2002:aa7:d0c5:: with SMTP id u5mr16780111edo.299.1565282642795; Thu, 08 Aug 2019 09:44:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565282642; cv=none; d=google.com; s=arc-20160816; b=te5ziFMQCW+JkAnC9gsZaMsN/0yTDSWq7udUJLDSaSJnZPEPAFQbpfdaGg/2y6hS+O JzGB5CIy0hHsEwCFCZbppW6pm3WJiFkuajE4QrGIDP/nexT5HZAza3FcGeVqN/+w0iUP DnaD+6/M+o0ZlYBhnBWG4Yrg9ZI7sVJlTpc7ioHwNnchttP9nJ5tSPXX+bJW+CXCuJIX iaXqtXuZuCYKRqWZ0nrK02c9TexWgJCNNOoa//N1PWe9UYqK9t/rIc364gMMK80b8IUJ ZW02b0luFXHx+Dqms+cM/bvlUwedPRYFIOUkEL83PHKhI4qZH0pNp/GwuBkub00Z63SK FV5g== 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=rHaCdXGh8EVx3YP7Nogh/BDIDsukD0V5+eFPdAJezxc=; b=GHcPHrylvK5auOitvwUdhiKqZCAyWNTyy4OY4jmltEjo39IEN6YDfkrLZHl9dKUBcY CRs+GYtlyzpYFIo/tHPo2d/DqfzRhpLX6FpbiKu3ko4CiIT4uLqzW6NhWxw/b2SaGbIT 6oOfCX2BFOLlDtbqhswtbwsdDHSrWbHdlj+s+co4j1up+3NQTNudvctoO4D6AkSLtSVB FD2tKs7M7AvZYlQVAsPchwEF86BehMp35YoUBXpdLOJQaRp7NtZA8DJm+aICqbbI1n9R 118J2xB5T3hSkhmqssW5ujsdduZGmpSobNSrAJOfW2w5brUaqtW6xl8UFvD9mSohgTmH uORA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UMFGPkoU; 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 f25si36812037ede.206.2019.08.08.09.44.02 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Aug 2019 09:44:02 -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=UMFGPkoU; 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 ([::1]:54100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvlWD-0007yN-Pf for patch@linaro.org; Thu, 08 Aug 2019 12:44:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55136) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvlTh-0004T2-OW for qemu-devel@nongnu.org; Thu, 08 Aug 2019 12:41:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hvlTg-0007ar-I3 for qemu-devel@nongnu.org; Thu, 08 Aug 2019 12:41:25 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:37643) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hvlTg-0007Y0-BY for qemu-devel@nongnu.org; Thu, 08 Aug 2019 12:41:24 -0400 Received: by mail-wr1-x444.google.com with SMTP id b3so3192801wro.4 for ; Thu, 08 Aug 2019 09:41:24 -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=rHaCdXGh8EVx3YP7Nogh/BDIDsukD0V5+eFPdAJezxc=; b=UMFGPkoU2A4+TW8JBjGnCbCQ1uvS4Eh3Mmhb7j8A30QiJ7KeZJ7XUmGP5N6jzwM5kA YePjMDh6mdXz7e5FE2SRpix2BlNJ30f6SbSCuIKLo4fiN6SQ05/PlvrtmX7UPRAb1MkP JfJ36xm2fy3iUddb6j64Xk3nLhEuOt9DsUs3ZgLKRtG4jc4f1e7yM1KBhiCJP01x5v+W lL2qDqDynhlrdgh8KKmytOfnduKPsXZf87YHyWY4hgGgVR+8WsteTLWXNut/WkyMlked H/ewRrIDNo8tJ0bPUQG0jShypTe95nV2Pd484MjpUib2r/xvImog9fNuH3gNiXmqberP c6sg== 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=rHaCdXGh8EVx3YP7Nogh/BDIDsukD0V5+eFPdAJezxc=; b=Nx8Prv/OEwkfUjYMsguYRE2arpaOOtlrzHJdcr5w+5i92MoW1I1vImA3xRuY0BmTy1 YtEf9LI9WKqSFqXaf0cuuIfb1PI/lM+r6CzkWorhNXnNCN9rb2N2i9Rjr9CmKdx0X846 c8GmQWHh6RYXtdOP4ot1YkxRpmdIPFU+XpNcwhbUo6IAlc381eN1lQ1sDu17QKrBUS7L YpRxctICLHfsRkgcY0l2cYK6fS+UHwzsoz5UVt8guA+zpL0IfChDG8u9vAur8qjyphu1 llg+LVkL2Xovl+1XpijNfdvxpFaATWp0TN+fcLnkCEQ9OxjAS+qYpG0tBh8TTTu+rjqj ShbA== X-Gm-Message-State: APjAAAXX8qRUjLAXULy8ELQETkemaLY5tcDQPDc63uJRpcuDwFAdW4Lm nvOGXHIg6Jatyd7ratuiY3y82A== X-Received: by 2002:a5d:4950:: with SMTP id r16mr2135215wrs.347.1565282483044; Thu, 08 Aug 2019 09:41:23 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id u130sm4469137wmg.28.2019.08.08.09.41.19 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 08 Aug 2019 09:41:21 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 188D11FF93; Thu, 8 Aug 2019 17:41:19 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 8 Aug 2019 17:41:16 +0100 Message-Id: <20190808164117.23348-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190808164117.23348-1-alex.bennee@linaro.org> References: <20190808164117.23348-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] [PATCH v1 6/7] target/riscv: 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: "open list:RISC-V TCG CPUs" , Sagar Karandikar , Bastian Koppelmann , Palmer Dabbelt , armbru@redhat.com, Alistair Francis , =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 and -helpers.h in cpu.h for the few bits that are global. Signed-off-by: Alex Bennée --- target/riscv/cpu.c | 1 + target/riscv/cpu.h | 2 +- target/riscv/fpu_helper.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) -- 2.20.1 Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index f8d07bd20ad..6d52f97d7c3 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -27,6 +27,7 @@ #include "qemu/error-report.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" +#include "fpu/softfloat-helpers.h" /* RISC-V CPU definitions */ diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 0adb307f329..240b31e2ebb 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -22,7 +22,7 @@ #include "qom/cpu.h" #include "exec/cpu-defs.h" -#include "fpu/softfloat.h" +#include "fpu/softfloat-types.h" #define TCG_GUEST_DEFAULT_MO 0 diff --git a/target/riscv/fpu_helper.c b/target/riscv/fpu_helper.c index b4f818a6465..0b79562a690 100644 --- a/target/riscv/fpu_helper.c +++ b/target/riscv/fpu_helper.c @@ -21,6 +21,7 @@ #include "qemu/host-utils.h" #include "exec/exec-all.h" #include "exec/helper-proto.h" +#include "fpu/softfloat.h" target_ulong riscv_cpu_get_fflags(CPURISCVState *env) { From patchwork Thu Aug 8 16:41:17 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: 170824 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp8817865ile; Thu, 8 Aug 2019 09:45:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxeAisaus2wt2z11efNFUvUvEj+2kdgLSoiO3oXSLeBEDaV0jWsVUOijzKCbgDuFXnsAPiU X-Received: by 2002:a17:906:b243:: with SMTP id ce3mr14082209ejb.176.1565282735601; Thu, 08 Aug 2019 09:45:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565282735; cv=none; d=google.com; s=arc-20160816; b=Krl4H37PIofaZanY8JpZl65F2/RPQxQM2bhd6GN03Wd9vtL/+sWf3coWaG+jInOhWf mEEP9JqYkADjzd57tMmoa3zfzhHCckUDzE37st6hTfm/U7VokRbTSEKGupFuA8BSc/72 uCIx9MhexOzlc26hGLn2MkpseTWHtgEtCpC6vcs2f/CnO+vjExoaK4NbCCq/ej1GxIvF hELBfAMf6NaqsxnurUcr34pzxyva82dmgdlgbOWr3jeJOJIBVaWXMGM54uJ+ZJl5MXGK bgur1Y+aoV2gaR05AXR7QIEfsjDiFrODvMVbHx6iTXJOY2iDTc+fU10hsgjwQsiDreGy 1fRQ== 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=cJ7b4qbxHqVbTw2rsvioZwlEmWolzTmmuvqu1NwPYKI=; b=NyVDU3hzraCniN5QFuORkQG8WsQXsSeoL/McsD46sUjPfohdSI57cAC9x/jNaQKaNL /khmTMC0h3A33KmqevWhWquRvoo1s4fM6iMHFP+eysmDJgW6IfY/pIrR0yvrQnbBWHKH aehfc8BN3pPSMC4V3bkBGTeODJsXdx/ANZ/IHSWHl85F+GGEHxhqI5ilAALhKQNvxYZq Qan4lCQmi+J1O5JG//qCeCLROtxj9kN4clfgzlytEEk3dq/bjHi7QThdjKtDVmLmiYVT RyZbGaHSHBRn9UlwoOArClEbvt4TKnXUdg5KUJqXStT3/bdDy61vyN7WYcE8BRaUSu0v UTZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UB8rBUr8; 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 58si36305812edz.364.2019.08.08.09.45.35 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Aug 2019 09:45:35 -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=UB8rBUr8; 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 ([::1]:54114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvlXi-0001V5-JT for patch@linaro.org; Thu, 08 Aug 2019 12:45:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55170) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvlTk-0004Ta-7L for qemu-devel@nongnu.org; Thu, 08 Aug 2019 12:41:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hvlTi-0007e2-7t for qemu-devel@nongnu.org; Thu, 08 Aug 2019 12:41:28 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:35411) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hvlTh-0007aQ-Im for qemu-devel@nongnu.org; Thu, 08 Aug 2019 12:41:25 -0400 Received: by mail-wr1-x444.google.com with SMTP id k2so9730848wrq.2 for ; Thu, 08 Aug 2019 09:41:24 -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=cJ7b4qbxHqVbTw2rsvioZwlEmWolzTmmuvqu1NwPYKI=; b=UB8rBUr8ukI8R6l4C6lBKbeHFZ4hGmWH95TQrChszpTCHJWnIkPLFSD+DQmzJBIwNe v9pIueEK6FpFToRnuxPnEBeSRpP1DQ/Dk5fF5lIFVg+2nORMtIN+SwW8zQgAICEPvOzj P5+dWrBB9tFAhVtfKRhO0PkjdSoe9+I73RRchQyd2XBMKXKDC56rJoJKT0jWKvI3HF4I sEMCV1oDl5Z5KLbBtMdX+fm0SGEZd3F8S6Qpukb9S8KBumwBK7oMIdGaXXiECiADfCzF AUOxxYID9FbyijuHp0eroBKMlpCJQbvn6Be+I6/R/nY2EmKu5Fpp4tJa0FtxnkvQWtmL RwHQ== 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=cJ7b4qbxHqVbTw2rsvioZwlEmWolzTmmuvqu1NwPYKI=; b=YD8IGmyj1p08R/vWnEidaLlcAVjk5Q+rswtBTA+wKGgxrFEmio2VUuI5dkkAomj0Cz 5ylo+TSI1X1dsRSPDHdorv2aqlYmVQ5bs/HnwgyWksvdRJQ2mHzu6WfjVMa4j9gkqqHg 3bfV35KBi+ICG9vxzjbSxQUKhjNBYpNk4YbtmGcPiLXVLBexXZNBdCNEwLSPohaUXFNG BmEAHHXzBN6Fo628s3kTdOL6W2MpMqK3tyRe+dOPNbLLRezj2CtY+9xwox1tL5HW+VQI UihLMwSlQqs1DfOaUqOQmIocdsBWKITy9fGKvACn71gE7589lpQGrNKi85gY00T/KWpv q8+Q== X-Gm-Message-State: APjAAAVtI8m1lh+7KSS579lptpqD89WIQFVgn0jyUiNAbWRYTTlN7ZfD IzDcPnG0yvltXTgg+LR0ZsifTw== X-Received: by 2002:adf:dd01:: with SMTP id a1mr17623099wrm.12.1565282483812; Thu, 08 Aug 2019 09:41:23 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 66sm17049115wrc.83.2019.08.08.09.41.19 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 08 Aug 2019 09:41:21 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 4A4661FF87; Thu, 8 Aug 2019 17:41:19 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 8 Aug 2019 17:41:17 +0100 Message-Id: <20190808164117.23348-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190808164117.23348-1-alex.bennee@linaro.org> References: <20190808164117.23348-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] [PATCH v1 7/7] targets (various): use softfloat-helpers.h where we can 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: David Hildenbrand , Bastian Koppelmann , Cornelia Huck , armbru@redhat.com, "open list:S390 TCG CPUs" , "Edgar E. Iglesias" , Guan Xuetao , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno , Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Generally the cpu and non-FP helper files just want to manipulate the softfloat flags. For this they can just use the -helpers.h include which brings in a minimal number of inline helpers. Signed-off-by: Alex Bennée --- target/alpha/helper.c | 2 +- target/microblaze/cpu.c | 2 +- target/s390x/cpu.c | 2 +- target/sh4/cpu.c | 3 +-- target/tricore/helper.c | 2 +- target/unicore32/cpu.c | 1 - 6 files changed, 5 insertions(+), 7 deletions(-) -- 2.20.1 Reviewed-by: Richard Henderson Reviewed-by: David Hildenbrand diff --git a/target/alpha/helper.c b/target/alpha/helper.c index 93b8e788b18..c6998348df4 100644 --- a/target/alpha/helper.c +++ b/target/alpha/helper.c @@ -21,7 +21,7 @@ #include "cpu.h" #include "exec/exec-all.h" -#include "fpu/softfloat.h" +#include "fpu/softfloat-types.h" #include "exec/helper-proto.h" #include "qemu/qemu-print.h" diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 0bec54b2f8a..9cfd7445e7d 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -28,7 +28,7 @@ #include "hw/qdev-properties.h" #include "migration/vmstate.h" #include "exec/exec-all.h" -#include "fpu/softfloat.h" +#include "fpu/softfloat-helpers.h" static const struct { const char *name; diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 736a7903e22..5db016672bb 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -42,7 +42,7 @@ #include "sysemu/sysemu.h" #include "sysemu/tcg.h" #endif -#include "fpu/softfloat.h" +#include "fpu/softfloat-helpers.h" #define CR0_RESET 0xE0UL #define CR14_RESET 0xC2000000UL; diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c index 816d6d7f311..d0a7707991f 100644 --- a/target/sh4/cpu.c +++ b/target/sh4/cpu.c @@ -25,8 +25,7 @@ #include "cpu.h" #include "migration/vmstate.h" #include "exec/exec-all.h" -#include "fpu/softfloat.h" - +#include "fpu/softfloat-helpers.h" static void superh_cpu_set_pc(CPUState *cs, vaddr value) { diff --git a/target/tricore/helper.c b/target/tricore/helper.c index a6803368506..d5db7b2c03f 100644 --- a/target/tricore/helper.c +++ b/target/tricore/helper.c @@ -19,7 +19,7 @@ #include "cpu.h" #include "exec/exec-all.h" -#include "fpu/softfloat.h" +#include "fpu/softfloat-helpers.h" #include "qemu/qemu-print.h" enum { diff --git a/target/unicore32/cpu.c b/target/unicore32/cpu.c index 802e2f1eba5..b27fb9689ff 100644 --- a/target/unicore32/cpu.c +++ b/target/unicore32/cpu.c @@ -17,7 +17,6 @@ #include "cpu.h" #include "migration/vmstate.h" #include "exec/exec-all.h" -#include "fpu/softfloat.h" static void uc32_cpu_set_pc(CPUState *cs, vaddr value) {