From patchwork Wed Feb 21 11:05:08 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: 129027 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp498778ljc; Wed, 21 Feb 2018 03:14:55 -0800 (PST) X-Google-Smtp-Source: AH8x226boYC0sMeXwpiM2GUF5l3TEPD3wO1+td+alsOwijOrGLW2IwnKj+ZtSg/YwkQpvKXI2/qH X-Received: by 10.129.98.11 with SMTP id w11mr1906972ywb.381.1519211695612; Wed, 21 Feb 2018 03:14:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519211695; cv=none; d=google.com; s=arc-20160816; b=QCjrdzK2TLmDkPlXPb0ruxTlbnyncUM8wpI2V67WlQMxVPtvVOTtatokXFibgSg14b A6zw85KADjHi0MZ74e2x2Ul/Rx5gLWmKwf6YSJpkFjlyPJUPyH1zb4H6B/2mMrMWDOon ZGaHtkVIkoPkf0DIWc9LdjuBCtEnX302D0iror+PGutLRAaRPYPCQenLsplC2wwfrrPb YGHTEVseFQYvQy2FUWMTTCYLYLz0Jam7//Vb5OdtLvPDKG5s0wnzRMveGK2eckYTqyMZ 8qYG5oAC5SjmdZ6Xa1QgFU528ioCgannRgwGxD19p+bitRLwfVhNWpZytNOH82hcaMmJ vTVw== 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=vcyRTgec4QkGUdIqcv+Jm4YjeN1OF/RseFEzHdlCSR8=; b=rz6g9Up0K1GDcTrEL7ngRIe0tLb2LVnQaIaAJftfKFqPO5XbHt01wRaMjXR047FpJV mjgvp499Dyao+yvoWuO/TKzJBsvpuoSX4Uo66WLchuKoO2GghkXdtNsBZJciuRQOxJcZ JFtMMSQXEKntBrfXmOcqibbUcXjtODKqLyQ15dHkHOR2MSW6EtgAJ8ziGJ4kT7PREs4p mVeWjzjTF8cx9OqfKA6OEv3if1BTTdwLyrlFDjpShiRibINj0ot3mdxl9m1DPdj43f/Z M/Qdc3tPjfUZXA9BY12p4bpVvw5yJFmcpEUwen7/y4SP1mlCtGkcdARZcgNDZMZavkBH KgkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=S3tgro8K; 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 o126si1278677ywe.153.2018.02.21.03.14.55 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 21 Feb 2018 03:14:55 -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=S3tgro8K; 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]:60085 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoSMQ-0002t6-VT for patch@linaro.org; Wed, 21 Feb 2018 06:14:55 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoSDW-0003wK-9p for qemu-devel@nongnu.org; Wed, 21 Feb 2018 06:05:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoSDV-0006gk-HF for qemu-devel@nongnu.org; Wed, 21 Feb 2018 06:05:42 -0500 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:37640) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eoSDV-0006gK-AL for qemu-devel@nongnu.org; Wed, 21 Feb 2018 06:05:41 -0500 Received: by mail-wr0-x244.google.com with SMTP id z12so3287370wrg.4 for ; Wed, 21 Feb 2018 03:05:41 -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=vcyRTgec4QkGUdIqcv+Jm4YjeN1OF/RseFEzHdlCSR8=; b=S3tgro8KC6aSvTMhWbjHpxdopASSIHoupjupLongRiqw6Kff9T+mSoe1JfIy1drPRP uSUk6vUuLGPoHI66T/tefwBa07bwC1p3CcFVqQpnAcHoNuFoPNklw26M2WMQxPeyIQg4 Dl7q+u7ueQekcEq92tncfTtROhxFxo7ZqZTxA= 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=vcyRTgec4QkGUdIqcv+Jm4YjeN1OF/RseFEzHdlCSR8=; b=V4d0IWIiPhzSeeDQ7D7qxKIgyzMRUTjWsLiY7sAJbtWx9YGVHQ5EqFFNhvk/JDWxOj AtyeS7r0NpDqsyKRZJeMyDDSVHcNHI8zbiPPUPCPUHSJ3LLn9oRd+P2oQUKiYG2IsDZS vnJlXYReyYzIxmW9aGtEyA9T5sZgARLmQ+cWAZGYE+zksINRm3to8fCEWJJCEk/FPFnj 3IsaTfrgGWaxhY6MmvNp7wnoP0keJP5oiA65OcezgDqHXRyVHsEKa8J0IR+IvUwEgSW9 EnyhcC0IUbhRSMG0f2cjrhu2cdIjlrE4OBY0T5GbOUzkvo19irJ4lmW6Q32ngSl6TQ3p 9D2Q== X-Gm-Message-State: APf1xPAGSCLY0jJKTbFSj9CXJghnsXYDEWQixmti2AlONVPOW46c8DgO fZ+sWubKDVYS8LrFeKGmpUQH/w== X-Received: by 10.223.189.131 with SMTP id l3mr2582413wrh.140.1519211140303; Wed, 21 Feb 2018 03:05:40 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id w31sm10788360wrc.49.2018.02.21.03.05.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Feb 2018 03:05:32 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id D1A863E06B0; Wed, 21 Feb 2018 11:05:23 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Wed, 21 Feb 2018 11:05:08 +0000 Message-Id: <20180221110523.859-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180221110523.859-1-alex.bennee@linaro.org> References: <20180221110523.859-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::244 Subject: [Qemu-devel] [PULL 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 -- 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)