From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 22B663857003; Tue, 13 Oct 2020 09:51:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 22B663857003 From: "avieira at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/97327] -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main Date: Tue, 13 Oct 2020 09:51:44 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: avieira at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: sripar01 at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2020 09:51:45 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97327 --- Comment #5 from avieira at gcc dot gnu.org --- Your other one: -mcpu=3Dcortex-m55+nomve -march=3Darmv8.1-m.main+mve -mfloat-abi=3Dsoftfp This has cpu without mve and arch with mve. Another fun caveat to look at is in: -mcpu=3Dcortex-m55 -mfloat-abi=3Dsoft float-abi=3Dsoft disables vector instructions, so it makes sense to remove = mve.fp and fp.dp/fp. However, we must make sure that +mve is still passed to the assembler because +mve enables new scalar shift instructions. If we want to be in-sync with legacy though I don't think we even need to l= ook at all these complicated cases as. Since it seems in the past we ignore fp extensions, take for instance: arm-none-eabi-gcc -mcpu=3Dcortex-m7 -march=3Darmv7e-m -mfloat-abi=3Dhard arm-none-eabi-gcc -mcpu=3Dcortex-m7 -march=3Darmv7e-m+fp -mfloat-abi=3Dhard= =20 arm-none-eabi-gcc -mcpu=3Dcortex-m7+nofp -march=3Darmv7e-m -mfloat-abi=3Ds= oft arm-none-eabi-gcc -mcpu=3Dcortex-m7+nofp -march=3Darmv7e-m+fp None of these give the warning, so maybe the solution is to ignore MVE as w= ell as the FP extension when checking for this? There is a bit in the warning c= ode=20 that says: /* And if the target ISA lacks floating point, ignore any extensions that depend on that. */ if (!bitmap_bit_p (target->isa, isa_bit_vfpv2)) bitmap_and_compl (isa_delta, isa_delta, isa_all_fpbits); Maybe we need to 'ignore any extension that depends on mve'? But I don't qu= ite understand how this works with the case where we do have isa_bit_vfpv2... For Srinath's sake it would be good to agree on what the behaviour should be and then work towards that. I personally don't have a strong feeling about = this other then: passing '-mcpu=3Dcortex-m55' shouldn't give warnings ... since = well that's insane :P=