For instructions with 'pc' as the 'Rn' register in addressing mode, the offset is always > 0: The following source code: strcc r7, [pc], #-1931 strcc r7, [pc], #1931 strcc r7, [r4], #-1931 strcc r7, [r4], #1931 is disasembled as follow: 84: 340f778b strcc r7, [pc], #1931 ; 8c <test+0x8> 88: 348f778b strcc r7, [pc], #1931 ; 90 <test+0xc> 8c: 3404778b strcc r7, [r4], #-1931 90: 3484778b strcc r7, [r4], #1931 There is an error in line 84. Note that if Rn is not 'pc', the '-' is printed correctly. regards, M. Briday
Created attachment 4522 [details] Fix decoding of signed PC offsets
Hi Mikaël, Please could you try out the uploaded patch and let me know if it works for you. Cheers Nick
Subject: Re: error in objdump disassemble for ARM target Hi Nick, This works great. Thanks for you quick fix, Cheers, Mikaël Le 15 janv. 2010 à 12:50, nickc at redhat dot com a écrit : > > ------- Additional Comments From nickc at redhat dot com 2010-01-15 11:50 ------- > Hi Mikaël, > > Please could you try out the uploaded patch and let me know if it works for you. > > Cheers > Nick > > > > -- > What |Removed |Added > ---------------------------------------------------------------------------- > Status|NEW |WAITING > > > http://sourceware.org/bugzilla/show_bug.cgi?id=11170 > > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter.
Subject: Bug 11170 CVSROOT: /cvs/src Module name: src Changes by: nickc@sourceware.org 2010-01-20 10:54:03 Modified files: opcodes : ChangeLog arm-dis.c Log message: PR 11170 * arm-dis.c (print_arm_address): Do not ignore negative bit in PC based post-indexed addressing. Patches: http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/opcodes/ChangeLog.diff?cvsroot=src&r1=1.1549&r2=1.1550 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/opcodes/arm-dis.c.diff?cvsroot=src&r1=1.121&r2=1.122
Closing as this issue is fixed on master.