public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/98759] New: arm cortex-r5 single precisions flotaing point generation
@ 2021-01-20  4:35 dallred at tesla dot com
  2021-01-20 11:16 ` [Bug target/98759] " wirkus at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: dallred at tesla dot com @ 2021-01-20  4:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98759

            Bug ID: 98759
           Summary: arm cortex-r5 single precisions flotaing point
                    generation
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dallred at tesla dot com
  Target Milestone: ---

Created attachment 50008
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50008&action=edit
Simple source file for replication

Trying to compile the simple floating point C function in the attached C file,
for an embedded Cortex-R5F core that does not support double precision in the
VFPv3, to an object file using either of the following:

$ arm-none-eabi-gcc -mcpu=cortex-r5+nofp.dp -mfloat-abi=hard -o float-test.o -c
float-test.c
$ arm-none-eabi-gcc -march=armv7-r+vfpv3xd -mfloat-abi=hard -o float-test.o -c
float-test.c

These two commands should be equivalent, and are, but they both fail at the
assembly step with a message like the following:

tmp/cc5XbvoO.s: Assembler messages:
/tmp/cc5XbvoO.s:42: Error: selected processor does not support `vmul.f32
s15,s14,s15' in ARM mode

The -mfloat-abi can be either 'hard' or 'softfp', result is the same. This was
observed using the prepackaged GCC downloads for Cortex-R/M made available by
ARM:
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads

This issue is observed using both gcc-arm-none-eabi-10-2020-q4-major and
gcc-arm-none-eabi-9-2020-q2-update. To me, it seems the generated assembly is
correct. I can't fathom why the assembler is complaining and I don't know why
it is saying this instruction is not supported in ARM mode. Interestingly,
using the -mthumb flag does allow the compilation to object file succeed. I can
find no evidence of VFP instructions being restricted to either ARM or Thumb2
mode of the processor.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug target/98759] arm cortex-r5 single precisions flotaing point generation
  2021-01-20  4:35 [Bug target/98759] New: arm cortex-r5 single precisions flotaing point generation dallred at tesla dot com
@ 2021-01-20 11:16 ` wirkus at gcc dot gnu.org
  2021-01-20 11:48 ` rearnsha at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: wirkus at gcc dot gnu.org @ 2021-01-20 11:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98759

Przemyslaw Wirkus <wirkus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wirkus at gcc dot gnu.org

--- Comment #1 from Przemyslaw Wirkus <wirkus at gcc dot gnu.org> ---
Hi Daniel,

I can confirm that this issue exists for Arm's toolchain releases (available
from developer.arm.com):
* gcc-arm-none-eabi-10-2020-q4-major and
* gcc-arm-none-eabi-9-2020-q2-update.

Quick bisect tells me that this issue was fixed in Binutils' GAS somewhere
between 2.35.1.20201116 and 2.35.1.20201120.

gcc-arm-none-eabi-10-2020-q4-major was released with Binutils 2.35.1.20201028:

$ ./gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-as --version
GNU assembler (GNU Arm Embedded Toolchain 10-2020-q4-major) 2.35.1.20201028

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug target/98759] arm cortex-r5 single precisions flotaing point generation
  2021-01-20  4:35 [Bug target/98759] New: arm cortex-r5 single precisions flotaing point generation dallred at tesla dot com
  2021-01-20 11:16 ` [Bug target/98759] " wirkus at gcc dot gnu.org
@ 2021-01-20 11:48 ` rearnsha at gcc dot gnu.org
  2021-01-20 16:33 ` dallred at tesla dot com
  2021-01-20 16:36 ` dallred at tesla dot com
  3 siblings, 0 replies; 5+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2021-01-20 11:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98759

Richard Earnshaw <rearnsha at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #2 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
Not a bug in GCC (and was fixed in GAS), so closing.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug target/98759] arm cortex-r5 single precisions flotaing point generation
  2021-01-20  4:35 [Bug target/98759] New: arm cortex-r5 single precisions flotaing point generation dallred at tesla dot com
  2021-01-20 11:16 ` [Bug target/98759] " wirkus at gcc dot gnu.org
  2021-01-20 11:48 ` rearnsha at gcc dot gnu.org
@ 2021-01-20 16:33 ` dallred at tesla dot com
  2021-01-20 16:36 ` dallred at tesla dot com
  3 siblings, 0 replies; 5+ messages in thread
From: dallred at tesla dot com @ 2021-01-20 16:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98759

--- Comment #3 from Daniel Allred <dallred at tesla dot com> ---
Thank you for the quick feedback. I can't find any bug report for binutils/gas
in https://sourceware.org/bugzilla related to this, so I may try and see if I
can find commits for gas between 2.35.1.20201116 and 2.35.1.20201120 that would
explain the fix.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug target/98759] arm cortex-r5 single precisions flotaing point generation
  2021-01-20  4:35 [Bug target/98759] New: arm cortex-r5 single precisions flotaing point generation dallred at tesla dot com
                   ` (2 preceding siblings ...)
  2021-01-20 16:33 ` dallred at tesla dot com
@ 2021-01-20 16:36 ` dallred at tesla dot com
  3 siblings, 0 replies; 5+ messages in thread
From: dallred at tesla dot com @ 2021-01-20 16:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98759

--- Comment #4 from Daniel Allred <dallred at tesla dot com> ---
Looks like this was it, came direct from ARM.

https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=48f4d8ce966e20e1e759e29ca8cf05a5dd328883

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-01-20 16:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20  4:35 [Bug target/98759] New: arm cortex-r5 single precisions flotaing point generation dallred at tesla dot com
2021-01-20 11:16 ` [Bug target/98759] " wirkus at gcc dot gnu.org
2021-01-20 11:48 ` rearnsha at gcc dot gnu.org
2021-01-20 16:33 ` dallred at tesla dot com
2021-01-20 16:36 ` dallred at tesla dot com

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).