MIPS sign extension of addresses
Maciej W. Rozycki
macro@ds2.pg.gda.pl
Fri Sep 13 02:15:00 GMT 2002
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 +
More information about the Binutils
mailing list