From nobody Tue Oct 28 02:06:23 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516074849875329.33514395844225; Mon, 15 Jan 2018 19:54:09 -0800 (PST) Received: from localhost ([::1]:59422 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebIK8-0004Es-VA for importer@patchew.org; Mon, 15 Jan 2018 22:54:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebI1m-0005a0-8J for qemu-devel@nongnu.org; Mon, 15 Jan 2018 22:35:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebI1l-0003Tr-G9 for qemu-devel@nongnu.org; Mon, 15 Jan 2018 22:35:10 -0500 Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]:38285) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ebI1l-0003TM-A3 for qemu-devel@nongnu.org; Mon, 15 Jan 2018 22:35:09 -0500 Received: by mail-pg0-x244.google.com with SMTP id y27so2834775pgc.5 for ; Mon, 15 Jan 2018 19:35:09 -0800 (PST) Received: from cloudburst.twiddle.net.com (24-181-135-57.dhcp.knwc.wa.charter.com. [24.181.135.57]) by smtp.gmail.com with ESMTPSA id c83sm1281024pfk.8.2018.01.15.19.35.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Jan 2018 19:35:07 -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; bh=7JeGEyJk3nvjPxacG2wgQtB6Jf/c44XFTKdgknI54YI=; b=K4cKNPI51r+7F+mDYEFwiQ5MnCVYuy0ULzxvn7RYHso3did9ZZGsa6LjvXC++MLKlb 4jYwsUQerPT8ZdDhHUyPkMPw+20MYnqKHWlg4JELe72fqYvjwqs3wCfJP567nTtWZ/Uj uKsZh6sKQ6N8jIazZYP0oUpA7PpNrofzGahIs= 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=7JeGEyJk3nvjPxacG2wgQtB6Jf/c44XFTKdgknI54YI=; b=iF4Yb2ZFs2ko22fmpz2bsLgRbQ5IBdfGUQ3i8B07LjWi5SSj00aYaxe69P0MC8F7Qv eH/ab9WB73mDjW/eBpxF395p3FToSd9LrHorGQBBpPIefOcmqNdy10zpui1zj1dE04mW fOI76dlaJHtLo3p6Y717ngxqMJxqCyZCVU1+cZ33XsoeH6jYt90leYuNQQ7f/4qpoPVW FuWEOyNeLpIwZMepVC8Ekcv2kGDYhQk5DeuZeQntGvYJexao5nY+umqkZBdYVb5im3KB 0Nj3DLN2PvorwHAR3UzKH8npaKq6+62hnW1MJMHKzag8MmC6uZJsIHA0Dcd9ofO66C98 vXiQ== X-Gm-Message-State: AKGB3mJcrO3rQL1LfbjHpyAPYljjBBi83KMDImrcqBXVukOAPymOeboN WckZjpU1SvgVnkmZlCdSo9AvBEnyl/s= X-Google-Smtp-Source: ACJfBouWJSRuLPmbqUjzl/v6q1wInKE5lU8yfdIbqlm9CSu80/op1Sej23bdNTWtzpt6ghZEgzFxBQ== X-Received: by 10.98.103.83 with SMTP id b80mr23721455pfc.223.1516073708061; Mon, 15 Jan 2018 19:35:08 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 15 Jan 2018 19:34:02 -0800 Message-Id: <20180116033404.31532-25-richard.henderson@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180116033404.31532-1-richard.henderson@linaro.org> References: <20180116033404.31532-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::244 Subject: [Qemu-devel] [PATCH v9 24/26] target/arm: Use vector infrastructure for aa64 orr/bic immediate 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 4f15e58556..5963eedd41 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -6078,7 +6078,6 @@ static void disas_simd_mod_imm(DisasContext *s, uint3= 2_t insn) bool is_neg =3D extract32(insn, 29, 1); bool is_q =3D extract32(insn, 30, 1); uint64_t imm =3D 0; - int i; =20 if (o2 !=3D 0 || ((cmode =3D=3D 0xf) && is_neg && !is_q)) { unallocated_encoding(s); @@ -6164,28 +6163,25 @@ static void disas_simd_mod_imm(DisasContext *s, uin= t32_t insn) tcg_gen_gvec_dup64i(vec_full_reg_offset(s, rd), is_q ? 16 : 8, vec_full_reg_size(s), imm); } else { + /* ORR or BIC, with BIC negation to AND handled above. */ + static const GVecGen2s ops[2] =3D { + { .fni8 =3D tcg_gen_or_i64, + .fniv =3D tcg_gen_or_vec, + .opc =3D INDEX_op_or_vec, + .vece =3D MO_64, + .prefer_i64 =3D TCG_TARGET_REG_BITS =3D=3D 64 }, + { .fni8 =3D tcg_gen_and_i64, + .fniv =3D tcg_gen_and_vec, + .opc =3D INDEX_op_and_vec, + .vece =3D MO_64, + .prefer_i64 =3D TCG_TARGET_REG_BITS =3D=3D 64 } + }; TCGv_i64 tcg_imm =3D tcg_const_i64(imm); - TCGv_i64 tcg_rd =3D new_tmp_a64(s); - - for (i =3D 0; i < 2; i++) { - int foffs =3D vec_reg_offset(s, rd, i, MO_64); - - if (i =3D=3D 1 && !is_q) { - /* non-quad ops clear high half of vector */ - tcg_gen_movi_i64(tcg_rd, 0); - } else { - tcg_gen_ld_i64(tcg_rd, cpu_env, foffs); - if (is_neg) { - /* AND (BIC) */ - tcg_gen_and_i64(tcg_rd, tcg_rd, tcg_imm); - } else { - /* ORR */ - tcg_gen_or_i64(tcg_rd, tcg_rd, tcg_imm); - } - } - tcg_gen_st_i64(tcg_rd, cpu_env, foffs); - } =20 + tcg_gen_gvec_2s(vec_full_reg_offset(s, rd), + vec_full_reg_offset(s, rd), + is_q ? 16 : 8, vec_full_reg_size(s), + tcg_imm, &ops[is_neg]); tcg_temp_free_i64(tcg_imm); } } --=20 2.14.3