[patch, mips] Follow up to pr54061 patch, fix another abort.

Richard Sandiford rdsandiford@googlemail.com
Wed Dec 12 08:21:00 GMT 2012

Steve Ellcey <sellcey@mips.com> writes:
> On Tue, 2012-12-11 at 21:52 +0000, Richard Sandiford wrote:
>> If even fake registers like these are going to be used, then I think
>> we should initialise to IGNORED_DWARF_REGNUM rather than INVALID_REGNUM in:
>>   for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
>>     {
>>       mips_dbx_regno[i] = INVALID_REGNUM;
>>       ...
>>     }
>> and remove the ALL_COP_REG loop that was in the earlier patch.
>> Richard
> So far, this is the only fake register that I have seen show up while
> building GCC, glibc, newlib, binutils, etc.  I am not sure if we want to
> set all fake registers to IGNORED because of this one case.  If more
> popped up then I could see us making that change.

I'm pretty sure we'll need more eventually though.  A quick inspection
shows that we don't set mips_dbx_regno for DSP_ACC_REGS or ST_REGS.
DSP_ACC_REGS in paticular seems likely to hit, although you need to
test with an -mdsp option to get coverage.  It's even conceivable
that we could end up with info for GOT_VERSION_REGNUM.

I don't think we really gain much by trying to distinguish in mips_dbx_regno
between INVALID_REGNUM (register isn't used at all by the compiler) and
IGNORED_DWARF_REGNUM.  Especially since we don't distinguish between
registers that have been disabled through -msoft-float, -mips3 and below
(for ST_REGS other than $fcc0), -mno-dsp, etc.


More information about the Gcc-patches mailing list