[Mesa-dev] [PATCH v1 1/5] meson: compilation flags for sse

Sergii Romantsov sergii.romantsov at globallogic.com
Mon Oct 29 08:44:28 UTC 2018

> What problem are we solving?

That we don't get fast paths in rounding.h by default on i686, I think?

Yes, it adds optimization for rounding.h. On x86_64 msse is enabled by
default (as example by gcc).
And additionally helps to fix autotools 32b build (missed linkage with
m-lib if no optimization).

This will make the code non-portable from an SSE capable system to a non-sse
> capable system. That's a pretty old system at this point (Pentium III and
> Athlon
> XP)

As i found in gcc-docs (
exactly mentioned systems are supports SSE.
But in the patch i'm checking if -msse supported by compiler.
If its incorrect than does it mean that compiler doesn't based on system
capabilities? And does it mean that adding option -msse4.1 is also enabled
in wrong way?

I'm cloning gcc to check how it supports 'sse' and if it based on system
capabilities. Also we may try to add some possibility to check
cpu-capabilities (around cpuid).
But if we don't need such optimization, than it will be nice at least to
fix autotools 32b build (https://patchwork.freedesktop.org/patch/258659/) -
i will update patch just by linking -lm with mesautil.

Please, advise.

On Fri, Oct 26, 2018 at 9:54 PM Dylan Baker <dylan at pnwbakers.com> wrote:

> Quoting Matt Turner (2018-10-26 10:44:47)
> > On Fri, Oct 26, 2018 at 3:06 AM Sergii Romantsov
> > <sergii.romantsov at gmail.com> wrote:
> > >
> > > While building of 32bit Mesa gcc doesn't specifies __SSE__ by default.
> > > So it has to be done manually by flag '-msee'.
> > > Added support of such specification to build-system.
> > >
> > > CC: Dylan Baker <dylan at pnwbakers.com>
> > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108560
> > > Signed-off-by: Sergii Romantsov <sergii.romantsov at globallogic.com>
> >
> > We can't do that.
> >
> > Maybe I'm missing some context. What problem are we solving?
> That we don't get fast paths in rounding.h by default on i686, I think?
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Sergii Romantsov
GlobalLogic Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20181029/97459d13/attachment-0001.html>

More information about the mesa-dev mailing list