From patchwork Fri May 11 02:44:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 135470 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp327457lji; Thu, 10 May 2018 19:49:12 -0700 (PDT) X-Google-Smtp-Source: AB8JxZolZ8829JrCFrOQQPdkckJFUXqFf7XfQHkckhfj1Jmw7TrTmNVUAD6diTAbjQQ6W06Kp7iI X-Received: by 2002:a0c:923b:: with SMTP id a56-v6mr3569488qva.248.1526006952300; Thu, 10 May 2018 19:49:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526006952; cv=none; d=google.com; s=arc-20160816; b=Q5cl1m+bKgwSe4jO77LqZJSmPltNFxK43NAOdphcC/OcBkb3lJgxw9wmbIbahE7Td7 +xnC3y1t1j49HYyy12/umBHuChOAtmNP2aAhh41u0b9tLWGmi7QP8wi99tQphLf3KD/U BWRuqsQpHs3eAMbTH1TuJ9LzqZ7g37DA7KYcEeRaWm7QNJdU6P890VN9APs0VuOhUHcY MHmYSbiXeKhR6UDNZ/9+Y2K5msClDpoUIOEaNHsJbq4MmpggzsS07wnbfdbEhORq9i67 YcqDRzAgV0dplejAFBx+1JV6L9Gx6pekd2w33Hh3tkk8XT4O2eD5Ka2N63GQWniP6ZCW 9wOA== 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=ufGfgaf1E0q+CInRpLn4NylNFL3FTv3R3tbGanoyGQI=; b=P19v2Uj0bXrE0JJwVgkb2yXROtkzLAqDDkBvCLl6HVnSWljP+BPUo1fbsxqoXePzIb OMKCge3pebj0IvQp7ZIuEzPX+WDKWbJydHRT+HIS5vl5leBgw39cIaO86FFeads1ip+J 6rjgYBfqVMEqGp0UoKRL0BzXULWuhyHOwDFJkv6uXKU1VYFuhUbhCpSoTCs7kL8eO4Z0 Io4aMKnFp1QYrCW06kHxosVpWZdbs9T2MbWcik5uOo05VT8vCEdpDCeXVSAREgw4G1R9 PRXR4sNUQaqktW4at0LEUK2V7p7CXZMXEPhJu9lDTZV7yYZsNZQoE4PsWcyvd1s6g3gx oKWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=kFSj7phv; 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 o16-v6si1833779qvc.68.2018.05.10.19.49.12 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 10 May 2018 19:49: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=kFSj7phv; 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]:36446 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGy7L-0005BJ-Lj for patch@linaro.org; Thu, 10 May 2018 22:49:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGy3W-00020K-Sw for qemu-devel@nongnu.org; Thu, 10 May 2018 22:45:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGy3W-0005zI-3T for qemu-devel@nongnu.org; Thu, 10 May 2018 22:45:14 -0400 Received: from mail-pl0-x241.google.com ([2607:f8b0:400e:c01::241]:36207) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGy3V-0005yr-UK for qemu-devel@nongnu.org; Thu, 10 May 2018 22:45:14 -0400 Received: by mail-pl0-x241.google.com with SMTP id v24-v6so2422348plo.3 for ; Thu, 10 May 2018 19:45:13 -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 :mime-version:content-transfer-encoding; bh=ufGfgaf1E0q+CInRpLn4NylNFL3FTv3R3tbGanoyGQI=; b=kFSj7phvCT946u+xRv4Djdrqb7e4x+kqZ6e7ANmsS2n/Brf47zZQWd/10eaWeGORvQ PmOyzdS6Q4BT06tWJeDKwqFRU76WzAUhZrUaDJCsV3bhs5oZUeGT66WajhqpKwoYnNfB SeIIcy3LlVHB8ND/7TOkNoMAK6tkjFULj/iiQ= 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=ufGfgaf1E0q+CInRpLn4NylNFL3FTv3R3tbGanoyGQI=; b=GxEftgErOUPqI14sbQonGgcwOUMtXv69925FbQdLnql81NqOs32ujteEGf2AC+TiME HgdSoSMctpoYiDVv9fMN32zwGNZuln+9i9cQxGQuAvD+YwZsWO/NDyPJKnpbfZD+qC4O FMM7m80U8Ekl877h9Y7sz88cPz4ZT4I2PXCUGo6QZDyoCt/TLyYFg9Omt7nF9SVLthlk PULIvhsWvLHK4HVQOKBnnrMyvzdcnakcw3oQlsTG88RhHMpN5OaDKjQUBJGMp1hh9RNI Ee7R8sg5No8KK24CT+ud0elRWxtRyhWkw+BwFYX8/Q70A7CHeDfplmtbmPpQXX9tCr3t rTfw== X-Gm-Message-State: ALKqPwcy/OUjXirUQ5RaaK/L0ycZUyR/fROasGnVSpvajR3boIEi8zVy 3S+ZfWJ6mUjq1GMEkZbFlGHMHcdI06I= X-Received: by 2002:a17:902:274a:: with SMTP id j10-v6mr3757210plg.393.1526006712625; Thu, 10 May 2018 19:45:12 -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 n18-v6sm5420915pfg.36.2018.05.10.19.45.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 May 2018 19:45:11 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 10 May 2018 19:44:47 -0700 Message-Id: <20180511024454.31679-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180511024454.31679-1-richard.henderson@linaro.org> References: <20180511024454.31679-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::241 Subject: [Qemu-devel] [PATCH v3 04/11] target/arm: Implement FCVT (scalar, fixed-point) 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" Cc: qemu-stable@nongnu.org Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) -- 2.17.0 diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 14f35e878a..eb69a548e1 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -5491,6 +5491,20 @@ static void disas_fp_imm(DisasContext *s, uint32_t insn) return; } + switch (type) { + case 0: /* float32 */ + case 1: /* float64 */ + break; + case 3: /* float16 */ + if (arm_dc_feature(s, ARM_FEATURE_V8_FP16)) { + break; + } + /* fallthru */ + default: + unallocated_encoding(s); + return; + } + if (!fp_access_check(s)) { return; } @@ -5697,8 +5711,7 @@ static void disas_fp_fixed_conv(DisasContext *s, uint32_t insn) bool sf = extract32(insn, 31, 1); bool itof; - if (sbit || (type > 1) - || (!sf && scale < 32)) { + if (sbit || (!sf && scale < 32)) { unallocated_encoding(s); return; }