* config/tc-mips.c (gpr_read_mask, gpr_write_mask): Fix handling
	of register 0.
+2011-07-04  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * config/tc-mips.c (gpr_read_mask, gpr_write_mask): Fix handling
+       of register 0.
+
 2011-07-04  Maciej W. Rozycki  <macro@codesourcery.com>
 
        * config/tc-mips.c (append_insn): Make sure DWARF-2 location
 
       if (pinfo2 & INSN2_READ_GPR_Z)
        mask |= 1 << EXTRACT_OPERAND (RZ, *ip);
     }
-  return mask & ~0;
+  /* Don't include register 0.  */
+  return mask & ~1;
 }
 
 /* Return the mask of core registers that IP writes.  */
       if (pinfo2 & INSN2_WRITE_GPR_Z)
        mask |= 1 << EXTRACT_OPERAND (RZ, *ip);
     }
-  return mask & ~0;
+  /* Don't include register 0.  */
+  return mask & ~1;
 }
 
 /* Return the mask of floating-point registers that IP reads.  */