public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcc/103424] New: Ignoring -mfpu=sp_full/-mfpu=-sp_lite/-msingle-float
@ 2021-11-25 9:45 andrea.bellandi at desy dot de
2021-11-25 9:49 ` [Bug libgcc/103424] " pinskia at gcc dot gnu.org
2021-11-25 9:53 ` pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: andrea.bellandi at desy dot de @ 2021-11-25 9:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103424
Bug ID: 103424
Summary: Ignoring -mfpu=sp_full/-mfpu=-sp_lite/-msingle-float
Product: gcc
Version: 8.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgcc
Assignee: unassigned at gcc dot gnu.org
Reporter: andrea.bellandi at desy dot de
Target Milestone: ---
When passing "-mfpu=sp_full/-mfpu=-sp_lite/-msingle-float" to CFLAGS with
--target=powerpc-xilinx-eabi/--target=powerpc-xilinx-eabisim, libgcc should be
compiled with hard- single precision fpu code and soft- double precision (see
https://gcc.gnu.org/onlinedocs/gcc-8.5.0/gcc/RS_002f6000-and-PowerPC-Options.html#RS_002f6000-and-PowerPC-Options).
However these flags are ignored (no apparent reference to them in libgcc).
Therefore the library attempt a compilation with both single- and double- soft
floating point replacement.
How to reproduce:
Compilation failure of the whole 'gcc product' with the following parameters
CFLAGS_FOR_TARGET="-g -O2 -mxilinx-fpu -msingle-float" ../gcc/configure
--target=powerpc-xilinx-eabi --prefix="$PREFIX" --disable-nls --with-tune=440
--enable-languages=c,c++ --without-headers
make all-gcc
make all-target-libgcc
Error:
/home/bellandi/Projects/build-gcc/./gcc/xgcc
-B/home/bellandi/Projects/build-gcc/./gcc/
-B/home/bellandi/.local/cross/powerpc-xilinx-eabi/bin/
-B/home/bellandi/.local/cross/powerpc-xilinx-eabi/lib/ -isystem
/home/bellandi/.local/cross/powerpc-xilinx-eabi/include -isystem
/home/bellandi/.local/cross/powerpc-xilinx-eabi/sys-include -g -O2
-mfpu=sp_lite -mrelocatable-lib -mno-eabi -mstrict-align -O2 -g -O2 -DIN_GCC
-DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-isystem ./include -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector
-Dinhibit_libc -I. -I. -I../../.././gcc -I../../../../gcc/libgcc
-I../../../../gcc/libgcc/. -I../../../../gcc/libgcc/../gcc
-I../../../../gcc/libgcc/../include -o _mulsc3.o -MT _mulsc3.o -MD -MP -MF
_mulsc3.dep -DL_mulsc3 -c ../../../../gcc/libgcc/libgcc2.c -fvisibility=hidden
-DHIDE_EXPORTS
during RTL pass: reload
../../../../gcc/libgcc/libgcc2.c: In function '__mulsc3':
../../../../gcc/libgcc/libgcc2.c:2036:1: internal compiler error: Max. number
of generated reload insns per insn is achieved (90)
}
^
0x8d1519 lra_constraints(bool)
../../gcc/gcc/lra-constraints.c:4836
0x8bf2e4 lra(_IO_FILE*)
../../gcc/gcc/lra.c:2422
0x87bd49 do_reload
../../gcc/gcc/ira.c:5472
0x87bd49 execute
../../gcc/gcc/ira.c:5656
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
make[3]: *** [Makefile:494: _mulsc3.o] Error 1
make[3]: Leaving directory
'/home/bellandi/Projects/build-gcc/powerpc-xilinx-eabi/single/libgcc'
make[2]: *** [Makefile:1201: multi-do] Error 1
make[2]: Leaving directory
'/home/bellandi/Projects/build-gcc/powerpc-xilinx-eabi/libgcc'
make[1]: *** [Makefile:125: all-multi] Error 2
make[1]: Leaving directory
'/home/bellandi/Projects/build-gcc/powerpc-xilinx-eabi/libgcc'
make: *** [Makefile:12382: all-target-libgcc] Error 2
This probably happens due to the libgcc attempt to generate single precision
code for __mulsc3
Note that the flags should be implemented at least for powerpc-xilinx-eabi.
See
https://china.xilinx.com/support/documentation/ip_documentation/apu_fpu.pdf
page 8
https://www.xilinx.com/support/documentation/ip_documentation/apu_fpu_virtex5.pdf
page 8
Possible fix:
Perform a configuration simular to the powerpc*-*-linux* for the 'e500v1'
option:
https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libgcc/config.host;h=677173eee432efe784dfe6535b931f63df54cc7c;hb=eafe83f2f20ef0c1e7703c361ba314b44574523c#l1083
Result in the inclusion of t-e500v1-fp
https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libgcc/config/rs6000/t-e500v1-fp;h=ff88acaa8e7af0fadcc4f47f090efd7767839b13;hb=eafe83f2f20ef0c1e7703c361ba314b44574523c
(Not sure if the xilinx fpu support hard unordsf2..)
Note:
For 'lite' versions of the fpu (-mfpu=dp_lite and -mfpu=sp_lite), the fsqrt/s
and div/s instructions have to be also implemented in the 'soft' version
(maybe using the hardfp_exclusions and softp_extras variables?)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libgcc/103424] Ignoring -mfpu=sp_full/-mfpu=-sp_lite/-msingle-float
2021-11-25 9:45 [Bug libgcc/103424] New: Ignoring -mfpu=sp_full/-mfpu=-sp_lite/-msingle-float andrea.bellandi at desy dot de
@ 2021-11-25 9:49 ` pinskia at gcc dot gnu.org
2021-11-25 9:53 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-25 9:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103424
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Try using TFLAGS instead of CFLAGS_FOR_TARGET.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libgcc/103424] Ignoring -mfpu=sp_full/-mfpu=-sp_lite/-msingle-float
2021-11-25 9:45 [Bug libgcc/103424] New: Ignoring -mfpu=sp_full/-mfpu=-sp_lite/-msingle-float andrea.bellandi at desy dot de
2021-11-25 9:49 ` [Bug libgcc/103424] " pinskia at gcc dot gnu.org
@ 2021-11-25 9:53 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-25 9:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103424
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Target Milestone|--- |9.0
Resolution|--- |WONTFIX
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This option was removed in GCC 9 and was deprecated in GCC 8.
Since We don't support any GCC lower than GCC 9, closing as won't fix.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-25 9:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-25 9:45 [Bug libgcc/103424] New: Ignoring -mfpu=sp_full/-mfpu=-sp_lite/-msingle-float andrea.bellandi at desy dot de
2021-11-25 9:49 ` [Bug libgcc/103424] " pinskia at gcc dot gnu.org
2021-11-25 9:53 ` pinskia 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).