From patchwork Fri Apr 16 18:59: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: 422588 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp661893jaf; Fri, 16 Apr 2021 12:25:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzurWqqqF0dycJBd4uQEfcctEmcj6hJc2klFNd0cQhwsCtMynNWpRJADUO9QkUP3mjPGZzR X-Received: by 2002:a6b:8bd3:: with SMTP id n202mr4580947iod.57.1618601102101; Fri, 16 Apr 2021 12:25:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618601102; cv=none; d=google.com; s=arc-20160816; b=N+lAPp7qZ0kC3vpWdF4VD/J1WvkjnKMzTFXcIXAanrAEhywe6ob47+70wph13KmyL+ kpYgUnu96wJpmZ0igERq4jMo1z5kAp0pQSIQ0SJt4O1bHqwWS32uaQ4rwPCTuIBguC4V c45GRgdMhrYCKuln3/qEgZ+nHF+eNZ1JY7xIlfs7KchzRP+qFoH4e3ijwWfxEa6Vb/uh 1BAdgxl2oycFR7o7OGHfembAzhwbZ8iBPrrrX26VJWmmTaLoJ2SMjsmSKw3qZjpLoqMz W8gOgF8dkEBASGlrgxELocuBeWGfPP/YHgDbtQOgayb3p1RfXiKeSdkGwtTvU4FUGuaU snuQ== 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=aHJm4yhflwYT0zFdnhDkesD7hVJG4+2l6Mj+AHEyIq8=; b=P5O3v+d2VJWM2dGa8AqKR2m2DUdv6U63jmiFwsUckQhtpZNiUcPW93WpnkzkHEfvbh cESUE/vrpy1i1JLUTTMtdpBmkQu7+HYcoCByimfu3C5NwAQeuumAJ0fkGXmdGOvAbN0/ As509fkTIN4q5V+RcbERlrcHhaP0TVnFTuUXcg7sJzaQdUXFPDbE+iUDZP0WbRoQhz5P UbRIlqei8iKeOCL7g1IUypX2/VnILdGQXkGzETDSzrjpIaXCP2AqxdA/46EtGhczv2Gs +X3OV/4cvNaOOqok1HPVq2bxzR3ENoTJw1dbub9I6qRIuz1JWDmJIipP8B6XYOyKYjCG JhYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=nHrXZFf1; 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 r1si3308530ilj.50.2021.04.16.12.25.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Apr 2021 12:25:02 -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=nHrXZFf1; 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]:56778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXU5N-0003zH-Jy for patch@linaro.org; Fri, 16 Apr 2021 15:25:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50758) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXTiF-00047v-OG for qemu-devel@nongnu.org; Fri, 16 Apr 2021 15:01:07 -0400 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:39750) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lXThc-0004Tk-Th for qemu-devel@nongnu.org; Fri, 16 Apr 2021 15:01:07 -0400 Received: by mail-pj1-x102d.google.com with SMTP id ot17-20020a17090b3b51b0290109c9ac3c34so16896732pjb.4 for ; Fri, 16 Apr 2021 12:00:28 -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=aHJm4yhflwYT0zFdnhDkesD7hVJG4+2l6Mj+AHEyIq8=; b=nHrXZFf1gghtBb9qtMWpo63WL8owrcPR5+vouErtFy9wQMzWy77IrXrwuWlT3YnErg 95VOFeQBa0wVZT+b4SiUxp9+x3seqP1jOcLggxHSCDpYUGjuc0oc94qDvZmVKsYvXBXi qyDKfQ2+mpTi2vyb/b9dvJExQaH3LOjHDtunlnn4dbdaR6L90GQ9eEkoJ2H55NbTWmpb CvguinCNcSlFwdZweuU76WLU0UfF60D+KZ0csHtBIA5Lc+x3zJUKXDGQhfSAWDMQgY/6 vMcCujie7cK9OjynbhVIssT+1N8uB7v8r7PBORANy+8EwVR/PzfMMoG/AHq5J0us/Kvr ahiA== 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=aHJm4yhflwYT0zFdnhDkesD7hVJG4+2l6Mj+AHEyIq8=; b=IOv78nLYzmLqkDkaUzS31Ry9zm6wSgEfO+ZDyOsIZRdw9KuRhhMvH8dZtfKC1Riaqs 9t+r1pvtXBG0Ly/lngT5f6n9dcyC0bC0mIMwSun6OJc4/lVl4oE9qhp7d0yowBLlviE/ tQgHv2dmGvWYHekpH4TXeFpxBNS3u7BMcn4Olb/pvCc2EawfrrbH6VWpvQyc82uDDWnm pQsDuqQhS7paaisogMUfKmI7djHLhrt6Qsczr/4MnOqOkI9C2vWPykTw/xo9XrsnaEQI WaywHPLohVXmAhLW8Tav9pY5WX0Wb8Tc7SMRbgxWSzrbSmC4vqZDDJ1HNylW/OkXaLwH y58w== X-Gm-Message-State: AOAM530iholGkewew5WdEmwUqGAZfEhx6fkV6/0kO52gXMUa6lA3IEmq DtqQHj5md9m8mO4njBz4ZP/5axorFOJtPQ== X-Received: by 2002:a17:90a:4381:: with SMTP id r1mr11700641pjg.214.1618599627423; Fri, 16 Apr 2021 12:00:27 -0700 (PDT) Received: from localhost.localdomain ([71.212.131.83]) by smtp.gmail.com with ESMTPSA id d7sm1988337pfv.197.2021.04.16.12.00.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Apr 2021 12:00:27 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 27/30] target/arm: Use MemOp for size + endian in aa64 vector ld/st Date: Fri, 16 Apr 2021 11:59:56 -0700 Message-Id: <20210416185959.1520974-28-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::102d; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102d.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 | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) -- 2.25.1 diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index ac60dcf760..d3bda16ecd 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -1146,24 +1146,24 @@ static void write_vec_element_i32(DisasContext *s, TCGv_i32 tcg_src, /* Store from vector register to memory */ static void do_vec_st(DisasContext *s, int srcidx, int element, - TCGv_i64 tcg_addr, int size, MemOp endian) + TCGv_i64 tcg_addr, MemOp mop) { TCGv_i64 tcg_tmp = tcg_temp_new_i64(); - read_vec_element(s, tcg_tmp, srcidx, element, size); - tcg_gen_qemu_st_i64(tcg_tmp, tcg_addr, get_mem_index(s), endian | size); + read_vec_element(s, tcg_tmp, srcidx, element, mop & MO_SIZE); + tcg_gen_qemu_st_i64(tcg_tmp, tcg_addr, get_mem_index(s), mop); tcg_temp_free_i64(tcg_tmp); } /* Load from memory to vector register */ static void do_vec_ld(DisasContext *s, int destidx, int element, - TCGv_i64 tcg_addr, int size, MemOp endian) + TCGv_i64 tcg_addr, MemOp mop) { TCGv_i64 tcg_tmp = tcg_temp_new_i64(); - tcg_gen_qemu_ld_i64(tcg_tmp, tcg_addr, get_mem_index(s), endian | size); - write_vec_element(s, tcg_tmp, destidx, element, size); + tcg_gen_qemu_ld_i64(tcg_tmp, tcg_addr, get_mem_index(s), mop); + write_vec_element(s, tcg_tmp, destidx, element, mop & MO_SIZE); tcg_temp_free_i64(tcg_tmp); } @@ -3734,9 +3734,9 @@ static void disas_ldst_multiple_struct(DisasContext *s, uint32_t insn) for (xs = 0; xs < selem; xs++) { int tt = (rt + r + xs) % 32; if (is_store) { - do_vec_st(s, tt, e, clean_addr, size, endian); + do_vec_st(s, tt, e, clean_addr, size | endian); } else { - do_vec_ld(s, tt, e, clean_addr, size, endian); + do_vec_ld(s, tt, e, clean_addr, size | endian); } tcg_gen_add_i64(clean_addr, clean_addr, tcg_ebytes); } @@ -3885,9 +3885,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, scale | s->be_data); } else { - do_vec_st(s, rt, index, clean_addr, scale, s->be_data); + do_vec_st(s, rt, index, clean_addr, scale | s->be_data); } } tcg_gen_add_i64(clean_addr, clean_addr, tcg_ebytes);