Message ID | 20180221110523.859-7-alex.bennee@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp495882ljc; Wed, 21 Feb 2018 03:11:47 -0800 (PST) X-Google-Smtp-Source: AH8x2263F+2Nr3JG2LlQlGWtVOKE44Gg0fwQ4HdNAQ8y021srQT/aYyAngoT5eVDzTyfQjmSdPFG X-Received: by 2002:a25:f40e:: with SMTP id q14-v6mr657317ybd.334.1519211507859; Wed, 21 Feb 2018 03:11:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519211507; cv=none; d=google.com; s=arc-20160816; b=Ll7HLs4rlCxGVAv0GkhFY7QL0uNXuUDnOdHhvwG1iVqo3fk/AU8kkkeVgctdw+VZIj 6U43n4iLmVu2mxpe/myCzsqEIwARhhek56MUXurtRdLvzI4Au/6ZwrFZCWTksNjx/1mp 0K0hY0smZxfW0hCjlufTWiag+36BJu4ZguzY4Kb56TIvdBVkM6XIrrjXnDoVo9T8OSi1 mhvL2T7NvDF0BGleQg+bC6qEdLpvllc6+DMCloTWVgmFqzlsoiTpgp5CdjsbbH75OKmd nDkKrOwqmw+Ul+ESSWJvj9ITVmdAD4zxe9pWh9K0lTP5McPUe5ekand/yloIi/LM9TDP 4Khw== 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=V1rIefF1xH1GH1x1k7AGkSIkQ2sRzhLOIW7nEZh75ts=; b=qXldG/ZuZ3YSyJCqEyytPzPjpFcMyGOn92qGlYeM1l30m3St/WCO7ic2cEu0ef5rDc Dc2htxeIGRmI0O7p5JBAn84MR/xFst1//FoGYYZtRqFGAP8Kc2D8vstLONihJ2YIZu6f LyXEWZVFbBqkSj7RrjSUgmkzlE3fcAJf+KbpNDTkWOOMBrO0JlLxGlt8Zsqk0Ro91JO3 KMQwtdIzmB2URGdKK6jOzPIgpVEPk7vWW1d8M7mAErc2FI6Xt2KNtLOPNMMFj/K6j0Vi Nm/w4e8TPUBhqetV2XeIME8886Q4MCh79KGRUXV/HoNLQXodZBa67nTrn7xqUbCbrsNt 2wfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=e0Tdg1FO; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id w3si632127ybi.754.2018.02.21.03.11.47 for <patch@linaro.org> (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 21 Feb 2018 03:11:47 -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=e0Tdg1FO; 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]:60061 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1eoSJP-0007mv-5t for patch@linaro.org; Wed, 21 Feb 2018 06:11:47 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <alex.bennee@linaro.org>) id 1eoSDU-0003vw-14 for qemu-devel@nongnu.org; Wed, 21 Feb 2018 06:05:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <alex.bennee@linaro.org>) id 1eoSDR-0006fF-KV for qemu-devel@nongnu.org; Wed, 21 Feb 2018 06:05:40 -0500 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:43965) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <alex.bennee@linaro.org>) id 1eoSDR-0006ei-EE for qemu-devel@nongnu.org; Wed, 21 Feb 2018 06:05:37 -0500 Received: by mail-wr0-x241.google.com with SMTP id u49so3259496wrc.10 for <qemu-devel@nongnu.org>; Wed, 21 Feb 2018 03:05:37 -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=V1rIefF1xH1GH1x1k7AGkSIkQ2sRzhLOIW7nEZh75ts=; b=e0Tdg1FOj3DTBxDE7DIpFLAV5rNinLHxywdHw42ZNrDxljJttP1YREivz1L26S8Tuw YWYtPQGICRo45ggR8v9Hn9dy5n9gL7W/UUvdGwaqi/2tfl/JuKLS1XQBuYddf5zVtlMT 3hCFn4B3tkDbAI9RH2LqUyQ+qG9r9aULWHlG8= 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=V1rIefF1xH1GH1x1k7AGkSIkQ2sRzhLOIW7nEZh75ts=; b=Y2lW2FPQgo/T91bqbPS5kdpi5WZkfM1Piz2DjimE+5DwcjgKqQzT2EtT1qR1SSSBkj RMjGS0xHaisCfpIMd7N26MScHvzz3tlLdzfw8zl2aPZKrpnkz6shjVg7yanun6Bb0zZt B4e44JLFB04pbB6QvQXpAqTi/QkpIUeY62jNHxb3L/bi1cuJm0JbWqr/B4y3+/RvzeId qVISDUCcQWZ0RA0F7b7ZIUdsJ0rzhtqSD+BOk+JfYec4rLH/ukX/MYZobn84oAlSeEH6 zQTwtb0q0VJVXzEC/JdfUshazE1+uctJTXVzJiZJLk3u33PpqHHIWsZUtqiFxP8m61oA +mTQ== X-Gm-Message-State: APf1xPDzuWV/MEorbBuXcrhJZ6Qbqs1Jb/Z2JBLA6WMHwYluZTcY5y7N aRxo9Of+86b8MExROqYrXCvlBA== X-Received: by 10.28.109.10 with SMTP id i10mr1876586wmc.107.1519211136364; Wed, 21 Feb 2018 03:05:36 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id b136sm21711065wme.34.2018.02.21.03.05.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Feb 2018 03:05:27 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id AF8E23E043F; Wed, 21 Feb 2018 11:05:23 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org> To: peter.maydell@linaro.org Date: Wed, 21 Feb 2018 11:05:06 +0000 Message-Id: <20180221110523.859-7-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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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] [PULL 06/22] include/fpu/softfloat: implement float16_chs helper X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, qemu-devel@nongnu.org, Aurelien Jarno <aurelien@aurel32.net> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
re-factor softfloat and add fp16 functions
|
expand
|
diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h index 1d34f2c3eb..f75aa59100 100644 --- a/include/fpu/softfloat.h +++ b/include/fpu/softfloat.h @@ -272,6 +272,15 @@ static inline float16 float16_abs(float16 a) */ return make_float16(float16_val(a) & 0x7fff); } + +static inline float16 float16_chs(float16 a) +{ + /* Note that chs does *not* handle NaN specially, nor does + * it flush denormal inputs to zero. + */ + return make_float16(float16_val(a) ^ 0x8000); +} + /*---------------------------------------------------------------------------- | The pattern for a default generated half-precision NaN. *----------------------------------------------------------------------------*/