• Mans Rullgard's avatar
    arm: intreadwrite: fix inline asm constraints for gcc 4.6 and later · adebad07
    Mans Rullgard authored
    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: 's avatarMans Rullgard <mans@mansr.com>
    adebad07
Name
Last commit
Last update
doc Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavresample Loading commit data...
libavutil Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
Doxyfile Loading commit data...
INSTALL Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README Loading commit data...
RELEASE Loading commit data...
arch.mak Loading commit data...
avconv.c Loading commit data...
avplay.c Loading commit data...
avprobe.c Loading commit data...
avserver.c Loading commit data...
cmdutils.c Loading commit data...
cmdutils.h Loading commit data...
cmdutils_common_opts.h Loading commit data...
common.mak Loading commit data...
configure Loading commit data...
library.mak Loading commit data...
version.sh Loading commit data...