From patchwork Wed Jan 24 13:13:01 2018 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: 125646 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp411179ljf; Wed, 24 Jan 2018 05:20:42 -0800 (PST) X-Google-Smtp-Source: AH8x227wDMW/TPRfkKcEJJVmaZSYSMnbXMzU43UsajVSevOqua2ZWxGaDV10D3+F3yQbQ1GV9ri6 X-Received: by 10.37.86.70 with SMTP id k67mr5099708ybb.61.1516800041991; Wed, 24 Jan 2018 05:20:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516800041; cv=none; d=google.com; s=arc-20160816; b=fbQtLq3j4lqOI7WB897MhKlSzKlB+8B+b/BnPdIf54It2xMZJIb1uWGOwOm0H0fjaJ ljZ5FOrmY/lDzpVVmVYoN1gEpzB6fiWuYq1Pl0YdQWelQXNJMyd6qOweYvu7qwpOsdvm UsvbR2pGicpTbVy8mx6sksFH5aFlpddWw75PvKC7CC85W+tL0pHLVSDpPioImIYGpBFF tu4LYNXqJNlwLS3JowDbX19hN11zx96u4LiTKv8e5shlf5D3GYQRYGhtUpxNniATz+Jz /xqVEKAiD8dnB4R2OHpO3WRADSPn3Q6l6qDC48VKlElop6WKLCZjK3uJLeANVjNNtyqA l32g== 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=q/QGZ5o6atpK56lHQEGAn7ushRVN7XENPPoEOcoYfks=; b=PDd/TQJ/1FGaPe0NV4bMEB2vCOzpA7gVrfQo27ZNxTOmPeOKBlurD4dcbK3pFE0YMe /uFasik3E7hroBCk4sAuX/rl79Kr4T7Tp5DVbz67ynShfrEQ40khSuCP9WaHeaLddTz7 zNKbl+ouUSLHPuMmYKgTJ9VPPoeg+MSSlGdwfHZBbDZo2oHAH2rZe1/ugXtEGdvE5/W/ Oz6tn6JSaXevrxXNHKuq+vr3G5+RzqdsQcwSWboPKcvv+mRBo1MQhOdTMk85kduKBKTL WvXZN7Sa8dvUYaL4kfet1Vh2C22lAAY2g7Vplheq7/Xia66j4QGRy8AfXTBQAWnk1BD9 qVCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Tzbo2ry3; 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 n200si1866683ybf.539.2018.01.24.05.20.41 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 24 Jan 2018 05:20:41 -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=Tzbo2ry3; 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]:48301 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eeKyn-0000WV-By for patch@linaro.org; Wed, 24 Jan 2018 08:20:41 -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) 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-Received: by 10.223.173.43 with SMTP id p40mr5592602wrc.107.1516799605992; Wed, 24 Jan 2018 05:13:25 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , qemu-devel@nongnu.org, Aurelien Jarno Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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é --- v2 - fixup constants, remove unused onces --- include/fpu/softfloat.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) -- 2.15.1 Reviewed-by: Richard Henderson 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)