[PATCH] ARM: Disassemble lsls #0 as movs in Thumb-1

Matthew Gretton-Dann matthew.gretton-dann@arm.com
Wed Jun 2 13:44:00 GMT 2010


On Wed, 2010-06-02 at 10:47 +0100, Richard Earnshaw wrote:
> On Tue, 2010-06-01 at 16:29 +0100, Matthew Gretton-Dann wrote:
> > diff --git a/gas/testsuite/gas/arm/thumb.s
> > b/gas/testsuite/gas/arm/thumb.s
> > index d1e4339..79cadd7 100644
> > --- a/gas/testsuite/gas/arm/thumb.s
> > +++ b/gas/testsuite/gas/arm/thumb.s
> > @@ -200,3 +200,7 @@ forwardonly:
> >  .target:
> >         nop     @ pad for a.out
> >         nop
> > +
> > +baz:
> > +       mov     r0, r1
> > +       
> 
> This bit isn't right: the nops that precede your new code are to pad the
> object out to an even number of words (so that disassembly will be
> consistent across all object formats).
> 
> Other than this, the patch is fine.

Please find attached a new version of the patch which corrects this.
Now, instead of adding new instructions after the nops for .target I
just replace one nop with the mov instruction.

Thanks,

Matt

Proposed ChangeLogs

gas/testsuite/ChangeLog:
2010-06-02  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
        * gas/arm/thumb-eabi.d: Add case for divided syntax encoding of 
        mov.
        * gas/arm/thumb.d: Likewise.
        * gas/arm/thumb.s: Likewise.
        * gas/arm/thumb2_it.d: Update for change in lsls/movs 
        disassembly.
        * gas/arm/thumb2_it_auto.d: Liekwise.
        * gas/arm/thumb32.d: Likewise.

ld/testsuite/ChangeLog:
2010-06-02  Matthew Gretton-Dann <matthew.gretton-dann@arm.com>

        * ld-arm/arm-call.d: Handle change in lsls/movs disassembly.
        * ld-arm/farcall-thumb-arm-short.d: Likewise.
        * ld-arm/farcall-thumb-thumb-blx-pic-veneer.d: Likewise.
        * ld-arm/farcall-thumb-thumb-blx.d: Likewise.
        * ld-arm/farcall-thumb-thumb-m-pic-veneer.d: Likewise.
        * ld-arm/farcall-thumb-thumb-m.d: Likewise.
        * ld-arm/farcall-thumb-thumb-pic-veneer.d: Likewise.
        * ld-arm/farcall-thumb-thumb.d: Likewise.
        * ld-arm/thumb2-bl-as-thumb1-bad-noeabi.d: Likewise.
        * ld-arm/thumb2-bl-as-thumb1-bad.d: Likewise.
        * ld-arm/thumb2-bl-bad-noeabi.d: Likewise.
        * ld-arm/thumb2-bl-bad.d: Likewise.

opcodes/ChangeLog:
2010-06-02  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>

        * arm-dis.c (thumb-opcodes): Add disassembly for movs.

-- 
Matthew Gretton-Dann
Principal Engineer - PDSW Tools
ARM Ltd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1006-movs-disassembly.patch
Type: text/x-patch
Size: 10603 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20100602/c1944a9b/attachment.bin>


More information about the Binutils mailing list