"Error: constant too large" on mips gas

Maciej W. Rozycki macro@linux-mips.org
Wed Apr 13 17:55:00 GMT 2005


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



More information about the Binutils mailing list