From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2049) id BE07A3858288; Wed, 30 Nov 2022 15:04:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE07A3858288 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669820660; bh=+f7AIlGDoLfcMl2zR6yPqeqMHbYC272bWcgOl7NIrUg=; h=From:To:Subject:Date:From; b=Vo2jl97VDOOQH+dburer4eHLlbe/O5Lj647OU08jZ5ap5PxMLf0iGmOGMMlAEZqfq pwBoLvILmfBkkoyJOA8BbCEYK76KpVJTodDKhz901fMTRCA/78FAWum8B9JkLp7mCP 7qMCRRf32bXcBTIdrokwFypiX8tzwTmF6ct2TLuM= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Matthew Malcomson To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/ARM/heads/morello)] Automatically add `+c64` to `-march=morello -mabi=purecap` X-Act-Checkin: gcc X-Git-Author: Matthew Malcomson X-Git-Refname: refs/vendors/ARM/heads/morello X-Git-Oldrev: 87492b28b1c35088d7452c3f6088f5985debd473 X-Git-Newrev: 866155e7fafe87bb88cbe070e5206af953505927 Message-Id: <20221130150420.BE07A3858288@sourceware.org> Date: Wed, 30 Nov 2022 15:04:20 +0000 (GMT) List-Id: https://gcc.gnu.org/g:866155e7fafe87bb88cbe070e5206af953505927 commit 866155e7fafe87bb88cbe070e5206af953505927 Author: Matthew Malcomson 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 % 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" } */