From nobody Mon Nov 25 03:34:24 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1718831121; cv=none; d=zohomail.com; s=zohoarc; b=Es4bTIZqV268w0pd5aMQqALKnym/fnqOs5V5qbk1Q8SL5KeErn3REfA9WjQrutXNNrUocCBYPrhxXvM0Go97brju1+MFsZvCUkHCWliuqQa9Yfu8LwHfpYDEWNYCWDhwS0aEk1wNWeSpnE5Y/nTRTEkzLTCivLqeVi98LQtcTdI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1718831121; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=FtNxjFE/f89KWIDXkuZChFJ2j7WRxZA+Mhz/JhRC3yg=; b=cEUwY7+aiGn1N34C/wYP5bWKsG6g793KqF0h/sQegEbOSoF2qYZQvt6zrFpN5Dn/Gv2cbOMBkLPIXmywgtgY20JvsBxf30xaTehNOmNcBKeT86j2ymhDKm580jeyY0eSRCFzNCz4Ivl9N0AlKycrnaYtdY8Ahhr/zMrLR8XiQTw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1718831121239151.1719050677019; Wed, 19 Jun 2024 14:05:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sK2Pl-0002OS-J3; Wed, 19 Jun 2024 17:00:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sK2Pi-0002Ln-B3 for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:18 -0400 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sK2Pg-0000jE-Kr for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:18 -0400 Received: by mail-pg1-x52c.google.com with SMTP id 41be03b00d2f7-70346ae2c43so916740a12.1 for ; Wed, 19 Jun 2024 14:00:16 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f98f8f8c42sm39183765ad.162.2024.06.19.14.00.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 14:00:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718830815; x=1719435615; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FtNxjFE/f89KWIDXkuZChFJ2j7WRxZA+Mhz/JhRC3yg=; b=IIy6ns+nConpkdezXu+VmOc6doR/SpZddMTcpUmMxW8zVPDno1mVFWtJQKzb4W6RbK Kp7Zdj3LNtUV6WMG/Ye4V8qNVJQF1fzLCViKTXXq4TnLbaIlRKBtv06F2IcSKh8KCBrD ABFsG+hIC0OEdarL9m02+JtAnlX5CY5kImv/MAe+CV0sYHUG3sc+lQo0KPDcAihYyMIR wCf6lsJ7TlawxkyO58P+6P3/Oz/UiHOmBrrrt36yXtq7ymAEtAXuRv6pTjVy/AL481fO Us5X3XzNcTHOM67Nl2X4m67Ipo8/Kdk3FHH+kU39NWDnvMtxDUwwj9VBZeijcev5GfCJ 40nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718830815; x=1719435615; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FtNxjFE/f89KWIDXkuZChFJ2j7WRxZA+Mhz/JhRC3yg=; b=wh5TwMo3Thx0Nw+S388rzPtoYEZdnGTZRBO82Yeh1d3+oWsiKO/ZDDBDDiXsTcKr52 7knjo/6tHjaQ4bWqePYGA5sT5zOW74M9Ay4xd/iKEHwdcuPYa5TQ0tfcxjpyiX2sC+T7 5vr3geEZ2N7rxRayvOxkeNXV9LDaf2DiWSg3+2V1vHj9m0YgMoj3hzDSr3YQmTPbOrCR Fy2xQAh50lWU1y0hBO+bnjMwszkucZyLUhHCR+UTMYkZt1FIBtazEcRsIbNviU8ufmYT P9rwOXNRfq/NhAZXEZAK3i2IrrwhlEI039QE72XmIs42MmKe9m8+Zj32+oQvefIDGbxO 96Pw== X-Gm-Message-State: AOJu0Yx4Duwn+bky6mtvb+MD4ixRM6ZwotIJ1VM8YXdEwdyC8UChpQEN 2GndD9n7hGDVgnzDELUmLlTSJ0/ccR6eXoPI4QvIZr6alxPjPqkxUE3dXaFDQSEUcDC+3SvKz1Y n X-Google-Smtp-Source: AGHT+IGJQF3MB+nVBhH8FPJcFeIDjPRo3oxMhg5mST27Les7pOnXtDsrXmWa/9lh8kpjqcvTH3Ia6g== X-Received: by 2002:a17:902:f9c4:b0:1f8:3e2c:d66f with SMTP id d9443c01a7336-1f98b23f6d9mr67753515ad.17.1718830814841; Wed, 19 Jun 2024 14:00:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= , qemu-stable@nongnu.org Subject: [PULL 23/24] target/sparc: use signed denominator in sdiv helper Date: Wed, 19 Jun 2024 13:59:51 -0700 Message-Id: <20240619205952.235946-24-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240619205952.235946-1-richard.henderson@linaro.org> References: <20240619205952.235946-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::52c; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1718831121640100003 From: Cl=C3=A9ment Chigot The result has to be done with the signed denominator (b32) instead of the unsigned value passed in argument (b). Cc: qemu-stable@nongnu.org Fixes: 1326010322d6 ("target/sparc: Remove CC_OP_DIV") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2319 Signed-off-by: Cl=C3=A9ment Chigot Reviewed-by: Richard Henderson Message-Id: <20240606144331.698361-1-chigot@adacore.com> Signed-off-by: Richard Henderson --- target/sparc/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sparc/helper.c b/target/sparc/helper.c index 2247e243b5..7846ddd6f6 100644 --- a/target/sparc/helper.c +++ b/target/sparc/helper.c @@ -121,7 +121,7 @@ uint64_t helper_sdiv(CPUSPARCState *env, target_ulong a= , target_ulong b) return (uint32_t)(b32 < 0 ? INT32_MAX : INT32_MIN) | (-1ull << 32); } =20 - a64 /=3D b; + a64 /=3D b32; r =3D a64; if (unlikely(r !=3D a64)) { return (uint32_t)(a64 < 0 ? INT32_MIN : INT32_MAX) | (-1ull << 32); --=20 2.34.1