diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-05-08 14:50:59 +0900 |
---|---|---|
committer | Paul Mundt <lethal@hera.kernel.org> | 2007-05-09 01:35:01 +0000 |
commit | bd0799977cb9b68aa6a39e9630aeea4778a58385 (patch) | |
tree | 125c0c923701c5b6f823a7b614c295e06370d46c /include/asm-sh/system.h | |
parent | 51c8b856f5edfa45d956721aa6d6ebaa15699062 (diff) | |
download | linux-bd0799977cb9b68aa6a39e9630aeea4778a58385.tar.bz2 |
sh: Support for SH-2A 32-bit opcodes.
SH-2A supports both 16 and 32-bit instructions, add a simple helper
for figuring out the instruction size in the places where there are
hardcoded 16-bit assumptions.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh/system.h')
-rw-r--r-- | include/asm-sh/system.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-sh/system.h b/include/asm-sh/system.h index e7e96ee0c8a5..82f3e229e621 100644 --- a/include/asm-sh/system.h +++ b/include/asm-sh/system.h @@ -255,6 +255,15 @@ static inline void *set_exception_table_evt(unsigned int evt, void *handler) return set_exception_table_vec(evt >> 5, handler); } +/* + * SH-2A has both 16 and 32-bit opcodes, do lame encoding checks. + */ +#ifdef CONFIG_CPU_SH2A +extern unsigned int instruction_size(unsigned int insn); +#else +#define instruction_size(insn) (2) +#endif + /* XXX * disable hlt during certain critical i/o operations */ |