From patchwork Thu Jun 13 12:14:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 166638 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp725642ilk; Thu, 13 Jun 2019 05:58:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+GDJ8cDEvs8c5pcO+30koVDEctx2qkzWDVOxKttD5GLN5Hph3nNvRvqVUF81gbWhaKvkZ X-Received: by 2002:a37:a7d2:: with SMTP id q201mr68873599qke.150.1560430684698; Thu, 13 Jun 2019 05:58:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560430684; cv=none; d=google.com; s=arc-20160816; b=QvPHzXHardrYHBMKoqIFaTn+dtzRip8RPKIu7dYZmPjep53P1U6X5+M/0UIYqGhezJ vWln5OcETkpaYlgPXWpxWJgyNPtSz23MchUffrvwXrcbb1PmdumsyO/SgZ242/RqdNuB N8/wsOem8bs24lp6R55sJXgu3EtFnrtcRyWKn95rJvRXUOz3iP8N/GhWt1Fih6LFvghR i9lTuxw5664sPs8Zw3XGTpUaleEOww7t3uAa1d0zDAWQkxppw+i/Xv5OZREIRcKZYgLF mNjIMGFiUXa7J4suGm27khbmNOezIJtWNeYZYc5MMR0+A1rXYtIBLSYl36g3luY9fZb9 T+vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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; bh=AWW9PYoqGFrrUdmPkFR1zqFQl9klTG/mXKnSCy19Aj8=; b=ozEpF1A6vP3N8t0tzQnK6oI4OPA8T/VcWNe5mihTjxRhSZ3hZ8IhbBE9HGV4lKB3wv t3Pek2ASVtIE6ikcv7O73xnBt3707GpmImUdqa41pRVJBLj9vOcU8GoN5jXJH6AmI8Gx P5UO5MMNq1ll9/v/eGmsv7PdH8p7sTPaWr0n4yzE6+FXXSdCs5e7A88XB/c4Cjsu7OI9 1HpXWXy8Pn6lLf6OTIxeqIoEr4mgxAHxr2XNEJpOqV7xbNpLTygJxI6JWECv0vMEkfkb PF4xXfs6p9ME5GvUfmkHszSO8fDLcqG291EifRH6jKGwaMvMcAJEniY3qi6y423e6Ppn p/Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UK8vLKLs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id d20si1523253qkj.100.2019.06.13.05.58.04 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Jun 2019 05:58:04 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UK8vLKLs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:39550 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbPIq-0005U3-A7 for patch@linaro.org; Thu, 13 Jun 2019 08:58:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59359) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbOdZ-0008GV-QG for qemu-devel@nongnu.org; Thu, 13 Jun 2019 08:15:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbOdU-0004aA-LM for qemu-devel@nongnu.org; Thu, 13 Jun 2019 08:15:25 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:34218) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbOdU-0004Ro-36 for qemu-devel@nongnu.org; Thu, 13 Jun 2019 08:15:20 -0400 Received: by mail-wm1-x342.google.com with SMTP id w9so6496388wmd.1 for ; Thu, 13 Jun 2019 05:15:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=AWW9PYoqGFrrUdmPkFR1zqFQl9klTG/mXKnSCy19Aj8=; b=UK8vLKLsSwwci+QKStlpX9wExGCcwQIOoeokNN/QRdTJps0GL31OzlP/7oQuIm7Kd8 Vg+oArs6FH2M2T8cYvo97IB49tvUSU2Gfgz/pQ5AEPQI3fW8nTYIJ6MmueZ1kMxEif8d Jnac6IhI+Lmt1Q2M8YQoblgliBYbOLobqX5oC+P1wTK8mNrdZcmO1b4PTQjzjceRrxP4 /1YFeyxYefUZwkkMZqVsLZAdcGzjIRktzytfB//vpsqUcZkvfa8hH2iLtQ3LJ8Wv7j+M w6QUkRJ35FHQqazS7IQywaO5ttZ75S8yvYO7YX7YvVoa70tLqAh0gmGp+CofNgQIxp/x RbSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AWW9PYoqGFrrUdmPkFR1zqFQl9klTG/mXKnSCy19Aj8=; b=p+dw4So71VS1b4iQRzGskFcCvV6Aa1is3/oCEsNRqT+W2bN2yobolbTWi8fkqqoDEw 1meWZzEWH9nrIYXc2WVIswvd5YzSZ9nzep9CuT4i/IwO03Uz9qAshIZWkNbVY63FKVU/ /e3gj+oJBoqSUtgs2JeyGu4ZXHRR2nVoY/flOUDRutMvokunsqmG2kZhtNxtZnB49E7z st+0jJW1JIGD+K/bkgl8ZDCz/xgEHIJenPUjuIQrpRMYWQBOR46cyP1SwUPdPMOJR0Ub j7y4dU9j5lrQlFYP/vhzUGEIdCpAtQO0LA6+37oaKHX1qB8LmcHNt6U06dA8Z0Fuu3/A yx/Q== X-Gm-Message-State: APjAAAXccVnK7eXmlCCCVV9r513DVf6ybeq2wxD3QfFf//Z6Zq/rGL+h sYjPNvPSUD0HrC2MJXDEZIGtfJy63FaDYw== X-Received: by 2002:a1c:cc19:: with SMTP id h25mr3438305wmb.167.1560428114057; Thu, 13 Jun 2019 05:15:14 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id y6sm2010576wrp.12.2019.06.13.05.15.13 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 05:15:13 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Date: Thu, 13 Jun 2019 13:14:21 +0100 Message-Id: <20190613121433.5246-37-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190613121433.5246-1-peter.maydell@linaro.org> References: <20190613121433.5246-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::342 Subject: [Qemu-devel] [PULL 36/48] target/arm: Convert VNEG to decodetree X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Convert the VNEG instruction to decodetree. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/translate-vfp.inc.c | 10 ++++++++++ target/arm/translate.c | 6 +----- target/arm/vfp.decode | 5 +++++ 3 files changed, 16 insertions(+), 5 deletions(-) -- 2.20.1 diff --git a/target/arm/translate-vfp.inc.c b/target/arm/translate-vfp.inc.c index d0282f1f921..6e06b2a130a 100644 --- a/target/arm/translate-vfp.inc.c +++ b/target/arm/translate-vfp.inc.c @@ -1898,3 +1898,13 @@ static bool trans_VABS_dp(DisasContext *s, arg_VABS_dp *a) { return do_vfp_2op_dp(s, gen_helper_vfp_absd, a->vd, a->vm); } + +static bool trans_VNEG_sp(DisasContext *s, arg_VNEG_sp *a) +{ + return do_vfp_2op_sp(s, gen_helper_vfp_negs, a->vd, a->vm); +} + +static bool trans_VNEG_dp(DisasContext *s, arg_VNEG_dp *a) +{ + return do_vfp_2op_dp(s, gen_helper_vfp_negd, a->vd, a->vm); +} diff --git a/target/arm/translate.c b/target/arm/translate.c index 010dc32c5f7..3baf2baec3f 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -3098,7 +3098,7 @@ static int disas_vfp_insn(DisasContext *s, uint32_t insn) return 1; case 15: switch (rn) { - case 1: + case 1 ... 2: /* Already handled by decodetree */ return 1; default: @@ -3112,7 +3112,6 @@ static int disas_vfp_insn(DisasContext *s, uint32_t insn) /* rn is opcode, encoded as per VFP_SREG_N. */ switch (rn) { case 0x00: /* vmov */ - case 0x02: /* vneg */ case 0x03: /* vsqrt */ break; @@ -3291,9 +3290,6 @@ static int disas_vfp_insn(DisasContext *s, uint32_t insn) case 0: /* cpy */ /* no-op */ break; - case 2: /* neg */ - gen_vfp_neg(dp); - break; case 3: /* sqrt */ gen_vfp_sqrt(dp); break; diff --git a/target/arm/vfp.decode b/target/arm/vfp.decode index 7035861c270..79e41963be4 100644 --- a/target/arm/vfp.decode +++ b/target/arm/vfp.decode @@ -161,3 +161,8 @@ VABS_sp ---- 1110 1.11 0000 .... 1010 11.0 .... \ vd=%vd_sp vm=%vm_sp VABS_dp ---- 1110 1.11 0000 .... 1011 11.0 .... \ vd=%vd_dp vm=%vm_dp + +VNEG_sp ---- 1110 1.11 0001 .... 1010 01.0 .... \ + vd=%vd_sp vm=%vm_sp +VNEG_dp ---- 1110 1.11 0001 .... 1011 01.0 .... \ + vd=%vd_dp vm=%vm_dp