On Wed, May 02, 2012 at 01:34:47PM +0100, Mans Rullgard wrote:
> With a dereferenced type-cast pointer as memory operand, gcc 4.6
> and later will sometimes copy the data to a temporary location,
> the address of which is used as the operand value, if it thinks
> the target address might be misaligned.  Using a pointer to a
> packed struct type instead does the right thing.
> 
> The 16-bit case is special since the ldrh instruction addressing
> modes are limited compared to ldr.  The "Uq" constraint produces a
> memory reference suitable for an ldrsb instruction, which supports
> the same addressing modes as ldrh.  However, the restrictions appear
> to apply only when the operand addresses a single byte.  The memory
> reference must thus be split into two operands each targeting one
> byte.  Finally, the "Uq" constraint is only available in ARM mode.
> The Thumb-2 ldrh instruction supports most addressing modes so the
> normal "m" constraint can be used there.
> 
> Signed-off-by: Mans Rullgard <[email protected]>
> ---
>  libavutil/arm/intreadwrite.h |   13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)

LGTM
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to