From patchwork Wed May 1 05:05:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 163204 Delivered-To: patch@linaro.org Received: by 2002:a92:7e86:0:0:0:0:0 with SMTP id q6csp4134215ill; Tue, 30 Apr 2019 22:27:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqzMm5fDDtj5AzirpKPpbW7ZCWnclmw97nLWk6nRghO5SoPEmr1z3yDrg6oNvjK1bvT0eM82 X-Received: by 2002:adf:e546:: with SMTP id z6mr4458362wrm.287.1556688423122; Tue, 30 Apr 2019 22:27:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556688423; cv=none; d=google.com; s=arc-20160816; b=DO7GUleSo4JF2YYH2EjHsokfqRGa5BlYb6v/N/O134iDMg4gEwQsm1G2mktQ7f4X/K gylvEES79NxqosExtdAXEOsbXuvvadjnq5a621ojv5oJXWLRI6CLgP6peyb9KR5GyV/R GoazfCAuCWRlwnbZ58+b7QgEMDjBCof47xQsHVSYZ26vUoNOQdZmnvVnmtAGYihVkhCu qSKUfrRyLtDLSch1abOY96Mv5OpTscbTGN31HJxT6YyxA/Rsdc4q8go8g1t+diIW6+zT a5u8ROp4FQO1bKhr1jziPgihyJyikf7kVRUyXp4flQHkeFdTrmlHlil1EBNgBjog2bGW +UTg== 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:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=bE8JSPvg4RBd27AfEYsxgw0WnHCLv0Zk1q+/NsO1CmM=; b=KRUc2saaRJNdBGnAiRtr3qNLunEpRxRR3tHh/W6hB81hNlzs2/rFTceDxJhzDGmxPA zP774+v1mYyT7kQpxWsRLAk51S2fv8QIlD8mUHvaJ6p9HRJLbdaKJZNPWCa8G2Whjehh 2+skTyt/gzzT2T+eQ4twDcslIwWZzgdsd4j9RxK31/MO460ZM47OWdKYDL3fLsEm/fTc zggX85BmcbHR/YdfU5/d5hare7JzlQapPv5fjvlZaTJQMC0m9VG+SXeNfzf31HJGv/Pv kk7h5oJcKH4fVEuLp5LWA6a4fFc5Dt+fLgG3bbnxtlTc6tpAMtZnQhZh0AhpQ+HPGss2 pkPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=gKoRIBrE; 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 l10si8688142wrp.239.2019.04.30.22.27.02 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 30 Apr 2019 22:27:03 -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=gKoRIBrE; 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]:36586 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLhlm-0007gU-61 for patch@linaro.org; Wed, 01 May 2019 01:27:02 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLhRi-0006i2-Vg for qemu-devel@nongnu.org; Wed, 01 May 2019 01:06:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLhRf-00032e-0p for qemu-devel@nongnu.org; Wed, 01 May 2019 01:06:18 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:45893) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hLhRd-000317-OX for qemu-devel@nongnu.org; Wed, 01 May 2019 01:06:14 -0400 Received: by mail-pg1-x541.google.com with SMTP id i21so4414981pgi.12 for ; Tue, 30 Apr 2019 22:06:12 -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; bh=bE8JSPvg4RBd27AfEYsxgw0WnHCLv0Zk1q+/NsO1CmM=; b=gKoRIBrEw0+91rlVQu7QJGYH2DLmv4C/UHU1dl0NdT58C0KtdRquue3JZIcJGtlnl4 KKBLDolHHckRR4CbtpGf3IO5vLGjvzOhW6y6EyBfxiPoEHyTjbXti8TwCY6O8IQQjjkz UWjSMO+223J7dO2LB7LiXT3uqLUtuZQ01Tbv+w/+hg07qygrdIfVnK4q6nlW8u8XEGDc zCgh/eUzNH9g/NEvvOCtGLoM6fUFtWrUzv39lKmcGP9CUXQ4S8wRovhSg5QO3XOGfbfk r29/YycDRRHSSxMZb5HLy/quz9C2P3E4XI++bCMAljIvEQy9qLFH072fDcy4Q9ITA0G3 QteA== 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; bh=bE8JSPvg4RBd27AfEYsxgw0WnHCLv0Zk1q+/NsO1CmM=; b=Q3HtffVJmVb32+vy9Oj3We9hbZNjqBNBrhuOSrv3pPJ+wQUJrq6Q2oi9+rdVUSVmHF P+6nX6txm6E1Ii2ZTS3QCKJ8PRNJ+niJ9ziBDd07gtxsycXBjhPlDPG9GQvzDhmar6ZE deC8vIRcH1q5uS6zU4PqqtLa604jDRlBIhMt5VrX6Fz/pK61bqyaBRo0JlciH4XClF+Q Llb9pqJQUlNIYTazL9yropIWhcSy47y8k8wQH1UOKqDgJE4CGrCu3q2faXo1A8Sy48kY eLhRCo8BF17C18put337KM+b4+VssZTwnZY0w0r9RKU6nsukMc51RvGmqUSNZPdXwkWb hWMA== X-Gm-Message-State: APjAAAV+xNmu1zEf47mL/ipczLPnQnmp/OUrqrHMLOIi8uvJQOfdFp/p gcwyVLZkArfdYGL6k2M+zU+HJA4SLso= X-Received: by 2002:aa7:8212:: with SMTP id k18mr75367635pfi.50.1556687171202; Tue, 30 Apr 2019 22:06:11 -0700 (PDT) Received: from localhost.localdomain (97-113-189-189.tukw.qwest.net. [97.113.189.189]) by smtp.gmail.com with ESMTPSA id t127sm9687251pfb.106.2019.04.30.22.06.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Apr 2019 22:06:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 30 Apr 2019 22:05:29 -0700 Message-Id: <20190501050536.15580-23-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190501050536.15580-1-richard.henderson@linaro.org> References: <20190501050536.15580-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::541 Subject: [Qemu-devel] [PATCH v2 22/29] 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: , 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 Reviewed-by: Alex Bennée 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 61c2dbbff2..e7f8d96e21 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. */ @@ -2209,6 +2210,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; @@ -2320,6 +2324,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: @@ -2563,6 +2568,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: