sh: Remove implicit sign extension from assembler immediates
authorStuart Menefy <stuart.menefy@st.com>
Mon, 24 Aug 2009 08:09:53 +0000 (17:09 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 24 Aug 2009 08:09:53 +0000 (17:09 +0900)
commitfea966f7564205fcf5919af9bde031e753419c96
treeeb04727dfaad0c42bf9ba771e38f07c310622120
parentd724a9c9d572e092d1ce820463f082697487b874
sh: Remove implicit sign extension from assembler immediates

The SH instruction set has several instructions which accept an 8 bit
immediate operand. For logical instructions this operand is zero extended,
for arithmetic instructions the operand is sign extended. After adding an
option to the assembler to check this, it was found that several pieces
of assembly code were assuming this behaviour, and in one case
getting it wrong.

So this patch explicitly sign extends any immediate operands, which makes
it obvious what is happening, and fixes the one case which got it wrong.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/boot/compressed/head_32.S
arch/sh/include/asm/entry-macros.S
arch/sh/kernel/cpu/sh3/entry.S
arch/sh/kernel/entry-common.S
arch/sh/lib/clear_page.S