summaryrefslogtreecommitdiffstats
path: root/include/asm-sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-05-08 14:50:59 +0900
committerPaul Mundt <lethal@hera.kernel.org>2007-05-09 01:35:01 +0000
commitbd0799977cb9b68aa6a39e9630aeea4778a58385 (patch)
tree125c0c923701c5b6f823a7b614c295e06370d46c /include/asm-sh
parent51c8b856f5edfa45d956721aa6d6ebaa15699062 (diff)
downloadblackbird-op-linux-bd0799977cb9b68aa6a39e9630aeea4778a58385.tar.gz
blackbird-op-linux-bd0799977cb9b68aa6a39e9630aeea4778a58385.zip
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')
-rw-r--r--include/asm-sh/system.h9
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
*/
OpenPOWER on IntegriCloud