From patchwork Tue Oct 8 18:51:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 833621 Delivered-To: patch@linaro.org Received: by 2002:adf:a1d9:0:b0:367:895a:4699 with SMTP id v25csp450753wrv; Tue, 8 Oct 2024 11:54:53 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVGxBHufZ7FNQpPnv/HasvysU9mlkptDF+5nD1j2/1e/XzKahLVmCM3cQZscU0036MUxbrBDw==@linaro.org X-Google-Smtp-Source: AGHT+IHqCOmWxIz3zlw43P3hKrjOnMnOpODfd7tUGqZE9zMUmf162wQbkq+Asi29sAVKQ0AjujoR X-Received: by 2002:ac8:7f09:0:b0:458:5161:e0ca with SMTP id d75a77b69052e-45d9baed416mr280749871cf.41.1728413693072; Tue, 08 Oct 2024 11:54:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728413693; cv=none; d=google.com; s=arc-20240605; b=E/4kDVnhlbOQEqv2tasauk0VinY3ooeT+JVgIOuqKrVqfVNyWxyDQ0+8Qg+F46FrhC /3FPlKiGk7Uhl2+hEg1KR/AWyPjj3AyLp2BW8XxXKGNwIg2Hx4MpW7e5F8uRZZC0+CoW NYHsoce1cXmJmpdVCVnwaBIyDVbF1YhmvbgpW9KzMMhoiw/GY4vS4SCwWD9k4b6p3zO7 yXrXfzthNg/1Ev9uA0Yj8dXuqX/wyMguIb6eJlqca808OzEMq5JkCXeokdfHSjOG6lL0 ZVQVtRmsj+gMdzrGrUdz85sfnSNHR8Q857rQHC+9X+2pWqBM6eXT6FQreK7SsC7zE0Vy 6WlQ== 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:dkim-signature; bh=CvN0udLtupEne5xbmGMllUkO3gfAOouXveZw0bp9Mts=; fh=g1jmSm8gExqnCetj1a1Sa5xHoCqZ/paewyT+zCwPlKg=; b=kMTVXjtsLYWgGjVnvPP7ErTo3kcAq4MhttUwqZVrC+6b7Fd6fBVVzqQxVYOKwk+Kx0 wVVstfHYpYyCF+icNMbm4i7R32ZNsKo4vpyFJP7mttBE7tm4HC8ImjAug29B7mq7dIlb Tw9dJ4WLCmaoeUjI9Y2gz6qGjlGbfhLq8/Av5lCf7DGfqOIwTrETEmSYQIFSMqAdUBxB lpnDAif7buBAPd3U2NrUxKNdqcgxdNPnNw8t9Yid/PdysMjs3qpK9XTzcTSnh68gCUaF dJERS3EmXFrq7PE0Wv13VvVHB7zzBSyoZyvCMXlKoosfuH6i7rhi93F+LKyrdp8iJTpi YRtQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GsytaxmS; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-45da74b03e1si92926381cf.77.2024.10.08.11.54.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 Oct 2024 11:54:53 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=GsytaxmS; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1syFJc-0007UZ-6f; Tue, 08 Oct 2024 14:52:12 -0400 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 1syFJS-0007SQ-SE for qemu-devel@nongnu.org; Tue, 08 Oct 2024 14:52:02 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1syFJP-0002Tb-HJ for qemu-devel@nongnu.org; Tue, 08 Oct 2024 14:52:02 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-71de9e1f431so3496473b3a.3 for ; Tue, 08 Oct 2024 11:51:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728413514; x=1729018314; 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=CvN0udLtupEne5xbmGMllUkO3gfAOouXveZw0bp9Mts=; b=GsytaxmSMxM2mwlcXgYfqOPCEpmAkAsywDL5dqFwoCJxQZ85cgYfG3Hm9sfb4/LAnB ELX3fbbTNYlVnbVgovtgtR6fE3R2/YLNzHQLPkAa7q9TUXVlUbqr0NUXEZLTgOVnb+3K 3gCfSmzimjFOxWK5TltgVaNNNh3EwiJb24HhYqJkhrshwZmQUYpaNKytA1j/Af6huuVc 5qMpaDZVY2pLT4ciB6d5eIwX2EoRNiCMlRyWDbj4dJbSQVEgVC6wY+96F8wsuLvJoHUd GiIET8jGtr+7sF9aq8othO/bnyj6veMP9EknwDsoA5PYWN8h4V3WLaxUw3IR3jzXvZWF sYOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728413514; x=1729018314; 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=CvN0udLtupEne5xbmGMllUkO3gfAOouXveZw0bp9Mts=; b=rHVm4N2WOjZLb4J43R7MKZnu4hhMZcLVeQAfvmAhSNhyW1b5LunuhpoIyrFkQIk8Dr yvPwvsIX91pRvNp/eBnOhVHPzbgXdxvwuXEaep8/MCC/XIbYeTU/HHlFAQfLYCh2JPju qkMHqUBhV1eETgcJZvHfobIXHpjsgJQKgnkGuH3BE3LVrDTMmU7hlaQ45u+PTJUN1ryt PRyepB6nToVfdEoQ1COXOJmRuFty4+5BbKelGFCVenFfLehu34PC93T1apR9b5wBafIw xmqrwJ9FlXfkq4XTh36CbFJZEe5skOh3Ge0g48umTkqArUMxhVy013tcZ0scZuebK0wz pOuQ== X-Gm-Message-State: AOJu0YxrSDtERnoG4Dqcm1TzepF7svpAV+gRvx4ldoe7jBWGPGKzn55W p8aQLN+Fl+6jBLrFCe+2eBnfOtA+T6xin6jC8q4tyr12dCysT18WT02dEIoGmL8sqW16KbAQvr8 c X-Received: by 2002:a05:6a20:c886:b0:1d1:21a8:ee8d with SMTP id adf61e73a8af0-1d6dfa46960mr28034015637.22.1728413513872; Tue, 08 Oct 2024 11:51:53 -0700 (PDT) Received: from stoup.. (174-21-81-121.tukw.qwest.net. [174.21.81.121]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7e9f6821c32sm7186818a12.33.2024.10.08.11.51.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2024 11:51:53 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, qemu-stable@nongnu.org, Michael Tokarev Subject: [PULL 11/14] tcg/ppc: Use TCG_REG_TMP2 for scratch tcg_out_qemu_st Date: Tue, 8 Oct 2024 11:51:38 -0700 Message-ID: <20241008185141.20057-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241008185141.20057-1-richard.henderson@linaro.org> References: <20241008185141.20057-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x430.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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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 --- tcg/ppc/tcg-target.c.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc index 3f413ce3c1..6be5049d02 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)); }