This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB 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: MIPS sign extension of addresses


On Thu, 12 Sep 2002, Daniel Jacobowitz wrote:

> > >I've not yet checked, but are there fundamental reasons why bfd_vma
> > >or CORE_ADDR have to be unsigned?
> > 
> > I don't think it will help.  I think it will also hinder the situtation 
> > where BFD/GDB are supporting multiple architectures - one signed and one 
> > unsigned.
> 
> Oh, Andrew's right.  Signed CORE_ADDR isn't viable because other
> architectures have and assume an unsigned address space.

 Because MIPS is a minority?  Well, I can see some reason here, but care
has to be taken not to lose a sign with casts when operating on MIPS
addresses.  Fortunately the positive and the negative ranges of addresses
are distinct on MIPS so you won't find normal code or data crossing a
boundary (that might lead to wrong results of compare operations).

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +


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