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: "Error: constant too large" on mips gas


On Tue, 12 Apr 2005, Eric Christopher wrote:

> >  Well, no code example as I haven't touched it yet, but semantically-wise 
> > I think calls to expr() should should be able to specify the width of the 
> > ALU word to operate on and whether to treat literals as signed or not.  
> > Then any literal will get internally either zero- or sign-extended from 
> > the specified width to the width of the internal representation (i.e that 
> > of offsetT) as will any results produced.  Encountering a literal wider 
> > than the specified width should probably result in treating it as O_big.
> > 
> 
> This is close to what I was thinking of yesterday. One thought was that
> any literal that comes in as a "load address" should be considered to be
> sign extended to the size of the register, and a "load register" should
> be zero extended.

 Certainly, but that's something that callers have to take into account as 
expr() itself cannot make such a decision.

  Maciej


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