This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libgcc/78804] [RX] -m64bit-doubles does not work


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

--- Comment #2 from Nick Clifton <nickc at gcc dot gnu.org> ---
Hi Oleg,

> Nick, maybe you have an idea what's wrong here?

It is almost certainly a bug in the RX specific parts of the libgcc
configuration....

What happens is that GCC calls the function _COM_CONVd32s to convert the double
value into a signed 32-bit integer.  This conversion fails, probably because
_COM_CONVd32s thinks that the double input value is only 32-bits long.  (I have
not verified this.  This is just intuition).

It is unlikely that the actual code for the _COM_CONVd32s function is wrong,
since this code is in the generic part of the libgcc library, and if there was
a bug there it would have shown up on lots of targets.  (FYI the code is in
libbgcc/fp-bit.c, called float_to_si().  Various renaming shenanigans means
that its ends up being called _COM_CONVd32s in libgcc.a).

So what I suspect is that something is missing from the rx libgcc configuration
files (libgcc/config/rx/t-rx and/or libgcc/config/rx/rx-lib.h) which means that
float_to_si() is being mis-compiled, for the 64-bit-doubles multilib, with the
size of a double set to 32-bits.

Is that enough of a hint, or do you need me to investigate further ?

Cheers
  Nick

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]