From patchwork Tue Feb 6 16:48: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: 127027 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3089618ljc; Tue, 6 Feb 2018 08:51:41 -0800 (PST) X-Google-Smtp-Source: AH8x225HgbifWhLndsSeUnKwAW6TNXgbHaEp9rtxspZWq8nv4NE/gz/y2SEcgrmHpFDdJ+3uskNj X-Received: by 10.37.173.67 with SMTP id l3mr1900005ybe.6.1517935901135; Tue, 06 Feb 2018 08:51:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517935901; cv=none; d=google.com; s=arc-20160816; b=DucPZ4+ptAsd6kcsURDQ6n8zYM6Kz8Or/mDfwnmf2EmiFYSmBIuCXfSFx6il1hbz3k N0xSLQwoHlLQt0O8WlexpBym+zrXAV8Et74ypE7jdQQAFYYc4YHLUi9nzUcwIe8uYiL6 xFFtocBgUg9iszkMX6Hf4TzyF5vkwTBPAuqGobpi/ZwGQ3J/IPKDmFLJyp49A6yeI2+o 3A9P9X/jk6rdBOT4hmsBagn1tzT7tOCxAOQw0c7Tw3cwV9Qkl9R3scBtBnZNYjyd2KR2 5k7E5OYWyAbudOilqA3RP3xu7EuyAq1VOu+XKzK/MuWPCo5xin2x5AwcRQR7JL3SeQBI kCow== 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=q0LPRbmqeQMt8/7SVdLsOh0eSUUPit9todhKy0ZBmSc=; b=bxaIfLH+NaPd5nzaDwvZkNnMg2Z2zt9JjXiuA1CKkPr8METUBPNVFtZcvH86ceg8QH /TAF7fflB+kkkWQS3VQwRaaYHkDKd4I/X1b1F8aZ8XfQ6dtbQJWI/Rs+/t3XUdSnM5yd hkov23lC3YXjjmL0b/yhuzyxSRov7AovJ6PcAQC9oB4cs2e9C3TxTMvCYpB9ZwrlUZF7 dtX4xiZiSfhlSAfD1ou9rDXHh5nx52SBp+hYiVEjfYZI4D/Ir2f6Wl5eh1Zc24RtIDKr 7C9k9Q4OlNvuo80ltKB0swZamJc6ACDzmtN1Jr946hbvjWxgRPmYSpK1amYCuuDhM+Xo 3myw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=KY8qhvWC; 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 h184si1853156ywf.345.2018.02.06.08.51.40 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 06 Feb 2018 08:51: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=KY8qhvWC; 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]:37455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ej6T6-0002Eh-Bn for patch@linaro.org; Tue, 06 Feb 2018 11:51:40 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33566) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ej6Q4-0000az-3K for qemu-devel@nongnu.org; Tue, 06 Feb 2018 11:48:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ej6Q0-0004xv-1g for qemu-devel@nongnu.org; Tue, 06 Feb 2018 11:48:32 -0500 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:34511) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ej6Pz-0004vT-Qi for qemu-devel@nongnu.org; Tue, 06 Feb 2018 11:48:27 -0500 Received: by mail-wr0-x243.google.com with SMTP id z6so2666126wrb.1 for ; Tue, 06 Feb 2018 08:48:27 -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=q0LPRbmqeQMt8/7SVdLsOh0eSUUPit9todhKy0ZBmSc=; b=KY8qhvWCTd0g2x8zlT0MynMwNyvykVLVHQ8xirGcinmRYB3IXvz63pn4vA2o1V1WIa 0QTmH/YVrvMjvWN7n7vFY7oXN353Fx3Z+mINAAku7R3uJgjcCKRNCyh55WyL1YdKp3vN psQVusnziwExwWc2WprD5ggRhNc5rFkoM51BU= 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=q0LPRbmqeQMt8/7SVdLsOh0eSUUPit9todhKy0ZBmSc=; b=F14Fm8tYqNgFvxIxXRrrxdDoD5DTkRUrj0OROz9w6UZuS2KwXSR0D57yfkoESIUpo0 fvNbsOeGGQQ3lCi+1wEanuI6KBm5oAlL2lfEkQHeosPejN5WKvZ9tLJkgQP4/0t2izoB w87zgWjqsqAaXAiijL8d+FUwQl7nWcWFlSpAGfQvbsCKBYdTvKGjxl4lJNhvS1R3dWOc orMDHAupvavoV9LP1FQjr+DZaG5NBQE9jeJhjxfVAEKRZGG7BcXUd5CbyEqKDllORQ7X fpvCcWMHt4AM6iH7np85ES04lnjKaAtwi/e5K9GA3a404QqONmWFN7mDA9ztW9XtDz/X kPew== X-Gm-Message-State: APf1xPCendgFkVVu7qtrNJhqFadWV5uIZhIwW69c8PB+cZXeSp06ipvd 7ic9JoBLnkMSnJ/18tq39AGUTA== X-Received: by 10.223.136.89 with SMTP id e25mr2669924wre.140.1517935706681; Tue, 06 Feb 2018 08:48:26 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 78sm9549219wmm.22.2018.02.06.08.48.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Feb 2018 08:48:22 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id DA8BC3E069A; Tue, 6 Feb 2018 16:48:15 +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: Tue, 6 Feb 2018 16:48:01 +0000 Message-Id: <20180206164815.10084-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180206164815.10084-1-alex.bennee@linaro.org> References: <20180206164815.10084-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::243 Subject: [Qemu-devel] [PATCH v4 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é Reviewed-by: Richard Henderson --- v2 - fixup constants, remove unused onces --- include/fpu/softfloat.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) -- 2.15.1 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)