From patchwork Sat Apr 8 02:43:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 671490 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp608665wrt; Fri, 7 Apr 2023 19:52:26 -0700 (PDT) X-Google-Smtp-Source: AKy350ZNLck1sq7jOMI7u3ppFSKTyeTWqb0AXFvsi/gkXh/28S7W3w8XT9cjPYzhOQYHppnOwuPU X-Received: by 2002:ac8:59d4:0:b0:3d5:477:f42b with SMTP id f20-20020ac859d4000000b003d50477f42bmr7928141qtf.56.1680922346038; Fri, 07 Apr 2023 19:52:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680922346; cv=none; d=google.com; s=arc-20160816; b=erqyW7845lPCefCPsEXiGo5CLilX0G08Eio2Ax/M+eQsECp/UxLoL9nPr0Y+gQTJ99 Qn3K2FolS/ygqlGnu/DZAS8tRwyk3Av1wz1sr5n1udxqfAueKw+kaUEP7Ea+8J6Z0UbV aUR7tt25ZljYC2CuivRLwbf+g0lua/mJ361uGNG70uDxjs+EBaczJU83FkiIpUWD0seg 1yz6hikywg3at5bCNYbDtpD32Kyc1UICN6WgE2wn2DrSvNNa6mILdIQ9fC7Do/SGyQrJ ikKwNbb9LLibHdq7Ef2Izf/O9iusPixD9JWGfsZ6dxQ3JQF/I7ApI7PGuPSXdXz8j7Se cN4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=h7T6BCs08xsWhjirpyWfdNuX6EmPKpgX+sbsQPFTCEs=; b=J1Hsv0rtaRAym8SQqo6EnDxKMaLYrvNvBsybnUMz3I4recQbD7kt/q7XOo8wRc5X8M YuNCcES8IxbNftCFLmnMkJhsLRvBtlk1M4P8q2EPJadomAsMuxL6MojCNkxCt1AO8yMY as1nuMQNWTJaiOWZMPqIgFUvKMk0S4QcIOTBbGDRU6bj/I3aS9toURmZ0SE+bUIpV7UE UHbYk5tsvJtlwLYaGw/n36gVXVNcbUtick2DKz+dUcqvKhavtbhoeW2DY8Vwh1AcKQXZ MjeFSoxjQDX9RgFLWlJy1M5Vbvchz0PPzVHZN6td+lT3TbALsrkZx1GFDkWvFYWqeSeL m1TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nGQX48TJ; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d1-20020a05620a240100b007469d21ffc9si3999527qkn.690.2023.04.07.19.52.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Apr 2023 19:52:26 -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=nGQX48TJ; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pkyZR-0001MZ-JK; Fri, 07 Apr 2023 22:44:53 -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 1pkyZ6-0008Vc-8o for qemu-devel@nongnu.org; Fri, 07 Apr 2023 22:44:35 -0400 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pkyYP-0005ej-HL for qemu-devel@nongnu.org; Fri, 07 Apr 2023 22:44:31 -0400 Received: by mail-pj1-x1034.google.com with SMTP id v9so5046744pjk.0 for ; Fri, 07 Apr 2023 19:43:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680921828; 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=h7T6BCs08xsWhjirpyWfdNuX6EmPKpgX+sbsQPFTCEs=; b=nGQX48TJNDiSuqHWv/0uj7cUucF5+Ija8/ftVm6no7sbUp58zURB2Je8Yy01TsVkt1 x+O4q01fLFWNYUXJFoPY7oOKNovS9kATa3fSegfq3a5128YveroaXiPa2iM3yzIs3Hum Ry8SIHnXDSvQaBH9BaNFs/FtKX3TSgdrb3SJKihxJ2ETZOev/4XQMedwEsrTMaolQWYD 3CICSfy73NFZqYWDv/07INJ2qkinHqUSjdk7MOPuiOaCr+K2vlyNa5OdZ0xC0jK+cV7j 96chaS/kJv1j5kGRxN1cBsdtX9cM8fe4ep8tx39MxER2URd9ZsZynjhLfMWeDadfRK4e ma2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680921828; 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=h7T6BCs08xsWhjirpyWfdNuX6EmPKpgX+sbsQPFTCEs=; b=AT1mfAVubpp+qxs3VPtb7wTH2EEeiQ8PMiSGTiLWW3SZv3MsV3HIn5BGdLB2iiZTFF +arFlfeVvaCtwSdEwsYl2L/fpTsrElyGhWq6EX6kdf95nW9mKpJDtlqjNmuzpnOWJk1E cQ36CZCFwd6xE2qZrZTsHlXAUC1OUxEFaEUFuYg5E7RhcIjASwunBNxzg4JD1eTEIZmn simnp+uLr1umUWZBdSdGGmXCHj6vyLF3s2TTU5E2dkz+uyDzbyUONW/T2hJv716IkZoQ fSxsLPxxJgoUOlDIE3JO4hB3SLB1Jqv+LvGHSvrvN9mbeTtSd2NTBjTVzEhP5t0Vew2s rdcw== X-Gm-Message-State: AAQBX9dLJ7+UzDqldc7wQHxCs9pjSUJrqDW92dXwQg1ObQhb7a7gHXJD 4e+8KmSLftnBNPY2SiIRBgmGGuUJqc7XsqD0px4= X-Received: by 2002:a17:902:f213:b0:1a5:2592:89c6 with SMTP id m19-20020a170902f21300b001a5259289c6mr993185plc.29.1680921828586; Fri, 07 Apr 2023 19:43:48 -0700 (PDT) Received: from stoup.. ([2602:ae:1541:f901:8bb4:5a9d:7ab7:b4b8]) by smtp.gmail.com with ESMTPSA id d9-20020a170902c18900b0019d397b0f18sm3530780pld.214.2023.04.07.19.43.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Apr 2023 19:43:48 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-riscv@nongnu.org, qemu-ppc@nongnu.org Subject: [PATCH 36/42] tcg/ppc: Adjust constraints on qemu_ld/st Date: Fri, 7 Apr 2023 19:43:08 -0700 Message-Id: <20230408024314.3357414-38-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230408024314.3357414-1-richard.henderson@linaro.org> References: <20230408024314.3357414-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1034; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1034.google.com X-Spam_score_int: 4 X-Spam_score: 0.4 X-Spam_bar: / X-Spam_report: (0.4 / 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, SUSPICIOUS_RECIPS=2.51 autolearn=no 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 The softmmu tlb uses TCG_REG_{TMP1,TMP2,R0}, not any of the normally available registers. Now that we handle overlap betwen inputs and helper arguments, we can allow any allocatable reg. Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target-con-set.h | 11 ++++------- tcg/ppc/tcg-target-con-str.h | 2 -- tcg/ppc/tcg-target.c.inc | 32 ++++++++++---------------------- 3 files changed, 14 insertions(+), 31 deletions(-) diff --git a/tcg/ppc/tcg-target-con-set.h b/tcg/ppc/tcg-target-con-set.h index a1a345883d..f206b29205 100644 --- a/tcg/ppc/tcg-target-con-set.h +++ b/tcg/ppc/tcg-target-con-set.h @@ -12,18 +12,15 @@ C_O0_I1(r) C_O0_I2(r, r) C_O0_I2(r, ri) -C_O0_I2(S, S) C_O0_I2(v, r) -C_O0_I3(S, S, S) +C_O0_I3(r, r, r) C_O0_I4(r, r, ri, ri) -C_O0_I4(S, S, S, S) -C_O1_I1(r, L) +C_O0_I4(r, r, r, r) C_O1_I1(r, r) C_O1_I1(v, r) C_O1_I1(v, v) C_O1_I1(v, vr) C_O1_I2(r, 0, rZ) -C_O1_I2(r, L, L) C_O1_I2(r, rI, ri) C_O1_I2(r, rI, rT) C_O1_I2(r, r, r) @@ -36,7 +33,7 @@ C_O1_I2(v, v, v) C_O1_I3(v, v, v, v) C_O1_I4(r, r, ri, rZ, rZ) C_O1_I4(r, r, r, ri, ri) -C_O2_I1(L, L, L) -C_O2_I2(L, L, L, L) +C_O2_I1(r, r, r) +C_O2_I2(r, r, r, r) C_O2_I4(r, r, rI, rZM, r, r) C_O2_I4(r, r, r, r, rI, rZM) diff --git a/tcg/ppc/tcg-target-con-str.h b/tcg/ppc/tcg-target-con-str.h index 298ca20d5b..f3bf030bc3 100644 --- a/tcg/ppc/tcg-target-con-str.h +++ b/tcg/ppc/tcg-target-con-str.h @@ -14,8 +14,6 @@ REGS('A', 1u << TCG_REG_R3) REGS('B', 1u << TCG_REG_R4) REGS('C', 1u << TCG_REG_R5) REGS('D', 1u << TCG_REG_R6) -REGS('L', ALL_QLOAD_REGS) -REGS('S', ALL_QSTORE_REGS) /* * Define constraint letters for constants: diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc index 7195c0b817..dc4e88db8e 100644 --- a/tcg/ppc/tcg-target.c.inc +++ b/tcg/ppc/tcg-target.c.inc @@ -93,18 +93,6 @@ #define ALL_GENERAL_REGS 0xffffffffu #define ALL_VECTOR_REGS 0xffffffff00000000ull -#ifdef CONFIG_SOFTMMU -#define ALL_QLOAD_REGS \ - (ALL_GENERAL_REGS & \ - ~((1 << TCG_REG_R3) | (1 << TCG_REG_R4) | (1 << TCG_REG_R5))) -#define ALL_QSTORE_REGS \ - (ALL_GENERAL_REGS & ~((1 << TCG_REG_R3) | (1 << TCG_REG_R4) | \ - (1 << TCG_REG_R5) | (1 << TCG_REG_R6))) -#else -#define ALL_QLOAD_REGS (ALL_GENERAL_REGS & ~(1 << TCG_REG_R3)) -#define ALL_QSTORE_REGS ALL_QLOAD_REGS -#endif - TCGPowerISA have_isa; static bool have_isel; bool have_altivec; @@ -3780,23 +3768,23 @@ static TCGConstraintSetIndex tcg_target_op_def(TCGOpcode op) case INDEX_op_qemu_ld_i32: return (TCG_TARGET_REG_BITS == 64 || TARGET_LONG_BITS == 32 - ? C_O1_I1(r, L) - : C_O1_I2(r, L, L)); + ? C_O1_I1(r, r) + : C_O1_I2(r, r, r)); case INDEX_op_qemu_st_i32: return (TCG_TARGET_REG_BITS == 64 || TARGET_LONG_BITS == 32 - ? C_O0_I2(S, S) - : C_O0_I3(S, S, S)); + ? C_O0_I2(r, r) + : C_O0_I3(r, r, r)); case INDEX_op_qemu_ld_i64: - return (TCG_TARGET_REG_BITS == 64 ? C_O1_I1(r, L) - : TARGET_LONG_BITS == 32 ? C_O2_I1(L, L, L) - : C_O2_I2(L, L, L, L)); + return (TCG_TARGET_REG_BITS == 64 ? C_O1_I1(r, r) + : TARGET_LONG_BITS == 32 ? C_O2_I1(r, r, r) + : C_O2_I2(r, r, r, r)); case INDEX_op_qemu_st_i64: - return (TCG_TARGET_REG_BITS == 64 ? C_O0_I2(S, S) - : TARGET_LONG_BITS == 32 ? C_O0_I3(S, S, S) - : C_O0_I4(S, S, S, S)); + return (TCG_TARGET_REG_BITS == 64 ? C_O0_I2(r, r) + : TARGET_LONG_BITS == 32 ? C_O0_I3(r, r, r) + : C_O0_I4(r, r, r, r)); case INDEX_op_add_vec: case INDEX_op_sub_vec: