From patchwork Thu Oct 11 20:51:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 148676 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp2599134lji; Thu, 11 Oct 2018 13:58:23 -0700 (PDT) X-Google-Smtp-Source: ACcGV62AqeRaOBBR5k0Yefn98ogLQC6+ViXSKmpMzOM/VM/7Ic5kD79GyGBR8sZI1pK52WmQSJzu X-Received: by 2002:a0c:819c:: with SMTP id 28mr3357846qvd.7.1539291503019; Thu, 11 Oct 2018 13:58:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539291503; cv=none; d=google.com; s=arc-20160816; b=QjGxYlKysnW0qMsBr+2JCPGrinmnf6lsfAl9AKRdNalsXS1jnczxgHIKAahaVA7Z8r yE/LUzt4rp+631ejF/SjZiBco+sY80AwxeLLLw+M4dwcJeHiCWI7aVwzpvyNo90IFRhM po9g+XEt0NDCmiaTE8gpWl3AERieLRPNEVPZr7jdQnUH/MFmsn0JSkkILByXprBB3fol CuiX0UijRRLb592GvaxdFoZBfuBHRvZk7WpfWoq2qsuTYR83KavztxJMlb5rHuviTER5 4jNDNCIHzf+OMxpz5BADXCa1SvAu34eGezx6jAiwsm6kKCcOF/4QBT0RS22pDzi6hy5G TPSw== 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:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=q276Cj00zT1iWakpZyECyDDZxS4UysE8ylkjRlgyrFE=; b=kTE6x8CyF5K8332gfDoA3CRU6K1ixDdklYfJpxB2NScNFlJ2L4BElf1NtpeSJ6NOfm Ma06cNbG1Asja1ZdhVgeerSxZniW4wYr471KAbMTzipWVmJIndZcw37Kl/8CSv83utxp 7jAmoKpaEMGK2inHKGpLQrGFv0QL7y3kDoJ42eYrDBXt0rmiAHnUbM+Hc62xJaxJK2+B +7yvYlLX7JIQtBJfahtc8gflc9mLwGSl8MT8VxpISPKQXUw0+3xrjS1xWm+LwugRgUyt /sN0MSY8oY0mfOr+qN9wpY45J63zujb2oAdkWjyG0xz/FOtdyubYl3vGk2vA2lk0SLlU BrCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="JgMd/8x1"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 4-v6si9460455qtb.309.2018.10.11.13.58.22 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 11 Oct 2018 13:58:23 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="JgMd/8x1"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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]:37095 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAi2I-00030N-5L for patch@linaro.org; Thu, 11 Oct 2018 16:58:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45127) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAhwn-0006pt-Me for qemu-devel@nongnu.org; Thu, 11 Oct 2018 16:52:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAhwl-0005vB-Dg for qemu-devel@nongnu.org; Thu, 11 Oct 2018 16:52:41 -0400 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]:47047) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gAhwl-0003KD-03 for qemu-devel@nongnu.org; Thu, 11 Oct 2018 16:52:39 -0400 Received: by mail-pf1-x441.google.com with SMTP id r64-v6so4992246pfb.13 for ; Thu, 11 Oct 2018 13:52:14 -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; bh=q276Cj00zT1iWakpZyECyDDZxS4UysE8ylkjRlgyrFE=; b=JgMd/8x1tjrHcSPrQc1JbAsB1y4PmXc2xv3RfatAVzgvR/rhv0NRXAFqZagywdTMHN xaGUkKF2r/niEJz88gYwav7LOux9R13pTWuKh2r+G5clKT0DT5E+7z4KGyDLUw2rDV0g /ANiLAU+hbY48spf0McTkHVlCItl5asfMaWxA= 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; bh=q276Cj00zT1iWakpZyECyDDZxS4UysE8ylkjRlgyrFE=; b=LLpFa1JXHVfMGEoatmXwFDnGizJFTsMcFY8cD+vZMPUcd+gHiHFoyVOudS2BTbDE1Q 4UCOh7y0jQwDe/iPNtkG51LizUOKpmtuLfCx7zBIO5g0v7s0LMVs7uA8OnV3PGtZUqIq iaI2ctlokWbM0Na5Gaf3naX2FuGXGqKxr4XRakFDDeBs69hSmjLsCZFAcAWnkygFI5+U DkCHHZZouyabKObzwHR7M/6i4wx0chchwvSv0qRs/Pmuag98NPZF2V6gfN0sxvylHM43 L2oeIygC6fdI0co33fBgd9Ny6/CvWY72Hkr0oxJd1xeOZ8BrLNTGmAz/2SFqxCQLQdzj 1mUw== X-Gm-Message-State: ABuFfogdYPumoM/fcyU0OIZquTJVGGK6HZa7h8kUhcLzTgk7AYvt3Gr8 9kVt+LwUrp5y7BT3JZs5m94eDY0lP5U= X-Received: by 2002:a63:78cc:: with SMTP id t195-v6mr2804610pgc.329.1539291133159; Thu, 11 Oct 2018 13:52:13 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-8-179.tukw.qwest.net. [97.113.8.179]) by smtp.gmail.com with ESMTPSA id h87-v6sm34707866pfj.78.2018.10.11.13.52.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 Oct 2018 13:52:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 11 Oct 2018 13:51:49 -0700 Message-Id: <20181011205206.3552-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181011205206.3552-1-richard.henderson@linaro.org> References: <20181011205206.3552-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::441 Subject: [Qemu-devel] [PATCH 03/20] target/arm: Use tcg_gen_gvec_dup_i64 for LD[1-4]R X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) -- 2.17.1 diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index ac9723c1b9..fff99ca303 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -3217,36 +3217,14 @@ static void disas_ldst_single_struct(DisasContext *s, uint32_t insn) for (xs = 0; xs < selem; xs++) { if (replicate) { /* Load and replicate to all elements */ - uint64_t mulconst; TCGv_i64 tcg_tmp = tcg_temp_new_i64(); tcg_gen_qemu_ld_i64(tcg_tmp, tcg_addr, get_mem_index(s), s->be_data + scale); - switch (scale) { - case 0: - mulconst = 0x0101010101010101ULL; - break; - case 1: - mulconst = 0x0001000100010001ULL; - break; - case 2: - mulconst = 0x0000000100000001ULL; - break; - case 3: - mulconst = 0; - break; - default: - g_assert_not_reached(); - } - if (mulconst) { - tcg_gen_muli_i64(tcg_tmp, tcg_tmp, mulconst); - } - write_vec_element(s, tcg_tmp, rt, 0, MO_64); - if (is_q) { - write_vec_element(s, tcg_tmp, rt, 1, MO_64); - } + tcg_gen_gvec_dup_i64(scale, vec_full_reg_offset(s, rt), + (is_q + 1) * 8, vec_full_reg_size(s), + tcg_tmp); tcg_temp_free_i64(tcg_tmp); - clear_vec_high(s, is_q, rt); } else { /* Load/store one element per register */ if (is_load) {