From nobody Wed Feb 11 03:07:59 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1529547832905854.0580974823172; Wed, 20 Jun 2018 19:23:52 -0700 (PDT) Received: from localhost ([::1]:52636 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVpGK-0002Sf-8x for importer@patchew.org; Wed, 20 Jun 2018 22:23:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVooT-0004uH-5T for qemu-devel@nongnu.org; Wed, 20 Jun 2018 21:55:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fVooS-0003Ut-Bq for qemu-devel@nongnu.org; Wed, 20 Jun 2018 21:55:05 -0400 Received: from mail-pl0-x235.google.com ([2607:f8b0:400e:c01::235]:36790) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fVooS-0003UV-5W for qemu-devel@nongnu.org; Wed, 20 Jun 2018 21:55:04 -0400 Received: by mail-pl0-x235.google.com with SMTP id a7-v6so758236plp.3 for ; Wed, 20 Jun 2018 18:55:03 -0700 (PDT) Received: from cloudburst.twiddle.net (mta-98-147-121-51.hawaii.rr.com. [98.147.121.51]) by smtp.gmail.com with ESMTPSA id a27-v6sm6187946pfc.18.2018.06.20.18.55.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Jun 2018 18:55:02 -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=NuYhoUhPplWoUIEzViyhFHHhbuisvWgK7aXq7dj7Bws=; b=iZl8jqOl7KrFWi80RF2LGXQt82p2pfqtffZyTACNRDOWHwWYYl/rx6ZJdHdS3RfWNf nVR7y1alA9zxk71vOKbKH5njN1hGyc6Owt1HtRhV0QZmyx1ECW1DdfW14TeF63xhtayC xwRMMBtEMxH5jIr0WlGbJggCEQallIpWJ3VLU= 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=NuYhoUhPplWoUIEzViyhFHHhbuisvWgK7aXq7dj7Bws=; b=QyDoObEchFY5h02hd1ug4Nf3iQEZdToXng2eiDL6H/jwpiuK5TxtNs6Y5elhdeVpFK 47f10oS+b6WEE44gbU5h2WtftCnb87+rlfAwiKhocP9nVNn6C/ukHyWD4t61csN7N+hq skQhxb+Hh4/xfqkbrbeyqnCb/OxoQ5rIuLjMtCdDQgDDniFB5/dkshjNaY+fvDIXHcUG o26BjjzE8LYrjD30o/BUm/ZAY5jTuUn5cXtdIi+Yz70/nQIscZR6bUNpMcK/NRHwMXYB SpEG3RCUjc4e8smBJGldTJXR6KkjJBQoFGmIHK6GSG4ontXQryPxa5PJRsfgtJewEwEG fhGQ== X-Gm-Message-State: APt69E0e8q7KX3KPqRjn5jeQ59aFny74qcLTFJD+fMYKJ5c5EQNuEIGU 9dBYVtuRAX+ZHFhtjbP5XcRfbJLKqDc= X-Google-Smtp-Source: ADUXVKKOtCJ6YS0tsmGLo1DjKrgp0ikOfRmwB9xaeHxVKoCu0dbkabGQNHRQSzmv9m6Qa1IYDfW3FQ== X-Received: by 2002:a17:902:9a06:: with SMTP id v6-v6mr26242519plp.21.1529546102935; Wed, 20 Jun 2018 18:55:02 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 20 Jun 2018 15:53:54 -1000 Message-Id: <20180621015359.12018-31-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180621015359.12018-1-richard.henderson@linaro.org> References: <20180621015359.12018-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::235 Subject: [Qemu-devel] [PATCH v5 30/35] target/arm: Pass index to AdvSIMD FCMLA (indexed) 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@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The original commit failed to pass, or use, the index. Fixes: d17b7cdcf4ea Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 21 ++++++++++++--------- target/arm/vec_helper.c | 10 ++++++---- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 8d8a4cecb0..038e48278f 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -12669,15 +12669,18 @@ static void disas_simd_indexed(DisasContext *s, u= int32_t insn) case 0x13: /* FCMLA #90 */ case 0x15: /* FCMLA #180 */ case 0x17: /* FCMLA #270 */ - tcg_gen_gvec_3_ptr(vec_full_reg_offset(s, rd), - vec_full_reg_offset(s, rn), - vec_reg_offset(s, rm, index, size), fpst, - is_q ? 16 : 8, vec_full_reg_size(s), - extract32(insn, 13, 2), /* rot */ - size =3D=3D MO_64 - ? gen_helper_gvec_fcmlas_idx - : gen_helper_gvec_fcmlah_idx); - tcg_temp_free_ptr(fpst); + { + int rot =3D extract32(insn, 13, 2); + int data =3D index * 4 + rot; + tcg_gen_gvec_3_ptr(vec_full_reg_offset(s, rd), + vec_full_reg_offset(s, rn), + vec_reg_offset(s, rm, index, size), fpst, + is_q ? 16 : 8, vec_full_reg_size(s), data, + size =3D=3D MO_64 + ? gen_helper_gvec_fcmlas_idx + : gen_helper_gvec_fcmlah_idx); + tcg_temp_free_ptr(fpst); + } return; } =20 diff --git a/target/arm/vec_helper.c b/target/arm/vec_helper.c index 073e5c58e7..8f2dc4b989 100644 --- a/target/arm/vec_helper.c +++ b/target/arm/vec_helper.c @@ -317,10 +317,11 @@ void HELPER(gvec_fcmlah_idx)(void *vd, void *vn, void= *vm, float_status *fpst =3D vfpst; intptr_t flip =3D extract32(desc, SIMD_DATA_SHIFT, 1); uint32_t neg_imag =3D extract32(desc, SIMD_DATA_SHIFT + 1, 1); + intptr_t index =3D extract32(desc, SIMD_DATA_SHIFT + 2, 2); uint32_t neg_real =3D flip ^ neg_imag; uintptr_t i; - float16 e1 =3D m[H2(flip)]; - float16 e3 =3D m[H2(1 - flip)]; + float16 e1 =3D m[H2(2 * index + flip)]; + float16 e3 =3D m[H2(2 * index + 1 - flip)]; =20 /* Shift boolean to the sign bit so we can xor to negate. */ neg_real <<=3D 15; @@ -377,10 +378,11 @@ void HELPER(gvec_fcmlas_idx)(void *vd, void *vn, void= *vm, float_status *fpst =3D vfpst; intptr_t flip =3D extract32(desc, SIMD_DATA_SHIFT, 1); uint32_t neg_imag =3D extract32(desc, SIMD_DATA_SHIFT + 1, 1); + intptr_t index =3D extract32(desc, SIMD_DATA_SHIFT + 2, 2); uint32_t neg_real =3D flip ^ neg_imag; uintptr_t i; - float32 e1 =3D m[H4(flip)]; - float32 e3 =3D m[H4(1 - flip)]; + float32 e1 =3D m[H4(2 * index + flip)]; + float32 e3 =3D m[H4(2 * index + 1 - flip)]; =20 /* Shift boolean to the sign bit so we can xor to negate. */ neg_real <<=3D 31; --=20 2.17.1