This is the mail archive of the binutils@sources.redhat.com 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: ret value of bfd_get_sign_extend_vma


Michael Mueller <michael.mueller@kay-mueller.de> writes:

>>   But on other systems, and m68k is one, the cpu duplicates the topmost bit
>> of the 16-bit field into the upper (missing from the instruction) 16 address
>> bits.  So on these systems, 16-bit addresses 0x0000 to 0x7fff address 32-bit
>> range 0x00000000 to 0x00007fff, and 16-bit addresses 0x8000 to 0xffff
>> address 32-bit range 0xffff8000 to 0xffffffff.
>
> So that means that if I access a 16 bit range from 0x7ff0 to 0x8010 I
> access two noncontiguous pieces of memory. Funny.
>
> But bfd_get_sign_extend_vma returns 0 on m68k doesn't it?

There aren't actually true 16 bit addresses on m68k, it's just an
optimized way to address two memory regions in the 32 bit address space.
It does not make sense to speak of address 0x8010 when you mean
0xffff8010.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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