This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH][OPCODES][ARM]Disassembles SSAT and SSAT16 instructions immediate field incorrectly for Thumb-2
- From: Ramana Radhakrishnan <ramana dot gcc at googlemail dot com>
- To: Renlin Li <renlin dot li at arm dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>, Ramana Radhakrishnan <Ramana dot Radhakrishnan at arm dot com>, Nicholas Clifton <nickc at redhat dot com>
- Date: Tue, 14 Apr 2015 20:13:30 +0100
- Subject: Re: [PATCH][OPCODES][ARM]Disassembles SSAT and SSAT16 instructions immediate field incorrectly for Thumb-2
- Authentication-results: sourceware.org; auth=none
- References: <5527D8C3 dot 6050800 at arm dot com>
- Reply-to: ramrad01 at arm dot com
On Fri, Apr 10, 2015 at 3:05 PM, Renlin Li <renlin.li@arm.com> wrote:
> 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.
OK
Ramana