From: Srinath Parvathaneni <Srinath.Parvathaneni@arm.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
Richard Earnshaw <Richard.Earnshaw@arm.com>
Cc: Srinath Parvathaneni <Srinath.Parvathaneni@arm.com>
Subject: Re: [GCC][PATCH v2] arm: Add pacbti related multilib support for armv8.1-m.main.
Date: Tue, 6 Dec 2022 11:31:41 +0000 [thread overview]
Message-ID: <VE1PR08MB4893F483B7097032CCCA194F9B1B9@VE1PR08MB4893.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <32a435b2-b9c4-4b51-b1f0-d9f304ddf8c7@AZ-NEU-EX04.Arm.com>
[-- Attachment #1: Type: text/plain, Size: 3366 bytes --]
Ping!!
________________________________
From: Gcc-patches <gcc-patches-bounces+srinath.parvathaneni=arm.com@gcc.gnu.org> on behalf of Srinath Parvathaneni via Gcc-patches <gcc-patches@gcc.gnu.org>
Sent: 31 October 2022 15:36
To: gcc-patches@gcc.gnu.org <gcc-patches@gcc.gnu.org>
Cc: Richard Earnshaw <Richard.Earnshaw@arm.com>
Subject: [GCC][PATCH v2] arm: Add pacbti related multilib support for armv8.1-m.main.
Hi,
This patch adds the support for pacbti multlilib linking by making
"-mbranch-protection=none" as default in the command line for all M-profile
targets and uses "-mbranch-protection=none" for multilib matching. If any
valid value is passed to "-mbranch-protection" in the command line, this
new value overwrites the default value in the command line and uses
"-mbranch-protection=standard" for multilib matching.
Eg 1.
If the passed command line flags are:
a) -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=auto
b) -mcpu=cortex-m85+nopacbti -mfloat-abi=hard -mfpu=auto
After this patch the command line flags the compiler receives will be:
a) -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=auto -mbranch-protection=none
b) -mcpu=cortex-m85+nopacbti -mfloat-abi=hard -mfpu=auto -mbranch-protection=none
"-mbranch-protection=none" will be used in the multilib matching.
Eg 2.
If the passed command line flags are:
a) -march=armv8.1-m.main+mve+pacbti -mfloat-abi=hard -mfpu=auto -mbranch-protection=pac-ret
b) -mcpu=cortex-m85 -mfloat-abi=hard -mfpu=auto -mbranch-protection=pac-ret+bti
After this patch the command line flags the compiler receives will be:
a) -march=armv8.1-m.main+mve+pacbti -mfloat-abi=hard -mfpu=auto -mbranch-protection=pac-ret
b) -mcpu=cortex-m85 -mfloat-abi=hard -mfpu=auto -mbranch-protection=pac-ret+bti
"-mbranch-protection=standard" will be used in the multilib matching.
Eg 3.
For A-profile target, if the passed command line flags are:
-march=armv8-a+simd -mfloat-abi=hard -mfpu=auto
Even after this patch the command line flags compiler receives will remain the same:
-march=armv8-a+simd -mfloat-abi=hard -mfpu=auto
Regression tested on arm-none-eabi and bootstrapped on arm-none-linux-gnueabihf.
Ok for master?
Regards,
Srinath.
gcc/ChangeLog:
2022-10-28 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
* common/config/arm/arm-common.cc
(arm_canon_branch_protection_option): Define new function.
* config/arm/arm-cpus.in (armv8.1-m.main): Move dsp option below pacbti
option.
* config/arm/arm.h (arm_canon_branch_protection_option): Define function
prototype.
(CANON_BRANCH_PROTECTION_SPEC_FUNCTION): Define macro.
(MBRANCH_PROTECTION_SPECS): Likewise.
* config/arm/t-rmprofile (MULTI_ARCH_OPTS_RM): Add new options.
(MULTI_ARCH_DIRS_RM): Add new directories.
(MULTILIB_REQUIRED): Add new option.
(MULTILIB_REUSE): Reuse existing multlibs.
(MULTILIB_MATCHES): Match multilib strings.
gcc/testsuite/ChangeLog:
2022-10-28 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
* gcc.target/arm/multilib.exp (multilib_config "rmprofile"): Update
tests.
* gcc.target/arm/pac-10.c: New test.
* gcc.target/arm/pac-11.c: Likewise.
* gcc.target/arm/pac-12.c: Likewise.
next prev parent reply other threads:[~2022-12-06 11:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-31 15:36 Srinath Parvathaneni
2022-12-06 11:31 ` Srinath Parvathaneni [this message]
2022-12-06 17:58 ` Richard Earnshaw
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=VE1PR08MB4893F483B7097032CCCA194F9B1B9@VE1PR08MB4893.eurprd08.prod.outlook.com \
--to=srinath.parvathaneni@arm.com \
--cc=Richard.Earnshaw@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).