From nobody Wed Feb 11 05:11:16 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1517718175828422.027189365038; Sat, 3 Feb 2018 20:22:55 -0800 (PST) Received: from localhost ([::1]:58311 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eiBpO-0005RQ-TU for importer@patchew.org; Sat, 03 Feb 2018 23:22:54 -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) 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) 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-Google-Smtp-Source: AH8x226wJYr1yqClamq7DH/niww8LuT6F3+bCqcZ9OHkzowxsxiWZgMR7TQitVeR5FwrqMW0GDRK8Q== X-Received: by 10.101.64.139 with SMTP id t11mr8448293pgp.162.1517717511500; Sat, 03 Feb 2018 20:11:51 -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 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: 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 From: Alex Benn=C3=A9e 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=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- v2 - fixup constants, remove unused onces --- include/fpu/softfloat.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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)); } =20 +#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 s= ign) =20 #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) =20 @@ -506,7 +509,6 @@ static inline float64 float64_set_sign(float64 a, int s= ign) #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) =20 --=20 2.14.3