[flac-dev] [PATCH] MSVC2015U2 workaround, version 2
Ozkan Sezer
sezeroz at gmail.com
Mon May 2 19:37:03 UTC 2016
On 5/2/16, lvqcl <lvqcl.mail at gmail.com> wrote:
> Here's a new version of a patch that fixes a problem with MSVC2105 update2,
> but it doesn't disable any optimization, so the resulting encoding
> performance should be almost unaffected by this workaround.
>
>
> MSVC compiles
>
> abs_residual_partition_sums[partition] =
> (FLAC__uint32)_mm_cvtsi128_si32(mm_sum);
>
> into this:
>
> movq QWORD PTR [rsi], xmm2
>
> while it should be
>
> movd eax, xmm2
> mov QWORD PTR [rsi], rax
>
> With this patch, MSVC emits
>
> movq QWORD PTR [rsi], xmm2
> mov DWORD PTR [rsi+4], r9d
>
> so the price of this workaround is 1 extra write instruction per partition.
Why not use a 64bit suffix to that 0xFFFFFFFF, e.g. 0xFFFFFFFFi64
to make the intention clear? (since you are specifically targeting
msvc, the non-portability of i64 suffix shouldn't be a problem.)
--
O.S.
More information about the flac-dev
mailing list