From patchwork Thu Feb 27 14:27:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 868970 Delivered-To: patch@linaro.org Received: by 2002:a05:6504:3043:b0:290:25b2:841c with SMTP id f3csp422915lth; Thu, 27 Feb 2025 06:38:34 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW/OAGfbz6viQ2nb1rWn/Y4SLQ8cfmeFKiD3NFtCwlBghRY/gCjEbhuMmSMvgB8XGqwhSByuQ==@linaro.org X-Google-Smtp-Source: AGHT+IHnOA79VeMjvciGhUSR7Adgm5gMUudvTScIVWw0m18dKglYYHDFmCOol740PBt75nyzJPE1 X-Received: by 2002:a05:622a:4488:b0:473:882f:bcb1 with SMTP id d75a77b69052e-473882fc392mr71595731cf.46.1740667113772; Thu, 27 Feb 2025 06:38:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1740667113; cv=none; d=google.com; s=arc-20240605; b=jyRolya9JyNtYYBvUAWF0hfdn2KBu7ExMj/2cnU0KOEk503Gxk/GHkIUrvK8ialOwB G+1oBJlU+euCM4nGGqH+lzXpDTwgX7MnFecUemaoc1kHqU4sQ/XZ9aMmCr/kPn1PlnON 73/DB7AreMH4dBeVvqPfIzzmbQseslWKWCIEa7sgpyFpPiniUQHpgwr4TgQMGx8eSjHx dSv3FJqCFXBpphSFOjatEiHTjSJYrIv78vMLz89BIBjBw1TIxU5YLhlXQ03bStA3Cnx5 3CAUKPjmSWA+JbyfklmKYNgbW7Q2lTTdAVep/mzaka5xYdkjcjHLsbfE/Szyto+WfUsC +muA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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:to:from :dkim-signature; bh=wGTNFxYDOBY5OQaGDmBAuOxvbJwhsg8/Ld9YxzxYgfA=; fh=TnW26RXi3vBqsJEltUYVTeNTcoFo9Q+cNUyJiqJja74=; b=lEs9G6CbJpnesITIfWR2BHVRZGOITHtHfEVYXGl2DT2q4Gy/+ncYYaof7DHgnO3+VK CikFn9bO62tFnQctCizUPfDReU42ktKqZUGxC6CTw2xTDiTcEJOMn2LNH5jP5l2lCStr JPRoDENvXcf+oLpAsyRVNZ+cd2z2u2AM3KOga2kwKN8ngumVZVcbPWBf6J3TwOW0VcCo Bml+3tYJ28C+2ffl/r/WbU6VgbETd55rw+S4Wvjng0bMPAyIx+t1gZgkU6fI97uGLJec pCh2KcPgX/21F+y5mS+R6/k5GFpcLHjKkK0/cN0Iar8pFcSo+9PnZhuD3Y16CFG9lLYK D8EA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N13qwBjX; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-4747240e112si13541781cf.418.2025.02.27.06.38.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Feb 2025 06:38:33 -0800 (PST) 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=N13qwBjX; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tnert-000683-Sf; Thu, 27 Feb 2025 09:28:06 -0500 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 1tnerm-0005Qb-3j for qemu-devel@nongnu.org; Thu, 27 Feb 2025 09:27:58 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tnerj-0004ut-BU for qemu-devel@nongnu.org; Thu, 27 Feb 2025 09:27:57 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-43948021a45so9605645e9.1 for ; Thu, 27 Feb 2025 06:27:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740666469; x=1741271269; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=wGTNFxYDOBY5OQaGDmBAuOxvbJwhsg8/Ld9YxzxYgfA=; b=N13qwBjXmsDZtvx1sLihLtLTN39Kmc2gvV5e4OwAN2+vGPXMQ/kxb/khIbVR58JI6H VzUWealKNoY1FELiFLX9jrZQtMaPORVlrjIBYAlCGcW8b48xcqYG3a+w80egHM9O7IR4 mAKMA46X0BiN/8QvLiK/mmrem9i2QDA/hjkR2lphRH2bIEdFSmj4ChMpMVwMbAEFKWlD Gvlsos2LoE8FhYFLL0n3585W5w4xwCqVcOzCTqDsnJPKOMddF3pryP9JcZf36ZWk3hJz R8nPHm8AvegicmFJiaJXc0xro+1kX1hRyUnnV/Rd5MYXDsFRReHhcLmFD2UlOSc1x02P Ce3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740666469; x=1741271269; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wGTNFxYDOBY5OQaGDmBAuOxvbJwhsg8/Ld9YxzxYgfA=; b=vNsBu6KvPwzZrOulW824hpeYL+q71ZU6bVIj0qZaHEvLBobZ41z4bmTE45ijHKQ/jQ x3I0M3sz+keNjIDc0rLOK8Km/Ar/AKeDJhh04VFYQLqSs5D2LEL4NcJuzZdGs+FdNlvD N3s8v1ifd5OIJsEXuJ0zu/gaoz2uEafcltEQL69h42u8V+e9U++RwUMWuTnf/7GCGO8L aBQ/bGjaaMQ+yQStbdsDbihAtmYdp9aZ7H//YzIJeRJ1fnLrGYPX3EW5C4iJXg3DtQZF brczaZJcF8x7U6a0SYUCN/Hx/rfwOilnfQfK6LbzfMbzjHPTuPNk0QABZg/cDBzzzUgv u1IQ== X-Forwarded-Encrypted: i=1; AJvYcCUaUg1f98IVTDQQ0ruzEBYFEwj7C62WpPTEFrTYc03gnJOzO3noR2fn/cMleTX1zZddlNytiyc3E0ih@nongnu.org X-Gm-Message-State: AOJu0Yw3gpevRmWQEnIictIgz3cMh9cIvDLwPCPg8lmge97hUHqngEhV 1mCNlzqKyFRrIM8ZTct9D2zN106zhghmYqA1EvRmqI3tJkhKxH2bqdw5KcGHF/M= X-Gm-Gg: ASbGncslVTDSUDpX8qCsR6HXvrlwY4A0mwORAfaw3Xr4HEIIWOoAJLxzDWxxm6PzcmI /sFP6dQZJ8O5hu6GFT3BVu8NgixptjWUNghLFzbu9fstl+JvwZC84m881oQ94nRYcagvQnjINVu N9cwYWkmK84pLmhrIRMW3YGNEDz+zQL+Qlwz16fYwJbLIw9K6Kj9ALcWHnbb5IHcDZ/T3wG//WX fNFJfTk2gUaI0Cz+um/HF4tfg18sw+9WSslkYiNYsbG+bd4txsd1N/oqBph1WRVhuj91qoJTkx1 GHQM3hm0APwOB9bRKqf+whOno1SpjRTz X-Received: by 2002:a05:600c:5123:b0:439:8ef6:5782 with SMTP id 5b1f17b1804b1-43ab8fd7acemr72056025e9.10.1740666469262; Thu, 27 Feb 2025 06:27:49 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43aba532b8dsm55968335e9.14.2025.02.27.06.27.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2025 06:27:48 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 1/3] target/arm: Correct LDRD atomicity and fault behaviour Date: Thu, 27 Feb 2025 14:27:44 +0000 Message-ID: <20250227142746.1698904-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250227142746.1698904-1-peter.maydell@linaro.org> References: <20250227142746.1698904-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x332.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 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 Our LDRD implementation is wrong in two respects: * if the address is 4-aligned and the load crosses a page boundary and the second load faults and the first load was to the base register (as in cases like "ldrd r2, r3, [r2]", then we must not update the base register before taking the fault * if the address is 8-aligned the access must be a 64-bit single-copy atomic access, not two 32-bit accesses Rewrite the handling of the loads in LDRD to use a single tcg_gen_qemu_ld_i64() and split the result into the destination registers. This allows us to get the atomicity requirements right, and also implicitly means that we won't update the base register too early for the page-crossing case. Note that because we no longer increment 'addr' by 4 in the course of performing the LDRD we must change the adjustment value we pass to op_addr_ri_post() and op_addr_rr_post(): it no longer needs to subtract 4 to get the correct value to use if doing base register writeback. STRD has the same problem with not getting the atomicity right; we will deal with that in the following commit. Cc: qemu-stable@nongnu.org Reported-by: Stu Grossman Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/tcg/translate.c | 64 ++++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 24 deletions(-) diff --git a/target/arm/tcg/translate.c b/target/arm/tcg/translate.c index d8225b77c8c..e10a1240c17 100644 --- a/target/arm/tcg/translate.c +++ b/target/arm/tcg/translate.c @@ -5003,10 +5003,43 @@ static bool op_store_rr(DisasContext *s, arg_ldst_rr *a, return true; } +static void do_ldrd_load(DisasContext *s, TCGv_i32 addr, int rt, int rt2) +{ + /* + * LDRD is required to be an atomic 64-bit access if the + * address is 8-aligned, two atomic 32-bit accesses if + * it's only 4-aligned, and to give an alignemnt fault + * if it's not 4-aligned. + * Rt is always the word from the lower address, and Rt2 the + * data from the higher address, regardless of endianness. + * So (like gen_load_exclusive) we avoid gen_aa32_ld_i64() + * so we don't get its SCTLR_B check, and instead do a 64-bit access + * using MO_BE if appropriate and then split the two halves. + * + * This also gives us the correct behaviour of not updating + * rt if the load of rt2 faults; this is required for cases + * like "ldrd r2, r3, [r2]" where rt is also the base register. + */ + int mem_idx = get_mem_index(s); + MemOp opc = MO_64 | MO_ALIGN_4 | MO_ATOM_SUBALIGN | s->be_data; + TCGv taddr = gen_aa32_addr(s, addr, opc); + TCGv_i64 t64 = tcg_temp_new_i64(); + TCGv_i32 tmp = tcg_temp_new_i32(); + TCGv_i32 tmp2 = tcg_temp_new_i32(); + + tcg_gen_qemu_ld_i64(t64, taddr, mem_idx, opc); + if (s->be_data == MO_BE) { + tcg_gen_extr_i64_i32(tmp2, tmp, t64); + } else { + tcg_gen_extr_i64_i32(tmp, tmp2, t64); + } + store_reg(s, rt, tmp); + store_reg(s, rt2, tmp2); +} + static bool trans_LDRD_rr(DisasContext *s, arg_ldst_rr *a) { - int mem_idx = get_mem_index(s); - TCGv_i32 addr, tmp; + TCGv_i32 addr; if (!ENABLE_ARCH_5TE) { return false; @@ -5017,18 +5050,10 @@ static bool trans_LDRD_rr(DisasContext *s, arg_ldst_rr *a) } addr = op_addr_rr_pre(s, a); - tmp = tcg_temp_new_i32(); - gen_aa32_ld_i32(s, tmp, addr, mem_idx, MO_UL | MO_ALIGN); - store_reg(s, a->rt, tmp); - - tcg_gen_addi_i32(addr, addr, 4); - - tmp = tcg_temp_new_i32(); - gen_aa32_ld_i32(s, tmp, addr, mem_idx, MO_UL | MO_ALIGN); - store_reg(s, a->rt + 1, tmp); + do_ldrd_load(s, addr, a->rt, a->rt + 1); /* LDRD w/ base writeback is undefined if the registers overlap. */ - op_addr_rr_post(s, a, addr, -4); + op_addr_rr_post(s, a, addr, 0); return true; } @@ -5152,23 +5177,14 @@ static bool op_store_ri(DisasContext *s, arg_ldst_ri *a, static bool op_ldrd_ri(DisasContext *s, arg_ldst_ri *a, int rt2) { - int mem_idx = get_mem_index(s); - TCGv_i32 addr, tmp; + TCGv_i32 addr; addr = op_addr_ri_pre(s, a); - tmp = tcg_temp_new_i32(); - gen_aa32_ld_i32(s, tmp, addr, mem_idx, MO_UL | MO_ALIGN); - store_reg(s, a->rt, tmp); - - tcg_gen_addi_i32(addr, addr, 4); - - tmp = tcg_temp_new_i32(); - gen_aa32_ld_i32(s, tmp, addr, mem_idx, MO_UL | MO_ALIGN); - store_reg(s, rt2, tmp); + do_ldrd_load(s, addr, a->rt, rt2); /* LDRD w/ base writeback is undefined if the registers overlap. */ - op_addr_ri_post(s, a, addr, -4); + op_addr_ri_post(s, a, addr, 0); return true; } From patchwork Thu Feb 27 14:27:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 868967 Delivered-To: patch@linaro.org Received: by 2002:a05:6504:3043:b0:290:25b2:841c with SMTP id f3csp415952lth; Thu, 27 Feb 2025 06:29:20 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXCAz6ZYI9TxVR3zW4Z1wxqeZtnSV3BoNlO41Zxwyohbp2JN50GY/WfOrgODtfBVwCxqriNQA==@linaro.org X-Google-Smtp-Source: AGHT+IF26tCBBpgnlt4N4v/Ys5NDIbEawxXKFxL/8OuPKd3YfgjDKszRNYpSWUi4PkmUX3ZpUAqi X-Received: by 2002:a05:6122:1829:b0:520:64ea:c479 with SMTP id 71dfb90a1353d-5224cd48b92mr3807944e0c.10.1740666560247; Thu, 27 Feb 2025 06:29:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1740666560; cv=none; d=google.com; s=arc-20240605; b=WNViS1Q/AeCY/eX826woZXOOl2rsG3+Pw8AUIe/q+RasJDccM6/psgVxl925R2wdu4 auxCrN/GPViyAj6LFFpJvCNF7bP0eVtHyK/BNfH6RwhODSWQMrVQe0Zxv/wuI3WD7GvD NJl5tvBEIBOV5u2v/IgCWN3aKBRZnZJMCy2U4kZdoRpFkU8ckLtEAo6g11ZNksPJGqke sf2+15+6utpjV1hxofyWoYiEq7Yvu++MHbW3igIUlON0zXpENdpFP6LkOry36THrHqiN WYAc9EsICxwGAEsrUADxD0mn6kitong6bwrlzxHHps9V4qDzV1czOj+fub4J5a5rVd9S 2qzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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:to:from :dkim-signature; bh=Qe4aJgheLC+WLLda+xlMEOvgcnf2Z7Yw6J5SwaqcyMo=; fh=8jtQQ9rIFhb6WXcGWbSZ+38+ho3yMyxkjbPhkPg23gA=; b=hqwJY0yZzQU/Qa7zRspRTk837teOGNiv2jyk39AYcAc3wLGGvrcXGlD/9lW1AdhFZM hLu2rNUEZxZtmKPTf9frbr+YVe3cuDyDkc5QRDGq4O0N/2NA6ytCeO/MjDXwf34gTgyH etmeZgytOX/W/EpgCyphQHMW5obJ2xylCokrTx7+Gog+qbx237ZdQS/jSKyPOymH3oNk nuBATQ5Bdxh8d+2QjDz0JxNXCGimY22EOiFMZYTzr7nKk1PfTNIT2rQMaBuLR5B/bx1A CRwgy+bRJ3lu4A4xZBy1S5ETCYlgUabxmNE1mtNn7yjwjDWv0USUgBlgeMWDYFmDhcef Kr0A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CGLwn7x8; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 71dfb90a1353d-5234bec8536si283992e0c.46.2025.02.27.06.29.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Feb 2025 06:29:20 -0800 (PST) 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=CGLwn7x8; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tnesC-0007BQ-9n; Thu, 27 Feb 2025 09:28:24 -0500 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 1tnern-0005aM-Kx for qemu-devel@nongnu.org; Thu, 27 Feb 2025 09:28:00 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tnerj-0004v6-Rx for qemu-devel@nongnu.org; Thu, 27 Feb 2025 09:27:59 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-439a4fc2d65so10717655e9.3 for ; Thu, 27 Feb 2025 06:27:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740666470; x=1741271270; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Qe4aJgheLC+WLLda+xlMEOvgcnf2Z7Yw6J5SwaqcyMo=; b=CGLwn7x8yw+yL6mTLa1jg4a3zaxYhlHdWUFv6MC4K/YJ6evKK8X7edUSPmISQdCgvg vNj2yu/WUTtaye+yitDW7j8Axd90OBL1ZNMGvzgzZapD6vPjdiROQO9+DMPHHWdlA53C MjptXRI/7uzmIkaKs0+mV+UFaBNDupD3v7WvMRntfzWoXdDZnjxLbdP/bGv5DuzvtOGU s76HL5GHvMO1rsIkFAPifv+IcIBW4JL3eXkLrdgGqpctgrprSTsTv/6Bb2Z/0H+pawFl SFOeYgdYrD4zUbwPIZGfrUs6v8ZOiu1RpxRbKk2g6y0AGhbDNhpCDrAnFw6TssjVKg6F xe8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740666470; x=1741271270; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Qe4aJgheLC+WLLda+xlMEOvgcnf2Z7Yw6J5SwaqcyMo=; b=i8ltbFRu+ig7J1FBnNook/3TVywfXPibIoxQnIIfR5YBJJkGGnbJcKITMLRGvn0OiA FEAVPWzbljeeKojJp9G4heFpvk6KRYJ7K7r9/oYyEyGe7zkkO8VKO/Ruemp1lwucJDPa nBhps+ubxqxDWvPIzp0+WK5NNsk7I5bTyZSxzt6Mq+snmPIYV9qRevP/7O5s4v0KLEpG IR/W8sKMD/gtnb7yeICx5e47RdqW22yJdEMQNyIZrrD3la442hX6wSAdv1ESsNIL4iPB lUaClH3L0v/lv+sYDIy57lzU8FpH6k7gLEGq3Az8QuyhwouNpLnhNoYNrJy1VpeXbcVB roYQ== X-Forwarded-Encrypted: i=1; AJvYcCU5RbhDdII4/NHwc/yiBrhA+DNMe2n//zWtDsZvaPul0SEYnPCHY3I1j/mMwJayaPvdZziY8MVB2awW@nongnu.org X-Gm-Message-State: AOJu0Ywh57uEnRwgDs44hpWU91K4Qi4j4WlEyXdAkTCvM70Ywm6+XRil f3IbsGA0g1AASNwfudqHc4A6w3myXOESf/IP7S1eCjzVbICr9vCiIn1Met3FYO8= X-Gm-Gg: ASbGncv81KPGT7r3Kw5kymaspL1uHCHtrEoKu9G3TAmUqp+I02kxzqLXEuAUxACwjY2 1csQkVsPQbo7jXiLv+GfFP4q6Hdi640oQF3TYsp/PGNMLp8c+Pfeic+8mvLIY6Vg4r0U3VRiaC6 N2q7WT2o8v328+QWvZLDbYMSjnAARosTAtad1Aq0MNitgEB8xaqsYp/DX1KWDyTGqinK64EI4jx CVdeg7EQ2MNZbkKTUZiFL3uQF3tOWGvg+uHJTvNBNbxKOcfnt+SMJQnCHldAIQweUtTcYyaDBo3 KfyV/TRgHIlzVnovJ1OIXbPZrbxRm3CM X-Received: by 2002:a05:600c:5252:b0:439:88bb:d025 with SMTP id 5b1f17b1804b1-43ab0f26e5fmr110547285e9.1.1740666470162; Thu, 27 Feb 2025 06:27:50 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43aba532b8dsm55968335e9.14.2025.02.27.06.27.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2025 06:27:49 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 2/3] target/arm: Correct STRD atomicity Date: Thu, 27 Feb 2025 14:27:45 +0000 Message-ID: <20250227142746.1698904-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250227142746.1698904-1-peter.maydell@linaro.org> References: <20250227142746.1698904-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x329.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 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 Our STRD implementation doesn't correctly implement the requirement: * if the address is 8-aligned the access must be a 64-bit single-copy atomic access, not two 32-bit accesses Rewrite the handling of STRD to use a single tcg_gen_qemu_st_i64() of a value produced by concatenating the two 32 bit source registers. This allows us to get the atomicity right. As with the LDRD change, now that we don't update 'addr' in the course of performing the store we need to adjust the offset we pass to op_addr_ri_post() and op_addr_rr_post(). Cc: qemu-stable@nongnu.org Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/tcg/translate.c | 55 ++++++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 20 deletions(-) diff --git a/target/arm/tcg/translate.c b/target/arm/tcg/translate.c index e10a1240c17..2020d18f019 100644 --- a/target/arm/tcg/translate.c +++ b/target/arm/tcg/translate.c @@ -5057,10 +5057,38 @@ static bool trans_LDRD_rr(DisasContext *s, arg_ldst_rr *a) return true; } +static void do_strd_store(DisasContext *s, TCGv_i32 addr, int rt, int rt2) +{ + /* + * STRD is required to be an atomic 64-bit access if the + * address is 8-aligned, two atomic 32-bit accesses if + * it's only 4-aligned, and to give an alignemnt fault + * if it's not 4-aligned. + * Rt is always the word from the lower address, and Rt2 the + * data from the higher address, regardless of endianness. + * So (like gen_store_exclusive) we avoid gen_aa32_ld_i64() + * so we don't get its SCTLR_B check, and instead do a 64-bit access + * using MO_BE if appropriate, using a value constructed + * by putting the two halves together in the right order. + */ + int mem_idx = get_mem_index(s); + MemOp opc = MO_64 | MO_ALIGN_4 | MO_ATOM_SUBALIGN | s->be_data; + TCGv taddr = gen_aa32_addr(s, addr, opc); + TCGv_i32 t1 = load_reg(s, rt); + TCGv_i32 t2 = load_reg(s, rt2); + TCGv_i64 t64 = tcg_temp_new_i64(); + + if (s->be_data == MO_BE) { + tcg_gen_concat_i32_i64(t64, t2, t1); + } else { + tcg_gen_concat_i32_i64(t64, t1, t2); + } + tcg_gen_qemu_st_i64(t64, taddr, mem_idx, opc); +} + static bool trans_STRD_rr(DisasContext *s, arg_ldst_rr *a) { - int mem_idx = get_mem_index(s); - TCGv_i32 addr, tmp; + TCGv_i32 addr; if (!ENABLE_ARCH_5TE) { return false; @@ -5071,15 +5099,9 @@ static bool trans_STRD_rr(DisasContext *s, arg_ldst_rr *a) } addr = op_addr_rr_pre(s, a); - tmp = load_reg(s, a->rt); - gen_aa32_st_i32(s, tmp, addr, mem_idx, MO_UL | MO_ALIGN); + do_strd_store(s, addr, a->rt, a->rt + 1); - tcg_gen_addi_i32(addr, addr, 4); - - tmp = load_reg(s, a->rt + 1); - gen_aa32_st_i32(s, tmp, addr, mem_idx, MO_UL | MO_ALIGN); - - op_addr_rr_post(s, a, addr, -4); + op_addr_rr_post(s, a, addr, 0); return true; } @@ -5207,20 +5229,13 @@ static bool trans_LDRD_ri_t32(DisasContext *s, arg_ldst_ri2 *a) static bool op_strd_ri(DisasContext *s, arg_ldst_ri *a, int rt2) { - int mem_idx = get_mem_index(s); - TCGv_i32 addr, tmp; + TCGv_i32 addr; addr = op_addr_ri_pre(s, a); - tmp = load_reg(s, a->rt); - gen_aa32_st_i32(s, tmp, addr, mem_idx, MO_UL | MO_ALIGN); + do_strd_store(s, addr, a->rt, rt2); - tcg_gen_addi_i32(addr, addr, 4); - - tmp = load_reg(s, rt2); - gen_aa32_st_i32(s, tmp, addr, mem_idx, MO_UL | MO_ALIGN); - - op_addr_ri_post(s, a, addr, -4); + op_addr_ri_post(s, a, addr, 0); return true; } From patchwork Thu Feb 27 14:27:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 868969 Delivered-To: patch@linaro.org Received: by 2002:a05:6504:3043:b0:290:25b2:841c with SMTP id f3csp419471lth; Thu, 27 Feb 2025 06:33:47 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVb0ALOMu1vGg7LsqtWFzD5ToFJhDYhCbFL4vZdjms0+3ORqLbAHDo6kWr7egpbv1qrX/PTHA==@linaro.org X-Google-Smtp-Source: AGHT+IFudX9C58AS8QJE++RWY86Zp4AZ7nuzccwjIKscfYeJHHb6R/siTJ7dQgnOMEgMyxPQNgFC X-Received: by 2002:a05:6102:3a06:b0:4bb:dba6:99b7 with SMTP id ada2fe7eead31-4c01e2114f6mr3699381137.13.1740666827011; Thu, 27 Feb 2025 06:33:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1740666826; cv=none; d=google.com; s=arc-20240605; b=XN7ik0pCcCX92UUQBly1NZ7s98ntC7IGU9m6r7c943zokuvRcyvXJRUbjEAGccnuDD /c19AR9c28FmNC/8ZVyoCFPtgj08CnwaQ53cVpclfBEgygD16MdO4B+LFFf48YqslP7z D7nBAh6eX83bXzI+iOsCUodiE4g70qjMYaMDchlobYJp/SUsbswr6rSk+Xo1dMs8OtHw VZvsBqHmVqH5BNkS6IDky3FyseX/uINTMykAEhhVMD4CmKQoO8A4y//i4jcve41yV6wW 3Zyf7Ru+hhMRdxSbYx4QY0wFOcr024JtKLBTq7LGwdWeN631JYUEH06+LRP16oDXV906 rQbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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:to:from :dkim-signature; bh=bBTqTkCG2mdnnfefXGlINhtGqt3fpl8EJ4NhuP7TlgE=; fh=C0LcFUn9ZAGbnIqzTo1qt8BRSikDi7ysmofZ51ZAZD0=; b=JoV2mGD1zUTK8qpp2s/WKkAGGyKZS0L5xIIXltXngYJsnWopPJ1+xr0aMeXBT1vY8J DHi8FGGfCIib/IJMER2cJ28k5cQMsY+ycPZzfoEUzc71LgC5bZ/3p77RHvls7gBxIW8H q3tETVoy6fXERyYajLE7zUn36becURuUwCDBiJmfaXD3xOO05X5cXeBtdq50Xcwuav2/ rankWIUROqZrwAAJj/Y/rn8eW1zMFQamODnd7/Hi3CCyzGvAXNf2VHCDAmDzQgiwVvmA QmL5gShwSRubUIdX154pimUYllBtz9vGJsAL97Ee3zWAUyVhzqKtRUpf/FmVenao5jzp kb7g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZbdKsjwi; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=fail header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ada2fe7eead31-4c0345fb13fsi259641137.6.2025.02.27.06.33.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Feb 2025 06:33:46 -0800 (PST) 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=fail header.i=@linaro.org header.s=google header.b=ZbdKsjwi; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=fail header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tnerv-0006I7-Lt; Thu, 27 Feb 2025 09:28:07 -0500 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 1tnerm-0005QF-1H for qemu-devel@nongnu.org; Thu, 27 Feb 2025 09:27:58 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tnerj-0004vE-B6 for qemu-devel@nongnu.org; Thu, 27 Feb 2025 09:27:57 -0500 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-390dd3403fdso820514f8f.0 for ; Thu, 27 Feb 2025 06:27:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740666471; x=1741271271; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=bBTqTkCG2mdnnfefXGlINhtGqt3fpl8EJ4NhuP7TlgE=; b=ZbdKsjwilmoZKMi29fpz2olgtlExlSzC6mm3ZkjmPUonBf2eX2WDvZ2eMqo+yjzUW2 vVa4pEtZNQO1OEiNGW4MkNfPyVny+jZGi4fGe4KCGdC+MXgPJOMu2wkCXHMvbt+7p63x 4xM2Zz9MSQO5cFh2ryrZC4JRxEmpiB5etktJne/1Mrt0+KOXSYTKAQkVgIUJPkXFXaLW 1aXwA2ZDpYOk9VoV8io3bcM/f17yWwSpceNAziu34pnXEJnMBHSWiQsC5vmrNJ8nQZqK +zYtfroDO5CYSsjBOiyOxsiYiLU5iqshx6cc4dcZVas4TqfQ8W6BBB8nBOr/cy6LxJBf f0SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740666471; x=1741271271; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bBTqTkCG2mdnnfefXGlINhtGqt3fpl8EJ4NhuP7TlgE=; b=Y+IEoOkxURk+aYUsCan8dYfpFYgEptpjrIk//z5map8pEYF+lUJhwsP47AKLsvNM3T 6PFpK5wAl4ZWEo2c99nQZTMSXt+j5VzZiTYUptaCHm163XHNnGoIroPbJAW9/R6itINo sVo/22TZ1mu5GnLmxAKNRVp5hGTP39uuyl+sj2hdaXWf8C7kF2/urbW/EnxvH78ajw5w tayOG0aJ3ebLAXfsJvN/F+rTroCIXZSk96awUNVcTnED1K5tYwTM81QO+twNQD+11iBu 2CVAtpdOhfiBIjJgxyM9EY7IC/gCfYXVcit3XiHOfUv/uQ42WArOI+ELLR4h4FGXfUyL wmBA== X-Forwarded-Encrypted: i=1; AJvYcCX1wYXKIvIR1FtZTPCktwqA1gYDqv+mxVPZOHu48u22oIpy11mwLg0F+gd/umKFn7/QQgmWjmatlK94@nongnu.org X-Gm-Message-State: AOJu0YybkF3OfsbPotVraBKy+FzQB1wYomWv+45mHlcjwDMKiZn2dzOx zRQPXbq/ShM5s47WF/e8SfDb+P8yQU9XlqTG6xbJBWmlEdJA7G+b9T+6xd6Bsq0= X-Gm-Gg: ASbGnct6uKN5QAMFUnl9rTneW9T/K1vJnX672Bos22hS5vqT6rcMWX8hjsJOiV1lItj gZ+KdcUdSogOUZrPDqZFXge15dWoL/vrS7OaNR4GAy66W75RmjmmAqWR2O6HZg9ASz8ssUR0R3K 2ewRuNg2u52b8+qE5XZHMNpjrAvf58pxFHF6z8y+RFAsMmR/ROHqkhA2+zJMVb/u75/Wfk725/L /aNHoXwFH1uQrQSQug3r16A5ih9wpzORqK4Llv033bjIZ8d7XbDaskmisSNO1HbVAjXIdvZaStZ qM4bEb32ZreQAhCsJamhI5bgKpus0S+G X-Received: by 2002:a5d:47a3:0:b0:385:fc70:7f6 with SMTP id ffacd0b85a97d-390d4f377eemr6243064f8f.7.1740666471076; Thu, 27 Feb 2025 06:27:51 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43aba532b8dsm55968335e9.14.2025.02.27.06.27.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2025 06:27:50 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 3/3] target/arm: Drop unused address_offset from op_addr_{rr, ri}_post() Date: Thu, 27 Feb 2025 14:27:46 +0000 Message-ID: <20250227142746.1698904-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250227142746.1698904-1-peter.maydell@linaro.org> References: <20250227142746.1698904-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42e.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 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 All the callers of op_addr_rr_post() and op_addr_ri_post() now pass in zero for the address_offset, so we can remove that argument. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/tcg/translate.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/target/arm/tcg/translate.c b/target/arm/tcg/translate.c index 2020d18f019..bd3838d68e3 100644 --- a/target/arm/tcg/translate.c +++ b/target/arm/tcg/translate.c @@ -4941,7 +4941,7 @@ static TCGv_i32 op_addr_rr_pre(DisasContext *s, arg_ldst_rr *a) } static void op_addr_rr_post(DisasContext *s, arg_ldst_rr *a, - TCGv_i32 addr, int address_offset) + TCGv_i32 addr) { if (!a->p) { TCGv_i32 ofs = load_reg(s, a->rm); @@ -4954,7 +4954,6 @@ static void op_addr_rr_post(DisasContext *s, arg_ldst_rr *a, } else if (!a->w) { return; } - tcg_gen_addi_i32(addr, addr, address_offset); store_reg(s, a->rn, addr); } @@ -4974,7 +4973,7 @@ static bool op_load_rr(DisasContext *s, arg_ldst_rr *a, * Perform base writeback before the loaded value to * ensure correct behavior with overlapping index registers. */ - op_addr_rr_post(s, a, addr, 0); + op_addr_rr_post(s, a, addr); store_reg_from_load(s, a->rt, tmp); return true; } @@ -4999,7 +4998,7 @@ static bool op_store_rr(DisasContext *s, arg_ldst_rr *a, gen_aa32_st_i32(s, tmp, addr, mem_idx, mop); disas_set_da_iss(s, mop, issinfo); - op_addr_rr_post(s, a, addr, 0); + op_addr_rr_post(s, a, addr); return true; } @@ -5053,7 +5052,7 @@ static bool trans_LDRD_rr(DisasContext *s, arg_ldst_rr *a) do_ldrd_load(s, addr, a->rt, a->rt + 1); /* LDRD w/ base writeback is undefined if the registers overlap. */ - op_addr_rr_post(s, a, addr, 0); + op_addr_rr_post(s, a, addr); return true; } @@ -5101,7 +5100,7 @@ static bool trans_STRD_rr(DisasContext *s, arg_ldst_rr *a) do_strd_store(s, addr, a->rt, a->rt + 1); - op_addr_rr_post(s, a, addr, 0); + op_addr_rr_post(s, a, addr); return true; } @@ -5137,13 +5136,14 @@ static TCGv_i32 op_addr_ri_pre(DisasContext *s, arg_ldst_ri *a) } static void op_addr_ri_post(DisasContext *s, arg_ldst_ri *a, - TCGv_i32 addr, int address_offset) + TCGv_i32 addr) { + int address_offset = 0; if (!a->p) { if (a->u) { - address_offset += a->imm; + address_offset = a->imm; } else { - address_offset -= a->imm; + address_offset = -a->imm; } } else if (!a->w) { return; @@ -5168,7 +5168,7 @@ static bool op_load_ri(DisasContext *s, arg_ldst_ri *a, * Perform base writeback before the loaded value to * ensure correct behavior with overlapping index registers. */ - op_addr_ri_post(s, a, addr, 0); + op_addr_ri_post(s, a, addr); store_reg_from_load(s, a->rt, tmp); return true; } @@ -5193,7 +5193,7 @@ static bool op_store_ri(DisasContext *s, arg_ldst_ri *a, gen_aa32_st_i32(s, tmp, addr, mem_idx, mop); disas_set_da_iss(s, mop, issinfo); - op_addr_ri_post(s, a, addr, 0); + op_addr_ri_post(s, a, addr); return true; } @@ -5206,7 +5206,7 @@ static bool op_ldrd_ri(DisasContext *s, arg_ldst_ri *a, int rt2) do_ldrd_load(s, addr, a->rt, rt2); /* LDRD w/ base writeback is undefined if the registers overlap. */ - op_addr_ri_post(s, a, addr, 0); + op_addr_ri_post(s, a, addr); return true; } @@ -5235,7 +5235,7 @@ static bool op_strd_ri(DisasContext *s, arg_ldst_ri *a, int rt2) do_strd_store(s, addr, a->rt, rt2); - op_addr_ri_post(s, a, addr, 0); + op_addr_ri_post(s, a, addr); return true; }