bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/22699] sh*: Immediate signedness is incorrect in and/or/ts


From: fenugrec at users dot sourceforge.net
Subject: [Bug binutils/22699] sh*: Immediate signedness is incorrect in and/or/tst/xor #imm
Date: Thu, 25 Jan 2018 16:41:21 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=22699

fenugrec at users dot sourceforge.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fenugrec at users dot 
sourceforge.
                   |                            |net

--- Comment #1 from fenugrec at users dot sourceforge.net ---
Correct. To recap:

1) some opcodes need the sign-extended 8-bit immediate value:
- add #imm, Rn (OK)
- cmp/eq #imm, R0 (OK)
- mov #imm, Rn (OK)

2) others take the zero-extended imm8 :
- bitwise logic operators {and, and.b,...} : broken
- trapa : broken

3) some I haven't personally checked :
- ldrc / setrc
- other DSP , SH2A, SH4A opcodes

I would suggest reworking the relevant entries in opcodes/sh-opc.h (maybe
replace IMM0_8 by IMM0_8S and IMM0_8U to ensure every occurence is verified
manually; and add the proper handling in opcodes/sh-dis.c

Is there a regression test for this already ?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]