[vlc-devel] [PATCHv2 2/3] deinterlace: x86: add external asm emms function

Janne Grunau janne-vlc at jannau.net
Tue Dec 6 22:04:45 CET 2016


On 2016-12-06 22:07:51 +0200, Rémi Denis-Courmont wrote:
> Le mardi 6 décembre 2016, 20:43:53 Janne Grunau a écrit :
>
> > There are
> > sequence points between the functions clobbering the fpu register file
> > status and vlcpriv_emms_ext_asm.
> 
> And? If the calling convention allows the clobber, then the emms function is 
> useless. If it does not, then the call site is UB and the function is 
> therefore also useless.

which one? But I doubt any one which considers the fpu registers would 
allow it. Cdecl doesn't allow it. But this isn't really anything I'm 
changing (except moving the emms instruction from inline emms to an 
external function in some cases). I even disabled the mmx code and thus 
the necessity of emms on x86_64 for yadif and merge.

This is common idiom for x86 mmx optimizations and one could argue that
the function calling mmx asm functions and the mmx functions should be 
considered as a single unit. Also mmx is legacy and will be phased out 
slowly.

Janne


More information about the vlc-devel mailing list