From patchwork Tue Apr 16 03:48:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Oliva X-Patchwork-Id: 1923966 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=Z5jIMi1X; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VJVQ03GnWz1yZC for ; Tue, 16 Apr 2024 13:48:40 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7FFA33858408 for ; Tue, 16 Apr 2024 03:48:38 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by sourceware.org (Postfix) with ESMTPS id 5B00B3858D32 for ; Tue, 16 Apr 2024 03:48:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5B00B3858D32 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5B00B3858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713239301; cv=none; b=Mv/wbanP+DJQaMLFbJRvCFzHPHjAagFChyQri3yMQapK6pWUzbNzMJDd/hkA2QqBprZGs8t8B2J+gRighvBZDj1EvkeVnhYDWmKkd29ySuEnjI/CpoN5ZaEUgmlwEzH/BaLvGcNNOyuYbXqbCzxxCHXZ9vs/U55QleCkv7V4K3k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713239301; c=relaxed/simple; bh=HLTSUM6Fstcswo+c0PJ+jva1Ui8fJw0upbdj/HTtI8M=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=UN/GhKbVwxuEjF00qf41FjICI6oWhPIo4ZW2SRlhco149WD2e2R4mzvY8IZPcMjvQvK0MhoYtytjNnIL127CQKlXIRxnmngRebFx+2N6STU7H3yLSPd0Z5hTGS3uLxOi2iMMu94UixMdeJvfTvUUPgHGdLj/q++qZRFvc+aL1VA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1e4266673bbso34412515ad.2 for ; Mon, 15 Apr 2024 20:48:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1713239298; x=1713844098; darn=gcc.gnu.org; h=mime-version:user-agent:message-id:date:organization:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=eI/NjZd0/JR4kUuLhCKIMYNiyO6Uec9R7j7ADxQ9P4s=; b=Z5jIMi1XYVwaBz9mYPSIjB3avDcApvdwHMKFsG+0NXUjAz7ozUsQxJ2l1Cs2KGtNq1 IZCgARleMeDkUdDMIgV1MKMw/85q20A5I7nO8bKN9xIEi/xi/vmgayRmDa4N0TtbUIAh p42qzfw1H8Q3hqBYnOwEnvhQ4AQE4V8UIG6PZiZRa/b8JZmB5eCQG2kSNVmGXYEQ1vGT 1E3z3JoD4ElV1XbJBfmKe4ebk59nCC27uPPsvnsPY6c42jpN/lOj9MkZTc4pBB7Atcbd m51OUTmL5r8JumzV7UzcHdAMxiGiCi8kYEKClseIDDPsP/YOOwPjjI4NyQeziRquERyn aZ/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713239298; x=1713844098; h=mime-version:user-agent:message-id:date:organization:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=eI/NjZd0/JR4kUuLhCKIMYNiyO6Uec9R7j7ADxQ9P4s=; b=O9pyPPeiRsMyQ8vffzs98HW2HCKQ0JYmSUVPx5Iapjq3yY1NmSpbgVw2hPc61I2Rdk mXGwbYvf5MCaH3E5JIkYQl6FUUl0JFuoqFdPOFKOtbjhXlD2RHl7C7SXupV1bezyJDeR /Lh6Ngp7Knh9cmqUBsa+/gCC378cc4OS1uZ1zd8EbYaBH0Cr2SRuau+s+n/X80xSZQaM Unb7eCY+ZIYDjI8pk4jiE3pSyE5f6t82eDaIktBWBB0Rm3UNOBzHNNKJWjBYtWfublRJ Zz5v8yI5wSTgeKZ3IjuYo5UCtQ1woCQat85Oj3Q/OeG2Q72LxXKu9JrtkKqCzAOyvPbd p0Ig== X-Gm-Message-State: AOJu0Yx9gDgeuwjZsR3ZtAZ0WDukjrYewMhN4P9nE3vEPIuDZEJXISVz dGGYARzUrHTkRqIzZttmAZ8G9uvnR045xPI9uG7TJanmMPy7rQ7WKVfEAbor+OHTje/f1SUdX1p ZPw== X-Google-Smtp-Source: AGHT+IFQJw2YeoRtRF/qHvC969KnLLHVDditWS3OvFrRWXsAApyOaxWq4J88EyEXleG/AHgS9m37Cg== X-Received: by 2002:a17:903:2b10:b0:1e6:622c:7bb4 with SMTP id mc16-20020a1709032b1000b001e6622c7bb4mr5969087plb.19.1713239297826; Mon, 15 Apr 2024 20:48:17 -0700 (PDT) Received: from free.home ([2804:7f1:218b:5e2:c43b:e0c4:71a:241b]) by smtp.gmail.com with ESMTPSA id jj12-20020a170903048c00b001e2461c52c6sm8672724plb.149.2024.04.15.20.48.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 20:48:17 -0700 (PDT) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 43G3m48q2388093 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 16 Apr 2024 00:48:05 -0300 From: Alexandre Oliva To: gcc-patches@gcc.gnu.org Cc: Rainer Orth , Mike Stump , Nick Clifton , Richard Earnshaw , Ramana Radhakrishnan Subject: [PATCH] [testsuite] [arm] require arm_v8_1m_main for pacbti tests Organization: Free thinker, does not speak for AdaCore Date: Tue, 16 Apr 2024 00:48:04 -0300 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, WEIRD_QUOTING 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+incoming=patchwork.ozlabs.org@gcc.gnu.org arm pac and bti tests that use -march=armv8.1-m.main get an implicit -mthumb, that is incompatible with vxworks kernel mode. Declaring the requirement for a 8.1-m.main-compatible toolchain is enough to avoid those fails, because the toolchain feature test fails in kernel mode. Regstrapped on x86_64-linux-gnu. Also tested with gcc-13 on arm-, aarch64-, x86- and x86_64-vxworks7r2. Ok to install? for gcc/testsuite/ChangeLog * g++.target/arm/pac-1.C: Require arm_arch_v8_1m_main. * gcc.target/arm/acle/pacbti-m-predef-11.c: Likewise. * gcc.target/arm/acle/pacbti-m-predef-12.c: Likewise. * gcc.target/arm/acle/pacbti-m-predef-7.c: Likewise. * gcc.target/arm/bti-1.c: Likewise. * gcc.target/arm/bti-2.c: Likewise. --- gcc/testsuite/g++.target/arm/pac-1.C | 1 + .../gcc.target/arm/acle/pacbti-m-predef-11.c | 1 + .../gcc.target/arm/acle/pacbti-m-predef-12.c | 1 + .../gcc.target/arm/acle/pacbti-m-predef-7.c | 1 + gcc/testsuite/gcc.target/arm/bti-1.c | 1 + gcc/testsuite/gcc.target/arm/bti-2.c | 1 + 6 files changed, 6 insertions(+) diff --git a/gcc/testsuite/g++.target/arm/pac-1.C b/gcc/testsuite/g++.target/arm/pac-1.C index f671a27b048c6..f48ad6cc5cb65 100644 --- a/gcc/testsuite/g++.target/arm/pac-1.C +++ b/gcc/testsuite/g++.target/arm/pac-1.C @@ -2,6 +2,7 @@ /* { dg-do compile } */ /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" "-mcpu=*" } } */ /* { dg-options "-march=armv8.1-m.main+mve+pacbti -mbranch-protection=pac-ret -mthumb -mfloat-abi=hard -g -O0" } */ +/* { dg-require-effective-target arm_arch_v8_1m_main_ok } */ __attribute__((noinline)) void fn1 (int a, int b, int c) diff --git a/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-11.c b/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-11.c index 6a5ae92c567f3..dba4f491cfea7 100644 --- a/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-11.c +++ b/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-11.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" "-mcpu=*" "-mfloat-abi=*" } } */ /* { dg-options "-march=armv8.1-m.main+fp+pacbti" } */ +/* { dg-require-effective-target arm_arch_v8_1m_main_ok } */ #if (__ARM_FEATURE_BTI != 1) #error "Feature test macro __ARM_FEATURE_BTI_DEFAULT should be defined to 1." diff --git a/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-12.c b/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-12.c index db40b17c3b030..308a41eb4ba4c 100644 --- a/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-12.c +++ b/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-12.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" "-mcpu=*" } } */ /* { dg-options "-march=armv8-m.main+fp -mfloat-abi=softfp" } */ +/* { dg-require-effective-target arm_arch_v8_1m_main_ok } */ #if defined (__ARM_FEATURE_BTI) #error "Feature test macro __ARM_FEATURE_BTI should not be defined." diff --git a/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-7.c b/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-7.c index 1b25907635e24..10836a84bde56 100644 --- a/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-7.c +++ b/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-7.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" "-mcpu=*" } } */ /* { dg-additional-options "-march=armv8.1-m.main+pacbti+fp --save-temps -mfloat-abi=hard" } */ +/* { dg-require-effective-target arm_arch_v8_1m_main_ok } */ #if defined (__ARM_FEATURE_BTI_DEFAULT) #error "Feature test macro __ARM_FEATURE_BTI_DEFAULT should be undefined." diff --git a/gcc/testsuite/gcc.target/arm/bti-1.c b/gcc/testsuite/gcc.target/arm/bti-1.c index 79dd8010d2dab..34655387b55f5 100644 --- a/gcc/testsuite/gcc.target/arm/bti-1.c +++ b/gcc/testsuite/gcc.target/arm/bti-1.c @@ -2,6 +2,7 @@ /* { dg-do compile } */ /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" "-mcpu=*" } } */ /* { dg-options "-march=armv8.1-m.main -mthumb -mfloat-abi=softfp -mbranch-protection=bti --save-temps" } */ +/* { dg-require-effective-target arm_arch_v8_1m_main_ok } */ int main (void) diff --git a/gcc/testsuite/gcc.target/arm/bti-2.c b/gcc/testsuite/gcc.target/arm/bti-2.c index 33910563849a4..3284aba3020cc 100644 --- a/gcc/testsuite/gcc.target/arm/bti-2.c +++ b/gcc/testsuite/gcc.target/arm/bti-2.c @@ -3,6 +3,7 @@ /* { dg-options "-Os" } */ /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" "-mcpu=*" } } */ /* { dg-options "-march=armv8.1-m.main -mthumb -mfloat-abi=softfp -mbranch-protection=bti --save-temps" } */ +/* { dg-require-effective-target arm_arch_v8_1m_main_ok } */ extern int f1 (void); extern int f2 (void);