From patchwork Wed Feb 28 19:31:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 130054 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp130648lja; Wed, 28 Feb 2018 11:35:15 -0800 (PST) X-Google-Smtp-Source: AG47ELtnjjkUsJ7x37LkGMnG37fMAOCN9jLCVfsKUZcfhdk0Xnu1Gviuu9hvsL0KqohduwavdoTY X-Received: by 10.129.201.11 with SMTP id o11mr13066773ywi.2.1519846515846; Wed, 28 Feb 2018 11:35:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519846515; cv=none; d=google.com; s=arc-20160816; b=vwrSrehIhvmR0Pd+Qwy7jRpRs/HeiVPYL/ac3Cr7imuQUc8W8zhU3dptvih72mhC19 uQykJdA8m/NTRsuptiWgGHw7blzNdqTJcGPJGcUcw7Y9tYCr09sV7fzPqvOXmwoTJdqp HcPlyW/++xtDRRq7OdkL3QZ2Fhmr402qWnU7g1dpwucpmq481AEShA6NhPNPuey3umKX tFj7nxmSja3aKvwiXW6aoYPyWTJAR8uGbYk/zOHHPsIThM4TyRsy4cvPFHnrpLQW0cfJ u+63AxLZBq2UpkykUUxRBETd6meXKUa+veUtFm6lJFqAGc/bEuFDbljZze3P1KQHccpB tDhw== 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:arc-authentication-results; bh=mQkoNHAW8gt1UnT6vN1GNxitBesZm1YW8MnE7dIye3Q=; b=MGa8hMp5R6i+bw544nqbpTImbj2CA/3lM5oiHXs6YeF6YX2Z18yDIK2RlUANg4NSv1 FtPPMXTUpIM9Ifosk4SJlH00Jh42N/5jZmMtzgAaTPvV0DBFDbkDBKv+wwqd3L+Ztka4 1tUprnlYvKKAEoGos8oh3Pbh+48s+73vwc0LLDzp1mm1GsLK19u8UIo0bqBDyzgivPYt bdpeYom8WUl5wuM/LC3Z1fijR66XMgNpTkt/RcZClc0V0T5V4DvdzQJjWW5dtYS3hykp DMNC6OOWrKoHGWs0Y1loLCqap5p+uuQI8DLZ9B5UTFXfzFShE7dkq1HY7RptR+kcju+w KyMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=eZ2//YmX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id y8-v6si378454ybg.115.2018.02.28.11.35.15 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 28 Feb 2018 11:35:15 -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; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=eZ2//YmX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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]:46418 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er7VT-00061Z-6S for patch@linaro.org; Wed, 28 Feb 2018 14:35:15 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35594) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er7S1-0003O3-Vh for qemu-devel@nongnu.org; Wed, 28 Feb 2018 14:31:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1er7S0-0006MD-Is for qemu-devel@nongnu.org; Wed, 28 Feb 2018 14:31:41 -0500 Received: from mail-pl0-x241.google.com ([2607:f8b0:400e:c01::241]:41272) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1er7S0-0006Lb-CO for qemu-devel@nongnu.org; Wed, 28 Feb 2018 14:31:40 -0500 Received: by mail-pl0-x241.google.com with SMTP id k8-v6so2115980pli.8 for ; Wed, 28 Feb 2018 11:31:40 -0800 (PST) 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=mQkoNHAW8gt1UnT6vN1GNxitBesZm1YW8MnE7dIye3Q=; b=eZ2//YmXUQMghhREthF7NmqfRxMsAfFBqLhefH70Vt/4y8zm+WTze3Z9mO3Y1Hsb2x M8e5GDrvjoiuR/lzCDs5qvMfNb2WGSEO8C3Td0ilr55eoiiCCUNKrQ2XUp0SQpqbW5zY +zH+ROusKT3zU7L3UmK8l1hRO3a09N3AAdXoQ= 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=mQkoNHAW8gt1UnT6vN1GNxitBesZm1YW8MnE7dIye3Q=; b=S9EfU/SiTOmnRfbb2DdUXoq4Ovi3mMjHt9kiFAEuxbdmInYWtAIwM5FS0XTc4cxZl/ KJvvvqU6tY6upSpGm68GzfggPVCkAeymy1lWtTZV9aSBm045K4vr88HqirRHowruHdI/ 78qiwUkQPe7lqFlLdaauI6UeH4i3W89BHCxR/mPiyKj8N3A+LqgSjeyAHho9B79PxpDO p4R7Qv+7dlHv4czSw4d6K9oh9kGbv+njtqi8FSvHn6uYv/p5B1c/YdksmuDlm5/tQx+W UnHfraGi2iqy3gBLmIMu1US5E2WQXXsRodDuUYnN7s1xFBGFT7LqlK5cU2/B5+zsTe/2 ktkg== X-Gm-Message-State: APf1xPDaNx0H26vGwpaByDidWE+Qz1YB83rihHCpotB1pkIiCyREapqt MZipzfn+KUsM2eZAmT/5lRhWKJXiw1Q= X-Received: by 2002:a17:902:b183:: with SMTP id s3-v6mr14381385plr.108.1519846299135; Wed, 28 Feb 2018 11:31:39 -0800 (PST) Received: from cloudburst.twiddle.net (97-113-169-147.tukw.qwest.net. [97.113.169.147]) by smtp.gmail.com with ESMTPSA id k185sm4200212pgk.94.2018.02.28.11.31.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Feb 2018 11:31:38 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 28 Feb 2018 11:31:17 -0800 Message-Id: <20180228193125.20577-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180228193125.20577-1-richard.henderson@linaro.org> References: <20180228193125.20577-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:400e:c01::241 Subject: [Qemu-devel] [PATCH v3 08/16] target/arm: Decode aa32 armv8.1 two reg and a scalar 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: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/translate.c | 46 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) -- 2.14.3 diff --git a/target/arm/translate.c b/target/arm/translate.c index 05fa6a53f9..9169b6b367 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -76,6 +76,10 @@ static const char *regnames[] = { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "pc" }; +/* Function prototypes for gen_ functions calling Neon helpers. */ +typedef void NeonGenThreeOpEnvFn(TCGv_i32, TCGv_env, TCGv_i32, + TCGv_i32, TCGv_i32); + /* initialize TCG globals. */ void arm_translate_init(void) { @@ -6985,11 +6989,45 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn) } neon_store_reg64(cpu_V0, rd + pass); } - - break; - default: /* 14 and 15 are RESERVED */ - return 1; + case 14: /* VQRDMLAH scalar */ + case 15: /* VQRDMLSH scalar */ + { + NeonGenThreeOpEnvFn *fn; + + if (!arm_dc_feature(s, ARM_FEATURE_V8_RDM)) { + return 1; + } + if (u && ((rd | rn) & 1)) { + return 1; + } + if (op == 14) { + if (size == 1) { + fn = gen_helper_neon_qrdmlah_s16; + } else { + fn = gen_helper_neon_qrdmlah_s32; + } + } else { + if (size == 1) { + fn = gen_helper_neon_qrdmlsh_s16; + } else { + fn = gen_helper_neon_qrdmlsh_s32; + } + } + + tmp2 = neon_get_scalar(size, rm); + for (pass = 0; pass < (u ? 4 : 2); pass++) { + tmp = neon_load_reg(rn, pass); + tmp3 = neon_load_reg(rd, pass); + fn(tmp, cpu_env, tmp, tmp2, tmp3); + tcg_temp_free_i32(tmp3); + neon_store_reg(rd, pass, tmp); + } + tcg_temp_free_i32(tmp2); + } + break; + default: + g_assert_not_reached(); } } } else { /* size == 3 */