]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 7567/1: io: avoid GCC's offsettable addressing modes for halfword accesses
authorWill Deacon <will.deacon@arm.com>
Fri, 26 Oct 2012 17:42:08 +0000 (18:42 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 29 Oct 2012 10:04:27 +0000 (10:04 +0000)
commit0df61f4ce81cb05ed36ff38f3c7b7c83f43459f6
tree1983cc4138765d367f91f5beb2d656418a16d8bc
parentffa16cad7fb0d6d346a08acf5d1b176b03414285
ARM: 7567/1: io: avoid GCC's offsettable addressing modes for halfword accesses

Using the 'o' memory constraint in inline assembly can result in GCC
generating invalid immediate offsets for memory access instructions with
reduced addressing capabilities (i.e. smaller than 12-bit immediate
offsets):

  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54983

As there is no constraint to specify the exact addressing mode we need,
fallback to using 'Q' exclusively for halfword I/O accesses. This may
emit an additional add instruction (using an extra register) in order
to construct the address but it will always be accepted by GAS.

Reported-by: Bastian Hecht <hechtb@googlemail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/io.h