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: Dan Eble
Subject: Re: Inline assembler fallback for _FPU_SETCW() missing in MINGW libraries (issue 577450043 by address@hidden)
Date: Tue, 4 Feb 2020 10:35:42 -0500

On Feb 4, 2020, at 09:44, Masamichi Hosoda <address@hidden> wrote:
> 
> +// FIXME: workaround: In GUB, g++ 4.9.4 for darwin-x86,
> +// it seems that static cast from `unsigned long long` to `double`
> +// by x86 SSE2 raises an internal compile error.
> +// However, static cast from `signed long long` to `double`
> +// does not raise the error.
> +// So we use it for a workaround.
> +#if defined (__i386__) && defined (__APPLE__) && \
> +  defined (__SSE2_MATH__) && __GNUC__ < 5
> +    {
> +      I64 inum = num_;
> +      I64 iden = den_;
> +      return static_cast<double> (sign_) *
> +        static_cast<double> (inum) / static_cast<double> (iden);
> +    }
> +#else
>     return (double)sign_ * (double)num_ / (double)den_;
> +#endif

Is the conditional code really necessary?  Why not boil it down to the working 
code and a comment explaining the extra conversion to signed numbers?
— 
Dan




reply via email to

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