From: Conn Clark <hidden> Date: 2002-09-12 17:42:10
Alban Wood wrote:
<snip>
I was unaware of this. I guess I would have realized this at some point
but would have lost a lot of time.
Are there specific known cases or instructions for which the emulator
doesn't behave correctly?
Unfortunatly I haven't tried using the fpu emulation, I'm just
relaying to you what I've been told when I pursued it hoping to save ram.
After finding out it would only shave about 4K off of glibc I abandoned
the quest. I determined it was just not worth the hassel for such small
gains and applying my efforts elsewhere would yeild greater savings.
I don't know of anyone who has tried it lately, so the bugs may
no longer exist. Wolfgang Denk (who's opinion I hold with high regard)
has said that he could get it to fail with the "ls -l" command as I
recall.
<snip>
Yes it does. Thank you!
Alban
Exactly why do you want to use fpu emulation?
Hope I'm helping
Conn
--
*****************************************************************
If you live at home long enough, your parents will move out.
(Warning they may try to sell their house out from under you.)
*****************************************************************
Conn Clark
Engineering Stooge clark@esteem.com
Electronic Systems Technology Inc. www.esteem.com
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
From: Dan Malek <hidden> Date: 2002-09-12 18:16:01
Conn Clark wrote:
Unfortunatly I haven't tried using the fpu emulation,
The kernel fpu emulation works, it's just slower than using
the soft-float in the C library.
.... I'm just
relaying to you what I've been told when I pursued it hoping to save ram.
I wouldn't use the reason for trade off as memory savings. The things
you trade are performance and "big brother" (those processors with floating
point) :-) binary compatibility.
I don't know of anyone who has tried it lately,
I run some systems with kernel FPU and some without. Just depends upon
the libraries and applications I have available. Since most libraries
these days for the 8xx are built with soft-float, I tend to use that.
In this case, it doesn't matter if the kernel has the fpu emulation
option enabled or not.
The only bugs you will find is when you mix applications and libraries
that aren't compiled to match. The function calling conventions are
different between the FPU enabled programs/libraries and the soft-float
programs/libraries.
Even when you don't enable the kernel FPU emulation, we still emulate a
few FP instructions. This is to allow programs that use absolutely no
floating point to work with the generic FPU PowerPC libraries.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
From: Kumar Gala <hidden> Date: 2002-09-18 14:28:05
Dan,
Even when you don't enable the kernel FPU emulation, we still emulate a
few FP instructions. This is to allow programs that use absolutely no
floating point to work with the generic FPU PowerPC libraries.
Can you elaborate on this? Why exactly is this done? Is it because
glibc has some minor FP code @ startup?
thanks
- kumar
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
From: Dan Malek <hidden> Date: 2002-09-18 14:45:10
Kumar Gala wrote:
Can you elaborate on this? Why exactly is this done? Is it because
glibc has some minor FP code @ startup?
The best example is the setjmp/longjmp code and associated signal functions.
There is lots of assembly code in the C library specific to processors to
support this. When you call some setup functions or use signals (in this
case) you will execute load/store FP instructions.
I originally added these minimal emulations so I could use the standard
PowerPC libraries even though I didn't do any floating point in the application.
It was also necessary to simply get a shell running :-)
Note 1, just because you compile libraries with -msoft-float doesn't mean
there won't be floating point instructions in the code. You have to go through
the libraries and fix up all of the assembly code that may use floating
point instructions.
Note 2, don't ever mix real float instructions, soft-float libraries, soft-float
applications and kernel emulation. Everything must properly match for context
switching and passing of arguments between functions. A tempting combination
is an FP enabled library, minimal FP emulation in the kernel, and a soft-float
application to get maximum performance with minimal effort......don't do that,
it will not work. Either use complete user-land soft-float, or real FP
instructions with complete kernel emulation.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/