------- Comment #7 from amylaar at gcc dot gnu dot org 2007-02-01 03:41 ------- (In reply to comment #4) > Hereattached a patch to fix a few problems: > > 1) Rounding to nearest must be infinity if the "infinitely precise result has > a > magniture at least 2 exp Emax (2-2exp-p)" (ansi 754/1985 sect 4.1). The > implementation for addsf3 and adddf3 returned a NaN.
Not always a NaN, but it's a bug regardless. Good catch. However, this: LOCAL(inf): + mov #0,DBLRL negatively impacts sh3 MA unit scheduling. It might be an idea to align LOCAL(pos_difference_0) for sh3. - tst r7,r0 + tst r7,r0 You have to be careful with the whitespace. > 2) Infinity in divsf3.S was not set (case of 1.0/0.0). > * config/sh/IEEE-754/m3/divsf3.S: Intialize xff000000 label. > This was supposed to be: LOCAL(m1): .word -1 .balign 4 LOCAL(xff000000): #ifdef __LITTLE_ENDIAN__ .word 0 LOCAL(xff00): .word 0xff00 #else LOCAL(xff00): .word 0xff00 .word 0 #endif saving four bytes over using unshared constants. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29845