<p dir="ltr"></p>
<p dir="ltr">On Mar 27, 2014 8:16 AM, "Mats Kärrman" <<a href="mailto:Mats.Karrman@tritech.se">Mats.Karrman@tritech.se</a>> wrote:<br>
><br>
> Hi Khem,<br>
><br>
> On Friday, March 21, 2014 6:06 PM, Khem Raj wrote:<br>
> > On Fri, Mar 21, 2014 at 9:45 AM, Mark Hatle <<a href="mailto:mark.hatle@windriver.com">mark.hatle@windriver.com</a>> wrote:<br>
> >> On 3/21/14, 7:10 AM, Mats Kärrman wrote:<br>
> >>><br>
> >>> Hi,<br>
> >>><br>
> >>> On: Thursday, March 13, 2014 11:36 AM, Mats Kärrman wrote:<br>
> >>>><br>
> >>>> My "home made" hard float tune for PowerPC looks like this:<br>
> >>>><br>
> >>>> ------------------------------------------------------------------<br>
> >>>> # Tune for the e300c3 core<br>
> >>>> require conf/machine/include/tune-ppce300c3.inc<br>
> >>>><br>
> >>>> # Use hardware floating point<br>
> >>>> AVAILTUNES += "ppce300c3hf"<br>
> >>>> TUNE_FEATURES_tune-ppce300c3hf = "m32 fpu-hard ppce300c3"<br>
> >>>> TUNE_PKGARCH_tune-ppce300c3hf = "ppce300c3hf"<br>
> >>>> PACKAGE_EXTRA_ARCHS_tune-ppce300c3hf =<br>
> >>>> "${PACKAGE_EXTRA_ARCHS_tune-powerpc} ppce300c3hf"<br>
> >>>> DEFAULTTUNE = "ppce300c3hf"<br>
> >>>> ------------------------------------------------------------------<br>
> >>>><br>
> >>><br>
> >>> I found the reason for the error (deviance) in the sqrt function. glibc<br>
> >>> has<br>
> >>> special code for PowerPC 603e core (e300 is an optimized variant of 603e).<br>
> >>> By adding the following line to the tuning I now get the same result as<br>
> >>> for all other environments that I've tried:<br>
> >>><br>
> >>> GLIBC_EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "ppce300c3",<br>
> >>> "-with-cpu=603e", "", d)}"<br>
> >>><br>
> >>> Does anyone know about the reason for having soft-float as the default and<br>
> >>> only available alternative for e300c2/3 tunings?<br>
> >><br>
> >><br>
> >> My guess is because e300 e300c2 were both soft-float designs. And e300c3 is<br>
> >> the first hard float design.<br>
> >><br>
> >> The e300c3 should inherit and use the 603e directly. This includes<br>
> >> definiting the TUNE_FEATURES that the 603e does. If it doesn't do that, I'd<br>
> >> suggest it's a mistake.<br>
> >><br>
> >> The default 603e tune should include:<br>
> >><br>
> >> GLIBC_EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "ppc603e",<br>
> >> "-with-cpu=603e", "", d)}"<br>
> >><br>
> >> or similar already -- and should already be hard float enabled. (ppc603e<br>
> >> soft-float should be the alternative -- as it is significantly rarer and the<br>
> >> deviation.)<br>
> ><br>
> ><br>
> > alternatively we should define fpu Iplies in glibc for e300c3,<br>
> ><br>
> >><br>
> >><br>
> >>> Would it be worthwhile to send a patch to add the hf tuning to OE-core?<br>
> >><br>
> >><br>
> >> As the e300c3 should be hard float, we shouldn't have the 'hf' designation.<br>
> >> Otherwise, we should ensure the e300c3 tune is correctly configured.<br>
> ><br>
> > may be for now controlling it in tune file is a quicker fix.<br>
> ><br>
><br>
> Adding "-with-cpu=603e" to GLIBC_EXTRA_OECONF proved to be problematic<br>
> as it leads to contradictive --mcpu= args to gcc, both "e300c3" and "603e".<br>
><br>
> I solved that by using "-with-cpu=e300c3" and by adding a patch to eglibc:<br>
> ------------------------------------------------------------------------------<br>
> --- libc.orig/ports/sysdeps/powerpc/powerpc32/e300c3/fpu/Implies<br>
> +++ libc/ports/sysdeps/powerpc/powerpc32/e300c3/fpu/Implies<br>
> @@ -0,0 +1,2 @@<br>
> +# e300c3 is a variant of 603e so use the same optimizations for sqrt<br>
> +powerpc/powerpc32/603e/fpu</p>
<p dir="ltr">yes thats ok<br></p>
<p dir="ltr">> ------------------------------------------------------------------------------<br>
> Does this seem correct to you?<br>
><br>
> Initial tests shows that at least the sqrt test now works. The reason<br>
> I'm holding back on patches to the tune file is that I still have trouble<br>
> with time related syscalls, see [1].<br>
><br>
> >><br>
> >>> In that case what tests should be performed before that and what (related)<br>
> >>> tests are performed by the OE auto-builder?<br>
><br>
> BR // Mats<br>
><br>
> [1] <a href="http://lists.openembedded.org/pipermail/openembedded-core/2014-March/091011.html">http://lists.openembedded.org/pipermail/openembedded-core/2014-March/091011.html</a><br>
><br>
</p>