public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch 3/7, Arm, GCC] Add testsuite library support for PACBTI target.
@ 2021-10-08 12:17 Tejas Belagod
  2021-10-11 13:36 ` Richard Earnshaw
  0 siblings, 1 reply; 3+ messages in thread
From: Tejas Belagod @ 2021-10-08 12:17 UTC (permalink / raw)
  To: gcc-patches

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

Hi,

Add targeting-checking entities for PACBTI in testsuite
framework.

Tested on arm-none-eabi. OK for trunk?

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

gcc/ChangeLog:

	* testsuite/lib/target-supports.exp
	(check_effective_target_arm_pacbti_hw): New.

[-- Attachment #2: test-lib.txt --]
[-- Type: text/plain, Size: 864 bytes --]

diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 9ebca7ac007363d2a35158bb80092118f629b97b..323541c2da527e3da5dce4d85cadcb2068d9bb5c 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -5064,6 +5064,22 @@ proc check_effective_target_arm_cmse_clear_ok {} {
     } "-mcmse"];
 }
 
+# Return 1 if the target supports executing PACBTI instructions, 0
+# otherwise.
+
+proc check_effective_target_arm_pacbti_hw {} {
+    return [check_runtime arm_pacbti_hw_available {
+	__attribute__ ((naked)) int
+	main (void)
+	{
+	  asm ("pac r12, lr, sp");
+	  asm ("mov r0, #0");
+	  asm ("autg r12, lr, sp");
+	  asm ("bx lr");
+	}
+    } ""]
+}
+
 # Return 1 if this compilation turns on string_ops_prefer_neon on.
 
 proc check_effective_target_arm_tune_string_ops_prefer_neon { } {

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

* Re: [Patch 3/7, Arm, GCC] Add testsuite library support for PACBTI target.
  2021-10-08 12:17 [Patch 3/7, Arm, GCC] Add testsuite library support for PACBTI target Tejas Belagod
@ 2021-10-11 13:36 ` Richard Earnshaw
  2021-10-11 13:38   ` Richard Earnshaw
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Earnshaw @ 2021-10-11 13:36 UTC (permalink / raw)
  To: Tejas Belagod, gcc-patches

On 08/10/2021 13:17, Tejas Belagod via Gcc-patches wrote:
> Hi,
> 
> Add targeting-checking entities for PACBTI in testsuite
> framework.
> 
> Tested on arm-none-eabi. OK for trunk?
> 
> 2021-10-04  Tejas Belagod  <tbelagod@arm.com>
> 
> gcc/ChangeLog:
> 
> 	* testsuite/lib/target-supports.exp
> 	(check_effective_target_arm_pacbti_hw): New.
> 

OK.

R.

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

* Re: [Patch 3/7, Arm, GCC] Add testsuite library support for PACBTI target.
  2021-10-11 13:36 ` Richard Earnshaw
@ 2021-10-11 13:38   ` Richard Earnshaw
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Earnshaw @ 2021-10-11 13:38 UTC (permalink / raw)
  To: Tejas Belagod, gcc-patches

On 11/10/2021 14:36, Richard Earnshaw via Gcc-patches wrote:
> On 08/10/2021 13:17, Tejas Belagod via Gcc-patches wrote:
>> Hi,
>>
>> Add targeting-checking entities for PACBTI in testsuite
>> framework.
>>
>> Tested on arm-none-eabi. OK for trunk?
>>
>> 2021-10-04  Tejas Belagod  <tbelagod@arm.com>
>>
>> gcc/ChangeLog:
>>
>>     * testsuite/lib/target-supports.exp
>>     (check_effective_target_arm_pacbti_hw): New.
>>
> 
> OK.
> 
> R.

Oh, wait!  Not OK.  Needs documentation in sourcebuild.texi.

R.

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

end of thread, other threads:[~2021-10-11 13:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08 12:17 [Patch 3/7, Arm, GCC] Add testsuite library support for PACBTI target Tejas Belagod
2021-10-11 13:36 ` Richard Earnshaw
2021-10-11 13:38   ` Richard Earnshaw

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