From patchwork Wed May 2 22:15:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 134866 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp1203731lji; Wed, 2 May 2018 15:20:24 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpNc8PDpERIO+j5S/MfV3o5/vlkRKuSl79lqrJIrRLRc+ychCW9Kcyg9YZZ/x/D2fjrHqJa X-Received: by 10.233.225.13 with SMTP id g13mr16333191qkm.113.1525299623979; Wed, 02 May 2018 15:20:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525299623; cv=none; d=google.com; s=arc-20160816; b=e5PkVP6qFkumkfoS1BiLivFkYD0qY9rBJksuC5xGFYpTWU9zSZJBQGM4VrxZJCqFzx JlVcBW5U6WNFM6+JywmP9lwU0p2OR269djSK6gDmnv3Zt8kvrVI+aRzvmIJ33bThIQ4M 9/BoA6peWZSF33AaXmWg3ON4cc+nYaHnLNaWZzc/KRlJzzVXDrmtwehLfrY3F96Q7XNG HQbM88elJ+MonWXWs9tAGIElhkIEfq6Jfruz/cSVqy009ADSo7Phc8ivnEIdZ9S3zN8R AS8dvML6/M8zL4Ouq/ASGYtRoL6LS6ScwXj2C/kfus0PQqMlZagUxZeFgtxHxB3NOvrW IhiQ== 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:arc-authentication-results; bh=WwqWFnklKjiIuffvTXcb3kCGinNAr4T/DUG63Bdts3w=; b=TdBLm9B5Kg2bpf58h6BFoq3zwI37RTWgufALsgRvQ/ZYyvEt00cYVtPxqQoB3FGOE3 qHnHt0b969HXOyOcyqJgjIYHv/P1mx+OxK6enVx3n7HNeTMf/xCEwSsNoz0F9sLmb+Lm EHnafXoBsDjLckLrGLEmCcW9afPEQcB1Xf0ybKUFsz+/xoQO2EPBzoqLTaAU5plJvpOP Vb8G9GW3GbpabgPUAZdrT3VpQJwywCJPjcPzcDd3u6JGxuOWMhvXPylvKrVwi3DuJ1PA MfenjNtsOzlGmMZFpHenTSt8ewEflcT4b0ceVI2IEX517OckqAPqlysgnwarwQpSCuis cRdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=a5N2jNNj; 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 j4-v6si8123qvb.41.2018.05.02.15.20.23 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 02 May 2018 15:20: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=a5N2jNNj; 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]:52810 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fE06p-0003U6-EQ for patch@linaro.org; Wed, 02 May 2018 18:20:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fE02d-0000em-MX for qemu-devel@nongnu.org; Wed, 02 May 2018 18:16:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fE02c-0007tR-MM for qemu-devel@nongnu.org; Wed, 02 May 2018 18:16:03 -0400 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]:39709) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fE02c-0007sv-HI for qemu-devel@nongnu.org; Wed, 02 May 2018 18:16:02 -0400 Received: by mail-pf0-x242.google.com with SMTP id z9so12955528pfe.6 for ; Wed, 02 May 2018 15:16:02 -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=WwqWFnklKjiIuffvTXcb3kCGinNAr4T/DUG63Bdts3w=; b=a5N2jNNj+fXoT9hLC83Eyxc2IWCv6rCTxhDJjcPO3+OfocOxmBvRUuYrB51fIriE22 jQ8FMNWLZvK1o8x23nUrzQPllbnqGU/wblJqZZeD/1OsCj7pa05sPiwnV2dYf8zsFeDj h9wDNh43AjydGfcplR7S+wxxBqgfuV76Q8Ih4= 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=WwqWFnklKjiIuffvTXcb3kCGinNAr4T/DUG63Bdts3w=; b=V0lO2JfJlloxy0WjIuaysTU06dSfV5K4jJHcHSTENighm6dD40kKzO1cN2+YbZKQaI WGsblTszOGoenLMP/9wLu3a5AFBNYEg5SU0hrPIoFcEMrg7SbIdNRNxu2S6iqZwtbo0p vmgK2wtKAhMusHlfF7+IAHwVl42VZu7gbL+M92vtZj6DHegqQCwTqmqABoXrRH64KQtI sv2pcdt+NcHoCp6y3Wv5bVC1jl3RvfmM/72MlPHWi8210IBUGMWBjwoz3IwUop8avJWn rPP/B4OjAcH2AqkXhhd4lOO8QsVUmSde3KWE+orB5DYQn+4Xho/PvybQ+vAp4iIyrJwf MoeA== X-Gm-Message-State: ALQs6tCoVy4bfPUUCpNC3kV/mbPgzCDDGiSwOrgcefCyandOoNFTbv60 ztouSPYmW+/Gagp90WpeaQ0jNX/Tvh0= X-Received: by 10.98.201.92 with SMTP id k89mr20787451pfg.47.1525299361286; Wed, 02 May 2018 15:16:01 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-2-170.tukw.qwest.net. [97.113.2.170]) by smtp.gmail.com with ESMTPSA id 65sm26170145pft.74.2018.05.02.15.16.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 02 May 2018 15:16:00 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 2 May 2018 15:15:43 -0700 Message-Id: <20180502221552.3873-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180502221552.3873-1-richard.henderson@linaro.org> References: <20180502221552.3873-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:c00::242 Subject: [Qemu-devel] [PATCH v2 05/14] 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@linaro.org, qemu-arm@nongnu.org, qemu-stable@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Adding the fp16 moves to/from general registers. Cc: qemu-stable@nongnu.org Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) -- 2.14.3 diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index c64c3ed99d..247a4f0cce 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -5463,6 +5463,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); @@ -5480,6 +5489,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(); } } } @@ -5519,10 +5534,15 @@ 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 */ + if (arm_dc_feature(s, ARM_FEATURE_V8_FP16)) { + break; + } + /* fallthru */ default: /* all other sf/type/rmode combinations are invalid */ unallocated_encoding(s); - break; + return; } if (!fp_access_check(s)) {