From patchwork Mon Apr 24 05:40:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 676544 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp1988495wrs; Sun, 23 Apr 2023 22:58:39 -0700 (PDT) X-Google-Smtp-Source: AKy350YITtzepJFR1BmfMxTq/oUcDMLvig4EX+ClTp1Sjo0OtJJ6TzAOoU9LDaNrkYSdPppydgoS X-Received: by 2002:a05:622a:64a:b0:3e4:edf4:d6e7 with SMTP id a10-20020a05622a064a00b003e4edf4d6e7mr21175889qtb.11.1682315919553; Sun, 23 Apr 2023 22:58:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682315919; cv=none; d=google.com; s=arc-20160816; b=rDv7DWD480AkrQkgFQjQ4nqbSC/ENvt5AAAuumS3e5E+kbwmtrdDyxFJPRCaVA59jF i+6F2zuOHIh4tpJTW/SV5Kfmet3Ul+7olAzku7b86aDuFW1DXUlXyYEeCV+x9lvM7YaV s/bJ8LVaMETbxB5kxwWJ6bsq94ap0GQ3bDBRWDQLlvQnmYCI9PahRbPCJzk/kMNwdo8x eg9qe1IPf1YMJy/tNSsHbI0Fe87MMpRve+xq5S6SXQJ/+K/pedi0XzH5tQQrNpjcSizy DP0L2h03iUfwYmO7A5+PsIL+rAH19GZXYFLut9W02mutCn0/UWWK8IfOkGClFy10S3we W1+Q== 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=qczFTkPPIOJOuYJeVwbIfxTewK1OO7oMzRH8D3MY4Nevd5ivHoeUl/u2ivw77w7+YF Dp8Qakn26kVUHxyxg2+nwB1iV1uBMdjYXxFV8qaKzI0CZ6U84JC9MJSBE2NqdnibMV+0 fdPPti8//pPADT401g/5J8fSXUCyiNbffD/Nq0sgHa0LTYsOho9L9+JGtiemonCEk9PL HycoEp+16OiCKiOoetvJDTO46Rqcz2Psvmq3Lf8nVpk3PgP32qgx1gCvORx8XH2vh7+E re6ByQUQr4q5ptCbG1CnOMZ8UMAt5/78ANP6xO9aD2kvznRJut05ourVk/Fp5X3g1U50 /07w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ACtyLrak; 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 o9-20020a05620a2a0900b0074684765076si7304589qkp.135.2023.04.23.22.58.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 23 Apr 2023 22:58:39 -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=ACtyLrak; 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 1pqozX-0001SQ-1W; Mon, 24 Apr 2023 01:43:59 -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 1pqoxn-00060c-LD for qemu-devel@nongnu.org; Mon, 24 Apr 2023 01:42:24 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pqox2-0004Qk-FM for qemu-devel@nongnu.org; Mon, 24 Apr 2023 01:42:10 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3f19b9d5358so15703935e9.1 for ; Sun, 23 Apr 2023 22:41:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682314883; x=1684906883; 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=ACtyLrakakBQmEc6asqDpJkdPZTAGr1J5eljdp295ly5H/RWmIPUgI5Ege3+C721E9 WlHCD8XPmsjBSa7LO4vdwk5BfUGHa1oJLwCts1k+Fl0pGACdeyjXFpA7+ljkYE2m2jmS MSpyJe438/NqKngZlj2UGPk3drV+Ym1e6togpesPdOWvgRlkSLHtqvK8LeB1YoOisWTT jHM6hVh7fhIj3PYrLy4SFhNETPDq5vWUeuRV9vF6yiJgzn8kFs6siaor4wtTpQeU7K7x x9aumxO1SRB9cf+P7QmKQY3zu06MRFRwFWJ0T3Qs1/hRlYAG1wT1jvRieC1pgF/Wditx u2YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682314883; x=1684906883; 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=CIu+nstL+J+hFW9v7J3G824yGLUIdSV9Ic/5kaDSwd7OTclj5S20zxAv8FFtpVUogY O77blYc4bI9ooR+b6tr4dJ/FxYrKHOGsHGtL/00KFEW9HFA43xhcr1pvhu4P8WQEL9YX VAbbVO4eirddpyH4QtiFJ0Tpod5Alf7cvbFJOZEU249FAmj431OEQq5FYqdTw/JDN/QG aG2RyWUcrOKS8Avr7Z2vaV9TdqupY0KOl1SL0UZntQIEOLkANjvA7wLn5QBOTpGMJ9vA 1Kc4wFvQjWXCAODa0NsT09mxi6rl/L3H6XBNrMcZzGMyaxysdaNGx9D4s+gZuhkxfEDn KVoQ== X-Gm-Message-State: AAQBX9dPV/YFTvysBOEeQRY0iWgJeHb169QRMGSOvBxdVn4NDciW2x5C Z7b2IFBXnEzYoxa39LDFK0PhgboX5A+COxlDktLKHA== X-Received: by 2002:adf:cd82:0:b0:2cf:eb86:bd90 with SMTP id q2-20020adfcd82000000b002cfeb86bd90mr8763061wrj.63.1682314883017; Sun, 23 Apr 2023 22:41:23 -0700 (PDT) Received: from stoup.c.hoisthospitality.com (cust-west-loneq8-46-193-226-34.wb.wifirst.net. [46.193.226.34]) by smtp.gmail.com with ESMTPSA id j22-20020a5d6e56000000b002fbb285b01fsm9997852wrz.25.2023.04.23.22.41.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 22:41:22 -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, git@xen0n.name, jiaxun.yang@flygoat.com, =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 29/57] tcg/s390x: Pass TCGType to tcg_out_qemu_{ld,st} Date: Mon, 24 Apr 2023 06:40:37 +0100 Message-Id: <20230424054105.1579315-30-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230424054105.1579315-1-richard.henderson@linaro.org> References: <20230424054105.1579315-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=richard.henderson@linaro.org; helo=mail-wm1-x335.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: