[FFmpeg-devel] [PATCH/RFC] mathops/x86: work around inline asm miscompilation with GCC 4.8.1

Michael Niedermayer michaelni at gmx.at
Sun Jun 16 09:49:30 CEST 2013


On Sun, Jun 16, 2013 at 09:32:52AM +0200, Hendrik Leppkes wrote:
> On Sun, Jun 16, 2013 at 8:31 AM, James Almer <jamrial at gmail.com> wrote:
> > On 15/06/13 5:48 PM, Hendrik Leppkes wrote:
> >> On Sat, Jun 15, 2013 at 10:46 PM, Hendrik Leppkes <h.leppkes at gmail.com> wrote:
> >>> The volatile is not required here, and prevents a miscompilation with GCC
> >>> 4.8.1 when building on x86 with --cpu=i686
> >>
> >> I'm not sure if this problem also occurs on 32-bit Linux, if anyone
> >> wants to test, that may be useful.
> >> A simple build on 32-bit x86 with --cpu=i686 and make fate-vc1-ism
> >
> > I was able to reproduce it using gcc 4.8.0 on x86 linux, but it seems it's not limited to x86:
> > http://fate.ffmpeg.org/report.cgi?time=20130616054303&slot=x86_64-archlinux-gcc-enableshared
> 
> 
> Interesting, it doesn't happen on 64-bit for me.
> 
> I pin-pointed the specific uses of the function in question that cause
> it, but reading the generated asm didn't show anything obvious yet,
> but it could be the smallest thing.
> Its the 4 mid_pred calls in vc1_pred_b_mv, if anyone else wants to have a look.

can you post the generated asm? i mean the good one without volatile
and the bad with ?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130616/14c60300/attachment.asc>


More information about the ffmpeg-devel mailing list