summaryrefslogtreecommitdiffstats
path: root/fs/dcookies.c
diff options
context:
space:
mode:
authorDave Martin <dave.martin@linaro.org>2012-09-03 14:49:23 +0200
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-09-15 22:25:54 +0200
commit0ce3de23f2a520a6ac8c2179fb8f88342c4992ef (patch)
tree6d0de0020f06db07230e32b20ef3302293be8fbb /fs/dcookies.c
parentARM: 7508/1: opcodes: Don't define the thumb32 byteswapping macros for BE32 (diff)
downloadlinux-0ce3de23f2a520a6ac8c2179fb8f88342c4992ef.tar.xz
linux-0ce3de23f2a520a6ac8c2179fb8f88342c4992ef.zip
ARM: 7509/1: opcodes: Make opcode byteswapping macros assembly-compatible
Most of the existing macros don't work with assembler, due to the use of type casts and C functions from <linux/swab.h>. This patch abstracts out those operations and provides simple explicit versions for use in assembly code. __opcode_is_thumb32() and __opcode_is_thumb16() are also converted to do bitmask-based testing to avoid confusion if these are used in assembly code (the assembler typically treats all arithmetic values as signed). These changes avoid the need for the compiler to pre-evaluate constant expressions used to generate opcodes. By ensuring that the forms of these expressions can be evaluated directly by the assembler, we can just stringify the expressions directly into the asm during the preprocessing pass. The alternative approach (passing the evaluated expression via an inline asm "i" constraint) gets painful because the contents of the asm and the constraints must be kept in sync. This makes the resulting macros awkward to use. Retaining the C forms of the macros allows more efficient code to be generated when opcodes are generated programmatically at run- time, but there is no way to embed run-time-generated opcodes in asm() blocks. Signed-off-by: Dave Martin <dave.martin@linaro.org> Acked-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'fs/dcookies.c')
0 files changed, 0 insertions, 0 deletions