public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/ARM/heads/arm-12)] [GCC][PATCH] arm: Add pacbti related multilib support for armv8.1-m.main.
@ 2022-08-12 20:02 SRINATH PARVATHANENI
  0 siblings, 0 replies; 2+ messages in thread
From: SRINATH PARVATHANENI @ 2022-08-12 20:02 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2c9f0f7ef8d413d67def2176f1df93c48a1913ea

commit 2c9f0f7ef8d413d67def2176f1df93c48a1913ea
Author: Srinath Parvathaneni <srinath.parvathaneni@arm.com>
Date:   Fri Aug 12 20:47:42 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  <srinath.parvathaneni@arm.com>
    
            * config/arm/t-rmprofile: Add pacbti multililb variants.
    
    gcc/testsuite/ChangeLog:
    
    2022-08-12  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>
    
            * 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"


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gcc(refs/vendors/ARM/heads/arm-12)] [GCC][PATCH] arm: Add pacbti related multilib support for armv8.1-m.main.
@ 2022-08-12 19:00 SRINATH PARVATHANENI
  0 siblings, 0 replies; 2+ messages in thread
From: SRINATH PARVATHANENI @ 2022-08-12 19:00 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:3e0246b30f76c4f5f38162440082e66346b251bb

commit 3e0246b30f76c4f5f38162440082e66346b251bb
Author: Srinath Parvathaneni <srinath.parvathaneni@arm.com>
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  <srinath.parvathaneni@arm.com>
    
            * config/arm/t-rmprofile: Add pacbti multililb variants.
    
    gcc/testsuite/ChangeLog:
    
    2022-08-12  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>
    
            * 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"


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-12 20:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-12 20:02 [gcc(refs/vendors/ARM/heads/arm-12)] [GCC][PATCH] arm: Add pacbti related multilib support for armv8.1-m.main SRINATH PARVATHANENI
  -- strict thread matches above, loose matches on Subject: below --
2022-08-12 19:00 SRINATH PARVATHANENI

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).