On Fri, Dec 7, 2012 at 2:55 PM, Steve Ellcey <sell...@mips.com> wrote: > On Fri, 2012-12-07 at 14:43 -0800, H.J. Lu wrote: > >> > I think you need a way to tell a bad register from a good register >> > which doesn't have DWARF register number. >> > >> >> Something like >> >> #define IGNORED_DWARF_REGNUM (INVALID_REGNUM - 1) > > The other option would be to have a new macro that returned true or > false if a register had a dbx register number. > > #define VALID_DBX_REGNUM(regno) (true) > > and check that instead of checking the return of dbx_reg_number(). > > A target would override this default definition of VALID_DBX_REGNUM > for registers it wanted to ignore. It should probably be a target > macro but so should DBX_REGISTER_NUMBER and DWARF_FRAME_REGNUM, we > probably don't want to be making that change at this time in the release > cycle.
One case is a valid register without valid DWARF register number. The other is an invalid register. Both have invalid DWARF register number. I don't think VALID_DBX_REGNUM works here. -- H.J.