linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* What problems are there with floating point emulation in the kernel?
@ 2002-04-24 16:56 Conn Clark
  0 siblings, 0 replies; 5+ messages in thread
From: Conn Clark @ 2002-04-24 16:56 UTC (permalink / raw)
  To: May Ling List


Hello everyone,

	I've been told on this list that there are problems fpu emulation
in the kernel. I was curoius as to what the errors are and the aftermath
(pun intended) that occurs when they are encountered. ( Like are the
values off a little bit or a lot, does it cause a kerel panic, does it
block interupts, does it unleash a terible monster that will destroy the
universe, etc... .)

	I'm also very supprised that Motorola and IBM haven't dedicated
some resources to address these problems since their fpu-less chips are
often used in linux designs.

thanks in advance,

	Conn
--

*****************************************************************
  If you live at home long enough, your parents will move out.
*****************************************************************

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/

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

* RE: What problems are there with floating point emulation in the kernel?
@ 2002-05-22 19:27 Dan Kegel
  2002-05-22 22:41 ` Conn Clark
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Kegel @ 2002-05-22 19:27 UTC (permalink / raw)
  To: 'Conn Clark ', 'May Ling List '


Since it's very easy to avoid the use of floating point in
the kernel, it has not been a big issue.

Do you need to use floating point in the kernel for some reason?
- Dan

-----Original Message-----
From: Conn Clark
To: May Ling List
Sent: 4/24/2002 9:56 AM
Subject: What problems are there with floating point emulation in the
kernel?


Hello everyone,

	I've been told on this list that there are problems fpu
emulation
in the kernel. I was curoius as to what the errors are and the aftermath
(pun intended) that occurs when they are encountered. ( Like are the
values off a little bit or a lot, does it cause a kerel panic, does it
block interupts, does it unleash a terible monster that will destroy the
universe, etc... .)

	I'm also very supprised that Motorola and IBM haven't dedicated
some resources to address these problems since their fpu-less chips are
often used in linux designs.

thanks in advance,

	Conn
--

*****************************************************************
  If you live at home long enough, your parents will move out.
*****************************************************************

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/

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

* Re: What problems are there with floating point emulation in the kernel?
  2002-05-22 19:27 Dan Kegel
@ 2002-05-22 22:41 ` Conn Clark
  2002-05-22 22:52   ` Dan Kegel
  0 siblings, 1 reply; 5+ messages in thread
From: Conn Clark @ 2002-05-22 22:41 UTC (permalink / raw)
  To: Dan Kegel, May Ling List


Dan Kegel wrote:
>
> Since it's very easy to avoid the use of floating point in
> the kernel, it has not been a big issue.
>
> Do you need to use floating point in the kernel for some reason?
> - Dan

Its not the use of floating point in the kernel thats the problem.

	I would like to "emulate" the fpu in the kernel so I can
compile glibc and everything else with fpu instructions to save
ram. I have been told however that there are "issues" with this
approach, and the only way to go is to emulate the fpu in the
kernel and compile everything with soft float. What I want to
know is what these issues are? (accuracy,segment_fault,etc..)

Conn

--

*****************************************************************
  If you live at home long enough, your parents will move out.
*****************************************************************

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/

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

* Re: What problems are there with floating point emulation in the kernel?
  2002-05-22 22:41 ` Conn Clark
@ 2002-05-22 22:52   ` Dan Kegel
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Kegel @ 2002-05-22 22:52 UTC (permalink / raw)
  To: Conn Clark; +Cc: May Ling List


Conn Clark wrote:
> Its not the use of floating point in the kernel thats the problem.
>
> 	I would like to "emulate" the fpu in the kernel so I can
> compile glibc and everything else with fpu instructions to save
> ram. I have been told however that there are "issues" with this
> approach, and the only way to go is to emulate the fpu in the
> kernel and compile everything with soft float. What I want to
> know is what these issues are? (accuracy,segment_fault,etc..)

Oh.  Right.  Well, google reports at least one issue with the code;
see http://groups.google.com/groups?selm=fa.h1feiov.9jqg8k%40ifi.uio.no

> Mikael Pettersson (mikpe@csd.uu.se)
> Subject: Re: Kernel bugs found using inspect tool
> Newsgroups: fa.linux.kernel
> Date: 2000/02/25
>
> Ricky Beam writes:
>  > On Tue, 22 Feb 2000, Rupp, Ed J wrote:
>  > >the AT&T toolchest called 'inspect'.  I found 10 near-certain
>  > >bugs which may or may not be causing any observable problems
>  > >and 13 probable bugs which I couldn't immediately tell if they ...
>  > >===== Questionable ====
>  > >arch/ppc/math-emu/op-4.h: comparison takes precedence over assignment near
>  > >line 215
>  > >  (x3 += ((x2 += ((x1 += ((x0 += i) < x0)) < x1) < x2)))
>
> This whole expression is broken.
> The evaluation order for the "<" operator is unspecified, which means that
> subexpressions like "((x0 += i) < x0)" do not have well-defined values.
> They also violate the ANSI-C rules about permissible accesses and updates
> of variables between sequence points.

- Dan


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

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

* Re: What problems are there with floating point emulation in the kernel?
@ 2002-05-22 22:57 Rosen Jeremy
  0 siblings, 0 replies; 5+ messages in thread
From: Rosen Jeremy @ 2002-05-22 22:57 UTC (permalink / raw)
  To: clark, dkegel, linuxppc-embedded


this is best documented in the embedded HOWTO that you will find at
linuxppc.org
but I'll try to explain it quickly.

you can emulate fpu in two way.

1) compile the kernel with FPU emulation, and all applications "normally"
the main advantage is that it's simple. When a FP instruction is issued an
exception will be raised, and catched by the kernel emulation.
the main drawback is that it is slower ( I don't know about memory
consumption)

2) compile all libs and apps with SOFT_FPU. gcc will not generate floating
point instructions, but will use some glibc calls to replace them. It is
faster, but if any application is not compiled properly it will break.

Again, this is not as accurate as the answer in the embedded HOWTO.

just my two cents

>>> Conn Clark 05/23/02 08:41am >>>

Dan Kegel wrote:
>
> Since it's very easy to avoid the use of floating point in
> the kernel, it has not been a big issue.
>
> Do you need to use floating point in the kernel for some reason?
> - Dan

Its not the use of floating point in the kernel thats the problem.

 I would like to "emulate" the fpu in the kernel so I can
compile glibc and everything else with fpu instructions to save
ram. I have been told however that there are "issues" with this
approach, and the only way to go is to emulate the fpu in the
kernel and compile everything with soft float. What I want to
know is what these issues are? (accuracy,segment_fault,etc..)

Conn

--

*****************************************************************
  If you live at home long enough, your parents will move out.
*****************************************************************

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/

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

end of thread, other threads:[~2002-05-22 22:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-24 16:56 What problems are there with floating point emulation in the kernel? Conn Clark
  -- strict thread matches above, loose matches on Subject: below --
2002-05-22 19:27 Dan Kegel
2002-05-22 22:41 ` Conn Clark
2002-05-22 22:52   ` Dan Kegel
2002-05-22 22:57 Rosen Jeremy

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