From patchwork Wed Nov 8 14:55:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 163075 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:aa0b:0:b0:403:3b70:6f57 with SMTP id k11csp965709vqo; Wed, 8 Nov 2023 06:55:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IGhX4cI2c9lP+Ukp7zQLbbnCriOudBxXzgdcwYXebz5Sqw67HeKHdVLP/flNMxWTxumY/Pv X-Received: by 2002:a05:6830:114c:b0:6cd:8c8:1654 with SMTP id x12-20020a056830114c00b006cd08c81654mr2322487otq.2.1699455351139; Wed, 08 Nov 2023 06:55:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699455351; cv=pass; d=google.com; s=arc-20160816; b=eYWLQWIOq9v8QBhtdxIpUeLfO3KTi1Lt/C7QoQr86gQWkt2Xp8UhtGTzt67WOXv4tp AWb/SzJd3aZMHZDrPYrBYSpvyQE172VVmLJRSd+tIbFDgDUe1j+pS43ABVHc80Ou00x2 8rbZ4bEQtarnX/sqqREd7uIoODjRd3ckqLIxin6QiJo0Zcw1k4+AjILKT1JNJZH3ZJhL olen9beA0Gx266Bz4aicT3W+G52kVQ3y4jBLg8jFRGIakJoGjWRliHPtiWmdTKQUQXS4 +hYTsQTf1C6GVZE1ChUGZmumM4hw9WgftAY7aaVV2s8Va1t0jCQRsPYZOlPc8eEpBttI BZCg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:user-agent :message-id:date:subject:to:from:dkim-signature:arc-filter :dmarc-filter:delivered-to; bh=ea1A0NlwtNI/hhLoR0yYiaTKYWYm75Ih569h5DlTFDc=; fh=hPrbWPhweUx4V0GV9uXJqbyAzg2ABmTz7kczrAQqMmM=; b=A6O4ux+yCbYBlXt7/HScA7egjS91vMuq9cTjokd4fPZOHCXUJp2gWJkXlGPavFC1zV lkZy1/7EZ7cvsUrK+WBTY7CvJ3Onv2SRe4jSF3KiMneYjnlkJVBrI11HfUI7ByRXz29R tjGIt5nVlKEWFCO09ysYyHigBlSf3mn85bgEdsRnbGv8bE2la3Ea9LF6szXRU4vH0OCS T3gyoBP0k6QgxYM62AvEkI/IPJ44oG8AqK6P41cSzx3+vi2QMyf/MkdxDGlLiANkyUTa GgPnUrQHFqmBn6gdF3TcejOdCtgq29wImVDtyVzC6oNSUgfwvGgkqf0qWzr9tUSib1cx F39Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gs9fjJPM; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id 9-20020ac85749000000b0040f3c2813e2si1363880qtx.166.2023.11.08.06.55.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Nov 2023 06:55:51 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gs9fjJPM; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E10D6385840D for ; Wed, 8 Nov 2023 14:55:50 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 786EB3858D1E for ; Wed, 8 Nov 2023 14:55:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 786EB3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 786EB3858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699455327; cv=none; b=PGhdUS09nhafn5ciFj54CkAeC2zZA429xFEGBmfLsNjqB+eqb0E1JLtHPFmvJP0Nq/dj/RpJrINJZHp/FMdbaaF3TdA/Oy26+bwbzsjiDOoz6GpsLCzgEuOoilLGTHo3zhwX561wq+gkrZMaCfzL+WzBPfIQJKnD9PIdRXwYPKA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699455327; c=relaxed/simple; bh=WKjUbYCEorL7vZ6BhLFrkIohE4QO46yXSvdOeeQNgMk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=c3XmgP9FWp2XnzU9ZFxj5nmZJkuxlTWw/sOBL8JEFMPNfloJ0x6b5HXfqoPPtlWaYZRQ+Fx7O9hyeVEk42Wh7G5XxHIRpNKhngO/G8yJJCMxUUALPesVx07N40iRIC1tASLT3UA2X3gNY4lYVmKOkePc+ADEwWdw9fT2hwWmPdU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699455325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=ea1A0NlwtNI/hhLoR0yYiaTKYWYm75Ih569h5DlTFDc=; b=gs9fjJPMIXKZyFHqBotpDDo9QOTS90l0JPccqj3U6sQrjUqnXx69Ip6+V8JqpDpr1JwHtI 4cmCkUn7yrjNWUCmwPHYixGMYHa6unCRxQfFW9COavSrXEGMWSqB+OBMwy5OdrOADtD5TE h4M2LVOaUT0936ibp3fdB5GsHsGgeAU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-689-QW8EZ6f8MpiYZCS4wxb_uA-1; Wed, 08 Nov 2023 09:55:23 -0500 X-MC-Unique: QW8EZ6f8MpiYZCS4wxb_uA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4D8E081652F for ; Wed, 8 Nov 2023 14:55:19 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D0911C12913 for ; Wed, 8 Nov 2023 14:55:18 +0000 (UTC) From: Florian Weimer To: gcc-patches@gcc.gnu.org Subject: [PATCH] i386: Fix C99 compatibility issues in the x86-64 AVX ABI test suite Date: Wed, 08 Nov 2023 15:55:17 +0100 Message-ID: <875y2c8fca.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782008094002686114 X-GMAIL-MSGID: 1782008094002686114 * gcc.target/x86_64/abi/avx/avx-check.h (main): Call __builtin_printf instead of printf. * gcc.target/x86_64/abi/avx/test_passing_m256.c (fun_check_passing_m256_8_values): Add missing void return type. * gcc.target/x86_64/abi/avx512f/avx512f-check.h (main): Call __builtin_printf instead of printf. * gcc.target/x86_64/abi/avx512f/test_passing_m512.c (fun_check_passing_m512_8_values): Add missing void return type. --- gcc/testsuite/gcc.target/x86_64/abi/avx/avx-check.h | 4 ++-- gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_m256.c | 1 + gcc/testsuite/gcc.target/x86_64/abi/avx512f/avx512f-check.h | 6 +++--- gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_passing_m512.c | 1 + 4 files changed, 7 insertions(+), 5 deletions(-) base-commit: d72492cca7a66af166b8dcf58d1166d8b0c59c59 diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx/avx-check.h b/gcc/testsuite/gcc.target/x86_64/abi/avx/avx-check.h index e66a27e9afd..a04d0777637 100644 --- a/gcc/testsuite/gcc.target/x86_64/abi/avx/avx-check.h +++ b/gcc/testsuite/gcc.target/x86_64/abi/avx/avx-check.h @@ -16,12 +16,12 @@ main () { avx_test (); #ifdef DEBUG - printf ("PASSED\n"); + __builtin_printf ("PASSED\n"); #endif } #ifdef DEBUG else - printf ("SKIPPED\n"); + __builtin_printf ("SKIPPED\n"); #endif return 0; diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_m256.c b/gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_m256.c index ffc3ec36bf7..f739670431b 100644 --- a/gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_m256.c +++ b/gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_m256.c @@ -24,6 +24,7 @@ int failed = 0; assert (memcmp (&X1, &X2, sizeof (T)) == 0); \ } while (0) +void fun_check_passing_m256_8_values (__m256 i0 ATTRIBUTE_UNUSED, __m256 i1 ATTRIBUTE_UNUSED, __m256 i2 ATTRIBUTE_UNUSED, __m256 i3 ATTRIBUTE_UNUSED, __m256 i4 ATTRIBUTE_UNUSED, __m256 i5 ATTRIBUTE_UNUSED, __m256 i6 ATTRIBUTE_UNUSED, __m256 i7 ATTRIBUTE_UNUSED) { /* Check argument values. */ diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx512f/avx512f-check.h b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/avx512f-check.h index 25ce544c4a3..00a7578d2b5 100644 --- a/gcc/testsuite/gcc.target/x86_64/abi/avx512f/avx512f-check.h +++ b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/avx512f-check.h @@ -24,17 +24,17 @@ main () { avx512f_test (); #ifdef DEBUG - printf ("PASSED\n"); + __builtin_printf ("PASSED\n"); #endif } #ifdef DEBUG else - printf ("SKIPPED\n"); + __builtin_printf ("SKIPPED\n"); #endif } #ifdef DEBUG else - printf ("SKIPPED\n"); + __builtin_printf ("SKIPPED\n"); #endif return 0; diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_passing_m512.c b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_passing_m512.c index ead9c6797e1..1c88a55fb4b 100644 --- a/gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_passing_m512.c +++ b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_passing_m512.c @@ -24,6 +24,7 @@ int failed = 0; assert (memcmp (&X1, &X2, sizeof (T)) == 0); \ } while (0) +void fun_check_passing_m512_8_values (__m512 i0 ATTRIBUTE_UNUSED, __m512 i1 ATTRIBUTE_UNUSED, __m512 i2 ATTRIBUTE_UNUSED, __m512 i3 ATTRIBUTE_UNUSED, __m512 i4 ATTRIBUTE_UNUSED, __m512 i5 ATTRIBUTE_UNUSED, __m512 i6 ATTRIBUTE_UNUSED, __m512 i7 ATTRIBUTE_UNUSED) { /* Check argument values. */