linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Kernel Math Emulation vs. -msoft-float and -nfp
@ 1999-10-29 16:09 Grant Erickson
  1999-10-30  0:57 ` Wang Yong
  0 siblings, 1 reply; 3+ messages in thread
From: Grant Erickson @ 1999-10-29 16:09 UTC (permalink / raw)
  To: linuxppc-embedded


I finally got NFS root mounting working for the PowerPC 403GCX board port
I'm playing with and figured out why /sbin/init wasn't getting very far
(shared libraries, of course). However, that's about as far as things get.

I suspect that things are dying at this point because I'm using standard
files from Linux/PPC 1999 and that really assumes a PPC machine based on
the 6xx or 7xx processors.

So, I'm guessing that printf or one of the other routines that uses
varargs is killing things. I even compiled a simple, static, hello program
to replace /sbin/init and it too died.

So, I'm a little fuzzy on the issues with sans-FPU CPUs. What I'd like* to
accomplish is the ability to run a PowerPC binary compiled on ANY
Linux/PPC machine to run on this board. I think* I need kernel math
emualtion to accomplish this.

Anyway it seems to me that with the sans-FPU CPUs, there are three issues:
use of the floating point registers for argument passing, use of float and
double data types, and the use of arithmetic operations on those data
types.

So, my understanding is that -msoft-float does two things. First, it
prevents varags routines from using the floating point registers for
parameter passing, correct? Second, all floating / double math operations
are handled in inline or library code in user space, right?

So, my understanding of kernel math emulation is that it allows me to do
away with -msoft-float and instead all FP operations are emulated in the
kernel, right?

So, it seems the trade-off is more code (redundant for each app if it's
inline, shared if it's in the library) in user-space or a little more code
in the kernel (shared by ANY application needing it), right?

So, where does passing '-nfp' during the binutils, gcc, and glibc build
fit into all this?

Any light you can shed would be most appreciated.

Thanks,

Grant


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

^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: Kernel Math Emulation vs. -msoft-float and -nfp
@ 1999-10-30  3:02 Brian Kuschak
  0 siblings, 0 replies; 3+ messages in thread
From: Brian Kuschak @ 1999-10-30  3:02 UTC (permalink / raw)
  To: wung_y, Grant Erickson; +Cc: linuxppc-embedded



> i cannot find any math-emu lib for ppc. does
> linuxppc have one? there is 
> a dir called math-emu in the arch/i386 and
> arch/sparc64 while arch/ppc
> not.
> 

There is a math emulator in the 2.3.18 kernel.  I'm
using it on an 823 with some success.  I'm not sure if
the kernel does any FP ops, but the bash shell
definitely does.  These instructions generate
exceptions that the math-emu catches.

Hope that helps,
-Brian


=====


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

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

end of thread, other threads:[~1999-10-30  3:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-10-29 16:09 Kernel Math Emulation vs. -msoft-float and -nfp Grant Erickson
1999-10-30  0:57 ` Wang Yong
  -- strict thread matches above, loose matches on Subject: below --
1999-10-30  3:02 Brian Kuschak

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).