MIPS sign extension of addresses

Andrew Cagney ac131313@ges.redhat.com
Fri Sep 13 15:59: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?

Actually no.  GDB supports pure harvard architectures (non-unified 
instruction and data spaces).  Such targets have boundary conditions 
(where sub address spaces should modulo wrap) that make the MIPS case 
look trivial :-)

As with the MIPS, and as you note, it turns out that these boundary 
cases are sufficiently rare to not need an urgent fix.

enjoy,
Andrew




More information about the Binutils mailing list