From patchwork Sat Apr 8 02:42:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 671461 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp607362wrt; Fri, 7 Apr 2023 19:46:47 -0700 (PDT) X-Google-Smtp-Source: AKy350Yt4i1nprIZXl6Xf5B4VLdIhZ0zMa4DCDKZ4Nd48Tf0p0xXutafxYNUbmDGb0Od6R9zSb7t X-Received: by 2002:a05:6214:20e5:b0:5e6:798f:a7c3 with SMTP id 5-20020a05621420e500b005e6798fa7c3mr8500741qvk.39.1680922007800; Fri, 07 Apr 2023 19:46:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680922007; cv=none; d=google.com; s=arc-20160816; b=SoNNVh7W2zzmVIIm4yxgbsRq+2vDBRLIKITsGSnV6QbjDOdACY1Cc45hboratpAHwd P/EOlLM2fiii67pTke/byLg798Z+yUgUYGc+6NAgGfjumHtGAXrDxx3dnKcERHYCUPuQ jAUROqzck7sYaScXw/Sksz8pxCUDiq2y/dfArbgrGqD5hfd4dp1rQ1YBo0e/jnAJsNe7 6NKnAGIVbacsKDEDZnUSFRDCvNnqCSGQWMoZQlRnjBoGUNcLkVsVRlUmFXC8pUeMAFO+ mT7l4Y+JOqthQVrxL7B/ZXrV9s6In1SPB67OJgtPo1z/SGRm4kuWhhUuQiqSKgTXWiWR SIvQ== 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=v1FKEPnLDJAj/yYVllIJiIXirCKiRcnvS7tDELskOLA=; b=DwdGq6jk76vgF0TL6djq9fmzyYgGaYUV8kKr/tulpLqNm5Zh95rScnXE2G8e++bHAx AjYQmQPfm2fEZ3t1+1hl/C+8WZY4ExFe4OcxcjgVRcOIV6OphG/LWqIPiqxTxQpbzep7 0hl2nfcwY+wRBkSm91t144w8LlN3lR/s/8Wy0fFvijPWX07OHcCE7GEmlTvns2Fyp4nL DmeXGJ1bB+wRbmkKVCZ8TpYAUklzloDrLsUgkO9YOTnqWWlN4q2xvltiQZnhrz4kPmO+ JEFn2CAZwPYuZ5s6dON/04le8hVTk5Uaub7WnZbO7n8Snqs1YCcHZtEw34wrhWZycfNZ zxBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DHujcaH3; 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 jr3-20020a0562142a8300b0059117fe351dsi3509107qvb.57.2023.04.07.19.46.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Apr 2023 19:46:47 -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=DHujcaH3; 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 1pkyYj-0007w3-RV; Fri, 07 Apr 2023 22:44:09 -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 1pkyYi-0007uV-OB for qemu-devel@nongnu.org; Fri, 07 Apr 2023 22:44:08 -0400 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pkyYG-0005mA-Q9 for qemu-devel@nongnu.org; Fri, 07 Apr 2023 22:44:08 -0400 Received: by mail-pj1-x1033.google.com with SMTP id v9so5046585pjk.0 for ; Fri, 07 Apr 2023 19:43:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680921819; 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=v1FKEPnLDJAj/yYVllIJiIXirCKiRcnvS7tDELskOLA=; b=DHujcaH32y4Zna1dz1MkOyyv60Bg2NPIiAmQwTOSqaG7Pxbg7U1TjILh0iD0xt5Y5x cEwwRReqyIEt3rgWzw0iPhMEpb1LgSQp9mflVoRvY9j0B8M13zv6ZQWdJEG33UWE0y9A yGniyV8PORKD8TKFNhr5ZDQWE2IhFTQVH8u10+17MDdIYTI8it2l6eb5j4rqgAjidndq mSNnOwiMhL77omghATzozmADNTa6pMYIoaClcmVlxgWhByDTlMfB056P2LHxk0SlsD6O WigdbRwFa5+poGkgSvne7Rx6ulDwQfbmzz1s2xHI8smtaAnMBFVe+Q6iUJfEs/SDf0cK tr8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680921819; 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=v1FKEPnLDJAj/yYVllIJiIXirCKiRcnvS7tDELskOLA=; b=bC5yI+SI9KQLTZFOuWSrCa02iLnmVm77QxLlocZpynxCJrtrLRftCa4TUEZOCF0Og2 iquirvbBdsJlEaa/o42muDkSk0SqwIVkpSAwb9R2adO186B7P1oMpW9FHVgWedSB/QkN Wu7QurVqdxWLD7xLo7y0dT3pkbXIXMzggyP/YxUSFub7ZjaLo2AmNO28hhfGs6SymOaP gDK41HmT9Vt0TynuC3bTGrOtDVSmJ9SGXN4xwEhk5i2nyHmee70PaGh9I1cI7ZWw20Ip C3kqA9v9mGMlqy0xTjHexAekb8yvHBAU1CKuyTbkpj4rpL+7eZ/d9/Aw2wxQOsQ2Cf7T IJqQ== X-Gm-Message-State: AAQBX9cfbiyotbBhDvU/vq94CNCzWjdN3+Y9DtwoSnQKHGdNZRV0RHMo /XJhrju2zBR6gnPOJ+lpaC9XqjGuJSiHzvqkldk= X-Received: by 2002:a17:902:da8a:b0:1a0:5524:eb8e with SMTP id j10-20020a170902da8a00b001a05524eb8emr5964539plx.68.1680921819421; Fri, 07 Apr 2023 19:43:39 -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.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Apr 2023 19:43:39 -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 26/42] tcg/s390x: Pass TCGType to tcg_out_qemu_{ld,st} Date: Fri, 7 Apr 2023 19:42:58 -0700 Message-Id: <20230408024314.3357414-28-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::1033; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1033.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 We need to set this in TCGLabelQemuLdst, so plumb this all the way through from tcg_out_op. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- tcg/s390x/tcg-target.c.inc | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/tcg/s390x/tcg-target.c.inc b/tcg/s390x/tcg-target.c.inc index b399798664..77dcdd7c0f 100644 --- a/tcg/s390x/tcg-target.c.inc +++ b/tcg/s390x/tcg-target.c.inc @@ -1770,13 +1770,14 @@ static TCGReg tcg_out_tlb_read(TCGContext *s, TCGReg addr_reg, MemOp opc, } static void add_qemu_ldst_label(TCGContext *s, bool is_ld, MemOpIdx oi, - TCGReg data, TCGReg addr, + TCGType type, TCGReg data, TCGReg addr, tcg_insn_unit *raddr, tcg_insn_unit *label_ptr) { TCGLabelQemuLdst *label = new_ldst_label(s); label->is_ld = is_ld; label->oi = oi; + label->type = type; label->datalo_reg = data; label->addrlo_reg = addr; label->raddr = tcg_splitwx_to_rx(raddr); @@ -1900,7 +1901,7 @@ static void tcg_prepare_user_ldst(TCGContext *s, TCGReg *addr_reg, #endif /* CONFIG_SOFTMMU */ static void tcg_out_qemu_ld(TCGContext* s, TCGReg data_reg, TCGReg addr_reg, - MemOpIdx oi) + MemOpIdx oi, TCGType d_type) { MemOp opc = get_memop(oi); #ifdef CONFIG_SOFTMMU @@ -1916,7 +1917,8 @@ static void tcg_out_qemu_ld(TCGContext* s, TCGReg data_reg, TCGReg addr_reg, tcg_out_qemu_ld_direct(s, opc, data_reg, base_reg, TCG_REG_R2, 0); - add_qemu_ldst_label(s, 1, oi, data_reg, addr_reg, s->code_ptr, label_ptr); + add_qemu_ldst_label(s, 1, oi, d_type, data_reg, addr_reg, + s->code_ptr, label_ptr); #else TCGReg index_reg; tcg_target_long disp; @@ -1931,7 +1933,7 @@ static void tcg_out_qemu_ld(TCGContext* s, TCGReg data_reg, TCGReg addr_reg, } static void tcg_out_qemu_st(TCGContext* s, TCGReg data_reg, TCGReg addr_reg, - MemOpIdx oi) + MemOpIdx oi, TCGType d_type) { MemOp opc = get_memop(oi); #ifdef CONFIG_SOFTMMU @@ -1947,7 +1949,8 @@ static void tcg_out_qemu_st(TCGContext* s, TCGReg data_reg, TCGReg addr_reg, tcg_out_qemu_st_direct(s, opc, data_reg, base_reg, TCG_REG_R2, 0); - add_qemu_ldst_label(s, 0, oi, data_reg, addr_reg, s->code_ptr, label_ptr); + add_qemu_ldst_label(s, 0, oi, d_type, data_reg, addr_reg, + s->code_ptr, label_ptr); #else TCGReg index_reg; tcg_target_long disp; @@ -2307,13 +2310,16 @@ static inline void tcg_out_op(TCGContext *s, TCGOpcode opc, break; case INDEX_op_qemu_ld_i32: - /* ??? Technically we can use a non-extending instruction. */ + tcg_out_qemu_ld(s, args[0], args[1], args[2], TCG_TYPE_I32); + break; case INDEX_op_qemu_ld_i64: - tcg_out_qemu_ld(s, args[0], args[1], args[2]); + tcg_out_qemu_ld(s, args[0], args[1], args[2], TCG_TYPE_I64); break; case INDEX_op_qemu_st_i32: + tcg_out_qemu_st(s, args[0], args[1], args[2], TCG_TYPE_I32); + break; case INDEX_op_qemu_st_i64: - tcg_out_qemu_st(s, args[0], args[1], args[2]); + tcg_out_qemu_st(s, args[0], args[1], args[2], TCG_TYPE_I64); break; case INDEX_op_ld16s_i64: