Bug 11170 - error in objdump disassemble for ARM target
Summary: error in objdump disassemble for ARM target
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.17
: P2 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-14 17:56 UTC by Mikaël Briday
Modified: 2014-07-19 14:23 UTC (History)
2 users (show)

See Also:
Host:
Target: arm-elf
Build:
Last reconfirmed:


Attachments
Fix decoding of signed PC offsets (327 bytes, patch)
2010-01-15 11:49 UTC, Nick Clifton
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikaël Briday 2010-01-14 17:56:01 UTC
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
Comment 1 Nick Clifton 2010-01-15 11:49:48 UTC
Created attachment 4522 [details]
Fix decoding of signed PC offsets
Comment 2 Nick Clifton 2010-01-15 11:50:33 UTC
Hi Mikaël,

  Please could you try out the uploaded patch and let me know if it works for you.

Cheers
  Nick

  
Comment 3 Mikaël Briday 2010-01-16 14:38:49 UTC
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.

Comment 4 Sourceware Commits 2010-01-20 10:54:19 UTC
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

Comment 5 Will Newton 2014-07-19 14:23:57 UTC
Closing as this issue is fixed on master.