[PATCH][OPCODES][ARM]Disassembles SSAT and SSAT16 instructions immediate field incorrectly for Thumb-2

Renlin Li renlin.li@arm.com
Fri Apr 10 14:06:00 GMT 2015


Hi all,

Binutils objectdump disassembles ssat and ssat16 incorrectly for thumb-2 
instructions. The dumped immediate field is always one less than the 
correct immediate.

According to the instruction description, the sat_imm field of the 
instruction encodes this bit position by taking the value (<imm>-1). 
print_insn_thumb32 print out the value extract from the binary directly, 
which is not correct. It should add 1 to that result to correctly 
present the assembly.

GAS regression tests Okay without new issues.
Okay to commit?

Regards,
Renlin Li

opcodes/ChangeLog:

2015-04-10  Renlin Li  <renlin.li@arm.com>

     * arm-dis.c (thumb32_opcodes): Define 'D' format control code,
     use it for ssat and ssat16.
     (print_insn_thumb32): Add handle case for 'D' control code.

gas/testsuite/ChangeLog:

2015-04-10  Renlin Li  <renlin.li@arm.com>

     * gas/arm/arch7em.d: Adjust required ssat and ssat16 immediate field.
     * gas/arm/thumb32.d: Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: new.diff
Type: text/x-patch
Size: 4509 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150410/8d0fb2a4/attachment.bin>


More information about the Binutils mailing list