linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Dan Malek <dan@embeddededge.com>
To: Kumar Gala <kumar.gala@motorola.com>
Cc: Conn Clark <clark@esteem.com>, Alban Wood <awood@bloodwolf.org>,
	May Ling List <linuxppc-embedded@lists.linuxppc.org>
Subject: Re: mpc8xx fpu emu
Date: Wed, 18 Sep 2002 10:45:10 -0400	[thread overview]
Message-ID: <3D889176.4070600@embeddededge.com> (raw)
In-Reply-To: D8A0BB5A-CB12-11D6-AAF4-003065BFB10E@motorola.com


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/

  reply	other threads:[~2002-09-18 14:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D889176.4070600@embeddededge.com \
    --to=dan@embeddededge.com \
    --cc=awood@bloodwolf.org \
    --cc=clark@esteem.com \
    --cc=kumar.gala@motorola.com \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).