From patchwork Sat May 12 00:32:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 135578 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp1557031lji; Fri, 11 May 2018 17:36:12 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqksuTa3qhiygh/CEazfrEdbGJrhX7aNaCQs+tsLMPPGmK7LvJAxcoXULH64fjzgr7YaohM X-Received: by 2002:a0c:bd84:: with SMTP id n4-v6mr595033qvg.148.1526085372629; Fri, 11 May 2018 17:36:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526085372; cv=none; d=google.com; s=arc-20160816; b=uuclM0tXDv5o4Vm2oxbUG10vY2eiD+mJn7sh/KFPTQwrPef2R35+WNfRTK0LfDN20p bqNN0O6CUJoK2481vAioCz8vOvCiOc/9lslG9n1Qab3dt4EKMyowiwprRNlmD+OYKT/8 lkqx4Gtv3EvT6RlEAan9QonDFTyYQyfRNTOoKjvQLImGUlPOzSz9IR/EISyWe5A/KycR pQ5PrwP22t+7NnQAOkaLrUGMOVl+W2yWSl8/6Pt3TxcO71TrbyLCGIVgXky3Xaypqw9t s74rNbBAQt6Be2nBvAWrvfwmC7RD6q0lj1velSWDECUz/nxHMlVUAQRT6CD6ZZrPmeS+ qMRg== 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=pk+dSijseYdTRgdSgGsyBzJpy+TamubJS4GeiDT8GoQ=; b=ErbHXwSsfOAUT/GEeDIiHl2q+Rk7rqcmmANDVDSkU4cI8OYaG5g5QVZ9RmyzEbCNsj D2e1y6tJ23nL9LKejJK69G60FqQpw/j+bYHZQwQrXs0EOYGNn/JpSizMjCCwCbUlF1kG 59avzpNeX5S9YsmGn3Q8aOu0meKXT/B075Crpjj4cD6x87ulr8xL+JXtyIViCl4QznbL mwOGtvAeJtgz+Kdn+OcvZ/M7X2uRqEwO0PUdllRdZM+yR8gdAxvXkx28xJDJcBFrPoNF 0UP/Xxg/oDRRCoQL35e9RUpmDkQnRMY/4MdxO3Ghqtj1VA50DTHEbXFecYZgGs5jpOCB 2tBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=aEyyAhip; 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 o62-v6si1177202qkd.346.2018.05.11.17.36.12 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 11 May 2018 17:36:12 -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=aEyyAhip; 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]:58532 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHIWC-0000My-2k for patch@linaro.org; Fri, 11 May 2018 20:36:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59063) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHISX-0005xO-JI for qemu-devel@nongnu.org; Fri, 11 May 2018 20:32:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fHISV-00086u-I8 for qemu-devel@nongnu.org; Fri, 11 May 2018 20:32:25 -0400 Received: from mail-pl0-x242.google.com ([2607:f8b0:400e:c01::242]:35938) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fHISV-00086e-CJ for qemu-devel@nongnu.org; Fri, 11 May 2018 20:32:23 -0400 Received: by mail-pl0-x242.google.com with SMTP id v24-v6so4142822plo.3 for ; Fri, 11 May 2018 17:32:23 -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=pk+dSijseYdTRgdSgGsyBzJpy+TamubJS4GeiDT8GoQ=; b=aEyyAhipDhRsWX7qjTL8poG7I5jN28Z95ZrcUJg5nYQebQX9Pe35s9bbv922ps8zz0 Gfbcv2t6b72AesB1O/NBdS2eJz9u8MAVPhGs3AfJLytzwbyITRwoj4tQ87CeHLDrb5VO j6/j9zIBMmkCdJcCIT6K0CYlg11PsLY3yedx0= 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=pk+dSijseYdTRgdSgGsyBzJpy+TamubJS4GeiDT8GoQ=; b=SM27ZOCZqaSCIwmB1YFfZTBVISnTPbdW6yHSRsIb9PcDKUult/2GV5B2eKTYRSEKIF ljCI8/dehy+f/bP1lK1WryfU2XURT6usO2ohzJtD0URKLKC9B2ghz3BJbUWwekFEY/Mi mk0YSWv3EEjUFSI45YoOltkhmQW4x98/nie1hfUScTv+gbb/g2u2vqns7aNW30WQydho En51+HTs+IVTfkGdvEULdq3MxeqsHtBO0EXdIbGg3fbFBzfdIAp5lNgu9wyO75gJpp6B FpD9Pq6YxIQHUyGGZjmI9iyILT24F1gF3/1PjzHTFkwW8w4Tn8V7Z38HB/upDDIBg1aC ZCVw== X-Gm-Message-State: ALKqPwcqs8auGfIWtN+/dg4qD7LMTmmH24vN9iy2LZBR8Lun3XcEMfDC CqfqQryQI7oCdJFvVmlcgutFS/VFJAI= X-Received: by 2002:a17:902:8b85:: with SMTP id ay5-v6mr273034plb.30.1526085142087; Fri, 11 May 2018 17:32:22 -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 v186-v6sm7599735pfb.45.2018.05.11.17.32.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 May 2018 17:32:21 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 11 May 2018 17:32:07 -0700 Message-Id: <20180512003217.9105-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180512003217.9105-1-richard.henderson@linaro.org> References: <20180512003217.9105-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:c01::242 Subject: [Qemu-devel] [PATCH v4 01/11] 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, alex.bennee@linaro.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 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) -- 2.17.0 Reviewed-by: Alex Bennée diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 4d1b220cc6..5b8cf75e9f 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -5700,6 +5700,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); @@ -5717,6 +5726,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(); } } } @@ -5756,6 +5771,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);