public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/97327] New: -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main
@ 2020-10-07 21:52 clyon at gcc dot gnu.org
2020-10-07 21:52 ` [Bug target/97327] " clyon at gcc dot gnu.org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: clyon at gcc dot gnu.org @ 2020-10-07 21:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97327
Bug ID: 97327
Summary: -mcpu=cortex-m55 warns without -mfloat-abi=hard or
-march=armv8.1-m.main
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: clyon at gcc dot gnu.org
Target Milestone: ---
When compiling with
-mthumb -mcpu=cortex-m55
I get:
cc1: warning: switch '-mcpu=cortex-m55' conflicts with '-march=armv8.1-m.main'
switch
unless I add -mfloat-abi=hard
or -march=armv8.1-m.main
which is a bit counter-intuitive.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/97327] -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main
2020-10-07 21:52 [Bug target/97327] New: -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main clyon at gcc dot gnu.org
@ 2020-10-07 21:52 ` clyon at gcc dot gnu.org
2020-10-07 22:05 ` clyon at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: clyon at gcc dot gnu.org @ 2020-10-07 21:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97327
Christophe Lyon <clyon at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |arm
Target Milestone|--- |11.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/97327] -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main
2020-10-07 21:52 [Bug target/97327] New: -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main clyon at gcc dot gnu.org
2020-10-07 21:52 ` [Bug target/97327] " clyon at gcc dot gnu.org
@ 2020-10-07 22:05 ` clyon at gcc dot gnu.org
2020-10-08 8:11 ` jgreenhalgh at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: clyon at gcc dot gnu.org @ 2020-10-07 22:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97327
--- Comment #1 from Christophe Lyon <clyon at gcc dot gnu.org> ---
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/97327] -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main
2020-10-07 21:52 [Bug target/97327] New: -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main clyon at gcc dot gnu.org
2020-10-07 21:52 ` [Bug target/97327] " clyon at gcc dot gnu.org
2020-10-07 22:05 ` clyon at gcc dot gnu.org
@ 2020-10-08 8:11 ` jgreenhalgh at gcc dot gnu.org
2020-10-09 9:50 ` sripar01 at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jgreenhalgh at gcc dot gnu.org @ 2020-10-08 8:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97327
James Greenhalgh <jgreenhalgh at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
CC| |jgreenhalgh at gcc dot gnu.org
Last reconfirmed| |2020-10-08
Status|UNCONFIRMED |NEW
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/97327] -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main
2020-10-07 21:52 [Bug target/97327] New: -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main clyon at gcc dot gnu.org
` (2 preceding siblings ...)
2020-10-08 8:11 ` jgreenhalgh at gcc dot gnu.org
@ 2020-10-09 9:50 ` sripar01 at gcc dot gnu.org
2020-10-13 9:14 ` avieira at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: sripar01 at gcc dot gnu.org @ 2020-10-09 9:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97327
SRINATH PARVATHANENI <sripar01 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |sripar01 at gcc dot gnu.org
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/97327] -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main
2020-10-07 21:52 [Bug target/97327] New: -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main clyon at gcc dot gnu.org
` (3 preceding siblings ...)
2020-10-09 9:50 ` sripar01 at gcc dot gnu.org
@ 2020-10-13 9:14 ` avieira at gcc dot gnu.org
2020-10-13 9:22 ` clyon at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: avieira at gcc dot gnu.org @ 2020-10-13 9:14 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/97327] -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main
2020-10-07 21:52 [Bug target/97327] New: -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main clyon at gcc dot gnu.org
` (4 preceding siblings ...)
2020-10-13 9:14 ` avieira at gcc dot gnu.org
@ 2020-10-13 9:22 ` clyon at gcc dot gnu.org
2020-10-13 9:33 ` avieira at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: clyon at gcc dot gnu.org @ 2020-10-13 9:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97327
--- Comment #3 from Christophe Lyon <clyon at gcc dot gnu.org> ---
Well, why does the warning remove the extensions? (+XXXX) 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/97327] -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main
2020-10-07 21:52 [Bug target/97327] New: -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main clyon at gcc dot gnu.org
` (5 preceding siblings ...)
2020-10-13 9:22 ` clyon at gcc dot gnu.org
@ 2020-10-13 9:33 ` avieira at gcc dot gnu.org
2020-10-13 9:51 ` avieira at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: avieira at gcc dot gnu.org @ 2020-10-13 9:33 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/97327] -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main
2020-10-07 21:52 [Bug target/97327] New: -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main clyon at gcc dot gnu.org
` (6 preceding siblings ...)
2020-10-13 9:33 ` avieira at gcc dot gnu.org
@ 2020-10-13 9:51 ` avieira at gcc dot gnu.org
2020-10-16 13:54 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: avieira at gcc dot gnu.org @ 2020-10-13 9:51 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/97327] -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main
2020-10-07 21:52 [Bug target/97327] New: -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main clyon at gcc dot gnu.org
` (7 preceding siblings ...)
2020-10-13 9:51 ` avieira at gcc dot gnu.org
@ 2020-10-16 13:54 ` cvs-commit at gcc dot gnu.org
2020-10-19 11:58 ` cvs-commit at gcc dot gnu.org
2020-10-19 12:06 ` sripar01 at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-10-16 13:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97327
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by SRINATH PARVATHANENI
<sripar01@gcc.gnu.org>:
https://gcc.gnu.org/g:90042c43a92c452a5f9f3afbfcdad511ea09a54f
commit r11-4006-g90042c43a92c452a5f9f3afbfcdad511ea09a54f
Author: Srinath Parvathaneni <srinath.parvathaneni@arm.com>
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 <srinath.parvathaneni@arm.com>
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/97327] -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main
2020-10-07 21:52 [Bug target/97327] New: -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main clyon at gcc dot gnu.org
` (8 preceding siblings ...)
2020-10-16 13:54 ` cvs-commit at gcc dot gnu.org
@ 2020-10-19 11:58 ` cvs-commit at gcc dot gnu.org
2020-10-19 12:06 ` sripar01 at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-10-19 11:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97327
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by SRINATH PARVATHANENI
<sripar01@gcc.gnu.org>:
https://gcc.gnu.org/g:634ee90804cae1e08c8e25913288e0ecf0a5ea0a
commit r10-8911-g634ee90804cae1e08c8e25913288e0ecf0a5ea0a
Author: Srinath Parvathaneni <srinath.parvathaneni@arm.com>
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 <srinath.parvathaneni@arm.com>
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)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/97327] -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main
2020-10-07 21:52 [Bug target/97327] New: -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main clyon at gcc dot gnu.org
` (9 preceding siblings ...)
2020-10-19 11:58 ` cvs-commit at gcc dot gnu.org
@ 2020-10-19 12:06 ` sripar01 at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: sripar01 at gcc dot gnu.org @ 2020-10-19 12:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97327
SRINATH PARVATHANENI <sripar01 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #8 from SRINATH PARVATHANENI <sripar01 at gcc dot gnu.org> ---
Committed patches to trunk and GCC-10 branches.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2020-10-19 12:06 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-07 21:52 [Bug target/97327] New: -mcpu=cortex-m55 warns without -mfloat-abi=hard or -march=armv8.1-m.main clyon at gcc dot gnu.org
2020-10-07 21:52 ` [Bug target/97327] " clyon at gcc dot gnu.org
2020-10-07 22:05 ` clyon at gcc dot gnu.org
2020-10-08 8:11 ` jgreenhalgh at gcc dot gnu.org
2020-10-09 9:50 ` sripar01 at gcc dot gnu.org
2020-10-13 9:14 ` avieira at gcc dot gnu.org
2020-10-13 9:22 ` clyon at gcc dot gnu.org
2020-10-13 9:33 ` avieira at gcc dot gnu.org
2020-10-13 9:51 ` avieira at gcc dot gnu.org
2020-10-16 13:54 ` cvs-commit at gcc dot gnu.org
2020-10-19 11:58 ` cvs-commit at gcc dot gnu.org
2020-10-19 12:06 ` sripar01 at gcc dot gnu.org
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).