From patchwork Sat Apr 20 07:34:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 162579 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp312234jan; Sat, 20 Apr 2019 00:58:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqyTAb6SgCkQSLMuG9My+YiMQJanAeqG1xcwjV8n+0XO0b0sj2rhvxLBoEyGxdNWLMZgSRbz X-Received: by 2002:adf:e309:: with SMTP id b9mr1626792wrj.165.1555747099200; Sat, 20 Apr 2019 00:58:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555747099; cv=none; d=google.com; s=arc-20160816; b=fO904Q99dPDXLkDNc2JIvjoR3gcIEThq4WhRAsDWtZpAd79/AlwZX2y9RGw5D8UNnv g74nkExOAFJWYVabdJiytFRTsN0cN0Fob1/ljoGw51drh1ZPQuE9nfkPp/cqOPp4/6xm 9DOzUY3TnIhigRv4d5oCxfcjQm8k+NaoPs88vWEpUAZBVSmFMwsLjEWysTvybRyY767X T2wHtbeXQoTWR/5aSCABaRUr/ylaxzXS2aZ5AaUp9TVrE/W9dgdCgdVUGeuY3/48+Jmt Eil/UVYLmrmjrEZ9s72MdiF2ETajqi9iCJxRv6kHHs1qvqXzOZIcarCIa6XNuqYq9piU vSyw== 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; bh=L7/jGco+/JJYnhyme4mE2WKjitzinpGKSfbQsfSJn94=; b=h+i5ubc78nxHGVjQReQgUYbsmOhjurG0PNDY59FM1Rt7uluJRLLjd2H+ITxIzOjxKp PU/Lh+32rYIQzV1ks4a7edSjvpoazKMs8Jriz7AZWwckNQBiP5uUYa3szRLBuFaBiO6s 2cQ8r+i+ifhgDb0KFoPjx/si9XMB72jWEKGvvaLY/OUSX8+TyCbmpQ0aMkJyHZws/TJq sfS7fplsZPouVjsZRcifkw5paGJHN5z/bXlPwF+1z5AoifP4VWbH8jaPUMNqq594mIC0 /WioLTPNWzIw4R3cuAJT/HnIgRJS2R5Erxipvw0uxfaZ0q5xH/WG+qtcLdHTiaGR9VsQ rqeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ClFSOIvv; 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 q72si5467026wme.146.2019.04.20.00.58.18 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 20 Apr 2019 00:58:19 -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=ClFSOIvv; 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 ([127.0.0.1]:38388 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHkt8-0002z0-7P for patch@linaro.org; Sat, 20 Apr 2019 03:58:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40517) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHkXX-00011a-DZ for qemu-devel@nongnu.org; Sat, 20 Apr 2019 03:36:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hHkXW-0000mm-6F for qemu-devel@nongnu.org; Sat, 20 Apr 2019 03:35:59 -0400 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]:40670) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hHkXU-00006M-VL for qemu-devel@nongnu.org; Sat, 20 Apr 2019 03:35:57 -0400 Received: by mail-pf1-x441.google.com with SMTP id c207so3462049pfc.7 for ; Sat, 20 Apr 2019 00:35: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=L7/jGco+/JJYnhyme4mE2WKjitzinpGKSfbQsfSJn94=; b=ClFSOIvv3wKxiaBOLd3diX8DzrLQocKUTRav/6HZMfPGNjCCugVz/yzulcdHG6njKY lo9dfqDXRHPL2wA3+R4XlVqT1q4PhHFW0FDLj/4aLbpeYaUHuEr83RNiKzVmb59vr3T3 Q18zAxrE7ETxmVbET3JsInsJ0Q12K/zfmBtkHuIWbOnQfQoa3Dw2B1X6guZjMCyjac4F s5G0geHHH0K3DOn1N/LPzjVbj/ppZ4Kb8eai2lmvYyjS7rNb0PGOdioWNnfGyvNDhDUx A3vDvfWzoxsFz36ZWGITRpRH+k2MGvrYdC9Aw66W+l6ZMYYnE/0G/QgcLABLqbocUKOH UkbA== 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=L7/jGco+/JJYnhyme4mE2WKjitzinpGKSfbQsfSJn94=; b=S4gQaVaE4M0VBdhCDAMUZntTtJ2g1JCj42TZxHmfcVyEyof+UZkpBPVfu4h1tcgbfA lguxeTprgEpFzcCtyiTYW9MSum2nCfS09g0nUxsnahaX07XHMKZeVVrggELtzysFvvmL cRMSIiajmX6nTnRQQ5ZcmcmqDsQTU+3rx3q+cc0FvJqfMqTAjb7Fk+3yvIkDQyfUUJ36 TEtwc+9iMW+ilvQlPG75c+dLVRm5jFxW+WvqlazFkr34N+JWYawDkIIFoZhJ9ippjxW0 9qeU0I8Tf2/y+XLGtIrYOdm1aNDwrulQNrZzbuxzZ2FNITkwfsQYBL8UU9TKsPzgrEeq ZO6g== X-Gm-Message-State: APjAAAUvxuOA09uZB6pcdyhFOpXjQ+A0tF0Yf2AQ3x3CIsnXJoDgFyA/ TbN2kbNYb9DVtffyDxEDwusIKbZmQM4= X-Received: by 2002:aa7:9116:: with SMTP id 22mr1348838pfh.165.1555745729098; Sat, 20 Apr 2019 00:35:29 -0700 (PDT) Received: from localhost.localdomain (rrcs-66-91-136-155.west.biz.rr.com. [66.91.136.155]) by smtp.gmail.com with ESMTPSA id z22sm7025492pgv.23.2019.04.20.00.35.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Apr 2019 00:35:28 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 19 Apr 2019 21:34:31 -1000 Message-Id: <20190420073442.7488-28-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190420073442.7488-1-richard.henderson@linaro.org> References: <20190420073442.7488-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::441 Subject: [Qemu-devel] [PATCH 27/38] tcg/aarch64: Support vector absolute value 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: david@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.h | 2 +- tcg/aarch64/tcg-target.inc.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/tcg/aarch64/tcg-target.h b/tcg/aarch64/tcg-target.h index 21d06d928c..e43554c3c7 100644 --- a/tcg/aarch64/tcg-target.h +++ b/tcg/aarch64/tcg-target.h @@ -132,7 +132,7 @@ typedef enum { #define TCG_TARGET_HAS_orc_vec 1 #define TCG_TARGET_HAS_not_vec 1 #define TCG_TARGET_HAS_neg_vec 1 -#define TCG_TARGET_HAS_abs_vec 0 +#define TCG_TARGET_HAS_abs_vec 1 #define TCG_TARGET_HAS_shi_vec 1 #define TCG_TARGET_HAS_shs_vec 0 #define TCG_TARGET_HAS_shv_vec 1 diff --git a/tcg/aarch64/tcg-target.inc.c b/tcg/aarch64/tcg-target.inc.c index 7d2a8213ec..cf891defd4 100644 --- a/tcg/aarch64/tcg-target.inc.c +++ b/tcg/aarch64/tcg-target.inc.c @@ -554,6 +554,7 @@ typedef enum { I3617_CMGE0 = 0x2e208800, I3617_CMLE0 = 0x2e20a800, I3617_NOT = 0x2e205800, + I3617_ABS = 0x0e20b800, I3617_NEG = 0x2e20b800, /* System instructions. */ @@ -2205,6 +2206,9 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, case INDEX_op_neg_vec: tcg_out_insn(s, 3617, NEG, is_q, vece, a0, a1); break; + case INDEX_op_abs_vec: + tcg_out_insn(s, 3617, ABS, is_q, vece, a0, a1); + break; case INDEX_op_and_vec: tcg_out_insn(s, 3616, AND, is_q, 0, a0, a1, a2); break; @@ -2316,6 +2320,7 @@ int tcg_can_emit_vec_op(TCGOpcode opc, TCGType type, unsigned vece) case INDEX_op_andc_vec: case INDEX_op_orc_vec: case INDEX_op_neg_vec: + case INDEX_op_abs_vec: case INDEX_op_not_vec: case INDEX_op_cmp_vec: case INDEX_op_shli_vec: @@ -2559,6 +2564,7 @@ static const TCGTargetOpDef *tcg_target_op_def(TCGOpcode op) return &w_w_w; case INDEX_op_not_vec: case INDEX_op_neg_vec: + case INDEX_op_abs_vec: case INDEX_op_shli_vec: case INDEX_op_shri_vec: case INDEX_op_sari_vec: