From patchwork Tue Mar 1 09:47:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 547247 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f50:0:0:0:0:0 with SMTP id l16csp3525162imf; Tue, 1 Mar 2022 02:03:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJwNGnqjADGzXQ5OutDa7Qdx+zowWR33VthG7f5bHEX3S2CwMMCGg3jU0IOeDRiKbaw9aWj5 X-Received: by 2002:ac8:5cc9:0:b0:2de:8838:5888 with SMTP id s9-20020ac85cc9000000b002de88385888mr19896490qta.370.1646128993828; Tue, 01 Mar 2022 02:03:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646128993; cv=none; d=google.com; s=arc-20160816; b=oPIxrAGKhjQc+Hp98+Jtc1BemdS3Aq3MCrFzFFywleOpwkd0HA2T4mqDQwtmUzUXGV fkq2cGCm2zxt6ddM13iC5S0L07Gw7lm7/5qu88AOUr+s6XvmrvKnu02+JT+0dmlWmExz Hl67OHpNSLgkhyS1thSvVqPAFMqxZ/PnhwxA2z6QRVd3jSnGOsPyOKPggI5amYUtcJsK i+PIWU5kazWIJJhJsEOok7mJq9JWXEVtcNnZ3rO5Mm4zJYFlw0FVFAvk7lrlqy8phefU RVPZNY2EWBijOmhZsUBBoW/RJGwmeX9xsEbSK2hkTRLotSG9FLMMOEdKcuUOLsZlMiPa HrAQ== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=b2Z0r2dk3nkd5RgGjI14HIVrBPtONff7YVlY3kctiMs=; b=b18/Rhl/KnwB/Ru6ViBl6ky7yvk90lkB5xxcdTRVOXt5ZJZ7OrgtzAjS9K1kwpfV2l iyZ4OF1LjFdazFh3kSgFJMcI+bppmaPWKEgAM3fNOnbdgsmprTCgNp/uGNtZ3oNldpMp W3R4q6Diws+sypNb1ysBSkfUtUbT+PzGjPE6rcKCozZ82KFpZwfgt1asx6pWr42mIL2j 0rkA6u1AWcYAJHWqIeNcvzJ3Lav/tYxxofCqE0K2TVrfe5Vh3mnA/alQ9D4HCsSJSjjh aeybF0AaAqpbIlDQF23sD+DryqXgO6adCFzBp1wFih63Ek2uJ3wn1Y7XYUQpArcFPZfP +wfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=WPnrJmwg; 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 62-20020a370941000000b004771fcd18ffsi3938473qkj.486.2022.03.01.02.03.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Mar 2022 02:03:13 -0800 (PST) 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=WPnrJmwg; 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 ([::1]:43224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOzLd-0005AA-Av for patch@linaro.org; Tue, 01 Mar 2022 05:03:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49606) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOzF1-00080O-81 for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:56:23 -0500 Received: from [2a00:1450:4864:20::633] (port=33572 helo=mail-ej1-x633.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOzEz-0001y0-Od for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:56:22 -0500 Received: by mail-ej1-x633.google.com with SMTP id kt27so1247410ejb.0 for ; Tue, 01 Mar 2022 01:56:21 -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=b2Z0r2dk3nkd5RgGjI14HIVrBPtONff7YVlY3kctiMs=; b=WPnrJmwgEP84fCzrTeorjz+ynrjgdEquH379tGHlHYGpvryb1acxWJUdhsEE3AY0ka 9UBgb4Abcd8QeTWQO5eBGSNaM5Ghg2Fgf0a9/L+AjhusZ+bAFVupyJ9EM3bApvOHOyUu WJtWQn9wt0nvwX2JrMJh3odqOtLaM5VI6w98EdwQrNQ/HrGfZNJaJhG3X/Aqh+1Zt1XK dvVB6L/yN1aU4oN//etdB7I1/RK5Mi+W2gpQuXCHXYODCSkX/L4brdvFsq9bW4hacOhA y4y0X8VESy5efiOyYht3b8F3M5SjyWfNpC3ltAnLa9sneJ0SVHwQ3UvOcvJSfO1Doi64 e9yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=b2Z0r2dk3nkd5RgGjI14HIVrBPtONff7YVlY3kctiMs=; b=LLj7Z1q3MvqrCTm9PbgjJ10eosgpqUhkS1Xiq0Jwf2GDlAfSV0KdpKNQ4fwVMjvpq1 mqtCboppb7DDwUVQgbVVkfkSo38QpqdTwhMydyU+FWYnYKChStscj1x9OvZARCs+MCMh WaIqb3HW2YPUVCYweXRXqk4IqwDmtEufjpWY4QxAf2oYXBsGm0QK7JGF0c2AkiuvzdZY MN80BLKLCrie4x4jUfXK4x2ijVa0ZltKMhX1qtkBna/2UTkZ6398ZHNyEDDYBUanoaeS RQgqKsTofN9e32Hr/WsztCM5glrTmEiOutGW1NeG1kloiWe6Ab/potzfGTzuUNBhZB7H o6og== X-Gm-Message-State: AOAM533hM9kAb3qpASX6rmMxcjY1YbMZDebAxKtE5WhgpWLlFYnuVISb ggCy5ROCcz3vsNYo7N515m1IaQ== X-Received: by 2002:a17:906:6848:b0:6cf:6273:9c47 with SMTP id a8-20020a170906684800b006cf62739c47mr19020774ejs.1.1646128580467; Tue, 01 Mar 2022 01:56:20 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f15-20020a50e08f000000b004134a121ed2sm7153506edl.82.2022.03.01.01.56.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 01:56:16 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5389D1FFC3; Tue, 1 Mar 2022 09:47:16 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 11/18] tests/tcg: build sha1-vector with O3 and compare Date: Tue, 1 Mar 2022 09:47:08 +0000 Message-Id: <20220301094715.550871-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220301094715.550871-1-alex.bennee@linaro.org> References: <20220301094715.550871-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::633 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x633.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , "open list:ARM TCG CPUs" , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The aim of this is to test code generation for vectorised operations. Unfortunately gcc struggles to do much with the messy sha1 code (try -fopt-info-vec-missed to see why). However it's better than nothing. We assume the non-vectorised output is gold and baring compiler bugs the outputs should match. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20220225172021.3493923-12-alex.bennee@linaro.org> diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target index 1d967901bd..df3f8e9438 100644 --- a/tests/tcg/aarch64/Makefile.target +++ b/tests/tcg/aarch64/Makefile.target @@ -50,6 +50,16 @@ sysregs: CFLAGS+=-march=armv8.1-a+sve AARCH64_TESTS += sve-ioctls sve-ioctls: CFLAGS+=-march=armv8.1-a+sve +# Vector SHA1 +sha1-vector: CFLAGS=-O3 +sha1-vector: sha1.c + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) +run-sha1-vector: sha1-vector run-sha1 + $(call run-test, $<, $(QEMU) $(QEMU_OPTS) $<, "$< on $(TARGET_NAME)") + $(call diff-out, sha1-vector, sha1.out) + +TESTS += sha1-vector + ifneq ($(HAVE_GDB_BIN),) GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py diff --git a/tests/tcg/arm/Makefile.target b/tests/tcg/arm/Makefile.target index f509d823d4..2dc94931c3 100644 --- a/tests/tcg/arm/Makefile.target +++ b/tests/tcg/arm/Makefile.target @@ -70,6 +70,15 @@ endif ARM_TESTS += commpage +# Vector SHA1 +sha1-vector: CFLAGS=-O3 +sha1-vector: sha1.c + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) +run-sha1-vector: sha1-vector run-sha1 + $(call run-test, $<, $(QEMU) $(QEMU_OPTS) $<, "$< on $(TARGET_NAME)") + $(call diff-out, sha1-vector, sha1.out) + +ARM_TESTS += sha1-vector TESTS += $(ARM_TESTS) # On ARM Linux only supports 4k pages