From nobody Tue Nov 26 11:37:09 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=1707874026; cv=none; d=zohomail.com; s=zohoarc; b=ZhAVT1SU7m5uMzfikOM2Jbva/pTxw/cKDxyukWThEza7FjWoNiJ3Ol2KrqbDFBIoU3EhsvteKY6AGnQvsblBcw1MIFebDwvU7aUCjh89DoecyRnKNZSgbqlIL3eweVzMxu+n2dEKkDHxTSjnkdRN+eOXe51nFAjOGpWtqv8f9fI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707874026; 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=8A+ZdhxnkDzIAc1RYMXIDcGYuypp6UD3QlbP2p+Il38=; b=NE3uvqcyMmUTrsqgEo9UYLOJ75NspDxYvCMJFmClJfCXyXs7bqi1fZemwruErOjB+lilNy6KJ87HyhLV+eP95zI2rmvdU3jHAhiOEslXiN/J75tafjgx7szXtg8RdlTgcb3giEKDdXPllcn9N2s3TtLgndLXXOCA3I/E+IZV9Ec= 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 1707874026245802.9128008316628; Tue, 13 Feb 2024 17:27:06 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ra41v-000778-7U; Tue, 13 Feb 2024 20:25:43 -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 1ra41t-00075t-Bl for qemu-devel@nongnu.org; Tue, 13 Feb 2024 20:25:41 -0500 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ra41r-00014e-Nj for qemu-devel@nongnu.org; Tue, 13 Feb 2024 20:25:41 -0500 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1d93edfa76dso40229865ad.1 for ; Tue, 13 Feb 2024 17:25:39 -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.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 17:25:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707873938; x=1708478738; 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=8A+ZdhxnkDzIAc1RYMXIDcGYuypp6UD3QlbP2p+Il38=; b=QH/Poy2MLvsg/8KFEufLR0taJfPu1xQPTUK+cagcWVcxZxmV9ks54/dAvo1ExOKFwz OkcejTfFubXrd2UTgPmH2WSadiGNjGBv9NC/4UYGZMyAdaXqfv2J3/jCzN6xvaVv3fhk Uj6sBZ4hh5l8/eZxXASTbinKzdT3h8k9AS5nWAFY+c0L6SL4U/oxlPZNAkyuR6ZxQGev WVU9fVasIHDVfh8EgGxvfDDTeJYnIJnYyxxZh9efI2//+V+jxR+rtix8epLf7qr7qaSf M8+4yVXqjY2GU0Xi5McO7rFvgI0xkMQ4e0eUlE9oFkyOMDQZUx1AErt0ahFL+pHjWOaf Pv4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707873938; x=1708478738; 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=8A+ZdhxnkDzIAc1RYMXIDcGYuypp6UD3QlbP2p+Il38=; b=fErBhsdO6IZcufW5bxEBOBXc/SS4CyIgq29Ro+KrYtlyFInJhp6HL2thtXsj7gpn+S D/ADQTxbYuF0FEGLs5mS1172oH5B/e201nGvi4nZx31/AWN622nxUcvZiWMiSHEy1dzM UxEUhCB6ZV5k5a5E+QtkQ1+CW5ehTEv+hOOm8v0lomkOP6D49/8EuX17FRxKfR0RIuR/ 6vpEPZrXy8mcRJYc/JtrWSM+zccKvQPdNrWdJvuePqd2L6euORfBGPRtKD9ObOL+AAI4 R3KfGXVgYWgh/A2MenmOwy1CzpwqcjscBn5TcThYy79OdHx2lhX3TI9MJlpE+y6Wz340 rIBw== X-Gm-Message-State: AOJu0YyEPelOukibUEaQe3M/CKtRKoDbkDcX9Qtk7upGo7a9ytb6E6zI 8QsILhiSwgS7z9vbLM2vcacLWSV2K/2+zBvGtOC/thX9MErphqsxGx1Qnd8Xqn81VuK5Mhmf5gu V X-Google-Smtp-Source: AGHT+IE03+QtV01WIrZEKraUxmIHoXzL7NdprP/ct5FbZDAZgDsh4OhjwQAEF8Tw42E6m/f88LyoMQ== X-Received: by 2002:a17:902:7d84:b0:1d9:7121:170e with SMTP id a4-20020a1709027d8400b001d97121170emr1317239plm.35.1707873938247; Tue, 13 Feb 2024 17:25:38 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWFzPvKwNTRMXM69uBjd/faSb0cPVHmZBeyfUTnkY+RpIf9MYFc3+cboZBdjGVBfucPYFBV9GORelr1ZeziPtiamah8dIjrbK5r/EWIO8KhKds= From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Michael Tokarev Subject: [PATCH 1/2] tcg: Increase width of temp_subindex Date: Tue, 13 Feb 2024 15:25:32 -1000 Message-Id: <20240214012533.453511-2-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-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::62c; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62c.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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1707874028209100003 We need values 0-3 for TCG_TYPE_I128 on 32-bit hosts. Cc: qemu-stable@nongnu.org Fixes: 43eef72f4109 ("tcg: Add temp allocation for TCGv_i128") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2159 Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael Tokarev Tested-by: Michael Tokarev --- include/tcg/tcg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index daf2a5bf9e..451f3fec41 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -412,7 +412,7 @@ typedef struct TCGTemp { unsigned int mem_coherent:1; unsigned int mem_allocated:1; unsigned int temp_allocated:1; - unsigned int temp_subindex:1; + unsigned int temp_subindex:2; =20 int64_t val; struct TCGTemp *mem_base; --=20 2.34.1 From nobody Tue Nov 26 11:37:09 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