From patchwork Tue Feb 6 16:48:00 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: 127033 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3092774ljc; Tue, 6 Feb 2018 08:55:39 -0800 (PST) X-Google-Smtp-Source: AH8x225eUfi3up+9EleVD1YeXf0emd8mlYF/WNu3QGPbuNOzggnKywBL9l4jMT3ocL/veag9oafK X-Received: by 10.37.3.194 with SMTP id 185mr1867499ybd.379.1517936138954; Tue, 06 Feb 2018 08:55:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517936138; cv=none; d=google.com; s=arc-20160816; b=D76L2jEQzsbtb7nybtQ3F81aw82DxlLvHJrJUV+HH3KHGiW189CVU1rYlWAsVjI2mB ENrL063kZ9GDysON1X4uKFNGQjYOgf39fb9Hp2H3bWtGJLTMwSRBa1zu5RB94xgeaM3i /9H/qje4CHo1C9Ly5yeKYonlAOEto6ny+xY6RD0aQea8zjAK7bAXu/snehhmh5NkJtYR jPPK/K3HtfL01JvuEbWSY7sqQId8DxphyDi0WBGkeIJAmowkXrcskmGhodNHAJ9hnG8k MZ55JhYqEo3n7AdChDZ8ng4R+IBvhmtrJJCZ7vMX70IjltGZM/HrB2OY3erLxLGJo1R2 +0fA== 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=SorheihcHtUCGiSTnTOTs5ctR1c+FNyyQ7fs42JPDKc=; b=I8i87jjfmBMv65taWUvWaeSdOiMQJVdamkqatC8K320xoHCNsHdJ1qLtylLLAookzv eAEtoNk1ZS6Y6q9WwuPBOhuH4r8yKL39cIfY7wxNefR5Tyu4a3A80Lj0EXtMZS0wpc9y xExxncvywUsmqyJtHIAk0KCRtr7YhqBepVaOywxZhHSKROgDrtAI1vbIRDTvGdqaJXlY V6fyCnACABFtC4rEIW/Vqxm5y0qOYHeBqHQF5/2znLWmRySI0cA2Md/LB5YjTPSatFPX 4l1yCrOi+KuXcUU5CwG8BZIM3GGYeyJumM+a3v9uOR+iAjRSwRwi0vePaXl5qzRqoyTy xejw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=V04n8Sfy; 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 t1si1659379ybk.651.2018.02.06.08.55.38 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 06 Feb 2018 08:55:38 -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=V04n8Sfy; 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]:37615 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ej6Ww-0006r8-Ba for patch@linaro.org; Tue, 06 Feb 2018 11:55:38 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ej6Q4-0000b0-4O 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-0004yf-O7 for qemu-devel@nongnu.org; Tue, 06 Feb 2018 11:48:32 -0500 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:51157) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ej6Q0-0004xh-IR for qemu-devel@nongnu.org; Tue, 06 Feb 2018 11:48:28 -0500 Received: by mail-wm0-x242.google.com with SMTP id f71so5028608wmf.0 for ; Tue, 06 Feb 2018 08:48:28 -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=SorheihcHtUCGiSTnTOTs5ctR1c+FNyyQ7fs42JPDKc=; b=V04n8Sfyil+UbO9ad5CGlkyyEpohdCgR/KCadYK0CwrK9EXSivWEbZPSRrQRzz62zB XLAXjfWCJEISbKJ9VQNtDrLSsllGsZLUmp8g0QyQBBS51q1yjdQDZACFxDwrdxzLQj7N nukaOrHWatZkfteowu709WFIT5thoYghqw4E0= 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=SorheihcHtUCGiSTnTOTs5ctR1c+FNyyQ7fs42JPDKc=; b=bOfUH1p8XC4GNbt7WMkkKEVMJRNa6GwyniXwIn778UUlqEY2Kc6dYh6W8MWWxzYkuJ Duua2TwvRc2rP3tH7LSxYrr6hkRidJ7pupN2RDzrF7Ci5JBc8baTB0dFVMKHC8f274Yl OssH7lgwbUxty40dGk/PIDlVjW9ra+0+NmosT5x2RMI39b4iMSHhebhMqLeNyw2ntSLv oMvkBB77j6FwlYmRbkAw4WL8mJrhFRKQ+MxEBjQx7Zv2suE+XiODiGVChhLz/89035yR 3wwVicmTV2eTK9ZSPysEOottqq9qT0YV1fzcN0G/CMGK8zmgvkx4F6K1FKYEhMyzG4T2 +QtA== X-Gm-Message-State: APf1xPAJwv9iJm2ef9m7ywZRTsGsgnPcMLWnRJINfdzceGSunMHzdvfl YkNfKZhsAv+hXxNzc6NOuzTGPQ== X-Received: by 10.28.184.82 with SMTP id i79mr2420635wmf.6.1517935707466; Tue, 06 Feb 2018 08:48:27 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id q14sm5779936wre.66.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 C9C623E063E; 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:00 +0000 Message-Id: <20180206164815.10084-8-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:c09::242 Subject: [Qemu-devel] [PATCH v4 07/22] include/fpu/softfloat: implement float16_set_sign helper 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" Signed-off-by: Alex Bennée Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- include/fpu/softfloat.h | 5 +++++ 1 file changed, 5 insertions(+) -- 2.15.1 diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h index f75aa59100..59c06ef192 100644 --- a/include/fpu/softfloat.h +++ b/include/fpu/softfloat.h @@ -281,6 +281,11 @@ static inline float16 float16_chs(float16 a) return make_float16(float16_val(a) ^ 0x8000); } +static inline float16 float16_set_sign(float16 a, int sign) +{ + return make_float16((float16_val(a) & 0x7fff) | (sign << 15)); +} + /*---------------------------------------------------------------------------- | The pattern for a default generated half-precision NaN. *----------------------------------------------------------------------------*/