From nobody Tue Nov 26 13:40: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=1707874003; cv=none; d=zohomail.com; s=zohoarc; b=fhwzKF8vjAm/g4KtCrAjjvcfExLrRVdJ5qTZvyde5dHPeGj3Tb/YF/t5RJKB8EWrFYFDsXzGXFO5OzG6qULXkd7cAGCs7XK9nqP1dNQuo8rZxvapFskuaN8ho0dUuf1IcQ2MMaUavb8gfVJkLvrPm5GVlShqjjBrE55mOpuseBQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707874003; h=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=CZ+rg6GvMFeyTnvfLciFKKr2/Cz68cvZzuQCWDme714=; b=nxg/zhHGoZzPIPo87Z+w1sb1KEib8iBjSEJwK+Pp3ZeETZ0bTLpU4VOXtrWW6mGZT5R4sebFQ/0PW31lpQr++uR2kQILQqqWVxx26xfhx+4su2H0sav1SxeUmR3CwKgSJa1b/WXx+qohZBOHxEmkim2mMIWww8k2oUmYOZ1IC8I= 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 1707874003835635.9025686533224; Tue, 13 Feb 2024 17:26:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ra41w-00077u-Dn; Tue, 13 Feb 2024 20:25:44 -0500 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 1ra41u-00076l-SW for qemu-devel@nongnu.org; Tue, 13 Feb 2024 20:25:42 -0500 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ra41t-00014x-0Q for qemu-devel@nongnu.org; Tue, 13 Feb 2024 20:25:42 -0500 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-6e0aa4bb62fso1247459b3a.1 for ; Tue, 13 Feb 2024 17:25:40 -0800 (PST) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id d11-20020a170902cecb00b001d961f28b0asm2660333plg.270.2024.02.13.17.25.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 17:25:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707873939; x=1708478739; 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=CZ+rg6GvMFeyTnvfLciFKKr2/Cz68cvZzuQCWDme714=; b=MuI4Y1Flr3XP18ujMB10NhoMYMJLpEamntKmFw+kiyrxDmRQrwf7viH2qoE+5pLISs QS5Bx6efplQ7BV5USN9n1n3OTWlbyGNDzh42ElXXPr+T3R9KFPVUTyjhELTBKRdxJ9eG oTThN9oylYPwpL2/KSPQo1TlWspMCe+LA9A/0wyVi4raBLqem05mcO4PR/8VGht7yzq0 bTYUnBiZFswzU8N67109rAlYrvgSJnCOH0oYVona6eMpglLa3pnRahQjvGtgEvzJGue7 iQ8UXfVAcbh2kYG1j1DLIM1KXJIAqykbJ1+xRsAuP92Nk3UihrKpFEbSR+qRBIWw7vOI WDcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707873939; x=1708478739; 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=CZ+rg6GvMFeyTnvfLciFKKr2/Cz68cvZzuQCWDme714=; b=JGXMBSCqi4Q6UZ9siXtHriT1fznKyOUYQeFKZmsnLAFv89BViwISgX4BR48UAzuQhF 3DZsHWWGSoSvBxzCz69r+n2CaQlG2FBq8EPHwTQLnGQYRnSwZvTIvMEF4ImpOMuMOe2T 2KtRZOao/SG50Z1KpPEDxmvchcKD/ZSZq8Lf20dDyG1eIOBCfP+zl646QUcm/vGR50dm P2yIiE9ZrwN9SRH4ieFpm0TJwmWfMAHRY8xnwUc8XEllGVmanpOKjPB9FWPAdlwcmqS6 4WQfnD23MIOF0iuhS3FchV4h0HhJgG100GQZgfAJUz+j4/5qS0v86bY4PZpEn+Bjz05j v/pQ== X-Gm-Message-State: AOJu0Yzjnbt1b1TwqVcW0ETCVYoGeblZmD28n4UtSsPkLKwMqrsGZ2gh m6MdRjup6Zv8ITJM7b34kdRggDx9GBNU3+5PeQRsURVAo/CNFtFgUYHP6Motc/GKzPVxwIuyqpB u X-Google-Smtp-Source: AGHT+IHagfRqxj7S3pshb/c5xJNCuPY0rL8Hw30tG+C0TVa+5a4feQko+578f6y8KrNeCzuqWVItwg== X-Received: by 2002:a17:902:c105:b0:1d8:deb5:3390 with SMTP id 5-20020a170902c10500b001d8deb53390mr1243933pli.42.1707873939673; Tue, 13 Feb 2024 17:25:39 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVfepIAtWCfJtOjlUW1qXabBi09UqaZtjz2DhIDQdWiaZJ2jZMkgEjmvNvY4LHs1tf41SrFLb7T7/kBza4npA== From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Michael Tokarev Subject: [PATCH 2/2] tcg/arm: Fix goto_tb for large translation blocks Date: Tue, 13 Feb 2024 15:25:33 -1000 Message-Id: <20240214012533.453511-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240214012533.453511-1-richard.henderson@linaro.org> References: <20240214012533.453511-1-richard.henderson@linaro.org> MIME-Version: 1.0 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::434; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x434.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: 1707874006356100001 Content-Type: text/plain; charset="utf-8" Correct arithmetic for separating high and low on a large negative number. Cc: qemu-stable@nongnu.org Fixes: 79ffece4447 ("tcg/arm: Implement direct branch for goto_tb") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1714 Signed-off-by: Richard Henderson Reviewed-by: Michael Tokarev --- tcg/arm/tcg-target.c.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcg/arm/tcg-target.c.inc b/tcg/arm/tcg-target.c.inc index ffd23ef789..6a04c73c76 100644 --- a/tcg/arm/tcg-target.c.inc +++ b/tcg/arm/tcg-target.c.inc @@ -1771,9 +1771,9 @@ static void tcg_out_goto_tb(TCGContext *s, int which) * shifted immediate from pc. */ int h =3D -i_disp; - int l =3D h & 0xfff; + int l =3D -(h & 0xfff); =20 - h =3D encode_imm_nofail(h - l); + h =3D encode_imm_nofail(h + l); tcg_out_dat_imm(s, COND_AL, ARITH_SUB, TCG_REG_R0, TCG_REG_PC, h); tcg_out_ld32_12(s, COND_AL, TCG_REG_PC, TCG_REG_R0, l); } --=20 2.34.1