From nobody Mon Feb 9 04:22:59 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516800153356117.63205363081272; Wed, 24 Jan 2018 05:22:33 -0800 (PST) Received: from localhost ([::1]:48447 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eeL0V-0001qJ-PX for importer@patchew.org; Wed, 24 Jan 2018 08:22:27 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eeKrq-0003LS-Al for qemu-devel@nongnu.org; Wed, 24 Jan 2018 08:13:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eeKrn-0003pY-4U for qemu-devel@nongnu.org; Wed, 24 Jan 2018 08:13:30 -0500 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:38645) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eeKrm-0003oV-Uj for qemu-devel@nongnu.org; Wed, 24 Jan 2018 08:13:27 -0500 Received: by mail-wr0-x241.google.com with SMTP id x1so3979491wrb.5 for ; Wed, 24 Jan 2018 05:13:26 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id j77sm241811wmf.37.2018.01.24.05.13.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jan 2018 05:13:21 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 455073E0930; Wed, 24 Jan 2018 13:13:16 +0000 (GMT) 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=q/QGZ5o6atpK56lHQEGAn7ushRVN7XENPPoEOcoYfks=; b=Tzbo2ry3yi1rXYrODESYJKu166TZyj9g62n2nx+qUJ5lGWuFKr5gTij5HmeDRtzB1V /f7mU8bAwD+c66zUzALZaZIi2dj0Uznym1rlJHoZyuyV+2KILm2bKSp4uZIWQnllUOoj GWQ7T/EkchRCTSBoR9X64rsrAg6WD9/5g/HNg= 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=q/QGZ5o6atpK56lHQEGAn7ushRVN7XENPPoEOcoYfks=; b=RuAmHG6aioyhtabdEmCJPKqBIuf1z1IYF2Zri0ExgJ85fhHY1aFPJ3BcG0hEk9xIbN YRP5+jw1auWqUBuC25DJ4gVxDVYAMfsgvT1R7g7NIULxBpV81gXu6YEsqlKIrMWQkNht A/PHfzckfjD+DgACLVLCXUrcrDuS3zEsh8NKbIScGLd6wtjubR7D5h61rHDKZjCrqdxP B32o+movXJf1bZ6qLbqfroFZIB7Yb7W7UuSa2Uw0ShnYrG8fawDxxoD+EjJvudwgZ9Q4 ie7cIwoJVVwVMH0EFyvKlQG1aFG8tfWsoj7UoLaCNBS4EsJtzvm2vsKXq96iiJhBZ9ym 1aKg== X-Gm-Message-State: AKwxytfk+qyDCpdnI6/bQbKlmHroZqKu6C/Ti5i1mUdSoDz2MWxddA77 LxYMFkredsunRmRJ+m9d0hlwug== X-Google-Smtp-Source: AH8x2241iimgn6cDriPxO75pL0hg0uwynv3LlSk/y4QF7JE3S9ogW5GTD9bJG/2EOouF8qWURPp4YA== X-Received: by 10.223.173.43 with SMTP id p40mr5592602wrc.107.1516799605992; Wed, 24 Jan 2018 05:13:25 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: richard.henderson@linaro.org, peter.maydell@linaro.org, laurent@vivier.eu, bharata@linux.vnet.ibm.com, andrew@andrewdutcher.com Date: Wed, 24 Jan 2018 13:13:01 +0000 Message-Id: <20180124131315.30567-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180124131315.30567-1-alex.bennee@linaro.org> References: <20180124131315.30567-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:400c:c0c::241 Subject: [Qemu-devel] [PATCH v3 08/22] 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: =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org, Aurelien Jarno 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 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.15.1