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-16 Thread Andrea Corallo via Gcc-patches
Richard Earnshaw via Gcc-patches  writes:

> On 28/10/2021 12:43, Tejas Belagod via Gcc-patches wrote:
>> 
>>> -Original Message-
>>> From: Gcc-patches >> bounces+belagod=gcc.gnu@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  
>>>
>>> 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  
>> 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


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-10 Thread Andrea Corallo via Gcc-patches
Richard Earnshaw via Gcc-patches  writes:

> On 28/10/2021 12:43, Tejas Belagod via Gcc-patches wrote:
>> 
>>> -Original Message-
>>> From: Gcc-patches >> bounces+belagod=gcc.gnu@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  
>>>
>>> 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  
>> 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


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 Thread Richard Earnshaw via Gcc-patches




On 28/10/2021 12:43, Tejas Belagod via Gcc-patches wrote:




-Original Message-
From: Gcc-patches  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  

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  

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.


[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 Thread Tejas Belagod via Gcc-patches


> -Original Message-
> From: Gcc-patches  bounces+belagod=gcc.gnu@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  
> 
> 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  

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