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: HELP ME - porting to VLIW machine


Hi Lars,

> > >    11,     -11 bits in an address
> > That looks really strange.  Do you really only have 11 bit long
> > addresses ?
> 
> If, say, there was a machine with an (instruction and data) word
> size of 36 bits, but with only the 30 least significant bits valid
> for addresses, would the appropriate value in bfd_arch_info_type be
> 30 or 36?

30.

As I understand it, this field is used in the reloc code to check for
overflow of the computed reloc.  The assumption is that the reloc has
computed an address and so it checks to see if it will fit into the
number of address bits that are available in the architecture.

> Assume further that there was an older version of the architecture
> with only 18-bit addresses.  Should that be a different
> bfd_arch_info_type, with a distinct machine number?

Yes.

That older architecture could only support a much more limited address
range, and if, due to a bug, a reloc for the newer architecture is
used which generates an address which is too big, the reloc code needs
to be able to detect this and complain.

Cheers
        Nick


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