This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Strange floating point problems on SH4 with gcc 4.1.0
- From: Joern RENNECKE <joern dot rennecke at st dot com>
- To: Andrew de Quincey <adq_dvb at lidskialf dot net>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 27 Jul 2006 21:25:59 +0100
- Subject: Re: Strange floating point problems on SH4 with gcc 4.1.0
In http://gcc.gnu.org/ml/gcc-help/2006-07/msg00335.html, you write:
0x29ae4c6c <__udivsi3_i4+28>: fadd fr4,fr2
...
Specifically at:
#0 0x29ae4c6c in __udivsi3_i4 () from
This is supposed to use double precision.
For -m4, fpscr is supposed to be set to double precision mode on function entry.
(in gdb: p $fpscr & 0x180000 should give: 0x80000)
Inspect the values in __fpscr_values to confirm that the first value is for single
precision and the second for double precision (this should be set in __set_fpscr,
called from crt1.o).
Another thing to check is that fpscr is set back to double precision before the call
to NS_InitXPCOM2.