[FFmpeg-devel] Patch: Inline asm fixes for Intel compiler on Windows

Matt Oliver protogonoi at gmail.com
Sat Apr 5 15:21:54 CEST 2014


> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Remove-leal-op-to-fix-icl-inline-asm.patch
Type: application/octet-stream
Size: 1432 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140406/f8a7584d/attachment.obj>


More information about the ffmpeg-devel mailing list