From patchwork Wed May 3 06:57:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 678671 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp909688wrs; Wed, 3 May 2023 00:26:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5MH3hIMlBFYMSf5lYrcVCwVZOvtCiW/8R8FBOYptwCw8l5ctu/482Z/GVlZ01hhQv99slu X-Received: by 2002:a05:6214:3008:b0:61b:65f9:c1e7 with SMTP id ke8-20020a056214300800b0061b65f9c1e7mr5633291qvb.19.1683098782326; Wed, 03 May 2023 00:26:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683098782; cv=none; d=google.com; s=arc-20160816; b=B+/PBjsmpctVMeu0PkIUX+XwdbvgNZ5SrYzMnGPpQsUA2pli4LyPkBYrrvY7C3YBeA JWl6zwMoNJgE+HVWOhs8hHwo/Gn08o70OZqf1T//z/6HbtneChfId3KRGEuUb1nJx74o 6msvU4GAeljSma245VrumHkKKqcVq+f4KrhjjlTl/m9XoP94dlXi2ehoei0H9iBaem81 L+9XhnHtvuqMKH+bA70k3wyz6xo720Lb0hk6sJcD+RL2Gsgu08OHCuH3NNx72j+mZEBt 654MKm8wazC44U8t5nF4T35qyyFSBKTDjZeutk4YLjt1Q+c9y7ATwfY4bX8DUZiSfPSB 1KYw== 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=UZ3oBXASBZV470ZrKzndFoUfCl/zXLoOJQ/Z5rSAR3LyKERhxTzv0U9q0j0L2OPtcb jcaJJMkPPtG4y2EQ8kON3JfWx98y9vEpg/KpisiUwCZltmmw/LqyHe5in6gpuGo5TsyK d+5OzxmaLN0UjVQLJ6iYtQZmAqQXXad42DmjIR1dMhmBI5vVB8SPu8Qn/fgQhp6/rI2P A0X9tBosU2caAQZgdR66pQpT4lRCImkcgqQ5O9YxjjLA7qt0cfM3IuXgcMl/mYuvYAU5 g7uQyFH9HlFfYn7Qleva4Ndn6taK4r/uIZVQS6TUjOKKh91jUCCjHPtP8EkWwvsWDX5B hpYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TiBudMDY; 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 q14-20020a05620a0c8e00b0074b5207df19si17475764qki.364.2023.05.03.00.26.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 May 2023 00:26:22 -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=TiBudMDY; 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 1pu6RV-0008KY-52; Wed, 03 May 2023 02:58:25 -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 1pu6RS-0008H8-6T for qemu-devel@nongnu.org; Wed, 03 May 2023 02:58:22 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pu6Qx-0001pn-P0 for qemu-devel@nongnu.org; Wed, 03 May 2023 02:58:21 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-2fa47de5b04so4553260f8f.1 for ; Tue, 02 May 2023 23:57:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683097070; x=1685689070; 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=TiBudMDYDz617pbfqUsTUU2ZjBFbUcWu+l5sdG63L4xAON1Ic5V/RxWY6icRfHCmTB CI2fDm1pU9yqo90I7WGBFu+gXA775xfeX+a3NEg6tYhkQ2cXDt1KstWu6EaFzhauSJpX VnuyZJU4R9M2vMA2zh7w8Kz83TaYC59Ygq+sPku+4WdmbRkLugqK5WWn0HDeHjOpkjsd la4+gYoCUdzN/sA2L9C/RYLbtYebeA3ce9n5vBzyaHWLal/OSEKevLDGad9Y801fzeDC 3j1tEX1ZXT7fVW4pPrJGENK4MasE49lA+K01FMRZ+VQyUwZjTuLl9s1ECxClYrcokCyU hGjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683097070; x=1685689070; 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=EO8gKvUab7+aexTJGNPskyzcTmWtBcAoMhmIepkvj4AQJLS8YmVeif3hX8LzjNUwAu KQAzLEOqTt+WdZS4f9fyEwQrx1nFbsPhB5u2QivQ1h5vJwI2hyFQ1KmoIi3r9saJzi5Y Zc9sjrl2Y51ornroSCc4WmpfX2rA3zYhA4b7DREbSja9O0tEz4NF/0ltX5YNnJLeAGxs mhJ/qJZqbLaGtlnGkaUMGYqCDLKjxqBtJOR1I6KNwcHS6aE1PpXPpqXNf7ug0YDD+QuP V7OTaiL6kZrp+ryutyhs6dY8MN88QgBjbLSUwh+8kG+uqXhsxynSIxQOkvDyyf0+2TsN jfLQ== X-Gm-Message-State: AC+VfDxqd/Kb7jn89krmxc97saWzwX5d5s+FwUySk1QEbaRuIzimwOe/ Shv0Z6Lt0seZi3+iNlj5CjRFjfBtbDLFVbOvWbeiYw== X-Received: by 2002:a5d:6a43:0:b0:2f6:25a6:9788 with SMTP id t3-20020a5d6a43000000b002f625a69788mr13102275wrw.35.1683097070196; Tue, 02 May 2023 23:57:50 -0700 (PDT) Received: from stoup.Home ([2a02:c7c:74db:8d00:c01d:9d74:b630:9087]) by smtp.gmail.com with ESMTPSA id f6-20020a5d6646000000b002f6dafef040sm32796617wrw.12.2023.05.02.23.57.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 23:57:49 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: git@xen0n.name, philmd@linaro.org, qemu-arm@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org Subject: [PATCH v4 25/54] tcg/s390x: Pass TCGType to tcg_out_qemu_{ld,st} Date: Wed, 3 May 2023 07:57:00 +0100 Message-Id: <20230503065729.1745843-26-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230503065729.1745843-1-richard.henderson@linaro.org> References: <20230503065729.1745843-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=richard.henderson@linaro.org; helo=mail-wr1-x42d.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: