lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inline assembler fallback for _FPU_SETCW() missing in MINGW librarie


From: David Kastrup
Subject: Re: Inline assembler fallback for _FPU_SETCW() missing in MINGW libraries (issue 577450043 by address@hidden)
Date: Sat, 01 Feb 2020 11:05:03 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Masamichi Hosoda <address@hidden> writes:

>> Hm.  Maybe
>> 
>> -mfpmath=sse
>> 
>> instead?  The problem with switching the whole FPU to reduced precision
>> is that some library functions might not expect that, so it is making me
>> queasy.  On the other hand, using SSE might have a negative performance?
>> I just don't have a good idea what we are dealing with here.
>
> In my experiment, `-fexcess-precision=standard` cannot be used for C++.
>
> ```
> $ g++ -fexcess-precision=standard test.cc
> cc1plus: sorry, unimplemented: -fexcess-precision=standard for C++
>
> $ g++ --version
> g++ (GCC) 7.4.0
> Copyright (C) 2017 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
>
> $
> ```
>
> On the other hand, `-msse -mfpmath=sse` uses SSE,
> which can only perform single-precision floating-point calculation.
> SSE is too low precision.
>
> `-msse2 -mfpmath=sse` uses SSE2,
> which can perform double-precision floating-point calculation.
> Precision is sufficient, but older 32-bit x86 CPUs do not have SSE2.

According to https://en.wikipedia.org/wiki/SSE2 , SSE2 was implemented
by Intel in 2000 and then by AMD in 2003.

All 64bit-mode capable CPUs support it, and for better or worse, that's
very likely what we are catering for today even if our Windows
executables are still 32bit.  For the 32bit-only processors, I quote
from Wikipedia:

The following IA-32 CPUs support SSE2:

    Intel NetBurst-based CPUs (Pentium 4, Xeon, Celeron, Pentium D, Celeron D)
    Intel Pentium M and Celeron M
    Intel Atom
    AMD Athlon 64
    Transmeta Efficeon
    VIA C7

The following IA-32 CPUs were released after SSE2 was developed, but did not 
implement it:

    AMD CPUs prior to Athlon 64, such as Athlon XP
    VIA C3
    Transmeta Crusoe
    Intel Quark

So basically we'd be leaving Athlon XP in the cold (all other processors
seem even less relevant).

We also have:

    SSE2 is also a requirement for installing Windows 8[3] (and later)
    or Microsoft Office 2013 (and later) "to enhance the reliability of
    third-party apps and drivers running in Windows 8".[4]

Frankly, I think that it would be better if our Windows executables just
moved to 64bit but that seems like the more complicated option yet.  And
32bit systems kept around a whole lot longer even after processors
became 64bit-capable because they tended to require less memory.

-- 
David Kastrup



reply via email to

[Prev in Thread] Current Thread [Next in Thread]