public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Earnshaw <Richard.Earnshaw@foss.arm.com>
To: Andrea Corallo <andrea.corallo@arm.com>,
	Richard Earnshaw via Gcc-patches <gcc-patches@gcc.gnu.org>
Cc: Tejas Belagod <Tejas.Belagod@arm.com>,
	Richard Earnshaw <Richard.Earnshaw@arm.com>
Subject: Re: [Patch 7/8 V2] Arm: Emit build attributes for PACBTI target feature.
Date: Fri, 10 Dec 2021 16:51:12 +0000	[thread overview]
Message-ID: <23bebfe0-1216-d137-9c6f-296047d0c609@foss.arm.com> (raw)
In-Reply-To: <gkrk0gcxvqs.fsf_-_@arm.com>



On 10/12/2021 16:36, Andrea Corallo via Gcc-patches wrote:
> 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 6/7, Arm, GCC] Emit build attributes for PACBTI target
>>>> feature.
>>>>
>>>> Hi,
>>>>
>>>> This patch emits assembler directives for PACBTI build attributes as defined
>>>> by the ABI. (https://github.com/ARM-software/abi-
>>>> aa/releases/download/2021Q1/addenda32.pdf)
>>>>
>>>> Tested on arm-none-eabi.
>>>>
>>>> 2021-10-04  Tejas Belagod  <tbelagod@arm.com>
>>>>
>>>> gcc/ChangeLog:
>>>>
>>>> 	* config/arm/arm.c (arm_file_start): Emit EABI attributes for
>>>> 	Tag_PAC_extension, Tag_BTI_extension, TAG_BTI_use,
>>>> TAG_PACRET_use.
>>>>
>>>> gcc/testsuite/ChangeLog:
>>>>
>>>> 	* gcc.target/arm/acle/pacbti-m-predef-1.c: New test.
>>>> 	* gcc.target/arm/acle/pacbti-m-predef-3: New test.
>>>> 	* gcc.target/arm/acle/pacbti-m-predef-6.c: New test.
>>> This patch emits assembler directives for PACBTI build attributes
>>> as defined by the ABI.
>>> https://github.com/ARM-software/abi-aa/releases/download/2021Q1/addenda32.pdf
>>> 2021-10-25  Tejas Belagod  <tbelagod@arm.com>
>>> gcc/ChangeLog:
>>> 	* config/arm/arm.c (arm_file_start): Emit EABI attributes for
>>> 	Tag_PAC_extension, Tag_BTI_extension, TAG_BTI_use, TAG_PACRET_use.
>>> gcc/testsuite/ChangeLog:
>>> 	* gcc.target/arm/acle/pacbti-m-predef-1.c: New test.
>>> 	* gcc.target/arm/acle/pacbti-m-predef-3: New test.
>>> 	* gcc.target/arm/acle/pacbti-m-predef-6.c: New test.
>>
>> I'm not sure what the value of making these executable tests is.  It
>> means that they can only be used when the test model has PAC/BTI
>> available.  But they don't really test the PAC/BTI generation, so that
>> seems rather pointless.
>>
>> Better, IMO to make them simple compile/scan-assembler tests that
>> check the build attributes are correct.
>>
>> R.
> 
> Hi Richard,
> 
> agreed.  Please find attached the updated version of the patch.
> 
> Thanks for reviewing
> 
>    Andrea
> 

Oh, another one:

diff --git a/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-7.c 
b/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-7.c
new file mode 100644
index 00000000000..bdf9131c142
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-7.c
@@ -0,0 +1,16 @@
+#if defined (__ARM_FEATURE_BTI_DEFAULT)
+#error "Feature test macro __ARM_FEATURE_BTI_DEFAULT should be defined."
+#endif
+
+#if defined (__ARM_FEATURE_PAC_DEFAULT)
+#error "Feature test macro __ARM_FEATURE_PAC_DEFAULT should be undefined."
+#endif

Shouldn't the first error message be 'undefined'?

      parent reply	other threads:[~2021-12-10 16:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-28 11:43 [Patch 7/8, Arm, GCC] Emit build attributes for PACBTI target feature. [ Was RE: [Patch 6/7, Arm, GCC] Emit build attributes for PACBTI target feature.] Tejas Belagod
2021-12-07 14:48 ` Richard Earnshaw
2021-12-10 16:36   ` [Patch 7/8 V2] Arm: Emit build attributes for PACBTI target feature Andrea Corallo
2021-12-10 16:48     ` Richard Earnshaw
2021-12-13 16:52       ` [Patch 7/8 V3] " Andrea Corallo
2021-12-10 16:51     ` Richard Earnshaw [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=23bebfe0-1216-d137-9c6f-296047d0c609@foss.arm.com \
    --to=richard.earnshaw@foss.arm.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=Tejas.Belagod@arm.com \
    --cc=andrea.corallo@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).