From patchwork Wed Jan 29 13:39:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 23855 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f200.google.com (mail-ve0-f200.google.com [209.85.128.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7F853202FA for ; Wed, 29 Jan 2014 13:50:57 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id c14sf4391765vea.11 for ; Wed, 29 Jan 2014 05:50:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=HE4bN57E9i1iiyVhsd5Gu1CGL2kvB2L+ouz1i/fXkDg=; b=GeTqX585DJbYRs2AerzcdA2IijWCUnl5gGSSz+bu8CFtiAX1pxR68a6YUKBiafp5jq PtiRqa4NnOKGwGbzsAlW6PkbBSCfzDya1rBmKqRGmWGSfaYdyypuVyO/JWorKkyGUNgJ zMxEIRjl4RTsWMgO4wzCjmieaP9W2JVgu9w09inq7dCw6hps7Zeeeyxl6Pq/dFiVxgzL ufbOKfP8C4u4QKWjeeS2AkljKduu06J4TNRtQNMUc8nXlldwG0Rmx5pfmDk6vATqT/sG yxwJTctRH3CWP5OMTVzO4V8Kc4JMhE5rVee/Ksi8VrB2UZUgmAA3OaR20iZrY+cJCjcI SQjA== X-Gm-Message-State: ALoCoQlw0L6lnrqX/smGaGqqx2o+xvyZUuGlRWqcjgftc8kd9oFQMOLm7klmp0ypoJddHEuh2OZ7 X-Received: by 10.236.17.161 with SMTP id j21mr1526821yhj.55.1391003456688; Wed, 29 Jan 2014 05:50:56 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.39.134 with SMTP id v6ls85716qgv.36.gmail; Wed, 29 Jan 2014 05:50:56 -0800 (PST) X-Received: by 10.59.0.193 with SMTP id ba1mr6663936ved.12.1391003456539; Wed, 29 Jan 2014 05:50:56 -0800 (PST) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id tt2si812630vdc.35.2014.01.29.05.50.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Jan 2014 05:50:56 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.173; Received: by mail-ve0-f173.google.com with SMTP id oz11so1179876veb.18 for ; Wed, 29 Jan 2014 05:50:56 -0800 (PST) X-Received: by 10.52.30.167 with SMTP id t7mr556937vdh.36.1391003456454; Wed, 29 Jan 2014 05:50:56 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp114197vcz; Wed, 29 Jan 2014 05:50:56 -0800 (PST) X-Received: by 10.224.156.68 with SMTP id v4mr12115484qaw.66.1391003455689; Wed, 29 Jan 2014 05:50:55 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id t101si1804162qge.51.2014.01.29.05.50.51 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 29 Jan 2014 05:50:55 -0800 (PST) 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; Received: from localhost ([::1]:42404 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8VXW-0006xo-Ez for patch@linaro.org; Wed, 29 Jan 2014 08:50:50 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8VNj-0001Im-UM for qemu-devel@nongnu.org; Wed, 29 Jan 2014 08:40:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W8VNi-0001Ld-GU for qemu-devel@nongnu.org; Wed, 29 Jan 2014 08:40:43 -0500 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:45249) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8VNi-0001GJ-7h for qemu-devel@nongnu.org; Wed, 29 Jan 2014 08:40:42 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1W8VN8-0006xm-AX; Wed, 29 Jan 2014 13:40:06 +0000 From: Peter Maydell To: Anthony Liguori Date: Wed, 29 Jan 2014 13:39:53 +0000 Message-Id: <1391002805-26596-27-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1391002805-26596-1-git-send-email-peter.maydell@linaro.org> References: <1391002805-26596-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Cc: Blue Swirl , qemu-devel@nongnu.org, Aurelien Jarno Subject: [Qemu-devel] [PULL 26/38] target-arm: A64: Add SIMD three-different ABDL instructions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 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-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Implement the absolute-difference instructions in the SIMD three-different group: SABAL, SABAL2, UABAL, UABAL2, SABDL, SABDL2, UABDL, UABDL2. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target-arm/translate-a64.c | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c index e8479a5..e098efd 100644 --- a/target-arm/translate-a64.c +++ b/target-arm/translate-a64.c @@ -5602,6 +5602,21 @@ static void handle_3rd_widening(DisasContext *s, int is_q, int is_u, int size, } switch (opcode) { + case 5: /* SABAL, SABAL2, UABAL, UABAL2 */ + case 7: /* SABDL, SABDL2, UABDL, UABDL2 */ + { + TCGv_i64 tcg_tmp1 = tcg_temp_new_i64(); + TCGv_i64 tcg_tmp2 = tcg_temp_new_i64(); + + tcg_gen_sub_i64(tcg_tmp1, tcg_op1, tcg_op2); + tcg_gen_sub_i64(tcg_tmp2, tcg_op2, tcg_op1); + tcg_gen_movcond_i64(is_u ? TCG_COND_GEU : TCG_COND_GE, + tcg_passres, + tcg_op1, tcg_op2, tcg_tmp1, tcg_tmp2); + tcg_temp_free_i64(tcg_tmp1); + tcg_temp_free_i64(tcg_tmp2); + break; + } case 8: /* SMLAL, SMLAL2, UMLAL, UMLAL2 */ case 10: /* SMLSL, SMLSL2, UMLSL, UMLSL2 */ case 12: /* UMULL, UMULL2, SMULL, SMULL2 */ @@ -5640,6 +5655,22 @@ static void handle_3rd_widening(DisasContext *s, int is_q, int is_u, int size, } switch (opcode) { + case 5: /* SABAL, SABAL2, UABAL, UABAL2 */ + case 7: /* SABDL, SABDL2, UABDL, UABDL2 */ + if (size == 0) { + if (is_u) { + gen_helper_neon_abdl_u16(tcg_passres, tcg_op1, tcg_op2); + } else { + gen_helper_neon_abdl_s16(tcg_passres, tcg_op1, tcg_op2); + } + } else { + if (is_u) { + gen_helper_neon_abdl_u32(tcg_passres, tcg_op1, tcg_op2); + } else { + gen_helper_neon_abdl_s32(tcg_passres, tcg_op1, tcg_op2); + } + } + break; case 8: /* SMLAL, SMLAL2, UMLAL, UMLAL2 */ case 10: /* SMLSL, SMLSL2, UMLSL, UMLSL2 */ case 12: /* UMULL, UMULL2, SMULL, SMULL2 */ @@ -5739,10 +5770,10 @@ static void disas_simd_three_reg_diff(DisasContext *s, uint32_t insn) /* fall through */ case 0: case 2: - case 5: - case 7: unsupported_encoding(s, insn); break; + case 5: + case 7: case 8: case 10: case 12: