From patchwork Fri May 11 02:44:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 135466 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp325285lji; Thu, 10 May 2018 19:45:46 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpBwPpggW1fpI/bhEoiPbt2feGxnu5D0TWd/6+eO4QduLkUXNSRQ4STC8Er6jgNsR/GoBdy X-Received: by 2002:a37:cb05:: with SMTP id d5-v6mr3630215qkj.69.1526006746163; Thu, 10 May 2018 19:45:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526006746; cv=none; d=google.com; s=arc-20160816; b=wKqcmgC8Mrp+sEIDhs/3gC5F3oFOm9KSJZuC/vUc+we4w7oPB9yR8uOilbvfGyvv5F 9IM0oGcrU1bdbT8t6JLmd2EfGnZG91Xbah0IAj7OxcyFbYWpyckwM/zFUcTk7GpIYjDb eeaGr/uJZgLJ/vrLyHBHFPEUHD5WMRER6XVgBrX8jyhPA9hy42bklVL+SOTSes/Plmjt 6JZRZBY4HlC9qu5RRUPLuS+EqKz71bKV8iIurs9pkLA5KgcasbEjEFpgmpnBPx5sd+ur 7TpvgDpOeyLGXSqN6UTk4B5rr21mPN3X5r4/CKnUuU/612HQ3kI2PkcInszXW0rj8AEX 38Mw== 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=kc8rnh6pj5UXC0xkc35hjY/+cgtx+pbc5lCUKIGhNBQ=; b=ZHaOLznSMz0b2IGpHPK8haYNZAtrNmE1gUXd1rhE7gp1BS4V6Yd9nZ7BOyCpFfUeS8 G0cfG7tDB9sedxnQTXfCfQJE/ScfKDF4GgylSsw9Anq6EPKbF1wsdtGyBDMt758fJ/HM Xx+JKyYgx3o4uwV5JW1NYdnIZO8TxtwhwiU3Ka3/gW0wvuzquepZlNks3r2/3YHKnw7q HgX9R6qtgn+fu+UPLny5SNjOrEEHoqHJxrKgOSll1H1YLCFHGbNEoNys5dN3FVpeCnjU PkJJWTikec9pO4R7h6RfpY/bCf3hN+HW9pE15dp/GH+x54DN0yiwKG65I1AV+4DnSYvv KBNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=QMn5zzmx; 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 l124-v6si2208852qkf.172.2018.05.10.19.45.45 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 10 May 2018 19:45: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=@linaro.org header.s=google header.b=QMn5zzmx; 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]:36429 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGy41-00022Q-JU for patch@linaro.org; Thu, 10 May 2018 22:45:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43716) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGy3U-0001sb-3J for qemu-devel@nongnu.org; Thu, 10 May 2018 22:45:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGy3S-0005xZ-9u for qemu-devel@nongnu.org; Thu, 10 May 2018 22:45:12 -0400 Received: from mail-pl0-x244.google.com ([2607:f8b0:400e:c01::244]:37947) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGy3S-0005xD-4N for qemu-devel@nongnu.org; Thu, 10 May 2018 22:45:10 -0400 Received: by mail-pl0-x244.google.com with SMTP id c11-v6so2420772plr.5 for ; Thu, 10 May 2018 19:45:09 -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=kc8rnh6pj5UXC0xkc35hjY/+cgtx+pbc5lCUKIGhNBQ=; b=QMn5zzmxYSfSX+ysPM/jdxrbyPX8w4PtPdd9sx8nPpiWgDsp5xdj4zmyRaMgxhBSft MwVkk0uHc5esfeNZQONg1gm0kVdxbg0VUIm24H8WmvJZbmj7m7uyklpEJBg654xT3Qxc 4GQ+ht3vQtHHYf9INRoAk2ApjMz8yN+AGl8OE= 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=kc8rnh6pj5UXC0xkc35hjY/+cgtx+pbc5lCUKIGhNBQ=; b=a47UvaEqacWx2jh1Gg2JMOsUUket4RNWnNnINYDQQ44lHDUjPVP8Q272vsK1VCCtMz DgvqFnq/ArZDSYz3vONjMiNNuKLEo1iaz2TkUGVHjK0aIzo/IAfl6MofbF42Z33nHONK WHpw0AtdKOWf78ZWJASe3PDIaLgnUO9PoltlLLza3OweWsUE64xLYsi0nX/61GOKSmB7 9ggR9wleu9wqaYeCvlygG0R1yxFbEEwCaFGw1m1J96j3TeVi7UITogbl0JMBrWNbZttc Id9//TuFU6Vnos51jq+IElXYQIVA2+Hl3tzKpHv//ZaCCYfCxi+9uHJC6qJ8FgdXCPSx zJUw== X-Gm-Message-State: ALKqPwf2t+kz7kp7KkXm6QPbEnDW56s8aK1g0p89S75MYy7DE8UbmG0P yRsFhEr7b4EgSj82MT/4MUlmFnbYbUE= X-Received: by 2002:a17:902:2468:: with SMTP id m37-v6mr3779815plg.388.1526006708768; Thu, 10 May 2018 19:45:08 -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.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 May 2018 19:45:07 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 10 May 2018 19:44:44 -0700 Message-Id: <20180511024454.31679-2-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> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::244 Subject: [Qemu-devel] [PATCH v3 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 diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index b0471c842e..10d3856351 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);