From patchwork Sat Nov 9 12:07:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 842091 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp2115604wru; Sat, 9 Nov 2024 04:14:44 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWK9Q5a09+0uktSOpzlHUER4e+XsaSz60AX+dGRICgsiLa8/ulmxVa7xxRBhGPE6+UkV/jCdg==@linaro.org X-Google-Smtp-Source: AGHT+IH2Kl9Zfqy3Auxv84U3UX2FvVFXRIAJuX8ZIRbjznr/zv5mXQw3amMAKF7MF39IGRRs801I X-Received: by 2002:a05:6214:3a0a:b0:6d0:2c07:a28c with SMTP id 6a1803df08f44-6d39e1cc73bmr79928536d6.44.1731154484233; Sat, 09 Nov 2024 04:14:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731154484; cv=none; d=google.com; s=arc-20240605; b=Zo3HdLg22U9R5HRGEVAP31HN+vdk0vGL93rTDFowea1+1mNyuC+qkZEXRsuTc60ush Dw97r/kkx6YCZih9YD2GxtL0d85IK78UWsM8ML08re5WVrBEU8+Mb8lKdLYxYa38z/QE ydXH+g0XuObXLr0SBfEnFMbszLpH56Xk1EMpoFxMAB7xIEW8TeZrw8d2PFpwKRd3WArt diMkNCm00moCybQNLsbN555DmfZ6BeaSJ8vepphr0vx/1CQ/a/knReTqKhJCaxzbiO16 lV2A33DY5+ugv2w0FngUAvJA/3WcCzLDHd6fbKJozP78s51SMmFalWCkgQOpWDao7wTd ahtg== 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=0VYY9xOyVPfkAU9T4OwMt83yWBMxMR1kkt4Cun5Q2sk=; fh=bMaafE1clBtiBaCrlbrbcY1DSEPhhFUklUk4XoVHiPU=; b=eccl3SKbjKaKcU6+aGMyMpryA8R/NSaj6AmzSz76b2CZTi9vUM4m5vtIHbtX8Y0rKM sghqHnlYGlYBIhIrgimWpsVplX88jRUVJudiSzbPscxTQVMRSYLXJElxMmoWk4bYPlkT DDZeXvasA1UQB1FpfUUlXZ9WEWTbJoAo9aflVW8Pz1oR+9RpsBqE5TvsW/M8TLQaXJli xrJyQsFVKEwR9KldEXNG2euPQ1n8rL4S/RNJAAYYhL5Z+L7K4gxbTPjBzEZJozukxwcO CTM+I6/ES1KdrGZAyO+LlFE8+P3eiF4CgoXrBl8VYpIrSQk/hwsin9f0++cY5iLuhamK wMVQ==; 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 6a1803df08f44-6d39664c662si66953126d6.261.2024.11.09.04.14.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Nov 2024 04:14:44 -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 1t9kGr-0000Pl-UR; Sat, 09 Nov 2024 07:08:54 -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 1t9kGp-0000LQ-Pk; Sat, 09 Nov 2024 07:08:51 -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 1t9kGo-0003v8-0F; Sat, 09 Nov 2024 07:08:51 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 67882A15F5; Sat, 9 Nov 2024 15:07:07 +0300 (MSK) Received: from tls.msk.ru (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with SMTP id 309E6167F83; Sat, 9 Nov 2024 15:08:02 +0300 (MSK) Received: (nullmailer pid 3295289 invoked by uid 1000); Sat, 09 Nov 2024 12:08:01 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Richard Henderson , Michael Tokarev Subject: [Stable-9.0.4 13/57] tcg/ppc: Use TCG_REG_TMP2 for scratch tcg_out_qemu_st Date: Sat, 9 Nov 2024 15:07:15 +0300 Message-Id: <20241109120801.3295120-13-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 3553a47ba9..69abd30bbb 100644 --- a/tcg/ppc/tcg-target.c.inc +++ b/tcg/ppc/tcg-target.c.inc @@ -2704,9 +2704,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)); }