From nobody Wed Feb 11 02:10:11 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 15177178019293.0518579532931653; Sat, 3 Feb 2018 20:16:41 -0800 (PST) Received: from localhost ([::1]:58266 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eiBjN-0000Cp-4Z for importer@patchew.org; Sat, 03 Feb 2018 23:16:41 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47299) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eiBei-0004Yg-Ai for qemu-devel@nongnu.org; Sat, 03 Feb 2018 23:11:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eiBeh-0004rx-HZ for qemu-devel@nongnu.org; Sat, 03 Feb 2018 23:11:52 -0500 Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]:41094) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eiBeh-0004rh-B1 for qemu-devel@nongnu.org; Sat, 03 Feb 2018 23:11:51 -0500 Received: by mail-pg0-x242.google.com with SMTP id 141so5380855pgd.8 for ; Sat, 03 Feb 2018 20:11:51 -0800 (PST) Received: from cloudburst.twiddle.net (174-21-6-47.tukw.qwest.net. [174.21.6.47]) by smtp.gmail.com with ESMTPSA id k3sm1399425pgr.12.2018.02.03.20.11.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 03 Feb 2018 20:11:49 -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=QefWOD5QoOoi8TNKVFq33z0FgQ9NAGQGNRsIESMBXUI=; b=Dnkndd4U7LBnRXqPrBfAT+gmeWe5sH1LBgTVxyAe7pjqD5tKaiTfR/AhHTu9BjQCZo obcllywv/uBn0NKJRPzTZQ+DfH6hEyTeiU2BJ/CxrW2aXaf2HUI63Y7cb9oEjvpTzBxq Q2m/Ov5H2nmMFDUUrmk+u0JikrThhkeV/cxR4= 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=QefWOD5QoOoi8TNKVFq33z0FgQ9NAGQGNRsIESMBXUI=; b=QRkk22xWkL9v2BJqjiTsqPGXQqgl8A9R+GTumGKBrXu13ppU/E0cf1VInPnhYyFYGQ RDh5p73e+HWe6OMIWzKd4EvPNIJXxA5f1dQ7Vhf5TpAq4rzsu03dWOZodvActz4g/qZU WSdQMjRBVHcwgQpgZaAw4pVhzStHPwsLpAOL/4we4gIRSDt6Z3nvGC8LGJfMbpnoEVP5 n8XN06QAGoBFLIAH0JOzTS3JlE/FTcWIXTy6U+qeF8gTaSG///MJIrIxAAW7pDiqA+kB K4rJ1jpMT29BFLLfUA1/Igmjdp1S8KWd/agrEyyyQbywiXHhV/OAcenHVqRWh6YAoL13 XGKw== X-Gm-Message-State: APf1xPBBNlMT2+QsuCNSF0V6YVSJXZmFKn0x5xfFhKxtshCPvbBltwO3 Ea2XfP2PbmCiGW5oQ0RzP5eD9XeQiLY= X-Google-Smtp-Source: AH8x224dug1ZNY071JjclFFss9e/ydJlZllBhj/ibEs2BzEJ1LHOfeJDZ3gmJTwWd2Qr5IXrP3Dueg== X-Received: by 10.99.6.201 with SMTP id 192mr1372598pgg.50.1517717510099; Sat, 03 Feb 2018 20:11:50 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 3 Feb 2018 20:11:19 -0800 Message-Id: <20180204041136.17525-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180204041136.17525-1-richard.henderson@linaro.org> References: <20180204041136.17525-1-richard.henderson@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: 2607:f8b0:400e:c05::242 Subject: [Qemu-devel] [PATCH 07/24] 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: peter.maydell@linaro.org, cota@braap.org, alex.bennee@linaro.org, hsp.cat7@gmail.com 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 From: Alex Benn=C3=A9e 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.14.3