From patchwork Mon Jul 23 20:17:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 142660 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp6516875ljj; Mon, 23 Jul 2018 14:31:46 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfpWeqUmd1xMw+kjjt37srt5IiFSAvsHnIi9Aray3NVomBgA61FByWMFkI2PdncRsuq2X/M X-Received: by 2002:a0c:96eb:: with SMTP id b40-v6mr12957702qvd.235.1532381506097; Mon, 23 Jul 2018 14:31:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532381506; cv=none; d=google.com; s=arc-20160816; b=sxX4QEVpoBpXwr5Rpz3rzyCsUw+iapnUf85NmTlkfiCstdy6bLte7hCn2qDMbki5ye RiQ5Shd3DVr6NhMHCUMIT8sRBYQUsz1Wpq2OIZZbGNdNC4cvc3z46aKkeNSU9BFBjSLu a4n4oIhjjVMGMkxKnbCl9YyvJS9M2VTvJ41kpiS78Afjxk7YQqMWd1Fb2gJStNdMmydi H6yzMK1Dlm+07gm+HadR9vXtPqM4fxbyQHxBo6xZtBPI7ADl3A6aNn0dAiiCSEJvbMyD ttXu7JXXZrMV9H5z9JeFxkwl3KQFYevgJVCS9MWOiLjHCaQaFUZVw4OFnr61DyTJyQH7 vScA== 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=Fl9uEjw1xc2dKDewX9QPdz6gea0SzgkVpH8oMMWOvRQ=; b=WcA4vQrSXqOxsFp8HjhAkMR4WtXXaGxZags/im08V/ZWdMMlchY2+WgCqUrjLEbf+v w2OKAjlKrKJ1JCinwrycmnq7C3JfxrGgUZakEdxiJNYkVCqFGjZ7SPlOjKsKUI9ya28L GHRjEbbJFpqaJzc3MQ1BFOF8qeCfeYsGMQg/aH9YwCP1QVOq/IOuA2eUhKIkZVVXOdlV LVq+ZRugRr53V042+afjRlKBUgfVMX/5hxg+rckQLpye7DIhxlhIZYMynJYtA2IkDCOW O8bgC5KlPGr1/2axgxjKSmEhAhyZRm7RqzN9SBULs4E37AIzsPrTbaB2ZBnNg2jdWGPZ fhDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=I28VJK9k; 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=ibm.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id z25-v6si2091267qtg.147.2018.07.23.14.31.45 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 23 Jul 2018 14:31:46 -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=@gmail.com header.s=20161025 header.b=I28VJK9k; 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=ibm.com Received: from localhost ([::1]:36796 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhiQj-0007ZW-DM for patch@linaro.org; Mon, 23 Jul 2018 17:31:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhhKc-0003oR-Dr for qemu-devel@nongnu.org; Mon, 23 Jul 2018 16:21:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhhKb-0005KA-GG for qemu-devel@nongnu.org; Mon, 23 Jul 2018 16:21:22 -0400 Received: from mail-oi0-x230.google.com ([2607:f8b0:4003:c06::230]:33590) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fhhKb-0005K4-A4; Mon, 23 Jul 2018 16:21:21 -0400 Received: by mail-oi0-x230.google.com with SMTP id l10-v6so3507163oii.0; Mon, 23 Jul 2018 13:21:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Fl9uEjw1xc2dKDewX9QPdz6gea0SzgkVpH8oMMWOvRQ=; b=I28VJK9knH/01UrpGOJNNUM/a+h3j7uEgzBH5qCVnBpjvjuqubRJTjz4m12Ir9vvBX WOVrYVERHKjj4K43g/l5AENAWj6moY6AW06uOj6Cef+BmWeIzqYtroaK9SlETTFdexh3 dgQaiRVdS4aGHqB6g/TgMnT9ujEaLPFgfaH/LzfkHJwm1t3jiELRCYjBl7kXa1bzIpYa Tlr6R9gsCW13/1q5iTHjY4oOG36ObUYE7iK/uGNPoyW9et0GfyPO9S6bdibIAhmfrkgv vWC4w6goszLKdlFmNp7IPlMbTTnCiJ+LzvpR/nB61Jt4pkWfkzBTodrWgTpgYcCcwjdP Se3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Fl9uEjw1xc2dKDewX9QPdz6gea0SzgkVpH8oMMWOvRQ=; b=N+Ea3CTm81/4/rk/lEwatSWjhoPx5vSpzaHVhl4t3Pr4r6TvtM/sEZdRYzXLdUDhS+ Aof/leBd4pm1N4+j1w6c06N9SI2eHJZ+EHBjMmD6siavkqLsEVrg84hS3BNWyqCP19EN 3FDUzRuSHyGZbOdPQ02TEPLJ4oocRItcavyOiQuvfkTa/godABYRQqkjJtbV2VTidu/p ZTikyPLrUbPqnBKJng1qrQXO8ZrOVFqnMCeUoJOLUr9hBkVDdjVNlXypoO+LzYlJwkXK SuoFCcHHE+cO6wdj4fiE1xKKXMWgIcoLzn3F8TRauprBZWkBUKOvhzYaEuSJyicNH7wg zzLw== X-Gm-Message-State: AOUpUlGVMvDG2P6JcG3zPc9M3um9+FP09q2vaKVOcDZEud2BJEF0ERZG 9p6aY4XSu4Q2gGmGOx3jiIwskJkYboeMuw== X-Received: by 2002:aca:a94c:: with SMTP id s73-v6mr320905oie.68.1532377280129; Mon, 23 Jul 2018 13:21:20 -0700 (PDT) Received: from localhost (76-251-165-188.lightspeed.austtx.sbcglobal.net. [76.251.165.188]) by smtp.gmail.com with ESMTPSA id v5-v6sm1203124oix.36.2018.07.23.13.21.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jul 2018 13:21:19 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Mon, 23 Jul 2018 15:17:25 -0500 Message-Id: <20180723201748.25573-77-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180723201748.25573-1-mdroth@linux.vnet.ibm.com> References: <20180723201748.25573-1-mdroth@linux.vnet.ibm.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::230 Subject: [Qemu-devel] [PATCH 76/99] target/arm: Implement FMOV (general) for fp16 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 , Richard Henderson , qemu-stable@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Adding the fp16 moves to/from general registers. Cc: qemu-stable@nongnu.org Signed-off-by: Richard Henderson Tested-by: Alex Bennée Message-id: 20180512003217.9105-2-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell (cherry picked from commit 68130236e30a1ec64363f4915349feee181bfbc1) Signed-off-by: Michael Roth --- target/arm/translate-a64.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) -- 2.17.1 diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 639cd95772..b05f9bfe91 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -5457,6 +5457,15 @@ static void handle_fmov(DisasContext *s, int rd, int rn, int type, bool itof) tcg_gen_st_i64(tcg_rn, cpu_env, fp_reg_hi_offset(s, rd)); clear_vec_high(s, true, rd); break; + case 3: + /* 16 bit */ + tmp = tcg_temp_new_i64(); + tcg_gen_ext16u_i64(tmp, tcg_rn); + write_fp_dreg(s, rd, tmp); + tcg_temp_free_i64(tmp); + break; + default: + g_assert_not_reached(); } } else { TCGv_i64 tcg_rd = cpu_reg(s, rd); @@ -5474,6 +5483,12 @@ static void handle_fmov(DisasContext *s, int rd, int rn, int type, bool itof) /* 64 bits from top half */ tcg_gen_ld_i64(tcg_rd, cpu_env, fp_reg_hi_offset(s, rn)); break; + case 3: + /* 16 bit */ + tcg_gen_ld16u_i64(tcg_rd, cpu_env, fp_reg_offset(s, rn, MO_16)); + break; + default: + g_assert_not_reached(); } } } @@ -5513,6 +5528,12 @@ static void disas_fp_int_conv(DisasContext *s, uint32_t insn) case 0xa: /* 64 bit */ case 0xd: /* 64 bit to top half of quad */ break; + case 0x6: /* 16-bit float, 32-bit int */ + case 0xe: /* 16-bit float, 64-bit int */ + if (arm_dc_feature(s, ARM_FEATURE_V8_FP16)) { + break; + } + /* fallthru */ default: /* all other sf/type/rmode combinations are invalid */ unallocated_encoding(s);