From patchwork Mon Nov 9 10:47:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongyu Wang X-Patchwork-Id: 1396650 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=UiTYRTZb; dkim-atps=neutral Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CV7891JQGz9s1l for ; Mon, 9 Nov 2020 21:51:02 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7513E386103A; Mon, 9 Nov 2020 10:50:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7513E386103A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1604919059; bh=/QAhgkbBEyKCbyTnh/wgoD8hve80nf/8SMHHBsYcFKg=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=UiTYRTZbqGwlUKEnCbA6bJL+lj8O2fB0oKtdUg/6xm3UqVdqlGIWuBJttg1h6mrBc n/1IAfm83LRrPZbL+FfHsehKxnR7n4FCKHG+lJ+xCWvKdp3/zJkQaCOSSuBB4/9mbh MH3ZpcNWIUEFUwR+k0KvHl8ycF/2XdcDMiqOJrw8= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) by sourceware.org (Postfix) with ESMTPS id 9F251386101E for ; Mon, 9 Nov 2020 10:50:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9F251386101E Received: by mail-qv1-xf2a.google.com with SMTP id b11so3783509qvr.9 for ; Mon, 09 Nov 2020 02:50:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=/QAhgkbBEyKCbyTnh/wgoD8hve80nf/8SMHHBsYcFKg=; b=IxgUqEkpwG8v1wCtkazjfnUyUTH/Ip2B2CedTX/LpKMgzkoA+h16MdT34cbqJ+uteM FRYwojMGsU351juUJvbfQNFY+UhpZennrdd2AIvvSBYn6aBZs49/B3PgqSjjNkv3Ul71 u5IcmuOTtoRJnpSPMHP+hEqWjanGJQPtGLBBUJOdwuPO9E4ArVsFY8bb/vShznCvn9ZV Ijeqmlq7e4FJBgdmg943Ik2xb7+EOXHzwTmXYscse7k1MIJQxKwWCwpgAvpSoLZce2bY 8cOabJHsmOjgtr4rYr4Kinb6rBkV3QVeuUrPmhSzNesdnZMb5zsphd1a6LGVbCXuSmNN k6Jw== X-Gm-Message-State: AOAM5330KJj2Hz15u/hL+6T9yq7zPs+D9M+z2THzhIAQ7GKefbs+441s 55dWHbdftoZCFporz8aARxdsDGecapxbqkEW4kPYZWH175EhyQ== X-Google-Smtp-Source: ABdhPJwNxQHj5FmL/x+/ZzHuF6fW+SkaKE6SSYeI3zjzX7N4Pl2h0vQFjDeuqWyzjmqDPGL/pZIdYN+vWZjnNxrxu1w= X-Received: by 2002:a0c:cb04:: with SMTP id o4mr1493977qvk.15.1604919053924; Mon, 09 Nov 2020 02:50:53 -0800 (PST) MIME-Version: 1.0 Date: Mon, 9 Nov 2020 18:47:00 +0800 Message-ID: Subject: [PATCH] x86: Adjust keylocker testcases for fail on darwin To: GCC Patches , Uros Bizjak X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Hongyu Wang via Gcc-patches From: Hongyu Wang Reply-To: Hongyu Wang Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Hi According to the discussion in https://gcc.gnu.org/pipermail/gcc/2020-November/234096.html, The testcase for keylocker-* is too strict for darwin target. This patch adjusted the regex, and add a missing test for aesenc256kl instruction. Tested by Iain Sandone and all get pass in darwin target. Ok for trunk? gcc/testsuite/ChangeLog * gcc.target/i386/keylocker-aesdec128kl.c: Adjust regex patterns. * gcc.target/i386/keylocker-aesdec256kl.c: Likewise. * gcc.target/i386/keylocker-aesdecwide128kl.c: Likewise. * gcc.target/i386/keylocker-aesdecwide256kl.c: Likewise. * gcc.target/i386/keylocker-aesenc128kl.c: Likewise. * gcc.target/i386/keylocker-aesencwide128kl.c: Likewise. * gcc.target/i386/keylocker-aesencwide256kl.c: Likewise. * gcc.target/i386/keylocker-encodekey128.c: Likewise. * gcc.target/i386/keylocker-encodekey256.c: Likewise. * gcc.target/i386/keylocker-aesenc256kl.c: New test. From 9009ce97099b3a80fdf61a1927c1fff9c7f5b9bf Mon Sep 17 00:00:00 2001 From: hongyuw1 Date: Fri, 6 Nov 2020 15:08:10 +0800 Subject: [PATCH] Adjust Keylocker regex pattern for darwin, and add missing aesenc256kl test. gcc/testsuite/ChangeLog * gcc.target/i386/keylocker-aesdec128kl.c: Adjust regex patterns. * gcc.target/i386/keylocker-aesdec256kl.c: Likewise. * gcc.target/i386/keylocker-aesdecwide128kl.c: Likewise. * gcc.target/i386/keylocker-aesdecwide256kl.c: Likewise. * gcc.target/i386/keylocker-aesenc128kl.c: Likewise. * gcc.target/i386/keylocker-aesencwide128kl.c: Likewise. * gcc.target/i386/keylocker-aesencwide256kl.c: Likewise. * gcc.target/i386/keylocker-encodekey128.c: Likewise. * gcc.target/i386/keylocker-encodekey256.c: Likewise. * gcc.target/i386/keylocker-aesenc256kl.c: New test. --- .../gcc.target/i386/keylocker-aesdec128kl.c | 8 ++--- .../gcc.target/i386/keylocker-aesdec256kl.c | 8 ++--- .../i386/keylocker-aesdecwide128kl.c | 36 +++++++++---------- .../i386/keylocker-aesdecwide256kl.c | 36 +++++++++---------- .../gcc.target/i386/keylocker-aesenc128kl.c | 8 ++--- .../gcc.target/i386/keylocker-aesenc256kl.c | 17 +++++++++ .../i386/keylocker-aesencwide128kl.c | 36 +++++++++---------- .../i386/keylocker-aesencwide256kl.c | 36 +++++++++---------- .../gcc.target/i386/keylocker-encodekey128.c | 14 ++++---- .../gcc.target/i386/keylocker-encodekey256.c | 18 +++++----- 10 files changed, 117 insertions(+), 100 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/keylocker-aesenc256kl.c diff --git a/gcc/testsuite/gcc.target/i386/keylocker-aesdec128kl.c b/gcc/testsuite/gcc.target/i386/keylocker-aesdec128kl.c index 3cdda8ed7b0..9c3c8a88b0e 100644 --- a/gcc/testsuite/gcc.target/i386/keylocker-aesdec128kl.c +++ b/gcc/testsuite/gcc.target/i386/keylocker-aesdec128kl.c @@ -1,9 +1,9 @@ /* { dg-do compile } */ /* { dg-options "-mkl -O2" } */ -/* { dg-final { scan-assembler "movdqa\[ \\t\]+\[^\n\]*k2\[^\n\r]*%xmm0" } } */ -/* { dg-final { scan-assembler "aesdec128kl\[ \\t\]+\[^\n\]*h1\[^\n\r]*%xmm0" } } */ -/* { dg-final { scan-assembler "sete" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm0\[^\n\r]*k1" } } */ +/* { dg-final { scan-assembler {movdqa[ \t]+[^\n\r]*, %xmm0} } } */ +/* { dg-final { scan-assembler {aesdec128kl[ \t]+[^\n\r]*, %xmm0} } } */ +/* { dg-final { scan-assembler {sete} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm0,[^\n\r]*} } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/keylocker-aesdec256kl.c b/gcc/testsuite/gcc.target/i386/keylocker-aesdec256kl.c index 70b2c6357fa..6012b69e9bf 100644 --- a/gcc/testsuite/gcc.target/i386/keylocker-aesdec256kl.c +++ b/gcc/testsuite/gcc.target/i386/keylocker-aesdec256kl.c @@ -1,9 +1,9 @@ /* { dg-do compile } */ /* { dg-options "-mkl -O2" } */ -/* { dg-final { scan-assembler "movdqa\[ \\t\]+\[^\n\]*k2\[^\n\r]*%xmm0" } } */ -/* { dg-final { scan-assembler "aesdec256kl\[ \\t\]+\[^\n\]*h1\[^\n\r]*%xmm0" } } */ -/* { dg-final { scan-assembler "sete" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm0\[^\n\r]*k1" } } */ +/* { dg-final { scan-assembler {movdqa[ \t]+[^\n\r]*, %xmm0} } } */ +/* { dg-final { scan-assembler {aesdec256kl[ \t]+[^\n\r]*, %xmm0} } } */ +/* { dg-final { scan-assembler {sete} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm0,[^\n\r]*} } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/keylocker-aesdecwide128kl.c b/gcc/testsuite/gcc.target/i386/keylocker-aesdecwide128kl.c index f2806891bff..61c294ee052 100644 --- a/gcc/testsuite/gcc.target/i386/keylocker-aesdecwide128kl.c +++ b/gcc/testsuite/gcc.target/i386/keylocker-aesdecwide128kl.c @@ -1,23 +1,23 @@ /* { dg-do compile } */ /* { dg-options "-mwidekl -O2" } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata(\\(%rip\\))?\[^\n\r]*%xmm0" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+16(\\(%rip\\))?\[^\n\r]*%xmm1" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+32(\\(%rip\\))?\[^\n\r]*%xmm2" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+48(\\(%rip\\))?\[^\n\r]*%xmm3" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+64(\\(%rip\\))?\[^\n\r]*%xmm4" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+80(\\(%rip\\))?\[^\n\r]*%xmm5" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+96(\\(%rip\\))?\[^\n\r]*%xmm6" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+112(\\(%rip\\))?\[^\n\r]*%xmm7" } } */ -/* { dg-final { scan-assembler "aesdecwide128kl\[ \\t\]+\[^\n\]*h1" } } */ -/* { dg-final { scan-assembler "sete" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm0\[^\n\r]*odata(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm1\[^\n\r]*odata\\+16(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm2\[^\n\r]*odata\\+32(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm3\[^\n\r]*odata\\+48(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm4\[^\n\r]*odata\\+64(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm5\[^\n\r]*odata\\+80(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm6\[^\n\r]*odata\\+96(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm7\[^\n\r]*odata\\+112(\\(%rip\\))?" } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*, %xmm0} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*16[^\n\r]*, %xmm1} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*32[^\n\r]*, %xmm2} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*48[^\n\r]*, %xmm3} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*64[^\n\r]*, %xmm4} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*80[^\n\r]*, %xmm5} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*96[^\n\r]*, %xmm6} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*112[^\n\r]*, %xmm7} } } */ +/* { dg-final { scan-assembler {aesdecwide128kl[ \t]+[^\n\r]*} } } */ +/* { dg-final { scan-assembler {sete} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm0,[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm1,[^\n\r]*16[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm2,[^\n\r]*32[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm3,[^\n\r]*48[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm4,[^\n\r]*64[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm5,[^\n\r]*80[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm6,[^\n\r]*96[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm7,[^\n\r]*112[^\n\r]*} } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/keylocker-aesdecwide256kl.c b/gcc/testsuite/gcc.target/i386/keylocker-aesdecwide256kl.c index 9c60c84826f..4ad4deab18f 100644 --- a/gcc/testsuite/gcc.target/i386/keylocker-aesdecwide256kl.c +++ b/gcc/testsuite/gcc.target/i386/keylocker-aesdecwide256kl.c @@ -1,23 +1,23 @@ /* { dg-do compile } */ /* { dg-options "-mwidekl -O2" } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata(\\(%rip\\))?\[^\n\r]*%xmm0" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+16(\\(%rip\\))?\[^\n\r]*%xmm1" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+32(\\(%rip\\))?\[^\n\r]*%xmm2" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+48(\\(%rip\\))?\[^\n\r]*%xmm3" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+64(\\(%rip\\))?\[^\n\r]*%xmm4" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+80(\\(%rip\\))?\[^\n\r]*%xmm5" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+96(\\(%rip\\))?\[^\n\r]*%xmm6" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+112(\\(%rip\\))?\[^\n\r]*%xmm7" } } */ -/* { dg-final { scan-assembler "aesdecwide256kl\[ \\t\]+\[^\n\]*h1" } } */ -/* { dg-final { scan-assembler "sete" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm0\[^\n\r]*odata(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm1\[^\n\r]*odata\\+16(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm2\[^\n\r]*odata\\+32(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm3\[^\n\r]*odata\\+48(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm4\[^\n\r]*odata\\+64(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm5\[^\n\r]*odata\\+80(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm6\[^\n\r]*odata\\+96(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm7\[^\n\r]*odata\\+112(\\(%rip\\))?" } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*, %xmm0} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*16[^\n\r]*, %xmm1} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*32[^\n\r]*, %xmm2} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*48[^\n\r]*, %xmm3} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*64[^\n\r]*, %xmm4} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*80[^\n\r]*, %xmm5} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*96[^\n\r]*, %xmm6} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*112[^\n\r]*, %xmm7} } } */ +/* { dg-final { scan-assembler {aesdecwide256kl[ \t]+[^\n\r]*} } } */ +/* { dg-final { scan-assembler {sete} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm0,[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm1,[^\n\r]*16[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm2,[^\n\r]*32[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm3,[^\n\r]*48[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm4,[^\n\r]*64[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm5,[^\n\r]*80[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm6,[^\n\r]*96[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm7,[^\n\r]*112[^\n\r]*} } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/keylocker-aesenc128kl.c b/gcc/testsuite/gcc.target/i386/keylocker-aesenc128kl.c index c7bf743015e..a81f94a29ff 100644 --- a/gcc/testsuite/gcc.target/i386/keylocker-aesenc128kl.c +++ b/gcc/testsuite/gcc.target/i386/keylocker-aesenc128kl.c @@ -1,9 +1,9 @@ /* { dg-do compile } */ /* { dg-options "-mkl -O2" } */ -/* { dg-final { scan-assembler "movdqa\[ \\t\]+\[^\n\]*k2\[^\n\r]*%xmm0" } } */ -/* { dg-final { scan-assembler "aesenc128kl\[ \\t\]+\[^\n\]*h1\[^\n\r]*%xmm0" } } */ -/* { dg-final { scan-assembler "sete" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm0\[^\n\r]*k1" } } */ +/* { dg-final { scan-assembler {movdqa[ \t]+[^\n\r]*, %xmm0} } } */ +/* { dg-final { scan-assembler {aesenc128kl[ \t]+[^\n\r]*, %xmm0} } } */ +/* { dg-final { scan-assembler {sete} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm0,[^\n\r]*} } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/keylocker-aesenc256kl.c b/gcc/testsuite/gcc.target/i386/keylocker-aesenc256kl.c new file mode 100644 index 00000000000..05df5870f38 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/keylocker-aesenc256kl.c @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-options "-mkl -O2" } */ +/* { dg-final { scan-assembler {movdqa[ \t]+[^\n\r]*, %xmm0} } } */ +/* { dg-final { scan-assembler {aesenc256kl[ \t]+[^\n\r]*, %xmm0} } } */ +/* { dg-final { scan-assembler {sete} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm0,[^\n\r]*} } } */ + +#include + +__m128i k1, k2; +const char h1[48]; + +unsigned char +test_keylocker_4 (void) +{ + return _mm_aesenc256kl_u8 (&k1, k2, h1); +} diff --git a/gcc/testsuite/gcc.target/i386/keylocker-aesencwide128kl.c b/gcc/testsuite/gcc.target/i386/keylocker-aesencwide128kl.c index d01598c5897..4afbeaeaf8d 100644 --- a/gcc/testsuite/gcc.target/i386/keylocker-aesencwide128kl.c +++ b/gcc/testsuite/gcc.target/i386/keylocker-aesencwide128kl.c @@ -1,23 +1,23 @@ /* { dg-do compile } */ /* { dg-options "-mwidekl -O2" } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata(\\(%rip\\))?\[^\n\r]*%xmm0" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+16(\\(%rip\\))?\[^\n\r]*%xmm1" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+32(\\(%rip\\))?\[^\n\r]*%xmm2" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+48(\\(%rip\\))?\[^\n\r]*%xmm3" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+64(\\(%rip\\))?\[^\n\r]*%xmm4" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+80(\\(%rip\\))?\[^\n\r]*%xmm5" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+96(\\(%rip\\))?\[^\n\r]*%xmm6" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+112(\\(%rip\\))?\[^\n\r]*%xmm7" } } */ -/* { dg-final { scan-assembler "aesencwide128kl\[ \\t\]+\[^\n\]*h1(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "sete" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm0\[^\n\r]*odata(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm1\[^\n\r]*odata\\+16(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm2\[^\n\r]*odata\\+32(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm3\[^\n\r]*odata\\+48(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm4\[^\n\r]*odata\\+64(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm5\[^\n\r]*odata\\+80(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm6\[^\n\r]*odata\\+96(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm7\[^\n\r]*odata\\+112(\\(%rip\\))?" } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*, %xmm0} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*16[^\n\r]*, %xmm1} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*32[^\n\r]*, %xmm2} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*48[^\n\r]*, %xmm3} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*64[^\n\r]*, %xmm4} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*80[^\n\r]*, %xmm5} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*96[^\n\r]*, %xmm6} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*112[^\n\r]*, %xmm7} } } */ +/* { dg-final { scan-assembler {aesencwide128kl[ \t]+[^\n\r]*} } } */ +/* { dg-final { scan-assembler {sete} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm0,[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm1,[^\n\r]*16[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm2,[^\n\r]*32[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm3,[^\n\r]*48[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm4,[^\n\r]*64[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm5,[^\n\r]*80[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm6,[^\n\r]*96[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm7,[^\n\r]*112[^\n\r]*} } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/keylocker-aesencwide256kl.c b/gcc/testsuite/gcc.target/i386/keylocker-aesencwide256kl.c index f94b05e2868..a139750768d 100644 --- a/gcc/testsuite/gcc.target/i386/keylocker-aesencwide256kl.c +++ b/gcc/testsuite/gcc.target/i386/keylocker-aesencwide256kl.c @@ -1,23 +1,23 @@ /* { dg-do compile } */ /* { dg-options "-mwidekl -O2" } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata(\\(%rip\\))?\[^\n\r]*%xmm0" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+16(\\(%rip\\))?\[^\n\r]*%xmm1" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+32(\\(%rip\\))?\[^\n\r]*%xmm2" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+48(\\(%rip\\))?\[^\n\r]*%xmm3" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+64(\\(%rip\\))?\[^\n\r]*%xmm4" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+80(\\(%rip\\))?\[^\n\r]*%xmm5" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+96(\\(%rip\\))?\[^\n\r]*%xmm6" } } */ -/* { dg-final { scan-assembler "movdqu\[ \\t\]+\[^\n\]*idata\\+112(\\(%rip\\))?\[^\n\r]*%xmm7" } } */ -/* { dg-final { scan-assembler "aesencwide256kl\[ \\t\]+\[^\n\]*h1(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "sete" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm0\[^\n\r]*odata(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm1\[^\n\r]*odata\\+16(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm2\[^\n\r]*odata\\+32(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm3\[^\n\r]*odata\\+48(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm4\[^\n\r]*odata\\+64(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm5\[^\n\r]*odata\\+80(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm6\[^\n\r]*odata\\+96(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm7\[^\n\r]*odata\\+112(\\(%rip\\))?" } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*, %xmm0} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*16[^\n\r]*, %xmm1} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*32[^\n\r]*, %xmm2} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*48[^\n\r]*, %xmm3} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*64[^\n\r]*, %xmm4} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*80[^\n\r]*, %xmm5} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*96[^\n\r]*, %xmm6} } } */ +/* { dg-final { scan-assembler {movdqu[ \t]+[^\n\r]*112[^\n\r]*, %xmm7} } } */ +/* { dg-final { scan-assembler {aesencwide256kl[ \t]+[^\n\r]*} } } */ +/* { dg-final { scan-assembler {sete} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm0,[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm1,[^\n\r]*16[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm2,[^\n\r]*32[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm3,[^\n\r]*48[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm4,[^\n\r]*64[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm5,[^\n\r]*80[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm6,[^\n\r]*96[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n\r]*%xmm7,[^\n\r]*112[^\n\r]*} } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/keylocker-encodekey128.c b/gcc/testsuite/gcc.target/i386/keylocker-encodekey128.c index 8dd1bc634ac..c2bc7ea344d 100644 --- a/gcc/testsuite/gcc.target/i386/keylocker-encodekey128.c +++ b/gcc/testsuite/gcc.target/i386/keylocker-encodekey128.c @@ -1,12 +1,12 @@ /* { dg-do compile } */ /* { dg-options "-mkl -O2" } */ -/* { dg-final { scan-assembler "movdqa\[ \\t\]+\[^\n\]*k1(\\(%rip\\))?\[^\n\r]*%xmm0" } } */ -/* { dg-final { scan-assembler "movl\[ \\t\]+\[^\n\]*ctrl(\\(%rip\\))?\[^\n\r]*%eax" } } */ -/* { dg-final { scan-assembler "encodekey128\[ \\t\]+\[^\n\]*%eax\[^\n\r]*%eax" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm0\[^\n\r]*h2(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm1\[^\n\r]*h2\\+16(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm2\[^\n\r]*h2\\+32(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqa|movaps)\[ \\t\]+\[^\n\]*%xmm\[4-6\]\[^\n\r]*k2(\\(%rip\\))?" } } */ +/* { dg-final { scan-assembler {movdqa[ \t]+[^\n\r]*, %xmm0} } } */ +/* { dg-final { scan-assembler {movl[ \t]+[^\n\r]*, %eax} } } */ +/* { dg-final { scan-assembler {encodekey128[ \t]+[^\n]*%eax[^\n\r]*%eax} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n]*%xmm0,[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n]*%xmm1,[^\n\r]*16[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n]*%xmm2,[^\n\r]*32[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqa|movaps)[ \t]+[^\n]*%xmm[4-6\],[^\n\r]*} } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/keylocker-encodekey256.c b/gcc/testsuite/gcc.target/i386/keylocker-encodekey256.c index a9e19c6457b..d7d2bc48e18 100644 --- a/gcc/testsuite/gcc.target/i386/keylocker-encodekey256.c +++ b/gcc/testsuite/gcc.target/i386/keylocker-encodekey256.c @@ -1,14 +1,14 @@ /* { dg-do compile } */ /* { dg-options "-mkl -O2" } */ -/* { dg-final { scan-assembler "movdqa\[ \\t\]+\[^\n\]*k1(\\(%rip\\))?\[^\n\r]*%xmm0" } } */ -/* { dg-final { scan-assembler "movdqa\[ \\t\]+\[^\n\]*k2(\\(%rip\\))?\[^\n\r]*%xmm1" } } */ -/* { dg-final { scan-assembler "movl\[ \\t\]+\[^\n\]*ctrl(\\(%rip\\))?\[^\n\r]*%eax" } } */ -/* { dg-final { scan-assembler "encodekey256\[ \\t\]+\[^\n\]*%eax\[^\n\r]*%eax" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm0\[^\n\r]*h2(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm1\[^\n\r]*h2\\+16(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm2\[^\n\r]*h2\\+32(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqu|movups)\[ \\t\]+\[^\n\]*%xmm3\[^\n\r]*h2\\+48(\\(%rip\\))?" } } */ -/* { dg-final { scan-assembler "(?:movdqa|movaps)\[ \\t\]+\[^\n\]*%xmm\[4-6\]\[^\n\r]*k3(\\(%rip\\))?" } } */ +/* { dg-final { scan-assembler {movdqa[ \t]+[^\n\r]*, %xmm0} } } */ +/* { dg-final { scan-assembler {movdqa[ \t]+[^\n\r]*, %xmm1} } } */ +/* { dg-final { scan-assembler {movl[ \t]+[^\n\r]*, %eax} } } */ +/* { dg-final { scan-assembler {encodekey256[ \t]+[^\n]*%eax[^\n\r]*%eax} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n]*%xmm0,[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n]*%xmm1,[^\n\r]*16[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n]*%xmm2,[^\n\r]*32[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqu|movups)[ \t]+[^\n]*%xmm3,[^\n\r]*48[^\n\r]*} } } */ +/* { dg-final { scan-assembler {(?:movdqa|movaps)[ \t]+[^\n]*%xmm[4-6],[^\n\r]*} } } */ #include -- 2.20.1