From patchwork Mon May 15 14:33:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 681955 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8f:0:0:0:0:0 with SMTP id d15csp1150416wrr; Mon, 15 May 2023 07:39:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7d3GJp9nLWKZPu55CcivjRliHWVY5DHyJqBYl3cHg69lhyp+C8G+biHb5Pw2lNwxm7sIoP X-Received: by 2002:a7b:c8c9:0:b0:3f4:f00f:5e09 with SMTP id f9-20020a7bc8c9000000b003f4f00f5e09mr9161127wml.11.1684161564917; Mon, 15 May 2023 07:39:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684161564; cv=none; d=google.com; s=arc-20160816; b=G6ltXgB6u5iawYGWs6HqkmQuCVmk9iuuIDVrx/Nt1jYEQ6hcRefdtcqz/JEt+IxGhe Mlx8MFlCQvWnflvKCXvLecvk6z2R/U8fzbWh80Za90MnpCD4g0KsC2H7JtST6WJ9hTOU zlT33kU4mAG3+pOM50MATIlOty9qfupE0vgal6bKrApJYvWAyHH6ULhjqUV2DsTvTYq7 10u849buxhMjs4OQmS5Jv5JXgpwBKFMgwmRVjj7XsbB2e137UT+YG78BdrEvKk/yEgM4 q5IXZQTGj7ieVGdTx+CkUwxnK9/4G+bh7yaXbRBjBQD68m0HTf+OCN7u1KFgJRrnWmZx qOAA== 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=ls4ciHximYxj1CuBwfXZE8IEsihukuIHW0VGJUoZUDc=; b=uS5WcbDOUa00ou7BKVWj0hA1XWafRhTtnxdn/cFwrsJj7AzngOOBJzhCesamZowCZP DDy9pQ53qX8C8GD2tmaJY/S/BverVgpsA8mb6JVjqbPUVuNPJlH5IR7KpgWzjy0HdpGL hQ3+U1TLMmf+h7c657ePYeXVFOi99waKc4M7yPGtamTktB/ThBUl24a/1EJ9wRdXbSG5 KaXtH7t6MJqwGEAeBnfKoeb2LwgfEISpbU6pKqND2WRq2Fq8NKxswteHLGxB408+A4Ib pLkNbcE2wNH7eeVA3SDg/TpJjg2imASko5JnuzA2Tyd4JFWOLNn5TDjvFsIFLDrzwVcH T48w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s9b23tw5; 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 z8-20020adfe548000000b0030631c8dd52si14507569wrm.565.2023.05.15.07.39.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 May 2023 07:39:24 -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=s9b23tw5; 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 1pyZK1-0005W7-BD; Mon, 15 May 2023 10:37: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 1pyZJt-00050X-P4 for qemu-devel@nongnu.org; Mon, 15 May 2023 10:37:01 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pyZJl-0005zV-46 for qemu-devel@nongnu.org; Mon, 15 May 2023 10:37:01 -0400 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-64ab2a37812so20442189b3a.1 for ; Mon, 15 May 2023 07:36:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684161412; x=1686753412; 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=ls4ciHximYxj1CuBwfXZE8IEsihukuIHW0VGJUoZUDc=; b=s9b23tw5Hjb9D3k/SgxA9PWPSUn1Uq/Y+OPy5FITo4uY3j7eyLYna+N0GXKHXO5hsq SjuS9ASrqHbV/Da0a2GpmPQlmK8C7+UwkvMrU3OxhRlZUrMU6WBiFMrtKnWjodSUpx7Y ToKio7hJq3NWTD0tViL74D+evDEz3aAj1Z91xc7HVp2083RtcyXrg8MkGavOec1e/HMY XS2IarbNJCMUCaGJ4k32qnhVeT2OY7Lh1jCZDrwc06dC+ucaxoFa45bM339K+ouuAGWG eMh0IuaLOun+JPTZ3k8SIeX71rZ+a+g9wXZCaFoVYB6rGUVp4fWk/VaK4aiB4c6o438D sjOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684161412; x=1686753412; 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=ls4ciHximYxj1CuBwfXZE8IEsihukuIHW0VGJUoZUDc=; b=b1LwHsgPJjYtnTPr+Yt+G4dFIwW4XMVcrwJPSLt8xUWeHKR6gUHipd3ML8XmUYU2O7 kzANDVFi12/P+BymtjCO12A3EltHH/2yuWHHJ2OWIOMMtMoVTEEkZCdSNAY0Yr/onBnp MB+lCepsQeO4ptzY148VX09WS+DMy88gFpbb3OX7kFPpCt0MR/Uk4w6OEOefx5KDPNZv gvDRwPm5hdEzpmS9rMoztDkdjXmw/6Bo1qrxd10ygfgSQLsB6RIE4vWjG6zn+uxxASMB 8uXHsVxj6YqPOitE3OwG5mWWYfv+H/0npOxEJtwE7YpAvdT/sTGJLzP4TT+sbFlHKe5k XF/g== X-Gm-Message-State: AC+VfDzx4CZmiACxpQhPbRjRtdDx5+uvsVRsp41ryTU6UV7p7bScNv3O AvYzR47W1Dx3gmioEu3FriQbPOLTU2XyPTfWPQw= X-Received: by 2002:a17:902:f54c:b0:1ac:3b69:bb9c with SMTP id h12-20020a170902f54c00b001ac3b69bb9cmr41573964plf.28.1684161411742; Mon, 15 May 2023 07:36:51 -0700 (PDT) Received: from stoup.. ([2602:ae:1598:4c01:9902:96ac:8d8c:4366]) by smtp.gmail.com with ESMTPSA id i6-20020a1709026ac600b001aadfdfcd06sm8942735plt.299.2023.05.15.07.36.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 07:36:51 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, Peter Maydell Subject: [PATCH v5 43/54] tcg/loongarch64: Use atom_and_align_for_opc Date: Mon, 15 May 2023 07:33:02 -0700 Message-Id: <20230515143313.734053-44-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230515143313.734053-1-richard.henderson@linaro.org> References: <20230515143313.734053-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x434.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=unavailable 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 Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index d26174dde5..07d35f92fa 100644 --- a/tcg/loongarch64/tcg-target.c.inc +++ b/tcg/loongarch64/tcg-target.c.inc @@ -826,6 +826,7 @@ static bool tcg_out_qemu_st_slow_path(TCGContext *s, TCGLabelQemuLdst *l) typedef struct { TCGReg base; TCGReg index; + TCGAtomAlign aa; } HostAddress; bool tcg_target_has_memory_bswap(MemOp memop) @@ -845,7 +846,10 @@ static TCGLabelQemuLdst *prepare_host_addr(TCGContext *s, HostAddress *h, { TCGLabelQemuLdst *ldst = NULL; MemOp opc = get_memop(oi); - unsigned a_bits = get_alignment_bits(opc); + MemOp a_bits; + + h->aa = atom_and_align_for_opc(s, opc, MO_ATOM_IFALIGN, false); + a_bits = h->aa.align; #ifdef CONFIG_SOFTMMU unsigned s_bits = opc & MO_SIZE;