From patchwork Tue Apr 25 19:31:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 676830 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp2880568wrs; Tue, 25 Apr 2023 12:43:23 -0700 (PDT) X-Google-Smtp-Source: AKy350Z8mWvxFzr9IyeVaAZm2zhngTEXrL/jZGCy73jZRgaeq5b/Ww4PSGu9N4KuJzZ1conYQsuq X-Received: by 2002:a05:6214:e8d:b0:5ef:85b5:3a4a with SMTP id hf13-20020a0562140e8d00b005ef85b53a4amr33933307qvb.30.1682451803333; Tue, 25 Apr 2023 12:43:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682451803; cv=none; d=google.com; s=arc-20160816; b=dBpUBH9BwGOCzmB20YKHqgyBqWFn73wGWjiYLbalc348V/m5hqhj+c7r4B0FYuspJ8 /iFn83p2oD/bhiVU7xZZTOqUm+84Sq40lbYHJQUW2RdGBY6ypuMRwk4OpTU8MZWTpv/4 +NowGzz6x6CqFfPKH+SOzlZpFnlXm+hDJk93bCOYhYCOaj/qHpXSTuRHhn3C9xndua9L XSjOqXXyAMvWhDVNTvGqmSPe2ttkJ8fnx2OFUCvFFE7H65nmyUNQpX446sJ2lbCiIINn 25ovghiSyyOALJK8jiPTjaYVjHmPkzPTIC6F4m8D9dskJAVgFQ+LltGf9Zq7kY6DdMCa Itpw== 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=5+Rgd6h8ypNJWz++9VNujvYl5qeiVkqzvRz2suad2+I=; b=XypJJOix31U4B2LgpIxvD9gNgdqkqTtIzl4vJ7vRYskxEKa5atpR4vGPfAjEfiOG8R wL1y62kOjNK7XgCjy2XBu04In1m7uUUHn1jf2edMR4eF84R2frsZ4a9hCh0LgoFL8O7J WUnSW94MLTRHe5YDkn3TTXcbXfkAmhK6Mo+QQN+DredBUHyNoFNxagrWNaMw2pULoAub WQ4hl70TEPgyS45Md+W6CIRH6m4JePvGZvc9iH57R3xtr3PR1IKUGjUAKaxUCGDxXujl 21moUwqaf1vLeHLfCGC5iFP6BxE4wlA8FkNiwfxobQnowckO0rjMS3SLyn8+0zYCgTiF xSPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xxnsD/5i"; 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 c15-20020ad45aef000000b0056eae9c625fsi9423062qvh.318.2023.04.25.12.43.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Apr 2023 12:43:23 -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="xxnsD/5i"; 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 1prOYE-00032W-Mw; Tue, 25 Apr 2023 15:42:12 -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 1prOY6-0002tE-7M for qemu-devel@nongnu.org; Tue, 25 Apr 2023 15:42:02 -0400 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1prOY3-0007PF-Gt for qemu-devel@nongnu.org; Tue, 25 Apr 2023 15:42:01 -0400 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-4ec8133c59eso6400245e87.0 for ; Tue, 25 Apr 2023 12:41:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682451716; x=1685043716; 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=5+Rgd6h8ypNJWz++9VNujvYl5qeiVkqzvRz2suad2+I=; b=xxnsD/5iYNTQXjenHapynSfAap13xr+jjgBEdvb08p27sjZayHxEqX4RF+2MnAdWMA wAqytipEkSAw7AuHPP1N+JC9o6tqW3NpSdl+T08V8AkSpenMdmSU7NODAoNiOrRTvHkq psxqH5kP/qSaqBQpcZFPpLDNMQfq9O3NkRnjilu7fakeSN+M2sK5YJVwsppwKx1uzdEH CvwXv1cGEWBacSp9zdfYuZ1g587adQaBPe52gfnTfXDJ52bLL0PZ3ziixJEYtGccPgpN Ji45ENUzfVZOrcWjMVwNyxXGpdUEkWlORJL+AiZYVfCJ9dphaIf3ABli6GKMPEsQxiLc 2GjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682451716; x=1685043716; 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=5+Rgd6h8ypNJWz++9VNujvYl5qeiVkqzvRz2suad2+I=; b=jMy6icm4P9DTTQsvVAuJ6egHmknq+4WJUJZzY7c9Y6ks5DCmELAOK9kyP3U7qeN0ws 4dRRbnfw7W7dNfnRTB1TF/bhEhYn+stnWZ3IZn+xiibnZaey78aj1RfjqSvq65llCl/s GGBxGusZsSdzGgOfkyfSL/rB1pFE4WRd5P37SCfODhImc6g9V2vIBWzWBftYteINVYw+ oGdlnRRqmw8TKRoKUWYw1wn4khL36rbm6CT6ZiY6TiOvhnFkLfBktqFSIcfW2GigH3N1 7OKnfOiOAVeGVem8uMW8FnvkBIayub+j/PaiCkx5fM6lVAIOE27LySoVw6S1br9ER6+E KwDA== X-Gm-Message-State: AAQBX9eRAmAG/K/ekQ9C5ER5JI1rIsnLb0MsgpfuYIodUlOofgX5sZst mZX5rtX7dhLRLmnCwO4Beae+7nSixQXDU1Nrkcr/bw== X-Received: by 2002:a05:6512:909:b0:4eb:dd2:f3d2 with SMTP id e9-20020a056512090900b004eb0dd2f3d2mr4950709lft.43.1682451716518; Tue, 25 Apr 2023 12:41:56 -0700 (PDT) Received: from stoup.. ([91.209.212.61]) by smtp.gmail.com with ESMTPSA id d8-20020ac25448000000b004ec55ac6cd1sm2175662lfn.136.2023.04.25.12.41.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Apr 2023 12:41:56 -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, philmd@linaro.org Subject: [PATCH v3 51/57] tcg/sparc64: Use atom_and_align_for_opc Date: Tue, 25 Apr 2023 20:31:40 +0100 Message-Id: <20230425193146.2106111-52-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230425193146.2106111-1-richard.henderson@linaro.org> References: <20230425193146.2106111-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::129; envelope-from=richard.henderson@linaro.org; helo=mail-lf1-x129.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 Signed-off-by: Richard Henderson --- tcg/sparc64/tcg-target.c.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tcg/sparc64/tcg-target.c.inc b/tcg/sparc64/tcg-target.c.inc index bb23038529..4f9ec02b1f 100644 --- a/tcg/sparc64/tcg-target.c.inc +++ b/tcg/sparc64/tcg-target.c.inc @@ -1028,11 +1028,13 @@ static TCGLabelQemuLdst *prepare_host_addr(TCGContext *s, HostAddress *h, { TCGLabelQemuLdst *ldst = NULL; MemOp opc = get_memop(oi); - unsigned a_bits = get_alignment_bits(opc); - unsigned s_bits = opc & MO_SIZE; + MemOp s_bits = opc & MO_SIZE; + MemOp a_bits, atom_a, atom_u; unsigned a_mask; /* We don't support unaligned accesses. */ + a_bits = atom_and_align_for_opc(s, &atom_a, &atom_u, opc, + MO_ATOM_IFALIGN, false); a_bits = MAX(a_bits, s_bits); a_mask = (1u << a_bits) - 1;