Codewarrior R5 absolutely refuses to correctly handle the FlpFToA() in the
metrowerks Floating Point Library! After banging my head against the wall I
quick put together a little app which demonstrates the problem. The problem
is easy to see, look at the output from the debugger:
err = FlpFToA(theComp.fd, szTemp);
100699CE: 486EFFD2 pea -46(a6)
100699D2: 2F2EFFF4 move.l -12(a6),-(sp)
100699D6: 2F2EFFF0 move.l -16(a6),-(sp)
100699DA: 7401 moveq #1,d2
100699DC: 4E4F trap #15
100699DE: A305 _FlpDispatch
Why is it generating a TRAP??? I have the floating point set to "Library"
in the IDE and most importantly REGULAR MATH WORKS FINE! Yep, that's right,
I can do multiplication, divides, et al and it correctly uses the library
but it never links in the damn FlpFToA() function. I checked the .MAP file
and for some reason FlpFToA() isn't included.
Looking at the NewFloatMgr.h file, I tried defining the _DONT_USE_FP_TRAPS_
to 1
and while it caused it to be linked, it also caused a line 1111 error in
Poser.
The part of this that really pisses me off is that it all worked perfectly
under R4.
Any ideas? Of course Metrowerks hasn't responded in two days now.
Rick Wagner
BTW: This is the code from just before the statement above:
fA /= 2.0;
100699AA: 42A7 clr.l -(sp)
100699AC: 2F3C40000000 move.l #1073741824,-(sp)
100699B2: 2F2EFFFC move.l -4(a6),-(sp)
100699B6: 2F2EFFF8 move.l -8(a6),-(sp)
100699BA: 486EFFF8 pea -8(a6)
100699BE: 4EBAFC50 jsr *-942 ; 0x10069610
This shows that the floating point library is being called correctly for the
math functions.