From patchwork Sun Feb 4 04:11:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 126806 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp927010ljc; Sat, 3 Feb 2018 20:21:22 -0800 (PST) X-Google-Smtp-Source: AH8x226ds1kxAgFKEut7MNKFf2sm1VfTssgDeKdvdqAJr/MVc17IlbwLcUwsaHDevHuJ70XO4DfW X-Received: by 10.129.118.18 with SMTP id r18mr29712909ywc.96.1517718082315; Sat, 03 Feb 2018 20:21:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517718082; cv=none; d=google.com; s=arc-20160816; b=d5vX7PmLvYJbTOiUqWaDP5R/n21yf1FwuLpNfHziQrpREX7x1SXQkxT5hgIS7mNKu6 Wa+h4yaxFZcCNiL5vunKe1vv6kRrC9MsfKJhKQQtU8k9Y0XwQFfbiXl+PcNfT2RejVNW V/lCLrd+1ngLACCBycfayC5fCNiSC9gN5q5WNrJl3oraE8QUYlRyT/tg96tlKO8Sj+ZW sc39LGFSrFDzOudMzBtziMEQya97PlGjtfTGhjPvQUoZmaX66lLX2q7OUu+AWRz6OPKe 9Rtfw7EmRFV7TtV5TrUGxubrbdVH6wBWztNK/JfxXrUGV6z11W/HzFNau1+MXuM0EXTY JVdA== 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:arc-authentication-results; bh=mGirWZOwyS8TVU5YKMT+3Lan0MY1gV2C5QIm3hckiT8=; b=0nNYFJJNAZSBgmzwyNGHTV0xxIFSz5gcn4ixHMZnY2eUusGh00cjdCvaMV4qto613j bimulfZ6lqz/VQ1g+qOkL7ylpv9RhstDRfxPc3NsemUaZ+55UT5D7CO092rXNSFD7ddo qjZh3QwEClvdEj1zrxZmOZ4XlKBFjtH/Kb6Wlg08BgAYGqy1BBMAkkq2HRb1WFSZOyzN jLRBOhZzjc4ED2LFtPMHhvbbrekSc5PLd4NHgPGMPYOYkYyxjcnghdJbhZaRo1mPb4jz Tjwj/HYwsqwS0Nhpl8Wdi2vp91FYn2SOQX3TRtYMWbKh22bY46omqtxXNhGBPixlWk8q zyDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=emPeIkzC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id j206si1021374ywg.275.2018.02.03.20.21.22 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 03 Feb 2018 20:21:22 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=emPeIkzC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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]:58305 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eiBnt-0004IW-J8 for patch@linaro.org; Sat, 03 Feb 2018 23:21:21 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eiBen-0004f9-AJ for qemu-devel@nongnu.org; Sat, 03 Feb 2018 23:11:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eiBei-0004sv-Tm for qemu-devel@nongnu.org; Sat, 03 Feb 2018 23:11:57 -0500 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]:44775) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eiBei-0004sG-Nx for qemu-devel@nongnu.org; Sat, 03 Feb 2018 23:11:52 -0500 Received: by mail-pg0-x243.google.com with SMTP id r1so395422pgn.11 for ; Sat, 03 Feb 2018 20:11:52 -0800 (PST) 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=mGirWZOwyS8TVU5YKMT+3Lan0MY1gV2C5QIm3hckiT8=; b=emPeIkzCOY77OaWXoRZoli64hsgL2NgY+lWE01lFhOlxD3WeJZo3sk7R7SPr1HkAz+ P0uGPeWM7skUy7FVHc2sSj9d/fjLrYuxIW171g747U+MSg4i2fMizwV5ox5OXzcPPSM4 jKUTWQwqCRVe/jig1fgDc08AkZ/v9NhL0gpo0= 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=mGirWZOwyS8TVU5YKMT+3Lan0MY1gV2C5QIm3hckiT8=; b=UUGOquSnS1rXsOzJtVO40dltQAOlzF2G+oAc1ckxxeakASZJQmhYDxAoLni93hO0pj qjaCZJnr5o15xFAoFL4mamGjOk7erIQGC/TSqTjiMugehocZHoq35oSarWtOQl3m/A/H i/iSG2IrSxBoKQUVjRzpM621rWWMpOvRFqn0SbCrateVHVI9pSNsTUS9FIL9JqZg+BCI 9hTo/0OuLhFXO+2Cq+uz5jNMeQgOCgcYD2nHW1TKqnRWRHN02uQYKk57SIXn8FTlYbup EJPBmPRSWt8pOcILiDFADjGwrWqHPv3UbKSYWbGkW7q+oSD1eno06HTzpkVAt0D03O9c XBsA== X-Gm-Message-State: AKwxytc7dGpH0s6LIWCuzR3LBtaMw6FYyB28mmMU2W6gs+qtoqU7k0BD paZbyM6Ph4bTJaRq9+BqtrTpWbFalyU= X-Received: by 10.101.64.139 with SMTP id t11mr8448293pgp.162.1517717511500; Sat, 03 Feb 2018 20:11:51 -0800 (PST) Received: from cloudburst.twiddle.net (174-21-6-47.tukw.qwest.net. [174.21.6.47]) by smtp.gmail.com with ESMTPSA id k3sm1399425pgr.12.2018.02.03.20.11.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 03 Feb 2018 20:11:50 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 3 Feb 2018 20:11:20 -0800 Message-Id: <20180204041136.17525-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180204041136.17525-1-richard.henderson@linaro.org> References: <20180204041136.17525-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::243 Subject: [Qemu-devel] [PATCH 08/24] include/fpu/softfloat: add some float16 constants 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: peter.maydell@linaro.org, cota@braap.org, alex.bennee@linaro.org, hsp.cat7@gmail.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Alex Bennée This defines the same set of common constants for float 16 as defined for 32 and 64 bit floats. These are often used by target helper functions. I've also removed constants that are not used by anybody. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- v2 - fixup constants, remove unused onces --- include/fpu/softfloat.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) -- 2.14.3 diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h index 59c06ef192..23824a3000 100644 --- a/include/fpu/softfloat.h +++ b/include/fpu/softfloat.h @@ -286,6 +286,11 @@ static inline float16 float16_set_sign(float16 a, int sign) return make_float16((float16_val(a) & 0x7fff) | (sign << 15)); } +#define float16_zero make_float16(0) +#define float16_one make_float16(0x3c00) +#define float16_half make_float16(0x3800) +#define float16_infinity make_float16(0x7c00) + /*---------------------------------------------------------------------------- | The pattern for a default generated half-precision NaN. *----------------------------------------------------------------------------*/ @@ -392,8 +397,6 @@ static inline float32 float32_set_sign(float32 a, int sign) #define float32_zero make_float32(0) #define float32_one make_float32(0x3f800000) -#define float32_ln2 make_float32(0x3f317218) -#define float32_pi make_float32(0x40490fdb) #define float32_half make_float32(0x3f000000) #define float32_infinity make_float32(0x7f800000) @@ -506,7 +509,6 @@ static inline float64 float64_set_sign(float64 a, int sign) #define float64_zero make_float64(0) #define float64_one make_float64(0x3ff0000000000000LL) #define float64_ln2 make_float64(0x3fe62e42fefa39efLL) -#define float64_pi make_float64(0x400921fb54442d18LL) #define float64_half make_float64(0x3fe0000000000000LL) #define float64_infinity make_float64(0x7ff0000000000000LL)