From patchwork Tue Oct 8 18:51:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 833618 Delivered-To: patch@linaro.org Received: by 2002:adf:a1d9:0:b0:367:895a:4699 with SMTP id v25csp450571wrv; Tue, 8 Oct 2024 11:54:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUs+vNnwBziPT3oGXe75dK4sTsXeMfPFaF8vgb8W/pDiKxWvH4rsL4fDsNSJmXo1KanhQ+c7w==@linaro.org X-Google-Smtp-Source: AGHT+IG2HUm3ZmGANvAZz0OGXkyw0UPf4n4VA05Tm+XVRKZeiN00AbYEDVxluKIhpq/KyOq4JXhT X-Received: by 2002:a05:6214:5c42:b0:6cb:41e1:b2b4 with SMTP id 6a1803df08f44-6cbc9307cecmr223566d6.10.1728413667686; Tue, 08 Oct 2024 11:54:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728413667; cv=none; d=google.com; s=arc-20240605; b=HbvR5jK2lt6/jGe72S6SWJ92C+DhXSsfQom1pDtBWrZJhGoABNRq5ySV8CMrlt99mb d+St1990QJ9krM7Dptq8D6leqbCB40wYs0UKOCPA0Swn2101qXMd+lXDaCV//Kvi32uX flUHsRNw1Fx6eDOEcGHMIRD2i2/yIlYRzZYQTYmKoELcCAF2cU23xAmGAnDaN1m+3UuH kruq5ob0/nu72+tHgCkOZGk+uWRLEOwEld6Wa626XHgru0MkZXGNHA03eYkaYNRrWrn4 KNA3D6coXhErYb2CVs5KcryPV1aPJl6O8Yn0HgDkbSvOrqYa1nCS2orCfeWQYx7VSVti VK0w== 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=TdZ1rsJXsMXK9Xw+CkLT1YF+f8XvML7ftUECJVUUWO0=; fh=g1jmSm8gExqnCetj1a1Sa5xHoCqZ/paewyT+zCwPlKg=; b=Rb+CkKDYk4s5gIROR9iafREZN1F6BpRRfkUT5gwfkDNBj6sBuQG13+J/xd2HgSbBPM N48XWtYlo5djsDhHt5txHeGckTaBjCVkZnf4PyUT1gJyloBydIeB8I21g2UOgAweNkGp f3ZA3pkgwYM6GjRstc+NU4gXPrw3Z4KfsIptX0o0cia3ty5NyDC0ir9sJDDNauZiSESt Rdv4V4AUBkpjXsapy8fY2a7uKXqqm9xrl6hCP0O5c7/0YoTEkYIdqfCExPcJhy3J5qrv /Oa3NEQu44L7Z00BWs9/TJJ1qef9DYrzg5eIOmLGbO+rvu0OSZM/1kVdK5nl6yMrHyBg waAA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="k1G/9jlR"; 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 6a1803df08f44-6cbc0f6bed0si16763346d6.513.2024.10.08.11.54.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 Oct 2024 11:54:27 -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="k1G/9jlR"; 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-0007UK-0b; 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 1syFJR-0007SH-I3 for qemu-devel@nongnu.org; Tue, 08 Oct 2024 14:52:02 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1syFJL-0002Tj-Uk for qemu-devel@nongnu.org; Tue, 08 Oct 2024 14:52:00 -0400 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-71df0dbee46so2510260b3a.0 for ; Tue, 08 Oct 2024 11:51:55 -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=TdZ1rsJXsMXK9Xw+CkLT1YF+f8XvML7ftUECJVUUWO0=; b=k1G/9jlRImAn/XTA9HFFH+k3u7r333aaT/kg68TtIXlVmCSNXQ08otD/gwBsI6XGnM 1DInKggBAhFOQhRZ5SzMdxuwuSre0kEpArOw0lVy3Y0TUgyLMUMEtMlee3tZaStKmiUT zHtKjhk3xNnaeJ+sezPw6mNqy+DI3nA33vDT2/+eZ28ZyS/oDCaTJaaq5wjk1qchFC9Q QkgqQ9R4yED4KckEklGfHXbnMibeWcoioPOhdS72rkp7SPWHazAgb15ROX3Hd9gv30Ik 1LteSU1YsJhL5f66kDmKAEn+Tbx9DO+cv/tj1T02bX6+37rfrxMUm01keDzxkje8ZknA I8JQ== 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=TdZ1rsJXsMXK9Xw+CkLT1YF+f8XvML7ftUECJVUUWO0=; b=dDq06hG0SmgB4zZwY92u2h+tjIse/7qF1rbiF45NsucnGvjBa03rxZGpL0gD/wK/Pj K03p1vOUkH48z4iu/+3CUzt0jCyrZWGzbytgn846/tyEZnHlA49qGjMu2ThiVIXwKyrH jjte1kPq3xzHKuCsDTDsMxNgW3TDEpKfufEbivS/8qzFa/7SYQ4SLQYcmVdrDDRrksCK 4zCwb2x+27/Lfy6pMtONo7gOdraECOpqm8wzfeQZOKXPg+I7cf69ghQ2mjcxrfrn/n6y kmUrXBkJE9WhGnTnycSa0H/Lrz+I9bzJawNAL9Nit3pthJ2NDsbWbaFLGW0xmF32ZctX S4uQ== X-Gm-Message-State: AOJu0YwlvyWbKWg1zH1VR2mrBUQ3HtqsLoUzG3b7G5YlADbrIOPxI6UY 2RsslCFkZ1nFeokyHwEbTFJDrvpYaUOeMrNsVzBbwb114vaDh9u4tLig3iH/kjhX5dn9Ig2WjBQ 8 X-Received: by 2002:a05:6a21:e8e:b0:1cf:4dfd:f4e0 with SMTP id adf61e73a8af0-1d6dfa3b3aemr25125505637.13.1728413514622; Tue, 08 Oct 2024 11:51:54 -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.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2024 11:51:54 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, qemu-stable@nongnu.org, Michael Tokarev Subject: [PULL 12/14] tcg/ppc: Use TCG_REG_TMP2 for scratch index in prepare_host_addr Date: Tue, 8 Oct 2024 11:51:39 -0700 Message-ID: <20241008185141.20057-13-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::433; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x433.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=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 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 --- 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 6be5049d02..223f079524 100644 --- a/tcg/ppc/tcg-target.c.inc +++ b/tcg/ppc/tcg-target.c.inc @@ -2617,8 +2617,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; }