From patchwork Tue Jan 9 12:22:38 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: 123906 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp3960427qgn; Tue, 9 Jan 2018 04:28:02 -0800 (PST) X-Google-Smtp-Source: ACJfBou4ZmDF9o8UVeM/RRp6bJVFN4b9e9g7omIUyzvYC1Vq85yCO5o/yLZ/2IwmAl+ta0tgyu36 X-Received: by 10.37.183.142 with SMTP id n14mr13841211ybh.214.1515500882814; Tue, 09 Jan 2018 04:28:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515500882; cv=none; d=google.com; s=arc-20160816; b=Bq4JpbkR48OOFOnV8PqtLlHxcd97xGOO38W7E9IswEcw7/venmChPLJZQeDdx3OPnR YJWuOEeKWh24N6OibCX7gyxrC6VucPrdeaIKKdOBP5gMH8RrS8Ibw+m6WXt4+A2IsVJA nxZpsFkJ+/fz4lTvi74We4wJeN3ZgQO6hB3BRcNYlVRPM8TvqERPt8ITl/bB61zbJ1sb uopSB1TsPamojXdLGzVqrOKQvg46fkKDvv5z1OIXQvks2bf6FIr67e0K0CaU63JnbY9n df2iNhnJx9Cc6hNUwTV2G1+WHycwObQo1hcG0hrUYxfLcO4EQ1mWwARe4KwwAbo/xHej PSNg== 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=wZxx7z+WQCnQ78WbUwlXVYn9xXoslXabdFmm18Cqbbs=; b=W7TMnMivjHXUa67D7K0SvKQz2WelZBhhvYfBh3zhJCNgq++/RsinhOlR2JLuAyvEMJ KkKTNnaOvrBoN5t21pionpfDsrsnJeZQxrlut4xWVPrkpXQpm04ClNB2WZNoBlUSPw4B R8/ux3rAyb0PI9t/YPegwHyWxL8Lfz1NUAYJdZ6vIIBJGgsRvtSVEIz85iLu3KAtQ7v1 /88km0bP+A4VLqdV+TEgdnoGdJxRESkFtt833TL+fdPm1aekXgfz5OUL1MOM4BgsSgPO RL0LqBkWOZa7pzErJeqkZfyWjCKy1uvfOrfXHXeFXthE/cP1TJaoMaRn/6aXaW76jIKg bQwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Y0yGmolR; 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 g184si2932966yba.548.2018.01.09.04.28.02 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 09 Jan 2018 04:28:02 -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=Y0yGmolR; 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]:49488 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYt0c-0001IU-93 for patch@linaro.org; Tue, 09 Jan 2018 07:28:02 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYsvk-0006aM-Qo for qemu-devel@nongnu.org; Tue, 09 Jan 2018 07:23:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYsvj-0006PQ-H6 for qemu-devel@nongnu.org; Tue, 09 Jan 2018 07:23:00 -0500 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:42674) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eYsvj-0006Mi-B3 for qemu-devel@nongnu.org; Tue, 09 Jan 2018 07:22:59 -0500 Received: by mail-wr0-x244.google.com with SMTP id w107so13908099wrb.9 for ; Tue, 09 Jan 2018 04:22:59 -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=wZxx7z+WQCnQ78WbUwlXVYn9xXoslXabdFmm18Cqbbs=; b=Y0yGmolRZ/VHYDHjDqMo4p2fxKVRqmwXm+MbNgORW1j0OENvHcJXgsablp4hAFJ4BB dVMiwNQYYlqyuOnFLxRsYVJhZZ+oz2aBFfwHLGE/PqPNMvuF7LszT6sbOttZkUAIQ8PV wvrB36sXwTrwN4t0LeCqI0DL0xZQCAk5I5ls4= 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=wZxx7z+WQCnQ78WbUwlXVYn9xXoslXabdFmm18Cqbbs=; b=mUD4dCfkcwbWOnT/YANmOcz9wUo9de/5Gjlyl7t+lfg4rpw66mdRBY3/fLCbZgLSbZ dekrbk/zRZJNgLwPOuAeYxxMPViAc0aXw+LAjRPmnxBXUWBxvqOR1xAaX+V2MiamQj74 1Cp+yyEBqgZyVDA4npOVlFs/PMex1DWMhOn+TO+h1dQfQd8Odbk7JOGmyT0s2Cfh3QRu rmMR6JOGEl+1RCj6/h7loYdbsEuwvu7wWjVYgZTkhvpOxe8yNpGtRejxM5aIgonxSPBm +IQI7lUTp7EOpScrVk0pdgxW82qMy8c4Xpalnw+oVluLrZ8oij/TRjDE4zBRHjBt4UiE c3nw== X-Gm-Message-State: AKGB3mLvmJFzZb0GLLtI8mFFwmJ1PpTm6MXgI/NG1HoO1zaz6iiJC2BH JxUxY9xOKzHdGvvimhvVKwza9A== X-Received: by 10.223.158.144 with SMTP id a16mr14236070wrf.83.1515500578341; Tue, 09 Jan 2018 04:22:58 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id x127sm12731031wmb.10.2018.01.09.04.22.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jan 2018 04:22:54 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 92E383E2B49; Tue, 9 Jan 2018 12:22:52 +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, 9 Jan 2018 12:22:38 +0000 Message-Id: <20180109122252.17670-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180109122252.17670-1-alex.bennee@linaro.org> References: <20180109122252.17670-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] [PATCH v2 06/20] 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 --- v2 - fixup constants, remove unused onces --- include/fpu/softfloat.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) -- 2.15.1 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h index 8ab5d0df47..e64bf62f3d 100644 --- a/include/fpu/softfloat.h +++ b/include/fpu/softfloat.h @@ -368,6 +368,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(0x3a00) +#define float16_half make_float16(0x3800) +#define float16_infinity make_float16(0x7c00) + /*---------------------------------------------------------------------------- | The pattern for a default generated half-precision NaN. *----------------------------------------------------------------------------*/ @@ -474,8 +479,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) @@ -588,7 +591,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)