From patchwork Tue May 14 00:05:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 164091 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp1982771ili; Mon, 13 May 2019 17:28:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqzQkRrelKZJaap0UTkR6nad9slp0HnZjnh6aO2U47wejxz6P6JMAOx9jEuqDBMXjGdjRb4a X-Received: by 2002:aa7:db05:: with SMTP id t5mr31747421eds.217.1557793697661; Mon, 13 May 2019 17:28:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557793697; cv=none; d=google.com; s=arc-20160816; b=vhP0B69+iSz5vll7o/dy7c4q3oyLPDf3USei8zGRWDidynUUH6zeygmmJk5aL46G+A cZneWeFNp9OlL0/O2cAsHhLdRi2sNi3wmimDK9z/WtThfVjMcoeTABW30v7SpqIvKFLF /9xBGyeOWj/FhUQaH9Sk4QTtHkrmAr056Coqf+TLRu3l84ypnUsQpQxlXLhQhcEQNhVz bC3H8+Uwh0QM6u18RyXTnmgHk+bB9iOh4TVTB2Vamq2psLJTvguVhQvdaMo6/MTB0n3P rIBSEyFzlVGuwtyE6rvyJGP0LCViGohjPcUqJDZ6bkzIZX5U2KSTVwrpC986I72Khl0w qGog== 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=9WOXKtEi3L6ImDw3IdIaNV2poL0/GbDzfb9Cr5a6LGc=; b=DOqWMAIxgUNdKsSENz5zX2D6YNBNnXHNiPowFqicKy+aJ04q9X4jvogpH1N62jNopA Uu/ku1WosaaL60d9m9S5AmIoXqcNvwSCj/baQnP9NI8oy7tOxJE8arls+HHo4AHCJ8u4 031VVKi7qY2MgGUPvpoxjn73O04ar2IAAI6kgEiviO6tAbXU8uPf4FtcpYFOzMtQxN5o 0670bVxhotVQVWcEs10bAR0XxFfZ/FgWc+H+A5qZDiHmyS1gWDi9+/52yTUEGLvNroGS rgDcfR5Pz/YVMQP5O3SzgGL6W0P3D4/pSpTGz3smJ0wTPugpW6m7a2ENd+ZYldtVZE1r cxWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=BcO4IuGF; 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 e10si711357edb.321.2019.05.13.17.28.17 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 13 May 2019 17:28:17 -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=BcO4IuGF; 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]:36884 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQLIm-0002Sz-Me for patch@linaro.org; Mon, 13 May 2019 20:28:16 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59366) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQL7R-0004h8-6N for qemu-devel@nongnu.org; Mon, 13 May 2019 20:17:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQKxc-0003mq-44 for qemu-devel@nongnu.org; Mon, 13 May 2019 20:09:07 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]:34087) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hQKxV-0003dS-UB for qemu-devel@nongnu.org; Mon, 13 May 2019 20:06:19 -0400 Received: by mail-pf1-x42e.google.com with SMTP id n19so8073676pfa.1 for ; Mon, 13 May 2019 17:06:14 -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 :mime-version:content-transfer-encoding; bh=9WOXKtEi3L6ImDw3IdIaNV2poL0/GbDzfb9Cr5a6LGc=; b=BcO4IuGF3sq8sDLavMBragVBFJkuFI2xWHFaRRAgOE/Zoz2Oed3+OxkbQwUvfUkF9V q0c1KTXldd+IX0Fa9nqJprLCU7qjbzNXTdBItQ55L0VD97IBOFQK6zEGTCBXTgVmvwwm RaOS8nu/j6PrMeOznjVhoxuCfHzaTu670vwwkA73vhcLQ0rxeorRpDIEbkl6lVigG7Dh nOBjKMBHz0gX5otG3NPW7siCqlKvCNtlmqkmUjgy7oI4LQvTCFkok7VcDboqiIIunM4d guh/g1c/eANCvDgCqps5fnHafYVpxBN847jgEbWcuP15/FK6gosnzTAaUFOXb4bRzBCI +lKw== 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:mime-version:content-transfer-encoding; bh=9WOXKtEi3L6ImDw3IdIaNV2poL0/GbDzfb9Cr5a6LGc=; b=lzt4Nb47S4Yw5wGk6J2kb/gmgZ83YZ8KrtP1PNrpcX0KXDMwwG/pIhB/Ft/nbEEj5X rh9OwP70kO9b+5SBIrQj+ZycNjpkaVawUOp2TUFQUybwPLMdK+v8zESPvgXLLb7ComVG BQHDEX2kqM3i+Jmt0Bufi9usWfXfa1epZU9s5HmnHxGowBRs8cDnsqq0o48xTXYY66NF Y4lX00pt+GexI7ASxXZFSo0UwOFHU6Z9bksu1LHfXlLoTlwneHOo/H+x3jtA9ZqDsZx/ ZXXc+znprcqK1+Doy0BSGD6Njrv0Jm+IJXKYYKo0I0sDyqO9M/H5fR7DoQKX7bXvtTvB /6gg== X-Gm-Message-State: APjAAAUQHJVnEA02bzOIwC3axqKF9iwU2TPqZDovqfDluMfWpBSnOjSe esV+gYp3bEj0USj+SKUUYEWHlKVO08s= X-Received: by 2002:aa7:8096:: with SMTP id v22mr37297927pff.94.1557792372969; Mon, 13 May 2019 17:06:12 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id u3sm238151pfn.29.2019.05.13.17.06.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 May 2019 17:06:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 13 May 2019 17:05:32 -0700 Message-Id: <20190514000540.4313-24-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190514000540.4313-1-richard.henderson@linaro.org> References: <20190514000540.4313-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::42e Subject: [Qemu-devel] [PULL 23/31] 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: peter.maydell@linux.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Alex Bennée 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 df123c07f1..1248dfd04c 100644 --- a/tcg/aarch64/tcg-target.inc.c +++ b/tcg/aarch64/tcg-target.inc.c @@ -552,6 +552,7 @@ typedef enum { I3617_CMGE0 = 0x2e208800, I3617_CMLE0 = 0x2e20a800, I3617_NOT = 0x2e205800, + I3617_ABS = 0x0e20b800, I3617_NEG = 0x2e20b800, /* System instructions. */ @@ -2208,6 +2209,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; @@ -2319,6 +2323,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: @@ -2562,6 +2567,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: