public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Matthew Malcomson <matmal01@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/ARM/heads/morello)] Automatically add `+c64` to `-march=morello -mabi=purecap` Date: Wed, 30 Nov 2022 15:04:20 +0000 (GMT) [thread overview] Message-ID: <20221130150420.BE07A3858288@sourceware.org> (raw) https://gcc.gnu.org/g:866155e7fafe87bb88cbe070e5206af953505927 commit 866155e7fafe87bb88cbe070e5206af953505927 Author: Matthew Malcomson <matthew.malcomson@arm.com> Date: Wed Nov 30 15:03:17 2022 +0000 Automatically add `+c64` to `-march=morello -mabi=purecap` This is a convenience feature, it is already in Morello LLVM. This commit reduces the difference between the two compilers in the user facing controls. Diff: --- gcc/config/aarch64/aarch64.c | 9 +++++++-- gcc/testsuite/gcc.target/aarch64/morello/cli-convenience.c | 7 +++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index bfe5a312134..662d2bb6403 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -15402,11 +15402,16 @@ aarch64_override_options_internal (struct gcc_options *opts) what state the processor should be in (which also defines some parts of the ABI like whether symbol values should have their lowest bit set). If we want to generate purecap code we will need the processor to be in - the C64 state. */ + the C64 state. + + We automatically add this architecture feature without complaint when + targeting the -march=morello architecture. This is a command line + argument convenience feature. */ if (opts->x_aarch64_abi == AARCH64_ABI_MORELLO_PURECAP && !AARCH64_ISA_C64) { - error ("%<-mabi=purecap%> requires the %<+c64%> extension"); + if (selected_arch->arch != AARCH64_ARCH_MORELLO) + error ("%<-mabi=purecap%> requires the %<morello%> architecture"); aarch64_isa_flags |= AARCH64_FL_C64; } diff --git a/gcc/testsuite/gcc.target/aarch64/morello/cli-convenience.c b/gcc/testsuite/gcc.target/aarch64/morello/cli-convenience.c new file mode 100644 index 00000000000..46eec5ee9d5 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/morello/cli-convenience.c @@ -0,0 +1,7 @@ +/* { dg-do compile } */ +/* { dg-options "-march=morello -mabi=purecap" } */ +int foo(int *ptr) +{ + return *ptr; +} +/* { scan-assembler "c0" } */
reply other threads:[~2022-11-30 15:04 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20221130150420.BE07A3858288@sourceware.org \ --to=matmal01@gcc.gnu.org \ --cc=gcc-cvs@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: linkBe 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).