From patchwork Mon Dec 11 12:56:51 2017 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: 121397 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2757516qgn; Mon, 11 Dec 2017 05:00:32 -0800 (PST) X-Google-Smtp-Source: ACJfBouYSNz0FX30n2CuGcxCWH0sE603vknzRpXsWAQ0LFUuudQKJvcVZzvjQIUDRJC6PQmvBr5L X-Received: by 10.13.233.198 with SMTP id s189mr189919ywe.267.1512997232448; Mon, 11 Dec 2017 05:00:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512997232; cv=none; d=google.com; s=arc-20160816; b=h63Vdj0pXNf+2nEp+n9ibxaHPeOA/kOLQjfgBQyXxmeiefynrzpkor3+ahz3JshQTQ nR0E7PwHPx8UotCoqwyLh/Ks0uPd2b3IclM+7V5lb3ySm8cWl8XGy6EO6qtcJ+OC+lMJ +jW0Cq02pRS2J6s4G3DloocKBwUDNo+pQ3+bzWw4f9waDyW4fp5vmxOd7+jKKYga+bSd qnJQMsDnmj2o3eRiD+88yAFv+xB3+/9E8u1zstJXu4cgFvTZ06FjeukBcz1ayU5ZJ/8L 85zDa+fF//Pozh0iAnwFL5l+TjOKXc40o9O9aHA1WhSSVagOZGHda1ekGw4F5HCxZg5a RKow== 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=wP46SW2yKAaBmdenl9zzdRFHNYQbxZPYsnCJ88KO1hI=; b=a2eOEcbLWxV9KTekoTsGQZjFlXh5/TfK+LA7d7pr2+0gnJ++KNWzZd1ZW1nijLQOgf 4wVHZd7Nw0y4WQ5ar+JVwCc66uHOQJu/Y1531jGBH3vh0Ska+A6RqcpWyLHkq1/Fyyi4 aDib1x0yPtYt9xlI6bAmbbeTXOIi1TVvwHHIWJbID4C1a9slO2CUIJLHC4BmIu0+hIVF /waNlRueXHEGWSRHOi2u3a7oJE54vt6aSR1v2obMyJYgnwUZ/zn0qxq9wzVfHI7M6Uq9 X+2IB3awlVitHG2UoneVhJHInAELr+SDwDcYfKTAFGWFLv8/kIFARZgIeQcoI0fdnFqo +gbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=SR2T/vLK; 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 u79si2987699ywu.365.2017.12.11.05.00.32 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 11 Dec 2017 05:00:32 -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=SR2T/vLK; 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]:52597 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eONh9-0004kb-U8 for patch@linaro.org; Mon, 11 Dec 2017 08:00:31 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eONdy-0002Kj-JQ for qemu-devel@nongnu.org; Mon, 11 Dec 2017 07:57:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eONdx-0007d7-PL for qemu-devel@nongnu.org; Mon, 11 Dec 2017 07:57:14 -0500 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:45092) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eONdx-0007c4-K4 for qemu-devel@nongnu.org; Mon, 11 Dec 2017 07:57:13 -0500 Received: by mail-wr0-x241.google.com with SMTP id h1so17430996wre.12 for ; Mon, 11 Dec 2017 04:57:13 -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=wP46SW2yKAaBmdenl9zzdRFHNYQbxZPYsnCJ88KO1hI=; b=SR2T/vLKEnltmpgfgR24vtr+Wf0BgToXQ6TRMJW8y5NXkKIc25EBMufZz8gyyoBISp DsckOgZJaHjrsqoiauvZ4OHffm6Pq8soz0Yt0dc0hszznYTNFG7Co6GMKlxfBQLNX3Xm LMbHTQgbjBHYGgfex7sbS55wfHyNInNfG+RAY= 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=wP46SW2yKAaBmdenl9zzdRFHNYQbxZPYsnCJ88KO1hI=; b=OZtkT8EYNlz0Lk/7MzM8Waez180NLH+l52mIuhQNlfSSRXk612K2g7d09iCqXEO322 h9yisCx2O2whPOso/gv4WovC62t33BB8b6SYMeDI7r/+VedQqLbfdXLmGpOztW7GW/PG oj2LHJ2zLcuI7Np+E1cGeq+PwZgKh75wV+h8nuLmFMFfW1ic3hikx/0dtdBwNYK3k83s LPf81rLQ5DAwJCEHtw5I3V4tupGOxu8pqXkcWA9JX07eWHruZyHYrpZRPr0RGjK1yNYJ Nn/XoctpzoIbjjq3Y/BA8Oly+SRpMgvQuIpaaJzcv+l2myz8JMOd/G3OEWj1mxhjbQDA lwjA== X-Gm-Message-State: AKGB3mJ0v+tkxCCiy7PIH21wWY4kK5LQtrEPEWRI7ZepD4pxncrOBqzM 4GXgpzClrMVAbmNHfRtSm0XYYg== X-Received: by 10.223.149.6 with SMTP id 6mr314677wrs.112.1512997032444; Mon, 11 Dec 2017 04:57:12 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id n17sm8661877wmd.22.2017.12.11.04.57.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Dec 2017 04:57:10 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id BC1A53E0990; Mon, 11 Dec 2017 12:57:05 +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, aleksandar.markovic@imgtec.com Date: Mon, 11 Dec 2017 12:56:51 +0000 Message-Id: <20171211125705.16120-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171211125705.16120-1-alex.bennee@linaro.org> References: <20171211125705.16120-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 v1 05/19] include/fpu/softfloat: add some float16 contants 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. Signed-off-by: Alex Bennée --- include/fpu/softfloat.h | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.15.1 diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h index 17dfe60dbd..5a9258c57c 100644 --- a/include/fpu/softfloat.h +++ b/include/fpu/softfloat.h @@ -395,6 +395,13 @@ 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_ln2 make_float16(0x34d1) +#define float16_pi make_float16(0x4448) +#define float16_half make_float16(0x3800) +#define float16_infinity make_float16(0x7a00) + /*---------------------------------------------------------------------------- | The pattern for a default generated half-precision NaN. *----------------------------------------------------------------------------*/