linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Re: mpc8xx fpu emu
@ 2002-09-11 19:38 Alban Wood
  2002-09-11 21:42 ` Conn Clark
  2002-09-11 21:49 ` Wolfgang Denk
  0 siblings, 2 replies; 9+ messages in thread
From: Alban Wood @ 2002-09-11 19:38 UTC (permalink / raw)
  To: linuxppc-embedded


I forgot to mention that I was able to verify that the floating point
emulator *works*. I examined the result of a floating point division in
memory and it was valid. So I guess it is the libc I am using. Like I
said, could it be that it was compiled with -msoft-float?

I'm also not sure I can draw conclusions from the following fact, but I
disassembled the libc used on the board, and found no floating point
instructions. I did the same with a libc on a powerpc 604 I have here, and
did find floating point instructions.

Regards,

Alban



Alban Wood wrote:
> hello,
>
> Regarding my problem, I searched the list archives and did found some
mpu
> emul related posts but they were not exactly like my case.
>
> Basically, I have an RPX Lite-M board. The mpc850 does not have an fpu,
> but I have a need for non-intensive fpu operations. I don't want to
> compile applications and librairies with -msoft-float - for my needs the
> fpu emulator is really the way to go.
>
> The board successfully boots a slightly modified linux 2.4.9. I've
> compiled the kernel with and without math emulation.
>
> I also compiled a very simple application that does a floating point
> division and prints it. I explicitly specified -msoft-hard. (same with
the
> kernel btw), checked out the resulting assembly and did in fact find an
> fdiv instruction.
>
> Without the emulation, executing the program results in a floating point
> exception. This is normal.
>
> With the math emu kernel, the exception is caught and seemingly handled
as
> it should. However, a printf of a float results in "nan" (not a number).
>
> If I invoke the printf binary (printf "%f\n" 43.34343) it is able to
print
> a float.
>
> I didn't compile my own toolchain. I switch between the binary
> distributions I got from www.qslinux.org and timesys. I'm not sure this
is
> a good idea.
>
> Any ideas as to what could be wrong? Could it be that the libs in the
root
> filesystem I'm using for the board were compiled with -msoft-float,  and
> that as a result printf cannot properly output a float? (even though
it's
> been properly handled by the fpu emulator?)
>
>
> Thank you,
>
>
> Alban
>
>
>


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread
* mpc8xx fpu emu
@ 2002-09-11 18:52 Alban Wood
  2002-09-11 21:54 ` Wolfgang Denk
  0 siblings, 1 reply; 9+ messages in thread
From: Alban Wood @ 2002-09-11 18:52 UTC (permalink / raw)
  To: linuxppc-embedded


hello,

Regarding my problem, I searched the list archives and did found some mpu
emul related posts but they were not exactly like my case.

Basically, I have an RPX Lite-M board. The mpc850 does not have an fpu,
but I have a need for non-intensive fpu operations. I don't want to
compile applications and librairies with -msoft-float - for my needs the
fpu emulator is really the way to go.

The board successfully boots a slightly modified linux 2.4.9. I've
compiled the kernel with and without math emulation.

I also compiled a very simple application that does a floating point
division and prints it. I explicitly specified -msoft-hard. (same with the
kernel btw), checked out the resulting assembly and did in fact find an
fdiv instruction.

Without the emulation, executing the program results in a floating point
exception. This is normal.

With the math emu kernel, the exception is caught and seemingly handled as
it should. However, a printf of a float results in "nan" (not a number).

If I invoke the printf binary (printf "%f\n" 43.34343) it is able to print
a float.

I didn't compile my own toolchain. I switch between the binary
distributions I got from www.qslinux.org and timesys. I'm not sure this is
a good idea.

Any ideas as to what could be wrong? Could it be that the libs in the root
filesystem I'm using for the board were compiled with -msoft-float,  and
that as a result printf cannot properly output a float? (even though it's
been properly handled by the fpu emulator?)


Thank you,


Alban


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2002-09-18 14:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <Pine.LNX.4.44.0209121107090.7728-100000@manoir.bloodwolf.org>
2002-09-12 17:42 ` mpc8xx fpu emu Conn Clark
2002-09-12 18:16   ` Dan Malek
2002-09-18 14:28     ` Kumar Gala
2002-09-18 14:45       ` Dan Malek
2002-09-11 19:38 Alban Wood
2002-09-11 21:42 ` Conn Clark
2002-09-11 21:49 ` Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2002-09-11 18:52 Alban Wood
2002-09-11 21:54 ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).