This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ARM] signed zero


Nathan,

(Note: I am not a maintainer so can't give commit approval).

On Mon, 2011-05-23 at 15:04 +0100, Nathan Sidwell wrote:
> The ARM ISA encodes offsets in sign/magnitude representation, so there are two 
> representations of zero.  The ISA specifies how the assembler should select the 
> right one, and the disassembler should explicitly show -0.  For +0, it should 
> elide the offset in certain circumstances.

The assembler part of the patch looks okay to me.

Can you state the rules you are using to decide whether to elide +0?  

Looking at the source code and tests I think I agree with most of the
times you elide +0.  However, you seem to elide the offset when doing a
literal load (for instance ldr r0, [pc, #0] is being disassembled as ldr
r0, [pc]).  In this case I think the offset should be shown, and this is
also what the ARMARM does (see section A8.6.59 for example).

Thanks,

Matt

-- 
Matthew Gretton-Dann
Principal Engineer - PDSW Tools
ARM Ltd




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]