[FFmpeg-devel] Patch: Inline asm fixes for Intel compiler on Windows
Reimar.Doeffinger at gmx.de
Sun Apr 6 12:47:11 CEST 2014
On Sun, Apr 06, 2014 at 12:21:54AM +1100, Matt Oliver wrote:
> > If you do not initialize "bit", making it an output-only paramenter,
> > you should use =&q instead of +q as constraint.
> > However neither is correct as-is, setae sets only a single byte,
> > thus not initializing it will result in uninitialized data,
> > IOW the code as is is broken.
> > If you want to do that kind of change, you would have to use uint8_t
> > instead as type.
> Interestingly both compilers I tested with didnt show any errors and had
> the upper bits zeroed. However as the function returns a 32b int and any
> code that calls this function would also assume 32b then a xor to set to 0
> initially is still probably the way to go. Using uint8 would save that
> instruction but would add one later to clear the upper bytes should it ever
> be used for anything larger than 1B. So fixed to add back the set to 0.
Just to clarify: this patch looks good to me and I think it should be
applied unless someone has objections.
The discussion afterwards on whether it could be optimized further is
kind of unrelated.
More information about the ffmpeg-devel