public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcc/104984] New: Use hard-fp for libgcc single-floating-point routines
@ 2022-03-19 5:36 archicharmer at mail dot ru
2022-03-22 14:50 ` [Bug target/104984] " archicharmer at mail dot ru
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: archicharmer at mail dot ru @ 2022-03-19 5:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104984
Bug ID: 104984
Summary: Use hard-fp for libgcc single-floating-point routines
Product: gcc
Version: 9.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgcc
Assignee: unassigned at gcc dot gnu.org
Reporter: archicharmer at mail dot ru
Target Milestone: ---
I am currently using gcc-9.2.0 . At it's last building stage it was compiled
using the next configure additions:
--prefix=$PREFIX --enable-languages=c,c++ --includedir=$PREFIX/include
--target=mipsel-unknown-linux-gnu --with-arch=r6000 --with-float=hard
--with-fpu=single --enable-libatomic --with-llsc=yes --disable-multilib
--disable-libsanitizer
It generates the binaries of hard-float single-float ABI=o32 ISA=MIPS-II if
that matters.
I compiled the system from scratch by the cross-compiler which includes that
kind of gcc, and some of the programs - magick (ImageMagick), gdb, groupadd -
has the same segmentation fault in them:
$ gdb magick
$ run import scr.jpg
Program received signal SIGSEGV, Segmentation fault.
0x008c30e4 in __divdf3 (x=0, y=4) at ../../../libgcc/config/hardfp.c:37
37 ../../../libgcc/config/hardfp.c: No such file or directory.
I beleive it is someway related to this:
https://gcc.gnu.org/legacy-ml/gcc-patches/2014-02/msg00420.html
because if to make the next changes in the libgcc's config.host file:
# All MIPS targets provide a full set of FP routines.
cpu_type=mips
tmake_file="mips/t-mips"
- if test "${libgcc_cv_mips_hard_float}" = yes; then
- tmake_file="${tmake_file} t-hardfp-sfdf t-hardfp"
- else
+# if test "${libgcc_cv_mips_hard_float}" = yes; then
+# tmake_file="${tmake_file} t-hardfp-sfdf t-hardfp"
+# else
tmake_file="${tmake_file} t-softfp-sfdf"
- fi
+# fi
- those SegFaults disappears.
I have a mipsel system which have 32bit registers only and do not support
double floating point operations hardwarely (that's r5900). Can you make some
workarounds to such possible files like
libgcc/config/t-hardfp, libgcc/config/t-hardfp-sfdf and libgcc/config/hardfp.c
so it will be using only single-float libgcc functions for it's routines
hardwarely and the rest it will be using softwarely?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/104984] Use hard-fp for libgcc single-floating-point routines
2022-03-19 5:36 [Bug libgcc/104984] New: Use hard-fp for libgcc single-floating-point routines archicharmer at mail dot ru
@ 2022-03-22 14:50 ` archicharmer at mail dot ru
2022-03-22 19:26 ` joseph at codesourcery dot com
2022-03-24 3:20 ` archicharmer at mail dot ru
2 siblings, 0 replies; 4+ messages in thread
From: archicharmer at mail dot ru @ 2022-03-22 14:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104984
--- Comment #1 from Den <archicharmer at mail dot ru> ---
No one?.. Then, let's discourse.
These are inside the file t-hardfp-sfdf :
hardfp_float_modes := sf df
hardfp_int_modes := si
hardfp_extensions := sfdf
hardfp_truncations := dfsf
and these are inside the file t-softfp-sfdf :
softfp_float_modes := sf df
softfp_int_modes := si di
softfp_extensions := sfdf
softfp_truncations := dfsf
I assume it might be reasonable to create a new file. Let's call it
t-hardsf-soft-df . I believe these lines will be correct:
hardfp_float_modes := sf
softfp_float_modes := df
hardfp_int_modes := si
But what to set for extensions and truncations? And to which one in this case?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/104984] Use hard-fp for libgcc single-floating-point routines
2022-03-19 5:36 [Bug libgcc/104984] New: Use hard-fp for libgcc single-floating-point routines archicharmer at mail dot ru
2022-03-22 14:50 ` [Bug target/104984] " archicharmer at mail dot ru
@ 2022-03-22 19:26 ` joseph at codesourcery dot com
2022-03-24 3:20 ` archicharmer at mail dot ru
2 siblings, 0 replies; 4+ messages in thread
From: joseph at codesourcery dot com @ 2022-03-22 19:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104984
--- Comment #2 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
See libgcc/config/rs6000/t-e500v1-fp (which should have been removed along
with associated configure logic when the powerpcspe port was removed, the
cases using that file should no longer be reachable), for an example of a
configuration using hardware floating point for single precision only.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/104984] Use hard-fp for libgcc single-floating-point routines
2022-03-19 5:36 [Bug libgcc/104984] New: Use hard-fp for libgcc single-floating-point routines archicharmer at mail dot ru
2022-03-22 14:50 ` [Bug target/104984] " archicharmer at mail dot ru
2022-03-22 19:26 ` joseph at codesourcery dot com
@ 2022-03-24 3:20 ` archicharmer at mail dot ru
2 siblings, 0 replies; 4+ messages in thread
From: archicharmer at mail dot ru @ 2022-03-24 3:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104984
Den <archicharmer at mail dot ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |WONTFIX
--- Comment #3 from Den <archicharmer at mail dot ru> ---
(In reply to joseph@codesourcery.com from comment #2)
> See libgcc/config/rs6000/t-e500v1-fp
Thank you, Joseph. That's exactly what I was looking for.
As for the mips/mipsel single-float targets - it is not rational to make some
global changes like to use double float precisions emulately for all of them
(though, for r5900 it's worth it). Sure, there should be a functions to exclude
from being hardwarely operated.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-03-24 3:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-19 5:36 [Bug libgcc/104984] New: Use hard-fp for libgcc single-floating-point routines archicharmer at mail dot ru
2022-03-22 14:50 ` [Bug target/104984] " archicharmer at mail dot ru
2022-03-22 19:26 ` joseph at codesourcery dot com
2022-03-24 3:20 ` archicharmer at mail dot ru
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).