From patchwork Tue Dec 8 18:01:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 339778 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp3922421jai; Tue, 8 Dec 2020 10:23:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJw/DfDT4bDsszdygMC1LHfG9MayD8T8kKmkgqbfDE5OPXdGUC8ae8No7MYYCxjIZ9W6wda8 X-Received: by 2002:a25:5052:: with SMTP id e79mr11632799ybb.51.1607451792036; Tue, 08 Dec 2020 10:23:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607451792; cv=none; d=google.com; s=arc-20160816; b=J9MT0nOcW14U57RFcbsZ1xUYBm4KiUCKIkfFuA9uT2jvfZWTbE6xUHieyqHAB8kGCt rW2cQXHgZc756ilF+6aWxSXPXrMswy/DMzUqCk9ynN691XMfatGy8BvUx32aYTzQOOfK E4zjDtKeaKjBG3OGL6zcorZ+kyD5CE1kU6YaZI6xbSUMExa/2+sUU2ZmuL03hFn2Fa3H ID6Ig9FNtkZ1nNhgozLrMNcN441A78+PeOnZEvn6QIpCK/pQmVUUt8uHKskM4vwKF1i3 1XpclXi/be6XHjUM/eIznZa4tJUH1xqcform4SYFqNwivFpi0rVB1F+uj2nT2wZJ1avE JkJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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=6YevB6XxUr3y7N2xo8cdsW/ofLzNXY3bTUOzdECTRRM=; b=xgCauzHDPsfubC7HBcpeSp7wCOgBUNWFPgHTE/12du9edT3KNlfoWkxsNyO2Ky2Rny 8j8DxXJysdw+SJ5HclAvQajfOWvsixksS2RcBPvO4lAevrvt9Pv5w8tLCojBa0G3vRR5 WYwU18BoeeojQ0/edwTud+ymJQH8dqwYuLjXaYNba4H7+U3CMkOpmBb7kNqX09nK6NaM Zm9ZH9wQn8tM55JVnpO/Oxg5nAkHGygCMAxEurKNlonA5FnY+tzwEgVgovFhhCzzLw8v V4oD88w1Gtxh7B/+5/4Xw0hFETrS7uMinfpydXzEaCHMAO49PLnG7p+x5vXgtrXY1Pt5 5X2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="gZVBL7U/"; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p10si5733725ybl.137.2020.12.08.10.23.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 Dec 2020 10:23:12 -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="gZVBL7U/"; 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 Received: from localhost ([::1]:48614 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmhdn-0002W4-E7 for patch@linaro.org; Tue, 08 Dec 2020 13:23:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57310) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmhJM-0008Fc-JC for qemu-devel@nongnu.org; Tue, 08 Dec 2020 13:02:04 -0500 Received: from mail-ot1-x341.google.com ([2607:f8b0:4864:20::341]:41831) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kmhJK-0006Qx-Cs for qemu-devel@nongnu.org; Tue, 08 Dec 2020 13:02:04 -0500 Received: by mail-ot1-x341.google.com with SMTP id x13so9108707oto.8 for ; Tue, 08 Dec 2020 10:02:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6YevB6XxUr3y7N2xo8cdsW/ofLzNXY3bTUOzdECTRRM=; b=gZVBL7U/2m3jSDxR/JkjzdQi3og/2NIfsy0zIKm6sMqIGSNZ3gUhro9lzEVMWsDFPi uH8WvYFstBErhzmhgGkRJSm5pwhEcYgVmBCk/7KuW6NMekje6+J8nW7qoxrjOsYASve8 QR6KRCY3FT7Cuo/0xIlVaBpg5GM5ev4D/7IhagkehgChXB0xG+HbJ1NltZh2KJF6uDGX LpZg6VCqxW5ZO2ZfaqJ6clUpZzYrlg75qrMhBIyMv5OgmKBKr58Sh31um1NKCQY1tQkX eGcRXM3YnHOXgfLPwPyCkktkZC8hAGHZ0wVYYE6zuETuxvQMrNV1WYI0RWM1lqsA92r9 rr+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6YevB6XxUr3y7N2xo8cdsW/ofLzNXY3bTUOzdECTRRM=; b=C/SY4Lsi+sF0X3qrGW4xXOGYr8Ca3mOdGOHyghhqi9eZbyjCRrMhNdq/osKsNSREDc oIIGYL2PMqoQR/edtHEMsAM8c6Hfzfa1F8i6BoQKzTD40Xs1ZFZ/yZLtZowHh8AsUfm9 /gsCeJam5hFk4CheQJd/5dM4TDiYrgITMJi6zqCnC+AxOCfsxKaZ3XCef3jl6o9OiFPC wS1AbonT6Mg4EC89sRJHaroidTSJkQ7fR6LuTvQJyPmmj9QOR/4uzYKmf815/81a59zS NmYuI0yY3RqNSFnIjeDyupUCTZWGVIybPgMIL0xMxL0sn6SLSRX/7cFYBwOFJPZZt7rw R/sg== X-Gm-Message-State: AOAM531A6H+jqjfmzX0OdkPDoT0by/aLdXNRU0f/8f24lXXjGHxD2ekD tGfjXV0SbR2SCF6By2BnmhQ4qsMufIhSzpq4 X-Received: by 2002:a05:6830:1253:: with SMTP id s19mr4193933otp.270.1607450520661; Tue, 08 Dec 2020 10:02:00 -0800 (PST) Received: from localhost.localdomain (fixed-187-189-51-144.totalplay.net. [187.189.51.144]) by smtp.gmail.com with ESMTPSA id k20sm3886805oig.35.2020.12.08.10.01.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Dec 2020 10:02:00 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 22/24] target/arm: Enforce alignment for aa64 vector LDn/STn (single) Date: Tue, 8 Dec 2020 12:01:16 -0600 Message-Id: <20201208180118.157911-23-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201208180118.157911-1-richard.henderson@linaro.org> References: <20201208180118.157911-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::341; envelope-from=richard.henderson@linaro.org; helo=mail-ot1-x341.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 93065242cc..57042b8bb7 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -3786,6 +3786,7 @@ static void disas_ldst_single_struct(DisasContext *s, uint32_t insn) int index = is_q << 3 | S << 2 | size; int xs, total; TCGv_i64 clean_addr, tcg_rn, tcg_ebytes; + MemOp mop; if (extract32(insn, 31, 1)) { unallocated_encoding(s); @@ -3847,6 +3848,7 @@ static void disas_ldst_single_struct(DisasContext *s, uint32_t insn) clean_addr = gen_mte_checkN(s, tcg_rn, !is_load, is_postidx || rn != 31, scale, total); + mop = finalize_memop(s, scale); tcg_ebytes = tcg_const_i64(1 << scale); for (xs = 0; xs < selem; xs++) { @@ -3854,8 +3856,7 @@ static void disas_ldst_single_struct(DisasContext *s, uint32_t insn) /* Load and replicate to all elements */ TCGv_i64 tcg_tmp = tcg_temp_new_i64(); - tcg_gen_qemu_ld_i64(tcg_tmp, clean_addr, - get_mem_index(s), s->be_data + scale); + tcg_gen_qemu_ld_i64(tcg_tmp, clean_addr, get_mem_index(s), mop); tcg_gen_gvec_dup_i64(scale, vec_full_reg_offset(s, rt), (is_q + 1) * 8, vec_full_reg_size(s), tcg_tmp); @@ -3863,9 +3864,9 @@ static void disas_ldst_single_struct(DisasContext *s, uint32_t insn) } else { /* Load/store one element per register */ if (is_load) { - do_vec_ld(s, rt, index, clean_addr, scale | s->be_data); + do_vec_ld(s, rt, index, clean_addr, mop); } else { - do_vec_st(s, rt, index, clean_addr, scale | s->be_data); + do_vec_st(s, rt, index, clean_addr, mop); } } tcg_gen_add_i64(clean_addr, clean_addr, tcg_ebytes);