From patchwork Fri Apr 16 18:59:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 422586 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp659943jaf; Fri, 16 Apr 2021 12:21:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDb4NirkM9bqMLlibJwKRuqKsQUNe+B5varY3bcyqujnfFfND9ZGRJGpuUmMivrDW0W6ur X-Received: by 2002:a6b:e814:: with SMTP id f20mr4771590ioh.206.1618600898502; Fri, 16 Apr 2021 12:21:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618600898; cv=none; d=google.com; s=arc-20160816; b=TBcApObSoOp+mzDdBW3eDsenyIM0vvuEw6BTRigBtdCsciYtluHSBB9tEwGeB0kMyo MURu/ngbrxX5E1wlAPio44VB59lULztm/USmjAy7CJ85YOQnmBH1LcJw67W3Qe4fsblu OLKmOPaeT/4YhZ/oAVa/fahICBXPzD/K+86383xT3BDSIqxY/FPJFIlTaMumK2yTI7pE H1lAvSPx2wEker7PiYUVMp0+oWQ+owc5scERMXOldQ2xgzZH+svK4ghhMwyQI5QgOBkD P7VnKHBsvqCYbKFXuEb397P9JRBLQJ1ugpGdqWUKwpTyZwJIan32kqZh5ptKALRHxjIP BKTA== 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=zsvdYXq6ehB6Yi/U879OLLmvPBBL5YJ5lhH9C+FI0w0=; b=dLOvFL1ETGtfoP4uqmiAAyz9Z0NyW2PSh9wNM0qmMZN49MCrEFRpzFew/vO0E0RnHi +sxFv+4G+mZ/38b3AF4KqDkDRsNICc6aXASLZDvvWIugPwYs0zYxsg68ol/XDn0UAy3m yWVigkDEAHySb6FtjHeBTQPGrUbZicQMi/G/7kj/jctAsqZzLcLCSx+u0jObPCm6Nke9 VgeHRiltnNPkVpyhXPeKj/vw9N/pZftxQ7TjOklSutj+WJhkj4FEAKIWuIO618WXWcT3 5FM9870bPlv02ixb0p3b1D8U+wCoWM4ycdDOiqGa+OihorokeWf0mEo/u7S0LArhzROx VN8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="HCKE/RTu"; 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 v9si7890583ilu.68.2021.04.16.12.21.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Apr 2021 12:21:38 -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=fail header.i=@linaro.org header.s=google header.b="HCKE/RTu"; 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]:44102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXU25-00078W-Hg for patch@linaro.org; Fri, 16 Apr 2021 15:21:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXTiD-00046x-K6 for qemu-devel@nongnu.org; Fri, 16 Apr 2021 15:01:05 -0400 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]:37501) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lXThf-0004VK-21 for qemu-devel@nongnu.org; Fri, 16 Apr 2021 15:01:05 -0400 Received: by mail-pg1-x532.google.com with SMTP id p2so4355076pgh.4 for ; Fri, 16 Apr 2021 12:00:30 -0700 (PDT) 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=zsvdYXq6ehB6Yi/U879OLLmvPBBL5YJ5lhH9C+FI0w0=; b=HCKE/RTuzwdMoopodiWGlcV8Lg6/4kqC1kjNOZUBCv8qF8BO9rrGeSx4+F12t2epvN UiogMdj92B8uWMzXd9fOhPtnGLHZ4LWjrU2FL2D/C2LZGGmwhSlVn6gFNsdV85CydOfc 5LQMmRCrT3g5+REKRVrn5xi2B1bKRMTcoT047+6uGrZAHlP/fcyVT30Qjlj0Cvj6Bssa Zrk76TWWNUXZRZdySZkaGs8KnMJXqlbD4TKq1I/ICdiwQCrAo+ZbZj+QESsHuMBbqOZh sCHQRt3gSaAs5SsJ6sSaUOx096/abAfOA60ON2fVqbb59QSe3x4T9iX6H7zRhpHsR21p yzIQ== 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=zsvdYXq6ehB6Yi/U879OLLmvPBBL5YJ5lhH9C+FI0w0=; b=SkWuF3GrBXx4HUWv4CmdWGyrpBpy1x+hUVJDK4dpijkdWdoL1R/NsCrhKB9NGWITCK 7NKejx74Q8CKzkszObwrB4atb8f7dClylMOO0Cc6goNprw5sAjkjIrbBMPS2J8JyCU// VhEdI/Eb6Kp/d5iyvoMU+A8yLP1Kh2d3pztQKWTMswYfIJG6RXBaH8gMB830EZ+Oi0wF fiT1SVYb5lPvXU4skW0SCVJEl7X2X5A+FACZvWQw2pFfa/HwEhidkaCYP47tP+VpRgTP 9iuQC44D6GIgkHNiT2tHi9cohzZ2qRhH+bS/+X+sGbMNfWWz/bWr06ECpyzyhjv7zAqQ 9hGA== X-Gm-Message-State: AOAM532BBTjcMVhYXTmlIuotpJj1TQyn9E51VbgRsW7ZysB/d9UcjYWv M+O3n4mT/OCDFtjCZAedXhRf1fvD/w1R+A== X-Received: by 2002:a63:5004:: with SMTP id e4mr466189pgb.61.1618599629297; Fri, 16 Apr 2021 12:00:29 -0700 (PDT) Received: from localhost.localdomain ([71.212.131.83]) by smtp.gmail.com with ESMTPSA id d7sm1988337pfv.197.2021.04.16.12.00.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Apr 2021 12:00:28 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 29/30] target/arm: Enforce alignment for aa64 vector LDn/STn (single) Date: Fri, 16 Apr 2021 11:59:58 -0700 Message-Id: <20210416185959.1520974-30-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210416185959.1520974-1-richard.henderson@linaro.org> References: <20210416185959.1520974-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::532; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x532.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 , qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) -- 2.25.1 diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 2a82dbbd6d..95897e63af 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -3815,6 +3815,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); @@ -3876,6 +3877,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, total); + mop = finalize_memop(s, scale); tcg_ebytes = tcg_const_i64(1 << scale); for (xs = 0; xs < selem; xs++) { @@ -3883,8 +3885,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); @@ -3892,9 +3893,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);