[IAEP] [Sugar-devel] Planning for the future (Samuel Greenfeld)

Jerry Vonau me at jvonau.ca
Fri Feb 27 18:30:56 EST 2015



> On February 27, 2015 at 6:23 AM Daniel Drake <dsd at laptop.org> wrote:
>
>
> On Wed, Feb 25, 2015 at 1:20 PM, Jerry Vonau <me at jvonau.ca> wrote:
> > I know this is not a sugar issue directly, more of an OLPC issue but
> > since
> > Fedora F12 the entire i686 platform's userland is being compiled with
> > -mtune=atom[1] which would use sse[2].
>
> -mtune is designed not to break any compatibility.
> So -mtune=atom means that generated code is optimized for atom but *no
> compatibility with other CPUs is broken*.
> So -mtune=atom does not imply that gcc will spit out sse instructions
> because it feels like it. In fact, it will actively avoid generating
> sse instructions in order to maintain compatibility.
>
> (-march is probably what you are thinking of)

Well sort of, that sets the minimum cpu level to be compiled for, -mfpmath
has hand in the choice that is used for compiling also. I was mistaken,
guess I'll now think of -mtune as the most advanced cpu features that can
be used if present.

Just a thought, I haven't checked yet and have no plans in doing so but
compiling for i686 on a x86_64 machine might use the -mfpmath info, unless
specifically overridden, from the compiling machine where mfpmath default
is to use sse.

>
> > This causes problems for some parts
> > of sugar[3] now that java[4] is being used more and the XO-1 lacks sse.
>
> The WebKit issue happened because it generates its own machine code at
> runtime (not using gcc). It's definitely a bug that it dropped sse
> instructions in there without properly checking if the CPU can do sse,
> but not a common case that you will see throughout the distro.

Good that is not the whole distro it is just WebKit but someone wrote the
code with sse in mind but didn't see the need to fallback if absent.
Perhaps they were working on the assumption that all i686s had sse or
Fedora's lowest cpu supported would have sse available.

>
> I assume you mean javascript there, and bug #4785 does not look like a
> sse-related issue to me. That issue shows a SIGSEGV whereas if code is
> using sse instructions you would instead expect a SIGILL.

A crash is a crash, and should be fixed. What is the fix needs to be is up
to those who still care.


More information about the IAEP mailing list