From patchwork Wed Oct 23 11:05:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Khrustalev X-Patchwork-Id: 99424 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 32C07385842D for ; Wed, 23 Oct 2024 11:11:44 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 7954A3858C41; Wed, 23 Oct 2024 11:07:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7954A3858C41 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7954A3858C41 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729681668; cv=none; b=AthLM/V9BEYnu2SAP2+yTrENLWDcIpyjnwcf5fKSSgiEs0jpWk/8XunzSKj0k6RvlReCaN3x+J6pljKEpyqhzx6IMNJizeedJm/n3JaJOAkDCMHPHXb5fEdCZAlOU2PM8wu0H42ccsfBFoPQF0zuWQMkSwCOarF8jjvZ5pMl1mM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729681668; c=relaxed/simple; bh=4TQqSEl7FfAei1qlHhf0OV1ZJDEUYbJMAohvIiHYbAg=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=LwPQY/ampACZOx8YmgSfCAMC+1p7GEIP10dfB/CNi5tvFNuq2wLXj0MoTWcgwEk5TKhlZTPBViKidALUjy+75dCYAFGbetgDXKPlHJohrt251bOkz5DvRjthw+EYCxq0+ZU58Kd3qkxLCj+C8PrC8V+9YOafrsokFMdhywo8EAg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F36FF339; Wed, 23 Oct 2024 04:08:10 -0700 (PDT) Received: from udebian.localdomain (unknown [10.1.39.30]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9B7CC3F528; Wed, 23 Oct 2024 04:07:40 -0700 (PDT) From: Yury Khrustalev To: gcc-patches@gcc.gnu.org Cc: nsz@gcc.gnu.org, richard.earnshaw@arm.com, matthieu.longo@arm.com, richard.ball@arm.com Subject: [PATCH 12/22] aarch64: Add test for GCS ACLE defs Date: Wed, 23 Oct 2024 12:05:18 +0100 Message-Id: <20241023110528.487830-13-yury.khrustalev@arm.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241023110528.487830-1-yury.khrustalev@arm.com> References: <20241023110528.487830-1-yury.khrustalev@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-13.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, KAM_SHORT, SPF_HELO_NONE, SPF_NONE, TXREP 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~patchwork=sourceware.org@gcc.gnu.org From: Szabolcs Nagy gcc/testsuite/ChangeLog: * gcc.target/aarch64/pragma_cpp_predefs_1.c: GCS test. --- .../gcc.target/aarch64/pragma_cpp_predefs_1.c | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/gcc/testsuite/gcc.target/aarch64/pragma_cpp_predefs_1.c b/gcc/testsuite/gcc.target/aarch64/pragma_cpp_predefs_1.c index 307fa3d67da..6122cd55d66 100644 --- a/gcc/testsuite/gcc.target/aarch64/pragma_cpp_predefs_1.c +++ b/gcc/testsuite/gcc.target/aarch64/pragma_cpp_predefs_1.c @@ -268,6 +268,36 @@ #error "__ARM_FEATURE_RCPC is not defined but should be!" #endif +#pragma GCC target ("arch=armv8.8-a+gcs") +#ifndef __ARM_FEATURE_GCS +#error "__ARM_FEATURE_GCS is not defined but should be!" +#endif + +#pragma GCC target ("arch=armv8.8-a+nogcs") +#ifdef __ARM_FEATURE_GCS +#error "__ARM_FEATURE_GCS is defined but should not be!" +#endif + +#pragma GCC target ("arch=armv8.8-a") +#ifdef __ARM_FEATURE_GCS +#error "__ARM_FEATURE_GCS is defined but should not be!" +#endif + +#pragma GCC target ("branch-protection=gcs") +#ifndef __ARM_FEATURE_GCS_DEFAULT +#error "__ARM_FEATURE_GCS_DEFAULT is not defined but should be!" +#endif + +#pragma GCC target ("branch-protection=none") +#ifdef __ARM_FEATURE_GCS_DEFAULT +#error "__ARM_FEATURE_GCS_DEFAULT is defined but should not be!" +#endif + +#pragma GCC target ("branch-protection=standard") +#ifndef __ARM_FEATURE_GCS_DEFAULT +#error "__ARM_FEATURE_GCS_DEFAULT is not defined but should be!" +#endif + int foo (int a) {