Excessive limitation on gas for MIPS?

Sean McNeil sean@mcneil.com
Tue Mar 18 03:31:00 GMT 2003


Hello all,

I was testing the CVS repository binutils against an older version of
GCC and I was getting some errors that didn't look right at all:

Error: Number (0x0) larger than 32 bits

where 0x0 was always smaller than 32 bits.

Looking into it a little, I think there is an excessive limitation in
load_register and the following patch fixed my problem:

RCS file: /cvs/src/src/gas/config/tc-mips.c,v
retrieving revision 1.197
diff -c -3 -p -r1.197 tc-mips.c
*** gas/config/tc-mips.c        12 Mar 2003 23:07:37 -0000      1.197
--- gas/config/tc-mips.c        18 Mar 2003 03:29:53 -0000
*************** load_register (counter, reg, ep, dbl)
*** 3582,3588 ****
   
    /* The value is larger than 32 bits.  */
   
!   if (HAVE_32BIT_GPRS)
      {
        as_bad (_("Number (0x%lx) larger than 32 bits"),
              (unsigned long) ep->X_add_number);
--- 3582,3588 ----
   
    /* The value is larger than 32 bits.  */
   
!   if (HAVE_32BIT_GPRS && ! dbl)
      {
        as_bad (_("Number (0x%lx) larger than 32 bits"),
              (unsigned long) ep->X_add_number);

I would appreciate any feedback on the validity of this relaxation.  It
appears that instructions are legitimate with the fix/patch.

Cheers,
Sean




More information about the Binutils mailing list