Message ID | 20230503070656.1746170-46-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp905338wrs; Wed, 3 May 2023 00:13:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Ex4tYT/w8dmY1HcaZFUBfi00d7OjeyUHTtT9OdchOPqLDuoQV5RE1ucGW+iv8jZ7pPv/X X-Received: by 2002:a05:6214:5194:b0:5ef:45b4:d4fd with SMTP id kl20-20020a056214519400b005ef45b4d4fdmr6780567qvb.47.1683098022380; Wed, 03 May 2023 00:13:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683098022; cv=none; d=google.com; s=arc-20160816; b=qwOO5QzIkSpaV7XuvR+enZeIWAKmNVyoe3Oza1NPHL5dzYhL9kVVyaKKgBzmSre5tD PWd8fUPkaQgmzQlK7VR2yTz25Jk+i5WcIUot7p4sIoy7Sc826gh7egSJ4o1uELNdmBHa OYiEkOmAcXD7D28r7Kbj3DOPlKmkGcU/KN4z4JtbgYRvzHtZH6j/LVwEAG45At8D7Rko 0LDHnEvp9486rejnH8p03wrq/2U6oyFGWNnJzQH9g1MjcVOCoq2eYLXTdf7jG1VT0avJ m+suCYH6y1AnPz/ka7kjEfWXsbOebcbhUZmJFaVH5Z4chMmC3QAgDWk3b28e16k/io8M gx8Q== 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=xNYQj2Zg5TENytieXxeMxebRkQ90woYbMY4x/xns2OM=; b=oaM5Lz03SVtpz2sCFA5OcKEJ3Lr6ibITFP4H1fAK97yOdRbEHtVVVuIrr2RJP8lOIa PEtPgd8M5u/+AZrpWRyvZCEVabuox3MyDxl0lMxm5zWqR5Bl7lYdJtZu7Xg9qpfF3aln 7lkUwU1wTl/Ghpt49V0NfI3XooJdYQn8RdoSdo5ZRd2Q5y51BED45rWgmDsz3uNPehmw +a6OCEcc/OPTAtdClK/hhJnxeEXmNQP4uvtYQAHWTXeg2D9WztJ1123h+OZCefgFRM8J IM81w5aqUfTz34dYrqJsbfa2g2klhLhpZRpbXBfU8MrahbI7CavK2gRCroAa0o7wel3M sTmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UvG4Kq09; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e3-20020ac84e43000000b003ef6349dc0csi15447130qtw.50.2023.05.03.00.13.42 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 May 2023 00:13:42 -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=UvG4Kq09; 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 <qemu-devel-bounces@nongnu.org>) id 1pu6dw-0004sl-3h; Wed, 03 May 2023 03:11:16 -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 <richard.henderson@linaro.org>) id 1pu6dU-0002yt-JO for qemu-devel@nongnu.org; Wed, 03 May 2023 03:10:50 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1pu6dL-00073S-6S for qemu-devel@nongnu.org; Wed, 03 May 2023 03:10:46 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3f3331f928cso29229885e9.2 for <qemu-devel@nongnu.org>; Wed, 03 May 2023 00:10:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683097832; x=1685689832; 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=xNYQj2Zg5TENytieXxeMxebRkQ90woYbMY4x/xns2OM=; b=UvG4Kq09uplNadGTc8PJAfzwYnX9k6t1vOVCKn/OyHdSAr4drcDpMFLfbQScZpbAw7 xkTr/mUzcldVFwMvk+bj0jlwGO0/toFV9eu638UsOxTUDSBnp5PteLU92Mj1Pz7F/LDd dqy/OK7Avr+pqceaEdrjOuWaanQAMVcMfbQ/PWxCk3rc+fys1W6R+Ah5rpXwHGIECNV0 RJ+jxq97rYCkSIIk3L6/MPo8xR9ipsoF87ygHL/ykD74Ob6dLueXNr0+x0JVvxAuec2c a1ioth2rGJKJ6NyA0oNlAKlNGE4mpouLHL/yyvRoOLsyb5DGC84hx4DpdCKbX+F/m/M5 JRGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683097832; x=1685689832; 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=xNYQj2Zg5TENytieXxeMxebRkQ90woYbMY4x/xns2OM=; b=UDQMxxQAOB0iwR3DCG5tB6Tu+S01lD2tbogd8B9dke829SBRD5o+gbpVU4/4mAljgE jBkOl5LcQm5AwyBnrBuhArsJJGpwi9ZP0aa5VaLNIOAUz8Q9InaoOG8rEgKy4NXES2dp m2OLtkNCTPVESBE/g2F2eK6ySWPaMTnMxHIK2TSot0Hw6RSRD06aJClWatAwb0gl+CBX EQ32t2xB3/h7aGAzzE4eIq0RLXpjOnMvwWbgT/tzBsf798IW209G1lXD8Dkth/HtTd1x qDA5RNrRRiRGHjWK8r8py4VGVTApo2X5qfdQBMbBzksRIeF7YL9ISNIqUiMyvB+Mt6LM 66+w== X-Gm-Message-State: AC+VfDwyGA7gm7qE8U6va7J9fr9tCUUp1SDHFTejVj3Z6QmBiLjuxQJb b2WRCka9eWXAtxue8ieoizu5ataVuo9zVGaTWqrkPQ== X-Received: by 2002:a7b:c856:0:b0:3f1:7288:1912 with SMTP id c22-20020a7bc856000000b003f172881912mr13430836wml.33.1683097832005; Wed, 03 May 2023 00:10:32 -0700 (PDT) Received: from stoup.Home ([2a02:c7c:74db:8d00:c01d:9d74:b630:9087]) by smtp.gmail.com with ESMTPSA id v9-20020a05600c444900b003f173be2ccfsm54223673wmn.2.2023.05.03.00.10.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 May 2023 00:10:31 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Cc: git@xen0n.name, gaosong@loongson.cn, philmd@linaro.org, qemu-arm@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org Subject: [PATCH v4 45/57] tcg/arm: Use atom_and_align_for_opc Date: Wed, 3 May 2023 08:06:44 +0100 Message-Id: <20230503070656.1746170-46-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230503070656.1746170-1-richard.henderson@linaro.org> References: <20230503070656.1746170-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=richard.henderson@linaro.org; helo=mail-wm1-x334.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
tcg: Improve atomicity support
|
expand
|
On Wed, 3 May 2023 at 08:12, Richard Henderson <richard.henderson@linaro.org> wrote: > > No change to the ultimate load/store routines yet, so some atomicity > conditions not yet honored, but plumbs the change to alignment through > the relevant functions. > > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> thanks -- PMM
diff --git a/tcg/arm/tcg-target.c.inc b/tcg/arm/tcg-target.c.inc index e5aed03247..edd995e04f 100644 --- a/tcg/arm/tcg-target.c.inc +++ b/tcg/arm/tcg-target.c.inc @@ -1323,6 +1323,8 @@ typedef struct { TCGReg base; int index; bool index_scratch; + MemOp align; + MemOp atom; } HostAddress; bool tcg_target_has_memory_bswap(MemOp memop) @@ -1379,8 +1381,12 @@ static TCGLabelQemuLdst *prepare_host_addr(TCGContext *s, HostAddress *h, { TCGLabelQemuLdst *ldst = NULL; MemOp opc = get_memop(oi); - MemOp a_bits = get_alignment_bits(opc); - unsigned a_mask = (1 << a_bits) - 1; + MemOp a_bits, atom_a, atom_u; + unsigned a_mask; + + a_bits = atom_and_align_for_opc(s, &atom_a, &atom_u, opc, + MO_ATOM_IFALIGN, false); + a_mask = (1 << a_bits) - 1; #ifdef CONFIG_SOFTMMU int mem_index = get_mmuidx(oi); @@ -1498,6 +1504,9 @@ static TCGLabelQemuLdst *prepare_host_addr(TCGContext *s, HostAddress *h, }; #endif + h->align = a_bits; + h->atom = atom_a; + return ldst; }
No change to the ultimate load/store routines yet, so some atomicity conditions not yet honored, but plumbs the change to alignment through the relevant functions. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- tcg/arm/tcg-target.c.inc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)