[Bug target/97327] -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97327 SRINATH PARVATHANENI changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #8 from SRINATH PARVATHANENI --- Committed patches to trunk and GCC-10 branches.
[Bug target/97327] -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97327 --- Comment #7 from CVS Commits --- The releases/gcc-10 branch has been updated by SRINATH PARVATHANENI : https://gcc.gnu.org/g:634ee90804cae1e08c8e25913288e0ecf0a5ea0a commit r10-8911-g634ee90804cae1e08c8e25913288e0ecf0a5ea0a Author: Srinath Parvathaneni Date: Fri Oct 16 14:53:28 2020 +0100 arm: Fix the warning -mcpu=cortex-m55 conflicting with -march=armv8.1-m.main (pr97327). This patch fixes (PR97327) the warning -mcpu=cortex-m55 conflicts with -march=armv8.1-m.main for -mfloat-abi=soft by adding the isa_bit_mve_float to clearing FP bit list. The following combination are fixed with this patch: $ cat bug.c int main(){ return 0; } $ arm-none-eabi-gcc -mcpu=cortex-m55 -mfloat-abi=soft bug.c -c $ arm-none-eabi-gcc -mcpu=cortex-m55 -mfloat-abi=soft -march=armv8.1-m.main+mve bug.c -c Before this patch for above combinations: cc1: warning: switch '-mcpu=cortex-m55' conflicts with '-march=armv8.1-m.main' switch After this patch for above combinations no warning/errors. gcc/ChangeLog: 2020-10-16 Srinath Parvathaneni PR target/97327 * config/arm/arm.c (fp_bitlist): Add isa_bit_mve_float to FP bits array. gcc/testsuite/ChangeLog: PR target/97327 * gcc.target/arm/mve/intrinsics/pr97327.c: New test. (cherry picked from commit 90042c43a92c452a5f9f3afbfcdad511ea09a54f)
[Bug target/97327] -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97327 --- Comment #6 from CVS Commits --- The master branch has been updated by SRINATH PARVATHANENI : https://gcc.gnu.org/g:90042c43a92c452a5f9f3afbfcdad511ea09a54f commit r11-4006-g90042c43a92c452a5f9f3afbfcdad511ea09a54f Author: Srinath Parvathaneni Date: Fri Oct 16 14:53:28 2020 +0100 arm: Fix the warning -mcpu=cortex-m55 conflicting with -march=armv8.1-m.main (pr97327). This patch fixes (PR97327) the warning -mcpu=cortex-m55 conflicts with -march=armv8.1-m.main for -mfloat-abi=soft by adding the isa_bit_mve_float to clearing FP bit list. The following combination are fixed with this patch: $ cat bug.c int main(){ return 0; } $ arm-none-eabi-gcc -mcpu=cortex-m55 -mfloat-abi=soft bug.c -c $ arm-none-eabi-gcc -mcpu=cortex-m55 -mfloat-abi=soft -march=armv8.1-m.main+mve bug.c -c Before this patch for above combinations: cc1: warning: switch '-mcpu=cortex-m55' conflicts with '-march=armv8.1-m.main' switch After this patch for above combinations no warning/errors. gcc/ChangeLog: 2020-10-16 Srinath Parvathaneni PR target/97327 * config/arm/arm.c (fp_bitlist): Add isa_bit_mve_float to FP bits array. gcc/testsuite/ChangeLog: PR target/97327 * gcc.target/arm/mve/intrinsics/pr97327.c: New test.
[Bug target/97327] -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97327 --- Comment #5 from avieira at gcc dot gnu.org --- Your other one: -mcpu=cortex-m55+nomve -march=armv8.1-m.main+mve -mfloat-abi=softfp This has cpu without mve and arch with mve. Another fun caveat to look at is in: -mcpu=cortex-m55 -mfloat-abi=soft float-abi=soft 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 look at all these complicated cases as. Since it seems in the past we ignore fp extensions, take for instance: arm-none-eabi-gcc -mcpu=cortex-m7 -march=armv7e-m -mfloat-abi=hard arm-none-eabi-gcc -mcpu=cortex-m7 -march=armv7e-m+fp -mfloat-abi=hard arm-none-eabi-gcc -mcpu=cortex-m7+nofp -march=armv7e-m -mfloat-abi=soft arm-none-eabi-gcc -mcpu=cortex-m7+nofp -march=armv7e-m+fp None of these give the warning, so maybe the solution is to ignore MVE as well as the FP extension when checking for this? There is a bit in the warning code 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 quite 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=cortex-m55' shouldn't give warnings ... since well that's insane :P
[Bug target/97327] -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97327 --- Comment #4 from avieira at gcc dot gnu.org --- With -mcpu=cortex-m55+nomve should be equivalent to -march=armv8.1-m.main+dsp
[Bug target/97327] -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97327 --- Comment #3 from Christophe Lyon --- Well, why does the warning remove the extensions? (+) It seems to indicate they are not taken into account, which is confusing: it doesn't really say why there is a conflict. Why do you think -mcpu=cortex-m55+nomve -march=armv8.1-m.main should conflict? It's not clear to me when I look at arm-cpus.in
[Bug target/97327] -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97327 avieira at gcc dot gnu.org changed: What|Removed |Added CC||avieira at gcc dot gnu.org --- Comment #2 from avieira at gcc dot gnu.org --- The last two should conflict though right? I never quite understood this warning to be fair. My personal preference would be to warn for any invocation where both -mcpu and -march are passed, but I understand that for legacy reasons that might be undesirable. Though yeah -mcpu=cortex-m55 with a -mfloat-abi=soft should not warn for anything obviously.
[Bug target/97327] -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97327 SRINATH PARVATHANENI changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |sripar01 at gcc dot gnu.org
[Bug target/97327] -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97327 James Greenhalgh changed: What|Removed |Added Ever confirmed|0 |1 CC||jgreenhalgh at gcc dot gnu.org Last reconfirmed||2020-10-08 Status|UNCONFIRMED |NEW
[Bug target/97327] -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97327 --- Comment #1 from Christophe Lyon --- Similarly: -mcpu=cortex-m55+nomve -march=armv8.1-m.main+mve -mfloat-abi=softfp cc1: warning: switch '-mcpu=cortex-m55' conflicts with '-march=armv8.1-m.main' switch -mcpu=cortex-m55+nomve -march=armv8.1-m.main -mfloat-abi=softfp cc1: warning: switch '-mcpu=cortex-m55' conflicts with '-march=armv8.1-m.main' switch
[Bug target/97327] -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97327 Christophe Lyon changed: What|Removed |Added Target||arm Target Milestone|--- |11.0