From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2098) id 3C2743858CDA; Fri, 12 Aug 2022 19:00:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C2743858CDA Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: SRINATH PARVATHANENI To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/ARM/heads/arm-12)] [GCC][PATCH] arm: Add pacbti related multilib support for armv8.1-m.main. X-Act-Checkin: gcc X-Git-Author: Srinath Parvathaneni X-Git-Refname: refs/vendors/ARM/heads/arm-12 X-Git-Oldrev: 73b87442c19c1500b4f88ec60db712185149f5c5 X-Git-Newrev: 3e0246b30f76c4f5f38162440082e66346b251bb Message-Id: <20220812190000.3C2743858CDA@sourceware.org> Date: Fri, 12 Aug 2022 19:00:00 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Aug 2022 19:00:00 -0000 https://gcc.gnu.org/g:3e0246b30f76c4f5f38162440082e66346b251bb commit 3e0246b30f76c4f5f38162440082e66346b251bb Author: Srinath Parvathaneni Date: Fri Aug 12 18:56:07 2022 +0100 [GCC][PATCH] arm: Add pacbti related multilib support for armv8.1-m.main. Hi, This patch supports following -march/-mbranch-protection combination by linking them to existing pacbti multilibs. $ -march=armv8.1-m.main+pacbti+fp.dp+mve.fp -mbranch-protection=standard -mfloat-abi=hard -mthumb $ -march=armv8.1-m.main+pacbti+fp.dp+mve -mbranch-protection=standard -mfloat-abi=hard -mthumb $ -march=armv8.1-m.main+dsp+pacbti+fp.dp -mbranch-protection=standard -mfloat-abi=hard -mthumb Regression tested on arm-none-eabi and bootstrapped on arm-none-linux-gnueabihf. Ok for master? Regards, Srinath. gcc/ChangeLog: 2022-08-12 Srinath Parvathaneni * config/arm/t-rmprofile: Add pacbti multililb variants. gcc/testsuite/ChangeLog: 2022-08-12 Srinath Parvathaneni * gcc.target/arm/pac-10.c: New test. * gcc.target/arm/pac-11.c: Likewise. * gcc.target/arm/pac-12.c: Likewise. Diff: --- gcc/config/arm/t-rmprofile | 7 +++++++ gcc/testsuite/gcc.target/arm/pac-10.c | 7 +++++++ gcc/testsuite/gcc.target/arm/pac-11.c | 7 +++++++ gcc/testsuite/gcc.target/arm/pac-12.c | 7 +++++++ 4 files changed, 28 insertions(+) diff --git a/gcc/config/arm/t-rmprofile b/gcc/config/arm/t-rmprofile index fe46a1efa1a..77e248e47fe 100644 --- a/gcc/config/arm/t-rmprofile +++ b/gcc/config/arm/t-rmprofile @@ -97,6 +97,13 @@ MULTILIB_MATCHES += $(foreach FP, $(v8_1m_sp_variants), \ MULTILIB_MATCHES += $(foreach FP, $(v8_1m_dp_variants), \ march?armv8-m.main+fp.dp=mlibarch?armv8.1-m.main$(FP)) +MULTILIB_MATCHES += march?armv8.1-m.main+pacbti+fp.dp=march?armv8.1-m.main+pacbti+fp.dp+mve.fp +MULTILIB_MATCHES += march?armv8.1-m.main+pacbti+fp.dp=mlibarch?armv8.1-m.main+pacbti+fp.dp+mve.fp +MULTILIB_MATCHES += march?armv8.1-m.main+pacbti+fp.dp=march?armv8.1-m.main+pacbti+fp.dp+mve +MULTILIB_MATCHES += march?armv8.1-m.main+pacbti+fp.dp=mlibarch?armv8.1-m.main+pacbti+fp.dp+mve +MULTILIB_MATCHES += march?armv8.1-m.main+pacbti+fp.dp=march?armv8.1-m.main+dsp+pacbti+fp.dp +MULTILIB_MATCHES += march?armv8.1-m.main+pacbti+fp.dp=mlibarch?armv8.1-m.main+dsp+pacbti+fp.dp + # Map all mbranch-protection values other than 'none' to 'standard'. MULTILIB_MATCHES += mbranch-protection?standard=mbranch-protection?bti MULTILIB_MATCHES += mbranch-protection?standard=mbranch-protection?pac-ret diff --git a/gcc/testsuite/gcc.target/arm/pac-10.c b/gcc/testsuite/gcc.target/arm/pac-10.c new file mode 100644 index 00000000000..faf836b2026 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pac-10.c @@ -0,0 +1,7 @@ +/* Testing PACBTI multilib matches. */ +/* { dg-do run } */ +/* { dg-require-effective-target arm_pacbti_hw } */ +/* { dg-skip-if "need fp instructions" { *-*-* } { "" } { "-mfloat-abi=hard" } } */ +/* { dg-options "-march=armv8.1-m.main+mve.fp+fp.dp+pacbti -mbranch-protection=standard -mthumb -mfloat-abi=hard" } */ + +#include "pac.h" diff --git a/gcc/testsuite/gcc.target/arm/pac-11.c b/gcc/testsuite/gcc.target/arm/pac-11.c new file mode 100644 index 00000000000..51609b61c75 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pac-11.c @@ -0,0 +1,7 @@ +/* Testing PACBTI multilibs matches without mve float. */ +/* { dg-do run } */ +/* { dg-require-effective-target arm_pacbti_hw } */ +/* { dg-skip-if "need fp instructions" { *-*-* } { "" } { "-mfloat-abi=hard" } } */ +/* { dg-options "-march=armv8.1-m.main+mve+fp.dp+pacbti -mbranch-protection=standard -mthumb -mfloat-abi=hard" } */ + +#include "pac.h" diff --git a/gcc/testsuite/gcc.target/arm/pac-12.c b/gcc/testsuite/gcc.target/arm/pac-12.c new file mode 100644 index 00000000000..6e1295c834d --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pac-12.c @@ -0,0 +1,7 @@ +/* Testing PACBTI multilibs matches without mve. */ +/* { dg-do run } */ +/* { dg-require-effective-target arm_pacbti_hw } */ +/* { dg-skip-if "need fp instructions" { *-*-* } { "" } { "-mfloat-abi=hard" } } */ +/* { dg-options "-march=armv8.1-m.main+dsp+fp.dp+pacbti -mbranch-protection=standard -mthumb -mfloat-abi=hard" } */ + +#include "pac.h"