From patchwork Sat Nov 9 10:14:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 842073 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp2081801wru; Sat, 9 Nov 2024 02:17:48 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU+pNE7bmT3sZvBLwvQDkAqUn59gdjmnoUnkzU06wysngl3TqOX8DP8fOtZpXhayecpEgOY5w==@linaro.org X-Google-Smtp-Source: AGHT+IEIvsAZ8d78kxd3UtsbawDO3pSjiOUQ5qyr2KSBb/E7dAGrSBDWT8sG+y6vKJSxOXi4u6Px X-Received: by 2002:a05:622a:1350:b0:460:9946:56af with SMTP id d75a77b69052e-463093efdffmr82468041cf.44.1731147468463; Sat, 09 Nov 2024 02:17:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731147468; cv=none; d=google.com; s=arc-20240605; b=FiKrOG96KB+6AlLLKrySL4bYZp1mV7iZOLqjweIZlfxlqfJeqRE4psqDrWi+CnUDCC tOlIWAk00ysrf7EoUEIHX3JAdRu1bE1sllRc34XHC+bj1ITOq98gJyw7oJlrQfQ1mZ1W 7ceHb11wVEOBMdlEQd6JrL1P1yPtnpqkmchWrEyZJpvepvk4fJUBlbbOu5xyzQPkriPh IEmLBNa9azYw61qyWeqBurWsrDs6gMkrYf4iylanbfd/ZfP/tWZLciI7FdeUqMtu0LjS X45tMVSXcpZau+d4iSlavjHu5xllTFGCtaMx2YxiM2pSflVWMVvZZCftAgqV/NbP2/yC Nrsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=Xv8mqK9BNxr1f4IH8iXgcoodUHkNPeuxn6i7oMZkoVA=; fh=bMaafE1clBtiBaCrlbrbcY1DSEPhhFUklUk4XoVHiPU=; b=Mz5un0sQuFq2ujenb7B2Is3lEl7CMKwZJz64Ai6pOxy0anWgEHnvtA7exzcalxonjx 9GGit82rz8aBAPtFKKwuumSGHE3WuxNXJH2P818yIUUy1FeGywQuNz8k2RVUmd7Ljipt 9k6vBnb0lnRQipefRJyAVI2gLIEtDDluG7j9GSrZFuYG3W4nb/Npf2WZeLJNit7UiDch w4Yffw9ROyJ4ZmKy9g+FFYPIg4u2knFjyiTQA7oZD/9I0tD1mwcOWrOOjLar7GdDXkNj MWZOhEmR8gDuqX+fitW1B8PryfXlXUjMQNDSEGTc5xe9FwnbHuMa/h5ivrWMXGEbrN6/ zHNQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-462ff6260b7si63024721cf.474.2024.11.09.02.17.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Nov 2024 02:17:48 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9iVh-0005QZ-4R; Sat, 09 Nov 2024 05:16:05 -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 1t9iV8-0004dQ-2Q; Sat, 09 Nov 2024 05:15:32 -0500 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9iV5-0007kI-Kh; Sat, 09 Nov 2024 05:15:29 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id AFD20A13F0; Sat, 9 Nov 2024 13:13:49 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 541D7167EDC; Sat, 9 Nov 2024 13:14:44 +0300 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Richard Henderson , Michael Tokarev Subject: [Stable-8.2.8 12/49] tcg/ppc: Use TCG_REG_TMP2 for scratch index in prepare_host_addr Date: Sat, 9 Nov 2024 13:14:03 +0300 Message-Id: <20241109101443.312701-12-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Richard Henderson In tcg_out_qemu_ldst_i128, we need a non-zero index register, which we then use as a base register in several address modes. Since we always have TCG_REG_TMP2 available, use that. Cc: qemu-stable@nongnu.org Fixes: 526cd4ec01f ("tcg/ppc: Support 128-bit load/store") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2597 Signed-off-by: Richard Henderson Tested-By: Michael Tokarev (cherry picked from commit 3213da7b9539581c6df95f8ced5b09d0b02d425f) Signed-off-by: Michael Tokarev diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc index 192bb2120f..01c45cd17f 100644 --- a/tcg/ppc/tcg-target.c.inc +++ b/tcg/ppc/tcg-target.c.inc @@ -2469,8 +2469,8 @@ static TCGLabelQemuLdst *prepare_host_addr(TCGContext *s, HostAddress *h, if (TCG_TARGET_REG_BITS == 64 && addr_type == TCG_TYPE_I32) { /* Zero-extend the guest address for use in the host address. */ - tcg_out_ext32u(s, TCG_REG_R0, addrlo); - h->index = TCG_REG_R0; + tcg_out_ext32u(s, TCG_REG_TMP2, addrlo); + h->index = TCG_REG_TMP2; } else { h->index = addrlo; }