From patchwork Mon Jan 11 19:01:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 360589 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp2773973ejs; Mon, 11 Jan 2021 11:42:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJwkzrqrRLUWapcuNOoNM0nj5H37WUQgipDbZsraIiy0wn3OfPF9di8f8k05zhVTmgFkdve1 X-Received: by 2002:a25:5844:: with SMTP id m65mr1955859ybb.452.1610394125614; Mon, 11 Jan 2021 11:42:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610394125; cv=none; d=google.com; s=arc-20160816; b=sPtU4kOKCb0xcmhOLJ/BesrOVpzgRklQdS0GKa1rubtcbl6MGm2QparWWeSuzpYLEh rFS9SUVyYEups2ohRXbEIgRsy8LjRIQW8X54sULF0CmVoGg+TSHSq2qpr1faZ5dyxyXA FlAEvR3wzp07Oa3OB+Pwq2aC0N0WBFeC+phFIOWspNfqyHdPethEwDvgIZWCTKVZrbXz jukun0Cw4Cx9YnhmuHTagO9/QX0pgLNsyR1c0enQ9hk+DSugGKcJTzuNH25FRe1V7LyV PEivoUSg6LagMRFZPIu49T5yg134vZYyTYuxD7+X2HjcuFb/Z5ETimTtqgbtJ180OKAC 2qAQ== 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=6T/o1lhn6aSUmH+RBGXbRyAbXaPSiwSZ8/GJte4+zxA=; b=dU3Zq6ZozTbaSuNf869m/iYfG3NPPIVcods0dUTr99vPM4DLLTCMZbGIm3S+6p3zOL d1eKcocOfjvlmnlU105w91AGp1jk4VITKdwEq6MtUveiEqodSfdpKEEII42VGkVmeh41 Nv2kXztjm2IjuS6qFWfFTtQwx72BMLQHX/dU9P77mwbUd9rdGaPhjngtTfSpJhC7qj+x KW5q9T0C4TRDRjC+ZyKtiHVYwTCPP0n+7V5KLMqeXToJpSESoxjqaEWI1piL80Jd0L5H e57fOzMUIbCrQRIzGyjYtduThUVlRq54UKGvZBBHiR0KRIbdRYVo4aZ2mzuk1vGvMAfE rSWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=veqUcAfE; 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 8si691833ybo.110.2021.01.11.11.42.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Jan 2021 11:42:05 -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=veqUcAfE; 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]:52038 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kz34n-0001wf-2f for patch@linaro.org; Mon, 11 Jan 2021 14:42:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kz2SF-0006Tz-Ki for qemu-devel@nongnu.org; Mon, 11 Jan 2021 14:02:16 -0500 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]:40064) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kz2S8-0006YY-T9 for qemu-devel@nongnu.org; Mon, 11 Jan 2021 14:02:15 -0500 Received: by mail-pl1-x629.google.com with SMTP id q4so334179plr.7 for ; Mon, 11 Jan 2021 11:02:08 -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=6T/o1lhn6aSUmH+RBGXbRyAbXaPSiwSZ8/GJte4+zxA=; b=veqUcAfEKkOdgtGBmuxzfqqRywgKTkPGA58D/I4uIREHkWRTNhXWIbQdVsaYk7Weso BTI5skZEBoGn6csTSbu4mPIDOoODq5MlKNpz+HNSh+aZWXcGXHjK86pCUXTyILN2dVoG d854M+WbOVXI0QIoeJi+9ns8uFNrH1akYRqTKX32cY+N0g9h4QuHwecHT7iOpn7ulc70 hUrcdVm3m44YH0yK+FYUVwmHcKuk4LcEfxQbsf1TPhbxPqEguzwBTXGC7FWzyt/6YEAs MBiQPYY+G367ZDMGeosMICT/xKDIwv+4sOfUK9trWKHspzcCLoSnGTmdiQWcC5acCUzd 06OA== 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=6T/o1lhn6aSUmH+RBGXbRyAbXaPSiwSZ8/GJte4+zxA=; b=b/P8CQC0isOB/lTBtqQCQfq0lI5R3Omg5JcrLJaovvn28kJgL6INCXZ9KNhqecg4d7 NGcxK6AEKAHDNIzJgPHKZGCuOP9vQctf6lTpopvEy5ASL3DPy3b/7j+P7tbXMhhOcKhG 6HNfYh3NFmzglzLp/YFPvzWfiWWzPNUOkGkMVSpwMX2NMluXnNJJMjQpPHOdY62NI/uH yW3lRpbAP6i7aLEMNL7LcYMOKPTZi9YksbKJ5yS7SZfPblTLuZOeiTXO0or/UooXhyVm OCae/VFQXTiNvaRsWwdPr2urO7fVPQAWAtHbI8/2VkyZmtNE3fjTRmGzP6JhuWXElTXQ 9Nmw== X-Gm-Message-State: AOAM530WkzzQ5IwwcEGpo/YUiV4M11hhSHzQEX6RmHVe2kAHwrJ0GfSt 1kdeJEx7jupp9Nl3wtkOAmOjJi6BsXiTZQ== X-Received: by 2002:a17:90a:e64e:: with SMTP id ep14mr279189pjb.5.1610391727352; Mon, 11 Jan 2021 11:02:07 -0800 (PST) Received: from localhost.localdomain (rrcs-173-197-107-21.west.biz.rr.com. [173.197.107.21]) by smtp.gmail.com with ESMTPSA id n195sm350395pfd.169.2021.01.11.11.02.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 11:02:06 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 29/30] target/arm: Enforce alignment for aa64 vector LDn/STn (single) Date: Mon, 11 Jan 2021 09:01:12 -1000 Message-Id: <20210111190113.303726-30-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210111190113.303726-1-richard.henderson@linaro.org> References: <20210111190113.303726-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.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" 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 7765c15e0c..ec8e488b11 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);