The interesting thing I'm finding is that our math-emu is actually
quite busted :-)
For example look at fsqrt. It's defined as type AB which is incorrect,
it should be type XB. It ends up looking for it's arguments in the wrong
registers, same for fsrqts, fre, and a few others.
Also quite a few
On Jun 7, 2013, at 4:30 PM, Benjamin Herrenschmidt b...@kernel.crashing.org
wrote:
Right, looking more, the code really sucks.
Hey! :)
…. Either you use the existing
apparent ability for MATH_EMU to operate in minimal mode, ie,
load/store/fmr only (which seems to do exactly the same
Hi Ben.
On Jun 7, 2013, at 5:34 PM, Benjamin Herrenschmidt b...@kernel.crashing.org
wrote:
The question is whether this is still relevant ?
The only answer I could provide is that it's dependent upon the libraries and
how the distributions are built. It's also dependent upon processors
Another question...
Do you guys happen to have a patch to emulate fsqrt in the kernel ?
Fedora 19 seems to be using it ... among others.
Cheers,
Ben.
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo
-Original Message-
From: Benjamin Herrenschmidt [mailto:b...@kernel.crashing.org]
Another question...
Do you guys happen to have a patch to emulate fsqrt in the kernel ?
Fedora 19 seems to be using it ... among others.
You mean this one
arch/powerpc/math-emu/fsqrt.c ?
Yes.
Roy
On 06/07/2013 03:41 PM, Benjamin Herrenschmidt wrote:
Another question...
Do you guys happen to have a patch to emulate fsqrt in the kernel ?
Seems this is already emulated:
arch/powerpc/math-emu/fsqrt.c
You can enable CONFIG_MATH_EMULATION to try.
Tiejun
On Fri, 2013-06-07 at 15:46 +0800, tiejun.chen wrote:
On 06/07/2013 03:41 PM, Benjamin Herrenschmidt wrote:
Another question...
Do you guys happen to have a patch to emulate fsqrt in the kernel ?
Seems this is already emulated:
arch/powerpc/math-emu/fsqrt.c
You can enable
On Fri, 2013-06-07 at 07:45 +, Zang Roy-R61911 wrote:
-Original Message-
From: Benjamin Herrenschmidt [mailto:b...@kernel.crashing.org]
Another question...
Do you guys happen to have a patch to emulate fsqrt in the kernel ?
Fedora 19 seems to be using it ... among
On Fri, 2013-06-07 at 18:53 +1000, Benjamin Herrenschmidt wrote:
+
+static double crackpot_sqrt(double val)
+{
+int i;
+float x, y;
+const float f = 1.5F;
+
+x = val * 0.5F;
+y = val;
+i = * ( int * ) y;
+i = 0x5f3759df - ( i 1 );
+y = * ( float *
On 06/07/2013 04:53 PM, Benjamin Herrenschmidt wrote:
On Fri, 2013-06-07 at 15:46 +0800, tiejun.chen wrote:
On 06/07/2013 03:41 PM, Benjamin Herrenschmidt wrote:
Another question...
Do you guys happen to have a patch to emulate fsqrt in the kernel ?
Seems this is already emulated:
arch
+
+static double crackpot_sqrt(double val)
+{
+int i;
+float x, y;
+const float f = 1.5F;
+
+x = val * 0.5F;
+y = val;
+i = * ( int * ) y;
+i = 0x5f3759df - ( i 1 );
+y = * ( float * ) i;
+y = y * ( f - ( x * y * y ) );
+y
On Fri, 2013-06-07 at 17:02 +0800, tiejun.chen wrote:
On 06/07/2013 04:53 PM, Benjamin Herrenschmidt wrote:
On Fri, 2013-06-07 at 15:46 +0800, tiejun.chen wrote:
On 06/07/2013 03:41 PM, Benjamin Herrenschmidt wrote:
Another question...
Do you guys happen to have a patch to emulate fsqrt
i and y are put in a union.
It won't in the kernel disables strict aliasing :-)
Anyway, that was just a hack and plenty enough to get anaconda going,
the bloody thing only uses fsqrt because it's python crappola does
something like exp(1.0) / sqrt(2.0) as part of its random number stuff.
Honestly
approximation for graphics.
However it will be miscompiled unless i and y are put in a union.
It won't in the kernel disables strict aliasing :-)
Anyway, that was just a hack and plenty enough to get anaconda going,
the bloody thing only uses fsqrt because it's python crappola does
something like
is basically going to be a non-started on those chips.
BTW. Did you guys (ie. FSL) finally add fsqrt to e6500 or it's still
out ?
Cheers,
Ben.
Pretty sure fsqrt is still out of e6500.
Ok, thinking out loud... looks like we might be able to just use existing
math-emu for that. From what I
On Sat, 2013-06-08 at 09:23 +1000, Benjamin Herrenschmidt wrote:
Ok, thinking out loud... looks like we might be able to just use existing
math-emu for that. From what I can tell, all it needs (other than enabling
the config option), is a call to flush_fp_to_thread(current);
While talking
On Sat, 2013-06-08 at 09:25 +1000, Benjamin Herrenschmidt wrote:
On Sat, 2013-06-08 at 09:23 +1000, Benjamin Herrenschmidt wrote:
Ok, thinking out loud... looks like we might be able to just use existing
math-emu for that. From what I can tell, all it needs (other than enabling
the config
On Fri, 2013-06-07 at 17:20 -0700, Dan Malek wrote:
The purpose for that minimal code was the signal handlers were
hand-coded assembly that always did the FPU load/store regardless of
compiler flags. Over time, it became convenient to emulate a few
others, even with user space math
On Fri, 2013-06-07 at 18:13 -0700, Dan Malek wrote:
Hi Ben.
On Jun 7, 2013, at 5:34 PM, Benjamin Herrenschmidt
b...@kernel.crashing.org wrote:
The question is whether this is still relevant ?
The only answer I could provide is that it's dependent upon the
libraries and how the
Guys,
We seem to be using the PPC_FEATURE_64 HWCAP to imply fsqrt support. However,
the new e5500 core from Freescale that is 64-bit does NOT implement fsqrt so
this assumption is wrong:
sysdeps/powerpc/fpu/math_private.h
# if __WORDSIZE == 64 || defined _ARCH_PWR4
# define __CPU_HAS_FSQRT
20 matches
Mail list logo