From patchwork Fri May 5 21:24:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 679331 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp579416wrs; Fri, 5 May 2023 14:27:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7sb9LL9RMOokHqNwOZA1kddxV5G2aflQXdZ34DyrjdltNKSkDQQzbSeAiMrRn49bIdvo4B X-Received: by 2002:a05:622a:1983:b0:3f1:fb02:8340 with SMTP id u3-20020a05622a198300b003f1fb028340mr4440552qtc.4.1683322035346; Fri, 05 May 2023 14:27:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683322035; cv=none; d=google.com; s=arc-20160816; b=m0GxN0B5l4ic3tgh8Y03NQ1gBIs1208sYQg8BcPp80r256g8p03mGMHqg1NX+h16om JpgenQcd9t7R4YEfLqxRWoldZnBOLJm72ayTgBE7Jf7rrcUTygV1EmWu/Ki8HJDLHYEN bTiTIPTVN4d1JTs7AkKkzy8BFlHsvMRa17BvybBEeWcD06n8lauzg/E0D7amSAjMS7fD h1dDySj0wnpOBwKhmLsXRchC+kKYe4mFnpwr8tpLw07BtOXtJN3zQM/AO/OwqZ/W9Zky O42LnhNi/95vRcsGiKNp08fkYx2g/9DJITqr6Dz7zgXMrAYE9X3hrKkv1EkU6jd7HJ3P YK7Q== 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=h+hQGAfxVGFgcw51jDi1fjFbmaS4u/aJWSe3Wo6FlWM=; b=tgasVjvYm8q+Jl+lc6CQOO3Az6mgPKabpplTtV12uTrCm0MMxCa4VrwVx1Fgar+auO IPvLY7Y+9eQ8ufWhnlcSbHRiowaqgNCxRBFHtCzUS43BNgu14pCsrN5DjiHE01nUOfI1 i54XH2gNzO7JPr3STLA4a0kle3GPmIGxEgFbMH+y2b5YFILvBcS4QsTyCN2OyIBsWLGD Ivmkniep2UuxhVsBDAnQEYK4S4+933JabWzLdtv8wFOFYeAzdp5c/6R/N9teOiKdmrCs mgy+MDvD/CVmsDaFW27fbTxashVJZh+UldVp9y0QDOBlM4N34cxixz0UJ5F+E/srRcQp Ah+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vBEkUKD0; 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 p4-20020a05620a15e400b0074874eedba9si955021qkm.709.2023.05.05.14.27.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 May 2023 14:27:15 -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=vBEkUKD0; 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 1pv2va-0000rm-NT; Fri, 05 May 2023 17:25:22 -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 1pv2vW-0000pg-RA for qemu-devel@nongnu.org; Fri, 05 May 2023 17:25:18 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pv2vN-0004fL-Tm for qemu-devel@nongnu.org; Fri, 05 May 2023 17:25:18 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-2f9b9aa9d75so1537732f8f.0 for ; Fri, 05 May 2023 14:25:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683321908; x=1685913908; 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=h+hQGAfxVGFgcw51jDi1fjFbmaS4u/aJWSe3Wo6FlWM=; b=vBEkUKD0FyLWal8CfY05BLNWBzt5lhP5YAWEGlXLanN24eBfW7O3D8LvzNP3aozre4 yGWc7yn9Dnl/y6gurVo1wn+kZzrATxnssZD6MRM4uW2Kd2KZHZ4HCC8R9CX5zzZkBlvg 3Nic/YfilOuppAoToqTNDyEiKdUameRebGtj+ie5NXyhez+pl9YKSK7VILcqE7KtdNNx 9+C2i8RLHLAGr23fjX8sIjwcM3+A8qDoIm1y/bUe7W20iBr+T6AZKYZIBsKR/xvVVBUG nTauO4cTNyB/LZ4qrQYG0sF69K4/lbw+0JAa1P8q3z/lXNZBnuN9lOe5690FW4a0RcYj 2qKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683321908; x=1685913908; 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=h+hQGAfxVGFgcw51jDi1fjFbmaS4u/aJWSe3Wo6FlWM=; b=WWobypYl5aTVHN1slIqifO6v1MLFCVxEGfGvkdLcAc0wAKreP6+ghhHulTnPwo8pzK DCl51Lp1xJZu5RZMCpa1Oc9BUnkVpIJn8MQkisgTh/PYY/uw2B7R1zGKNaO+jGDWkM2o ms7TYjyMLNgF7yjQM1bRcOQZmooYcfpXrMo8I7tlnM2UCKXTsiytrTTkVCyzDiGuPzh0 WACML+rYPbB/eX3H0WClXz3Ltsvmp+o66BnU+KHoCvrz5cIGM2743m9+CpYDypa0VhvW HSvzOWnAxiLlCEL5FuMVBPAWJ2fPpT6HAocksQosHxO8LMoR41auc0I9gqDIunv+f0xP tFzw== X-Gm-Message-State: AC+VfDznk42Fiz8WbQgmeOloF+H5LBXJZQyX2ZnYRNcTCDDlZftauu/n 36+VW4Jxs+VSgcbNVgnXXw/rljIVgL/5o0Rbl6fzNw== X-Received: by 2002:a5d:4b91:0:b0:2ef:b19f:b24c with SMTP id b17-20020a5d4b91000000b002efb19fb24cmr2464846wrt.0.1683321908592; Fri, 05 May 2023 14:25:08 -0700 (PDT) Received: from stoup.. ([212.241.182.8]) by smtp.gmail.com with ESMTPSA id t14-20020a5d460e000000b003047ae72b14sm3426709wrq.82.2023.05.05.14.25.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 14:25:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 35/42] tcg/s390x: Pass TCGType to tcg_out_qemu_{ld,st} Date: Fri, 5 May 2023 22:24:40 +0100 Message-Id: <20230505212447.374546-36-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230505212447.374546-1-richard.henderson@linaro.org> References: <20230505212447.374546-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=richard.henderson@linaro.org; helo=mail-wr1-x435.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, T_SCC_BODY_TEXT_LINE=-0.01 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 We need to set this in TCGLabelQemuLdst, so plumb this all the way through from tcg_out_op. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- 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..e931f0cde4 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 data_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, true, oi, data_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 data_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, false, oi, data_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: