diff options
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 56d20040277..9d431832975 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -1,5 +1,5 @@ /* Output Dwarf2 format symbol table information from the GNU C compiler. - Copyright (C) 1992, 1993, 95-97, 1998 Free Software Foundation, Inc. + Copyright (C) 1992, 93, 95, 96, 97, 1998 Free Software Foundation, Inc. Contributed by Gary Funck (gary@intrepid.com). Derived from DWARF 1 implementation of Ron Guilmette (rfg@monkeys.com). Extensively modified by Jason Merrill (jason@cygnus.com). @@ -578,18 +578,26 @@ expand_builtin_dwarf_reg_size (reg_tree, target) continue; mode = reg_raw_mode[i]; + /* CCmode is arbitrarily given a size of 4 bytes. It is more useful to use the same size as word_mode, since that reduces the number of ranges we need. It should not matter, since the result should never be used for a condition code register anyways. */ - if (mode == CCmode) + if (GET_MODE_CLASS (mode) == MODE_CC) mode = word_mode; + size = GET_MODE_SIZE (mode); + /* If this register is not valid in the specified mode and + we have a previous size, use that for the size of this + register to avoid making junk tiny ranges. */ + if (! HARD_REGNO_MODE_OK (i, mode) && last_size != -1) + size = last_size; + if (size != last_size) { ranges[n_ranges].beg = i; - ranges[n_ranges].size = last_size = GET_MODE_SIZE (reg_raw_mode[i]); + ranges[n_ranges].size = last_size = size; ++n_ranges; if (n_ranges >= 5) abort (); |