From nobody Sun Dec 29 00:47:40 2024 Delivered-To: importer2@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+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1719578753; cv=none; d=zohomail.com; s=zohoarc; b=TXgedw7Ja8ToX+eNSJj0V5ZoedfBXq5XUPBdiS4qjNnQpvG+Cp6lrGAAU/NdAsp1OS4Zykg+E5LtcsuXc/3JkapEaZ45a7MXNmvsklaHXnPpzBoyumFfmL/nmmIGSOII36yF0w2oBA2igB+fdeMx3Qw84XIN3vaOsDoVUDMwLqo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719578753; 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=bf4WpUP3pGX7br6bhDuGt9p7GApyU5+eBul3rNsS2rQ=; b=QkGcg0uK3SYrEwJyeYnBbXYjXx6jj066kSN+2vCmiArva4KxgfKw6fpW6ZSADztV+m8sS6ovwV9JFsbuMulNiUDpIEMxpMmMUCDFSM7+puzGaELNUV3pd5iWqnh0S6F0s6Lpk1Ip5Na5xkbk53hbmJutrPkImNVWNtP2KHtfUdw= 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+importer2=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 1719578753138514.1066083850492; Fri, 28 Jun 2024 05:45:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sNAwy-00050y-PK; Fri, 28 Jun 2024 08:43:40 -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 1sNAwU-0004n4-Gs for qemu-devel@nongnu.org; Fri, 28 Jun 2024 08:43:06 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sNAwR-0005fB-EX for qemu-devel@nongnu.org; Fri, 28 Jun 2024 08:43:06 -0400 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a689ad8d1f6so73517066b.2 for ; Fri, 28 Jun 2024 05:43:02 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a72ab0b7dcfsm75779166b.209.2024.06.28.05.42.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jun 2024 05:42:59 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 2B5835F941; Fri, 28 Jun 2024 13:42:59 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719578582; x=1720183382; 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=bf4WpUP3pGX7br6bhDuGt9p7GApyU5+eBul3rNsS2rQ=; b=dJ8kVG8+/LAHdA2DUylJgR5ZA8TbZbU4iZWa45XkF72SChfAULXtgMvUzQojElbZ5t 6VBQ3zHDlsEQOUMILPA+ofLTmS4qqlrwo77rh8x5eC7+6XpQkBg5AtcZRa4+Mjgj3bxr WuaHvu08YE10aEUVYs/ptKNXqk46BQgbmCvv7q7BhbUTA9MZvN438d291hT0keNQCJ12 BbojqotxyfWLZkk3z9bDzpKtzCT9wu/Mft3R00yp6O+64GUBlD6BtlbUmAQ7GVcLHEWp 7Nevo3ziV16NlN/+HOB2ReZLbrtOi81hgn5ONaJIy4MG48Jp3hXx9kJTl/woKivBrHgp yTDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719578582; x=1720183382; 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=bf4WpUP3pGX7br6bhDuGt9p7GApyU5+eBul3rNsS2rQ=; b=Tj8nQTHMsXQYmqdAVfDE0KPz5xvYoNczMpM4DUpj1C++i8u/b0/X3nM5Mrh7lszQR8 cdIeYkW7kX9DcSBvfIE+EFfvKZCKstxueAYU9Cm21y8x2hpKcEdScVV1gQtyezmLftJR 7VhEpFeE8xN+t6THT0y3wto2BzqmdZi0xr6ilWqluN1m4iLuSNSN1LAUk4LVHM/CpWTN SfPVKXgXnN/q45hX2a2FCiULW3H1LmQL+VBS8jraduDSBeyOyxulwNtjLyGgzgeM9M47 JwJmzq/y0giUZ74gnP3fitfZSPKapeMXgtq3mJ7tXst9Bo/ToQKojLYlQBPoDz0MN5kC 35kQ== X-Gm-Message-State: AOJu0YxoVdh+3WcuTu0LQ/9h0BPzycdeqmmsDVauQHV+CCKal9U/BOEh 08/Fns5P4qnhQs4GbSxOyqhvKdo5RdTujbTYLBXRYg9bXs26Z0xl8PkwQUy5QYw= X-Google-Smtp-Source: AGHT+IH+++P/R21eqDgTQn+xp0aj6mpEyYARlO13ChiKD2kwSVYr6Y/nEyIUv0KyAiH5JPRhrkK0rg== X-Received: by 2002:a17:907:c805:b0:a72:4a4f:23d6 with SMTP id a640c23a62f3a-a724a4f2491mr1248488166b.8.1719578581296; Fri, 28 Jun 2024 05:43:01 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: David Hildenbrand , Beraldo Leal , Eduardo Habkost , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Wainer dos Santos Moschetta , qemu-arm@nongnu.org, Peter Xu , Mads Ynddal , Mahmoud Mandour , Pierrick Bouvier , Laurent Vivier , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexandre Iooss , Stefan Hajnoczi , Peter Maydell , Richard Henderson , Thomas Huth , Mark Cave-Ayland Subject: [PATCH 02/23] target/i386: fix gen_prepare_size_nz condition Date: Fri, 28 Jun 2024 13:42:37 +0100 Message-Id: <20240628124258.832466-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240628124258.832466-1-alex.bennee@linaro.org> References: <20240628124258.832466-1-alex.bennee@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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x631.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 autolearn=ham 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1719578754994100003 Incorrect brace positions causes an unintended overflow on 32 bit builds and shenanigans result. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2413 Suggested-by: Mark Cave-Ayland Signed-off-by: Alex Benn=C3=A9e --- target/i386/tcg/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index ad1819815a..94f13541c3 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -877,7 +877,7 @@ static CCPrepare gen_prepare_sign_nz(TCGv src, MemOp si= ze) return (CCPrepare) { .cond =3D TCG_COND_LT, .reg =3D src }; } else { return (CCPrepare) { .cond =3D TCG_COND_TSTNE, .reg =3D src, - .imm =3D 1ull << ((8 << size) - 1) }; + .imm =3D (1ull << (8 << size)) - 1 }; } } =20 --=20 2.39.2