From nobody Fri Dec 19 19:14:33 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 1500563665872365.84561393485035; Thu, 20 Jul 2017 08:14:25 -0700 (PDT) Received: from localhost ([::1]:38513 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYD9g-0004V5-2y for importer@patchew.org; Thu, 20 Jul 2017 11:14:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYD80-00035g-8j for qemu-devel@nongnu.org; Thu, 20 Jul 2017 11:12:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dYD7z-0004GN-3L for qemu-devel@nongnu.org; Thu, 20 Jul 2017 11:12:36 -0400 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:38157) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dYD7y-0004G9-Sh for qemu-devel@nongnu.org; Thu, 20 Jul 2017 11:12:35 -0400 Received: by mail-wm0-x22d.google.com with SMTP id w191so29897530wmw.1 for ; Thu, 20 Jul 2017 08:12:34 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id m26sm9942496wrm.4.2017.07.20.08.12.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Jul 2017 08:12:32 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 83E753E0AE9; Thu, 20 Jul 2017 16:04:33 +0100 (BST) 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=GGReV7WsbOnKhO/ks/Cg2OqfJUQfnRwp8A2tZZ6nIBE=; b=QWraHjBRXVJRDyjyU5awlCGTMP51aokGzESIZDIsxPgO1uPubjuRqJTGXQxWVOQEc8 iU1+CIDQO5blDls2jXg1kklyFQbafpUDmmt7j/p13QGvWRnVbqELaIb4xjGgIaEGpHlz m3gydc2vdzVB3FtDsgcZF1fI0po+qmM5eQUNY= 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=GGReV7WsbOnKhO/ks/Cg2OqfJUQfnRwp8A2tZZ6nIBE=; b=jX4kBceIxB2ax2EQiKFLyyCZ/84ouQEsCETZ8CQ70RqFzC2bNyMYF+CBIsnkbklk+4 +33qmNlyPwY2zxPUReqbH0rXS6jWaiXFi8yiYfboso5duw9YCnCB/zQvqDHsxJsynMT7 yPyi7+ukPoMwJTvuFGjgd6C1d4O9YpdW9kUrWeb+D8jO2zozwj8YB/DmEeg0LFC9jMtg 0nNZeCMBE07E433AIkxA1yIOqm+mv7YJKaf+SB8iy0Lx+SudkUjVfxeUgr7uOnbIAd6a ZGzvWRu6EbF9y7v2AsM5vkzpceP6m9rTYBNQRehnzLlaVzovL9fAdowryJiMlBclP4ms tmWA== X-Gm-Message-State: AIVw111lxLwP9yyyrFzvtg3xmukquZA6hns4LAab5vgneMLp4UbB8S2q Qp5v/osr64FndYUPzR1heA== X-Received: by 10.28.139.204 with SMTP id n195mr2568120wmd.14.1500563553765; Thu, 20 Jul 2017 08:12:33 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Thu, 20 Jul 2017 16:04:18 +0100 Message-Id: <20170720150426.12393-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170720150426.12393-1-alex.bennee@linaro.org> References: <20170720150426.12393-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22d Subject: [Qemu-devel] [RFC PATCH for 2.11 15/23] target/arm/translate-a64.c: AdvSIMD scalar 2 register misc decode 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: qemu-arm@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org, rth@twiddle.net 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 This is the initial decode skeleton for the Advanced SIMD scalar two register miscellaneous FP16 instruction group. The fprintfs are to aid debugging as the additional instructions are added. They will be removed once the group is complete. Signed-off-by: Alex Benn=C3=A9e --- target/arm/translate-a64.c | 60 ++++++++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 60 insertions(+) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index a8876e4bcc..c3f6080ce4 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -10582,6 +10582,65 @@ static void disas_simd_two_reg_misc(DisasContext *= s, uint32_t insn) } } =20 +/* ARMv8.2 AdvSIMD two reg misc half-precision + * + * 31 30 29 28 24 23 17 16 12 11 10 9 5 4 = 0 + * +---+---+---+-----------+---+---------------+--------+-----+------+----= --+ + * | 0 | Q | U | 0 1 1 1 0 | a | 1 1 1 0 0 0 0 | opcode | 1 0 | Rn | Rd= | + * +---+---+---+-----------+---+---------------+--------+-----+------+----= --+ + * + * This includes conversion functions and compare against zero + */ +static void disas_simd_two_reg_misc_fp16(DisasContext *s, uint32_t insn) +{ + int opcode =3D extract32(insn, 12, 5); + int u =3D extract32(insn, 29, 1); + int is_q =3D extract32(insn, 30, 1); + int a =3D extract32(insn, 23, 1); + int rn =3D extract32(insn, 5, 5); + int rd =3D extract32(insn, 0, 5); + int datasize, elements; + int fpopcode, pass; + TCGv_ptr fpst; + + /* Handle any non-vector operations first */ + switch (opcode) { + default: + fprintf(stderr, "%s: not a non-vector opcode %#x\n", __func__, opc= ode); + break; + } + + fpopcode =3D opcode | (a << 5) | (u << 6); + datasize =3D is_q ? 128 : 64; + elements =3D datasize / 16; + + fpst =3D get_fpstatus_ptr(); + + for (pass =3D 0; pass < elements; pass++) { + TCGv_i32 tcg_op1 =3D tcg_temp_new_i32(); + TCGv_i32 tcg_res =3D tcg_temp_new_i32(); + + read_vec_element_i32(s, tcg_op1, rn, pass, MO_16); + + switch (fpopcode) { + default: + fprintf(stderr,"%s: insn %#04x fpop %#2x\n", __func__, insn, f= popcode); + unsupported_encoding(s, insn); + } + + write_vec_element_i32(s, tcg_res, rd, pass, MO_16); + tcg_temp_free_i32(tcg_res); + tcg_temp_free_i32(tcg_op1); + } + + tcg_temp_free_ptr(fpst); + + if (!is_q) { + /* non-quad vector op */ + clear_vec_high(s, rd); + } +} + /* C3.6.13 AdvSIMD scalar x indexed element * 31 30 29 28 24 23 22 21 20 19 16 15 12 11 10 9 5 4 0 * +-----+---+-----------+------+---+---+------+-----+---+---+------+-----= -+ @@ -11259,6 +11318,7 @@ static const AArch64DecodeTable data_proc_simd[] = =3D { { 0x5e000000, 0xff208c00, disas_crypto_three_reg_sha }, { 0x5e280800, 0xff3e0c00, disas_crypto_two_reg_sha }, { 0x0e400400, 0x9f60c400, disas_simd_three_reg_same_fp16 }, + { 0x0e780800, 0x9f7f0c00, disas_simd_two_reg_misc_fp16 }, { 0x00000000, 0x00000000, NULL } }; =20 --=20 2.13.0