diff options
author | Stuart Menefy <stuart.menefy@st.com> | 2009-08-24 08:09:53 (GMT) |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-08-24 08:09:53 (GMT) |
commit | fea966f7564205fcf5919af9bde031e753419c96 (patch) | |
tree | eb04727dfaad0c42bf9ba771e38f07c310622120 /arch/sh/lib | |
parent | d724a9c9d572e092d1ce820463f082697487b874 (diff) | |
download | linux-fsl-qoriq-fea966f7564205fcf5919af9bde031e753419c96.tar.xz |
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>
Diffstat (limited to 'arch/sh/lib')
-rw-r--r-- | arch/sh/lib/clear_page.S | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sh/lib/clear_page.S b/arch/sh/lib/clear_page.S index 8342bfb..c92244d 100644 --- a/arch/sh/lib/clear_page.S +++ b/arch/sh/lib/clear_page.S @@ -57,7 +57,7 @@ ENTRY(clear_page) ENTRY(__clear_user) ! mov #0, r0 - mov #0xe0, r1 ! 0xffffffe0 + mov #0xffffffe0, r1 ! ! r4..(r4+31)&~32 -------- not aligned [ Area 0 ] ! (r4+31)&~32..(r4+r5)&~32 -------- aligned [ Area 1 ] |