public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch 8/8, Arm, GCC] Introduce multilibs for PACBTI target feature. [Was RE: [Patch 7/7, Arm, GCC] Introduce multilibs for PACBTI target feature.]
@ 2021-10-28 11:43 Tejas Belagod
  2021-12-07 14:56 ` Richard Earnshaw
  0 siblings, 1 reply; 4+ messages in thread
From: Tejas Belagod @ 2021-10-28 11:43 UTC (permalink / raw)
  To: Richard Earnshaw, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 1020 bytes --]



> -----Original Message-----
> From: Gcc-patches <gcc-patches-
> bounces+belagod=gcc.gnu.org@gcc.gnu.org> On Behalf Of Tejas Belagod via
> Gcc-patches
> Sent: Friday, October 8, 2021 1:19 PM
> To: gcc-patches@gcc.gnu.org
> Subject: [Patch 7/7, Arm, GCC] Introduce multilibs for PACBTI target feature.
> 
> Hi,
> 
> This patch adds a multilib for pacbti target feature.
> 
> Tested on arm-none-eabi. OK for trunk?
> 
> 2021-10-04  Tejas Belagod  <tbelagod@arm.com>
> 
> gcc/ChangeLog:
> 
> 	* config/arm/t-rmprofile: Add multilib rules for +pacbti.


This patch adds a multilib for pacbti target feature.

2021-10-04  Tejas Belagod  <tbelagod@arm.com>

gcc/ChangeLog:

	* config/arm/t-rmprofile: Add multilib rules for +pacbti.

Tested the following configurations, OK for trunk?

-mthumb/-march=armv8.1-m.main+pacbti/-mfloat-abi=soft
-marm/-march=armv7-a/-mfpu=vfpv3-d16/-mfloat-abi=softfp
mcmodel=small and tiny
aarch64-none-linux-gnu native test and bootstrap

Thanks,
Tejas.

[-- Attachment #2: ml.txt --]
[-- Type: text/plain, Size: 1939 bytes --]

diff --git a/gcc/config/arm/t-rmprofile b/gcc/config/arm/t-rmprofile
index a6036bf0a5191a3cac3bfbe2329783204d5c3ef4..241bf1939e30ae7890ae332556d33759f538ced5 100644
--- a/gcc/config/arm/t-rmprofile
+++ b/gcc/config/arm/t-rmprofile
@@ -27,8 +27,8 @@
 
 # Arch and FPU variants to build libraries with
 
-MULTI_ARCH_OPTS_RM	= march=armv6s-m/march=armv7-m/march=armv7e-m/march=armv7e-m+fp/march=armv7e-m+fp.dp/march=armv8-m.base/march=armv8-m.main/march=armv8-m.main+fp/march=armv8-m.main+fp.dp/march=armv8.1-m.main+mve
-MULTI_ARCH_DIRS_RM	= v6-m v7-m v7e-m v7e-m+fp v7e-m+dp v8-m.base v8-m.main v8-m.main+fp v8-m.main+dp v8.1-m.main+mve
+MULTI_ARCH_OPTS_RM	= march=armv6s-m/march=armv7-m/march=armv7e-m/march=armv7e-m+fp/march=armv7e-m+fp.dp/march=armv8-m.base/march=armv8-m.main/march=armv8-m.main+fp/march=armv8-m.main+fp.dp/march=armv8.1-m.main+mve/march=armv8.1-m.main+pacbti
+MULTI_ARCH_DIRS_RM	= v6-m v7-m v7e-m v7e-m+fp v7e-m+dp v8-m.base v8-m.main v8-m.main+fp v8-m.main+dp v8.1-m.main+mve v8.1-m.main+pacbti
 
 # Base M-profile (no fp)
 MULTILIB_REQUIRED	+= mthumb/march=armv6s-m/mfloat-abi=soft
@@ -36,6 +36,7 @@ MULTILIB_REQUIRED	+= mthumb/march=armv7-m/mfloat-abi=soft
 MULTILIB_REQUIRED	+= mthumb/march=armv7e-m/mfloat-abi=soft
 MULTILIB_REQUIRED	+= mthumb/march=armv8-m.base/mfloat-abi=soft
 MULTILIB_REQUIRED	+= mthumb/march=armv8-m.main/mfloat-abi=soft
+MULTILIB_REQUIRED	+= mthumb/march=armv8.1-m.main+pacbti/mfloat-abi=soft
 
 # ARMv7e-M with FP (single and double precision variants)
 MULTILIB_REQUIRED	+= mthumb/march=armv7e-m+fp/mfloat-abi=hard
@@ -93,3 +94,4 @@ MULTILIB_MATCHES	+= march?armv8-m.main=mlibarch?armv8-m.main
 MULTILIB_MATCHES	+= march?armv8-m.main+fp=mlibarch?armv8-m.main+fp
 MULTILIB_MATCHES	+= march?armv8-m.main+fp.dp=mlibarch?armv8-m.main+fp.dp
 MULTILIB_MATCHES	+= march?armv8.1-m.main+mve=mlibarch?armv8.1-m.main+mve
+MULTILIB_MATCHES	+= march?armv8.1-m.main+pacbti=mlibarch?armv8.1-m.main+pacbti

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

* Re: [Patch 8/8, Arm, GCC] Introduce multilibs for PACBTI target feature. [Was RE: [Patch 7/7, Arm, GCC] Introduce multilibs for PACBTI target feature.]
  2021-10-28 11:43 [Patch 8/8, Arm, GCC] Introduce multilibs for PACBTI target feature. [Was RE: [Patch 7/7, Arm, GCC] Introduce multilibs for PACBTI target feature.] Tejas Belagod
@ 2021-12-07 14:56 ` Richard Earnshaw
  2021-12-10  9:39   ` Andrea Corallo
  2021-12-16 14:52   ` Andrea Corallo
  0 siblings, 2 replies; 4+ messages in thread
From: Richard Earnshaw @ 2021-12-07 14:56 UTC (permalink / raw)
  To: Tejas Belagod, Richard Earnshaw, gcc-patches



On 28/10/2021 12:43, Tejas Belagod via Gcc-patches wrote:
> 
> 
>> -----Original Message-----
>> From: Gcc-patches <gcc-patches-
>> bounces+belagod=gcc.gnu.org@gcc.gnu.org> On Behalf Of Tejas Belagod via
>> Gcc-patches
>> Sent: Friday, October 8, 2021 1:19 PM
>> To: gcc-patches@gcc.gnu.org
>> Subject: [Patch 7/7, Arm, GCC] Introduce multilibs for PACBTI target feature.
>>
>> Hi,
>>
>> This patch adds a multilib for pacbti target feature.
>>
>> Tested on arm-none-eabi. OK for trunk?
>>
>> 2021-10-04  Tejas Belagod  <tbelagod@arm.com>
>>
>> gcc/ChangeLog:
>>
>> 	* config/arm/t-rmprofile: Add multilib rules for +pacbti.
> 
> 
> This patch adds a multilib for pacbti target feature.
> 
> 2021-10-04  Tejas Belagod  <tbelagod@arm.com>
> 
> gcc/ChangeLog:
> 
> 	* config/arm/t-rmprofile: Add multilib rules for +pacbti.
> 
> Tested the following configurations, OK for trunk?
> 
> -mthumb/-march=armv8.1-m.main+pacbti/-mfloat-abi=soft
> -marm/-march=armv7-a/-mfpu=vfpv3-d16/-mfloat-abi=softfp
> mcmodel=small and tiny
> aarch64-none-linux-gnu native test and bootstrap
> 
> Thanks,
> Tejas.
> 

I can't decide whether this is too much, or too little.  But it doesn't 
feel right as it is.

Ideally we don't want yet another multilib.  It would be better to have 
one of the existing multilib variants made pac/bti safe.

And secondly, what about the hand-written assembler files in libgcc? 
Don't they need updating to be PAC/BTI safe?

Also, does this even do what you intend it to do?  It adds the PAC/BTI 
architectural feature, but it doesn't actually enable PAC/BTI in the 
generated code.

R.

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

* Re: [Patch 8/8, Arm, GCC] Introduce multilibs for PACBTI target feature. [Was RE: [Patch 7/7, Arm, GCC] Introduce multilibs for PACBTI target feature.]
  2021-12-07 14:56 ` Richard Earnshaw
@ 2021-12-10  9:39   ` Andrea Corallo
  2021-12-16 14:52   ` Andrea Corallo
  1 sibling, 0 replies; 4+ messages in thread
From: Andrea Corallo @ 2021-12-10  9:39 UTC (permalink / raw)
  To: Richard Earnshaw via Gcc-patches
  Cc: Tejas Belagod, Richard Earnshaw, Richard Earnshaw

Richard Earnshaw via Gcc-patches <gcc-patches@gcc.gnu.org> writes:

> On 28/10/2021 12:43, Tejas Belagod via Gcc-patches wrote:
>> 
>>> -----Original Message-----
>>> From: Gcc-patches <gcc-patches-
>>> bounces+belagod=gcc.gnu.org@gcc.gnu.org> On Behalf Of Tejas Belagod via
>>> Gcc-patches
>>> Sent: Friday, October 8, 2021 1:19 PM
>>> To: gcc-patches@gcc.gnu.org
>>> Subject: [Patch 7/7, Arm, GCC] Introduce multilibs for PACBTI target feature.
>>>
>>> Hi,
>>>
>>> This patch adds a multilib for pacbti target feature.
>>>
>>> Tested on arm-none-eabi. OK for trunk?
>>>
>>> 2021-10-04  Tejas Belagod  <tbelagod@arm.com>
>>>
>>> gcc/ChangeLog:
>>>
>>> 	* config/arm/t-rmprofile: Add multilib rules for +pacbti.
>> This patch adds a multilib for pacbti target feature.
>> 2021-10-04  Tejas Belagod  <tbelagod@arm.com>
>> gcc/ChangeLog:
>> 	* config/arm/t-rmprofile: Add multilib rules for +pacbti.
>> Tested the following configurations, OK for trunk?
>> -mthumb/-march=armv8.1-m.main+pacbti/-mfloat-abi=soft
>> -marm/-march=armv7-a/-mfpu=vfpv3-d16/-mfloat-abi=softfp
>> mcmodel=small and tiny
>> aarch64-none-linux-gnu native test and bootstrap
>> Thanks,
>> Tejas.
>> 

Hi Richard,

> I can't decide whether this is too much, or too little.  But it
> doesn't feel right as it is.
>
> Ideally we don't want yet another multilib.  It would be better to
> have one of the existing multilib variants made pac/bti safe.
>
> And secondly, what about the hand-written assembler files in libgcc?
> Don't they need updating to be PAC/BTI safe?

I agree with you, this patch is missing at least bti landing pads in the
hand-written assembler files in libgcc.

> Also, does this even do what you intend it to do?  It adds the PAC/BTI
> architectural feature, but it doesn't actually enable PAC/BTI in the
> generated code.

Good point, I'll fix this too in the upcoming respin.

Thanks for reviewing.

BR

  Andrea

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

* Re: [Patch 8/8, Arm, GCC] Introduce multilibs for PACBTI target feature. [Was RE: [Patch 7/7, Arm, GCC] Introduce multilibs for PACBTI target feature.]
  2021-12-07 14:56 ` Richard Earnshaw
  2021-12-10  9:39   ` Andrea Corallo
@ 2021-12-16 14:52   ` Andrea Corallo
  1 sibling, 0 replies; 4+ messages in thread
From: Andrea Corallo @ 2021-12-16 14:52 UTC (permalink / raw)
  To: Richard Earnshaw via Gcc-patches
  Cc: Tejas Belagod, Richard Earnshaw, Richard Earnshaw

Richard Earnshaw via Gcc-patches <gcc-patches@gcc.gnu.org> writes:

> On 28/10/2021 12:43, Tejas Belagod via Gcc-patches wrote:
>> 
>>> -----Original Message-----
>>> From: Gcc-patches <gcc-patches-
>>> bounces+belagod=gcc.gnu.org@gcc.gnu.org> On Behalf Of Tejas Belagod via
>>> Gcc-patches
>>> Sent: Friday, October 8, 2021 1:19 PM
>>> To: gcc-patches@gcc.gnu.org
>>> Subject: [Patch 7/7, Arm, GCC] Introduce multilibs for PACBTI target feature.
>>>
>>> Hi,
>>>
>>> This patch adds a multilib for pacbti target feature.
>>>
>>> Tested on arm-none-eabi. OK for trunk?
>>>
>>> 2021-10-04  Tejas Belagod  <tbelagod@arm.com>
>>>
>>> gcc/ChangeLog:
>>>
>>> 	* config/arm/t-rmprofile: Add multilib rules for +pacbti.
>> This patch adds a multilib for pacbti target feature.
>> 2021-10-04  Tejas Belagod  <tbelagod@arm.com>
>> gcc/ChangeLog:
>> 	* config/arm/t-rmprofile: Add multilib rules for +pacbti.
>> Tested the following configurations, OK for trunk?
>> -mthumb/-march=armv8.1-m.main+pacbti/-mfloat-abi=soft
>> -marm/-march=armv7-a/-mfpu=vfpv3-d16/-mfloat-abi=softfp
>> mcmodel=small and tiny
>> aarch64-none-linux-gnu native test and bootstrap
>> Thanks,
>> Tejas.
>> 
>
> I can't decide whether this is too much, or too little.  But it
> doesn't feel right as it is.
>
> Ideally we don't want yet another multilib.  It would be better to
> have one of the existing multilib variants made pac/bti safe.

Right, which one do you think we want to pick?

Thanks

  Andrea

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

end of thread, other threads:[~2021-12-16 14:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-28 11:43 [Patch 8/8, Arm, GCC] Introduce multilibs for PACBTI target feature. [Was RE: [Patch 7/7, Arm, GCC] Introduce multilibs for PACBTI target feature.] Tejas Belagod
2021-12-07 14:56 ` Richard Earnshaw
2021-12-10  9:39   ` Andrea Corallo
2021-12-16 14:52   ` Andrea Corallo

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).