From patchwork Sat Nov 9 10:14:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 842076 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp2081975wru; Sat, 9 Nov 2024 02:18:27 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVQ2b2xvESL0SRtGO5POeP9KFwq0yKJIp/Hh40IUuHrn0YGjEv+JGLA+bjh+COnN9VDKEsZyw==@linaro.org X-Google-Smtp-Source: AGHT+IEsQOTHuMN3YinhEYLNpj9OfaKS58J2a8gFkUO1Ng42UF2LI5GWjZywf+Ig/56VA4WqL4O+ X-Received: by 2002:a05:620a:450a:b0:7b1:3ff2:697a with SMTP id af79cd13be357-7b3328f5244mr966082885a.17.1731147507530; Sat, 09 Nov 2024 02:18:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731147507; cv=none; d=google.com; s=arc-20240605; b=QTXuhm4dLQXeFapE0Q+fvi/uIy2zCkl5fHc41auDLW5MLkSa+ILivIDjTCkHzVulcs HNTOHIL1PXSLLNLcGKPEFN+6yqIW6U9NqJy78IzgmkZIxKfMQCytyhqC6DFJckXuOYbG Idoh+HeMad8OyHSMnouEaX05UK4jvKMKuKgw7SrN2xANQ9qyNz1hNBlrzqQsVFjEZhex OjsTH3IGxRDLkbqN5wOoOoTj407OL1jxYAaBAvxGL5xETvSl/pATqMJhDnG9oR0zQql5 Hsxhh+iL5B/RFW84kbvc73IHJWn+xlMbUqMbeGHTTEePWYD/o5Rd5qWxgutuzFKHbg/q E/Cw== 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=4xNwJ0P+TBDRtfUakneCg6hdWy7tnalmf5nXRiLuerk=; fh=bMaafE1clBtiBaCrlbrbcY1DSEPhhFUklUk4XoVHiPU=; b=N2dIaFnUKWBUBFM19XNDGXN7YoRaGLVQillaFCZgmLWOd/oXMRehYwrwFiIQcAbkfE DDkL2Plaz9woku98r+AhyXUQQkdmLk+BLpkkaT3xPIK1QeSsouSgku2a0Cm1KeaHuAeg AA7nZudIauPyFeURjxqak/etdzjlnF6ukYSVCOqNUZDXa/sIq8jk4VHdMNTqHeb+MwBY rePYzGoxt796v6vOebFSxjnTfI/ecmv9pPUopVpKb62dDWUW6tHts7xP7O64FD4Rz6e1 yYK1URfyETUOGgrsqQUjTKUhpfMQaNSiD1U8e870bO+Jw9IoAvxmm9DTJp3vuHXKZKq4 Z8mA==; 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 af79cd13be357-7b32ad1f597si652464485a.603.2024.11.09.02.18.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Nov 2024 02:18:27 -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 1t9iWq-00073y-8j; Sat, 09 Nov 2024 05:17:16 -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 1t9iV4-0004Zq-Fb; Sat, 09 Nov 2024 05:15:28 -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 1t9iV2-0007Yj-R2; Sat, 09 Nov 2024 05:15:26 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 9F3F1A13EF; 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 4B746167EDB; 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 11/49] tcg/ppc: Use TCG_REG_TMP2 for scratch tcg_out_qemu_st Date: Sat, 9 Nov 2024 13:14:02 +0300 Message-Id: <20241109101443.312701-11-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 the fallback when STDBRX is not available, avoid clobbering TCG_REG_TMP1, which might be h.base, which is still in use. Use TCG_REG_TMP2 instead. Cc: qemu-stable@nongnu.org Fixes: 01a112e2e9 ("tcg/ppc: Reorg tcg_out_tlb_read") Signed-off-by: Richard Henderson Tested-By: Michael Tokarev (cherry picked from commit 4cabcb89b101942346aebff081aa1453e958fe7f) Signed-off-by: Michael Tokarev diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc index 54816967bc..192bb2120f 100644 --- a/tcg/ppc/tcg-target.c.inc +++ b/tcg/ppc/tcg-target.c.inc @@ -2556,9 +2556,9 @@ static void tcg_out_qemu_st(TCGContext *s, TCGReg datalo, TCGReg datahi, uint32_t insn = qemu_stx_opc[opc & (MO_BSWAP | MO_SIZE)]; if (!have_isa_2_06 && insn == STDBRX) { tcg_out32(s, STWBRX | SAB(datalo, h.base, h.index)); - tcg_out32(s, ADDI | TAI(TCG_REG_TMP1, h.index, 4)); + tcg_out32(s, ADDI | TAI(TCG_REG_TMP2, h.index, 4)); tcg_out_shri64(s, TCG_REG_R0, datalo, 32); - tcg_out32(s, STWBRX | SAB(TCG_REG_R0, h.base, TCG_REG_TMP1)); + tcg_out32(s, STWBRX | SAB(TCG_REG_R0, h.base, TCG_REG_TMP2)); } else { tcg_out32(s, insn | SAB(datalo, h.base, h.index)); }