From patchwork Mon Apr 19 20:22:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 424059 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp3066405jaf; Mon, 19 Apr 2021 14:19:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+L1jsQi+odHzBv0oAzmFvYWsBl0TrvqpGtAARhYnUW3Xe0ySpl9CYLHmF7ZCUyQWlXy1e X-Received: by 2002:a92:360f:: with SMTP id d15mr20579612ila.31.1618867140606; Mon, 19 Apr 2021 14:19:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618867140; cv=none; d=google.com; s=arc-20160816; b=i3oFp21p4EtoONO12EFjOiQo3zq4Qu3oRLSewH08W955rkIAVE4LapLLOYhUuF8IdA U0aWdmGTj/Q2AwdXGG/zgQAOxfvmdotBSxtmxVtNr2JL4wNgS3Qe4bOe90G9TSsRTmzD CmbPnKJyAc0e3QOAMWnOwIIMLZcXLPc+6MlgCNVvmdWemq4pmzFoaw1h+j1OmNXilYB0 J5M63Skj/+fMftHpVXZ8jrk/QArgAr14M2CB1vP6OUO70gmbCvJb6tjqZriluaibkv88 kxPQD/hhYhIyIjlY3xl/YCetuxRVCdiA9YEZn9orO384soBpnX2ef0sxF80ZnrWCZIBR fTRA== 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=DfVlOrhtkYci9Sbw02/gjqT12FPW0wsp3h8/kWyx0V1JVgL/FAmsucwmkNBsxVQMaP 69M4O2UTPB9HovwNc5snMRy8tdtUo+84R33BRJQoxujgaZYCagpkx2BbZwUO3Uyw8x0n A+tRV9z/1L4Cwu4U5cQecd6mFnSetQRRv/RDNWxsJNsnhJzyG4wipiJaLP+BOJabxDaJ ipimV97yVVnAR3TdW9WGsUknkfWLQJReYMlTIOfHe7NeR/BW9yJsDs0fL6iDok0+kKBI hRbEIY3TVGLPDmz9xzg2zdwxTXuv2Lutp3v0x/KMX8WjWYTahxYsH2bYkshpDbrOdwFl 3Wuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=VgSQCETw; 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 c18si17477464ioo.20.2021.04.19.14.19.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 14:19:00 -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=VgSQCETw; 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]:43046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYbIK-0003pa-3e for patch@linaro.org; Mon, 19 Apr 2021 17:19:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34452) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYaR2-00088f-Ck for qemu-devel@nongnu.org; Mon, 19 Apr 2021 16:23:56 -0400 Received: from mail-qk1-x72d.google.com ([2607:f8b0:4864:20::72d]:35374) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYaR0-0002pI-MP for qemu-devel@nongnu.org; Mon, 19 Apr 2021 16:23:56 -0400 Received: by mail-qk1-x72d.google.com with SMTP id h13so18508849qka.2 for ; Mon, 19 Apr 2021 13:23:54 -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=VgSQCETwH1hPhJrsiqoBUf834UQ4mGnh3h8me3d+Y3CM/3XekpbRiX2i3/QBHENlAN NVXKjpRO/SBpEFFk/2e+sUji0hbNnWwM649Rig7oqXURNW5EhYOXUSCywWDpsarQFsyJ /Dxs5cLw3NG+hWY+W/Jc+7LY0xlLFIm35DeMh4CoiBKysRCGk8PFF5LRx8zCSR3URSpb tFu+mT3bSnmRKpG7rPzG4tLYFFhPlb7AsS/SMI6FairLFhueHC3S95yrlQ+jR4HoXiJ7 tV8G3FPAtWeSsfVRWy8Gxhf1y+HnZ0s0jnjk4KavLwDW5sqrei5GH+0J7KklnxsZ2gLV kMzQ== 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=Rpjb3kcvgQ4ox1cHn+yt+Xb8XYNcyW0bQQXSw+XbSlk4jABhlhIdGsFnbqZ+8bbTNe UDyuMNUmxb7uuITXuPzXUnxC41HE30wEP4j8DpFe+QZbpauNZt3Y0v4oDmJpu6S/AQ4x jmJXvuMHKNstmWHzBjh0MrJGyd3sQxEsaPK6NF9Zilus6a/2ng5/QAiJw2Z8+UKiQY6W 5SvcL9ijFT6GEccbeAN5BLgVPOoFPACjMq2+/gU8rJwr5T7wp0h6CHTzDhWioxehf+SR FHSLsQhxMekV/fg8ui73m8LyhfOW7uIO8EUsBYMNuN4N0T9fwl09SI7Iyx30VBf49F0j OK8Q== X-Gm-Message-State: AOAM530RVzEe/2nUfn/WKQUnozOrlhv3lb4PBmXwnU3LnK7aEiicUK4/ 8lShmL+tuUvrnazg958T/sLNd9stdwA63y8U X-Received: by 2002:a37:9607:: with SMTP id y7mr14026801qkd.25.1618863833808; Mon, 19 Apr 2021 13:23:53 -0700 (PDT) Received: from localhost.localdomain ([2607:fb90:80c7:aba4:3594:91a:8889:c77a]) by smtp.gmail.com with ESMTPSA id c23sm10007835qtm.46.2021.04.19.13.23.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 13:23:53 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v5 30/31] target/arm: Enforce alignment for aa64 vector LDn/STn (single) Date: Mon, 19 Apr 2021 13:22:56 -0700 Message-Id: <20210419202257.161730-31-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210419202257.161730-1-richard.henderson@linaro.org> References: <20210419202257.161730-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::72d; envelope-from=richard.henderson@linaro.org; helo=mail-qk1-x72d.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.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);