From nobody Thu Oct 30 08:09:39 2025 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) 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=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1510067713119773.1510448959332; Tue, 7 Nov 2017 07:15:13 -0800 (PST) Received: from localhost ([::1]:53897 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eC5aZ-0004km-7K for importer@patchew.org; Tue, 07 Nov 2017 10:14:55 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eC5SM-0005rc-2N for qemu-devel@nongnu.org; Tue, 07 Nov 2017 10:06:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eC5SI-00008g-MB for qemu-devel@nongnu.org; Tue, 07 Nov 2017 10:06:26 -0500 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:50997) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eC5SI-00007d-GY for qemu-devel@nongnu.org; Tue, 07 Nov 2017 10:06:22 -0500 Received: by mail-wm0-x242.google.com with SMTP id s66so4334632wmf.5 for ; Tue, 07 Nov 2017 07:06:22 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id o135sm2262492wmg.1.2017.11.07.07.06.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Nov 2017 07:06:16 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id F3AA03E061C; Tue, 7 Nov 2017 15:06:09 +0000 (GMT) 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=08zOc1t0wstXM2NGnYCovki0Coxc7wLE9BBSxT+bosI=; b=eyaT421FIXR8h0N2gCrqcuzq9sPT4EB07pfMrRC6PQbFNEwZVEZ/iPM2X4eMj5fSHX +IeIEXbW1HwWThKGAPOgrCkP8TbNgCc9F2Acawwewc9eSYI523mdboiDU5bM6JFLd1AP ySMSUYcmPr7Or76JxS1z2ePZ7Crp5QJTlJKVI= 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=08zOc1t0wstXM2NGnYCovki0Coxc7wLE9BBSxT+bosI=; b=UUhp5NA1gDYP1RSkkKo0vNiTtdM6KmgFH+6ZRDZnO6uqQybf0MhFE9upeHvCA/z9+L +2jModtbdNIusy68c2kHCK0Vtf9HOS0KtffrO7btNh572PcImzipz/bEemPyg5p6x+hw YJ5L7ekUin3+ukcX4g9G/iKBG8wZMcgRKqRYsjkybWwgYFSeaCQpI++EEHNSvxAgUeuj fZFFpa/Dgf4yJiZenLltJeWsyEA5vfsRtqAB3H3s9H7rG5S4FNEHOHZzvhNWY4Oqyyfo KBk2kxcMA4q6CE1xEf0Y5l1JXbAq8rYW7QwKHFi6yRMIsTSV+uhW1BVs9S8+tWy/ZgIL 3rSw== X-Gm-Message-State: AJaThX5dXaF2gAycf+Sjp9X5u+UfMiPbDyOqUclCTjwpm79VAgc/o0AI oV8qoZYvCyQxRH0Mb2jMQLF3I168Ecs= X-Google-Smtp-Source: ABhQp+TqaNPpv8eaxHm0Q8jUiy0Ac6pOz9kO6resI1EL25FiJHav5FtHC/nr2lntq5fPg1o4Qn2mSw== X-Received: by 10.28.1.199 with SMTP id 190mr1738841wmb.51.1510067181370; Tue, 07 Nov 2017 07:06:21 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Tue, 7 Nov 2017 15:05:58 +0000 Message-Id: <20171107150558.22131-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171107150558.22131-1-alex.bennee@linaro.org> References: <20171107150558.22131-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::242 Subject: [Qemu-devel] [RISU PATCH 10/10] risu_reginfo_aarch64: add SVE support to reginfo_dump_mismatch 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, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Dave.Martin@arm.com, qemu-devel@nongnu.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_6 Z_629925259 SPT_0 Signed-off-by: Alex Benn=C3=A9e --- risu_reginfo_aarch64.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++= +++ 1 file changed, 49 insertions(+) diff --git a/risu_reginfo_aarch64.c b/risu_reginfo_aarch64.c index 7c97790..8aba192 100644 --- a/risu_reginfo_aarch64.c +++ b/risu_reginfo_aarch64.c @@ -141,6 +141,18 @@ int reginfo_is_eq(struct reginfo *r1, struct reginfo *= r2) return memcmp(r1, r2, sizeof(*r1)) =3D=3D 0; } =20 +#ifdef SVE_MAGIC +static int sve_zreg_is_eq(struct reginfo *r1, struct reginfo *r2, int z) +{ + return memcmp(r1->zregs[z], r2->zregs[z], sizeof(*r1->zregs[z])) =3D= =3D 0; +} + +static int sve_preg_is_eq(struct reginfo *r1, struct reginfo *r2, int p) +{ + return memcmp(r1->pregs[p], r2->pregs[p], sizeof(*r1->pregs[p])) =3D= =3D 0; +} +#endif + /* reginfo_dump: print state to a stream, returns nonzero on success */ int reginfo_dump(struct reginfo *ri, FILE * f) { @@ -216,5 +228,42 @@ int reginfo_dump_mismatch(struct reginfo *m, struct re= ginfo *a, FILE * f) } } =20 +#ifdef SVE_MAGIC + if (test_sve) { + if (m->vl !=3D a->vl) { + fprintf(f, " SVE VL : %d vs %d\n", m->vl, a->vl); + } + for (i =3D 0; i < SVE_NUM_PREGS; i++) { + if (!sve_preg_is_eq(m, a, i)) { + int q; + fprintf(f, " P%2d : ", i); + for (q =3D 0; q < sve_vq_from_vl(m->vl); q++) { + fprintf(f, "%04x", m->pregs[i][q]); + } + fprintf(f, " vs "); + for (q =3D 0; q < sve_vq_from_vl(m->vl); q++) { + fprintf(f, "%04x", a->pregs[i][q]); + } + fprintf(f, "\n"); + } + } + for (i =3D 0; i < SVE_NUM_ZREGS; i++) { + if (!sve_zreg_is_eq(m, a, i)) { + int q; + char *pad=3D""; + fprintf(f, " Z%2d : ", i); + for (q =3D 0; q < sve_vq_from_vl(m->vl); q++) { + if (m->zregs[i][q] !=3D a->zregs[i][q]) { + fprintf(f, "%sq%02d: %016" PRIx64 "%016" PRIx64 " vs %= 016" PRIx64 "%016" PRIx64"\n", pad, q, + (uint64_t) (m->zregs[i][q] >> 64), (uint64_t) = m->zregs[i][q], + (uint64_t) (a->zregs[i][q] >> 64), (uint64_t) = a->zregs[i][q]); + pad =3D " "; + } + } + } + } + } +#endif + return !ferror(f); } --=20 2.14.2