[FFmpeg-devel] [Patch] inline asm: fix arrays when used as named constraint
protogonoi at gmail.com
Wed May 7 06:31:46 CEST 2014
This patch should fix the recent problems with icl and FATE (I wont get
started on icl and inline asm issues).
Basically when the name of a static array was passed to MANGLE it is
treated as a pointer to the first element in the array and can be offset
accordingly to get other elements. However when using named constraints the
compiler was adding an extra level of pointer indirection and instead
MANGLE generated a pointer to a pointer to the first element. This is
obviously not what the inline asm is expecting and so invalid values are
loaded. A result is named constraints where the input constraint is an
array need to be handled differently.
The attached patch adds the correct way to handle this, previous versions
of icl hid this issue so it snuck through but the patch has been tested
with as many compiler versions as I can get my hands on and fate tests pass
with all of them now. Also tested with gcc using named constraints (as this
is now used when lto is enabled) and all tests pass there as well (gcc -lto
probably wasnt working correctly before this patch just no one noticed).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6900 bytes
Desc: not available
More information about the ffmpeg-devel