Port-m68k archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/arch/mac68k/mac68k



[Matt, in case you did not follow: regress/lib/libc/ieeefp/round fails on
m68k]

Ok, I think this broke it:

RCS file: /cvsroot/src/sys/arch/m68k/include/ieeefp.h,v
[..]
----------------------------
revision 1.6
date: 2008/08/05 16:47:42;  author: matt;  state: Exp;  lines: +38 -10
Update <machine/ieeefp.h> to use the C99 FE_* definitions instead of the
NetBSD defined ones.  Redefine the NetBSD ones in terms of the C99 ones.
Step 1 to having <fenv.h>
----------------------------

We used to have a mapping of FP_* -> FLT_ROUNDS of:

0 -> 1
1 -> 0
2 -> 3
3 -> 2

but now we need:

0 -> 1
1 -> 0
2 -> 2
3 -> 3

We could adapt the _map in src/lib/libc/arch/m68k/gen/flt_rounds.S and
use the slower code again, or rearange the defines of FE_* in
sys/arch/m68k/include/ieeefp.h to

#define FE_TONEAREST    0       /* round to nearest representable number */
#define FE_TOWARDZERO   1       /* round to zero (truncate) */
#define FE_UPWARD       3       /* round toward positive infinity */
#define FE_DOWNWARD     2       /* round toward negative infinity */

which looks to be the best solution to me (and reorder the lines maybe).

Martin


Home | Main Index | Thread Index | Old Index