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>
Este cometimento está contido em:

cometido por
Paul Mundt

ascendente
d724a9c9d5
cometimento
fea966f756
@@ -257,7 +257,7 @@ restore_all:
|
||||
!
|
||||
! Calculate new SR value
|
||||
mov k3, k2 ! original SR value
|
||||
mov #0xf0, k1
|
||||
mov #0xfffffff0, k1
|
||||
extu.b k1, k1
|
||||
not k1, k1
|
||||
and k1, k2 ! Mask original SR value
|
||||
|
Criar uma nova questão referindo esta
Bloquear um utilizador