From nobody Wed Feb 11 05:35:36 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1517936228417637.8806928436578; Tue, 6 Feb 2018 08:57:08 -0800 (PST) Received: from localhost ([::1]:37835 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ej6YN-0008UW-FW for importer@patchew.org; Tue, 06 Feb 2018 11:57:07 -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) 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) 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-Google-Smtp-Source: AH8x226JKZuQedKkAiA1Kx1iTy42lGArxgzvTSupuJTkcYydntbVX1BLa1QqWM2v7NC2W6JaJGQxpQ== X-Received: by 10.28.184.82 with SMTP id i79mr2420635wmf.6.1517935707466; Tue, 06 Feb 2018 08:48:27 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=20Benn=C3=A9e?= , qemu-devel@nongnu.org, Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- include/fpu/softfloat.h | 5 +++++ 1 file changed, 5 insertions(+) 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); } =20 +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. *-------------------------------------------------------------------------= ---*/ --=20 2.15.1