From patchwork Wed Jun 13 01:56:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 138393 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp101725lji; Tue, 12 Jun 2018 19:04:00 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ5Qd2Jl0+S89qvzjSJaTwNDmpZYNgmJuxM6kBaBpe0SUUebWLgtixT6EdJJog7aSN82VeU X-Received: by 2002:ac8:163a:: with SMTP id p55-v6mr2781538qtj.157.1528855440877; Tue, 12 Jun 2018 19:04:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528855440; cv=none; d=google.com; s=arc-20160816; b=DNDeikZ8p3IrkZ+h/EHcAyFR9eG5DAf6RFzjZ1HAr867DvjAP3Py5cXOVF0X69sBNA iMxmUTDd2jRalVPnjqJ+XgK3QcxHrw+uAiicZq7y7UfGzVJiuYAWl9THTAFTfeqchv/U mEUW38bYnV+iJc+BU3h+5iEtpGUlcYY1K4sU90RdjDt8BfMm+q8KVCPH25oW2m+eJhfj yiOzxV1D+whKRnwT5vpe0oiwRtSPNHMB5UDXzVlXUCpWm1Cy8b3me2SsBbNvXh3o3y6p IyMfzb+C4+bzGMzUHPYTxCRKDQpv4Xoya9wx2zeifF8UGbU0Qgo3u72r3VAPIaUWi3Az Crzg== 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=1seX/MWdF66DWCgqk5sBbS7AoboDAL+ftKWl5wY1S6g=; b=mBDULznq/jrQavqaV82+Cbjg0YvcuBafIoo9vGeS3jSU5QqRmmyZYWktWvIRrNEIFS Q97atMHeV/ZRoSjoR7fvDjdreBIq7N4pk7uln0/4Sx2DEGI/IE8qTn4gwNSXE8o/3RoO pYkZloIxXGNbunX87AjG3RekAqcaym/V83EZEZqrG38bBrfyEth4jkGakuk1PuRPR5jY yCYXh1kGLcM24UC4yHF2ECS/l2Q3d/kxEJ4jX2VRMdSREUiyHJ4jwEOv6eJMXRRjW9m+ dL0ieONvpLtbOOJGVSjwgdB8/mJv5E7WZnwev0hJg1NTUcgTPYGCczSanqMq7LwuN3JZ ITTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=K2kPudgq; 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 w140-v6si1690226qkw.211.2018.06.12.19.04.00 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 12 Jun 2018 19:04:00 -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=K2kPudgq; 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]:59300 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSv8i-0007Or-Af for patch@linaro.org; Tue, 12 Jun 2018 22:04:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSv2U-0002g1-H8 for qemu-devel@nongnu.org; Tue, 12 Jun 2018 21:57:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fSv2R-0006Ky-CM for qemu-devel@nongnu.org; Tue, 12 Jun 2018 21:57:34 -0400 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]:45756) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fSv2R-0006Kl-19 for qemu-devel@nongnu.org; Tue, 12 Jun 2018 21:57:31 -0400 Received: by mail-pf0-x242.google.com with SMTP id a22-v6so497934pfo.12 for ; Tue, 12 Jun 2018 18:57:30 -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=1seX/MWdF66DWCgqk5sBbS7AoboDAL+ftKWl5wY1S6g=; b=K2kPudgqELQqytqjMo/5gcCIuB2Mi3/++BV2dSrxPywTIuFIWxApsdme5obuaMsMW9 e1WpnPxUz8nPK80qMdHSwsb4Pj6n+1rO5c6NQLmkzV8KPQu1XVZHurfyMNL9TQa9R6Pn +2cBpiEfrH+C/smGyei6HWNKsI/7MYZNxf4zU= 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=1seX/MWdF66DWCgqk5sBbS7AoboDAL+ftKWl5wY1S6g=; b=hs4GofUkMalLNwsGBWW2HUhSC6UjiGoL9U8Tn2kDVfDK0pKvnza97bZPYfxRPm40ZW pkZeYeSMMOw5Uh/TRfHM40ZmdgRQMlTUrLp17Qjm9V2sKnPiHwW5dWrY1XHWuaSRjthR vHkB4Ur8r/pdlBhpyRWnJKwqlwV/DDV46XNjr9JVNhDkoolxw2RykTcNjRiHdzOKkBRW l7RAUiGiRM0Ez/6o1CjQoy+cRXBpr3q1QcXWqUu0aCiddHnfrE/vllK9XdhCryeFBeFV 7AhD/id1p0sLHn+n8BcX99qE1bHn94NSrw3lXIExT7P6PF5RZM0Y4sfKzmAKjDp3n6Sk Li0Q== X-Gm-Message-State: APt69E2oUbVOIWNNv+dIWFKmOlBHuTGvDhxT53vKWLOJtSaF1Mxj1f7R V9gQ+9vDLGBR1GPyjDF4aahd0DdLlIU= X-Received: by 2002:a62:f705:: with SMTP id h5-v6mr2856832pfi.169.1528855049603; Tue, 12 Jun 2018 18:57:29 -0700 (PDT) Received: from cloudburst.twiddle.net (rrcs-173-198-77-219.west.biz.rr.com. [173.198.77.219]) by smtp.gmail.com with ESMTPSA id g10-v6sm1647287pfi.148.2018.06.12.18.57.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Jun 2018 18:57:28 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 12 Jun 2018 15:56:39 -1000 Message-Id: <20180613015641.5667-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180613015641.5667-1-richard.henderson@linaro.org> References: <20180613015641.5667-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 v4b 16/18] target/arm: Implement FDUP/DUP 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 Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/translate-sve.c | 37 +++++++++++++++++++++++++++++++++++++ target/arm/sve.decode | 8 ++++++++ 2 files changed, 45 insertions(+) -- 2.17.1 diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index ae6a504f61..13d5effff1 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -3191,6 +3191,43 @@ static bool trans_WHILE(DisasContext *s, arg_WHILE *a, uint32_t insn) return true; } +/* + *** SVE Integer Wide Immediate - Unpredicated Group + */ + +static bool trans_FDUP(DisasContext *s, arg_FDUP *a, uint32_t insn) +{ + if (a->esz == 0) { + return false; + } + if (sve_access_check(s)) { + unsigned vsz = vec_full_reg_size(s); + int dofs = vec_full_reg_offset(s, a->rd); + uint64_t imm; + + /* Decode the VFP immediate. */ + imm = vfp_expand_imm(a->esz, a->imm); + imm = dup_const(a->esz, imm); + + tcg_gen_gvec_dup64i(dofs, vsz, vsz, imm); + } + return true; +} + +static bool trans_DUP_i(DisasContext *s, arg_DUP_i *a, uint32_t insn) +{ + if (a->esz == 0 && extract32(insn, 13, 1)) { + return false; + } + if (sve_access_check(s)) { + unsigned vsz = vec_full_reg_size(s); + int dofs = vec_full_reg_offset(s, a->rd); + + tcg_gen_gvec_dup64i(dofs, vsz, vsz, dup_const(a->esz, a->imm)); + } + return true; +} + /* *** SVE Memory - 32-bit Gather and Unsized Contiguous Group */ diff --git a/target/arm/sve.decode b/target/arm/sve.decode index 4b718060a9..b8bd22aff7 100644 --- a/target/arm/sve.decode +++ b/target/arm/sve.decode @@ -614,6 +614,14 @@ CTERM 00100101 1 sf:1 1 rm:5 001000 rn:5 ne:1 0000 # SVE integer compare scalar count and limit WHILE 00100101 esz:2 1 rm:5 000 sf:1 u:1 1 rn:5 eq:1 rd:4 +### SVE Integer Wide Immediate - Unpredicated Group + +# SVE broadcast floating-point immediate (unpredicated) +FDUP 00100101 esz:2 111 00 1110 imm:8 rd:5 + +# SVE broadcast integer immediate (unpredicated) +DUP_i 00100101 esz:2 111 00 011 . ........ rd:5 imm=%sh8_i8s + ### SVE Memory - 32-bit Gather and Unsized Contiguous Group # SVE load predicate register