diff options
author | Richard Henderson <rth@redhat.com> | 2001-10-11 16:20:54 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2001-10-11 16:20:54 -0700 |
commit | 5929a2f01346eee238c076088ac5228def8791c6 (patch) | |
tree | 1d0663f0c60645a502fa1d6edf9b4a6492213598 /gcc | |
parent | 1097820739d8c8feba6a0636eb3593627201a542 (diff) | |
download | gcc-5929a2f01346eee238c076088ac5228def8791c6.zip gcc-5929a2f01346eee238c076088ac5228def8791c6.tar.gz gcc-5929a2f01346eee238c076088ac5228def8791c6.tar.bz2 |
dwarf2out.c (add_const_value_attribute): If long < HOST_WIDE_INT, fall back to add_AT_long_long for large CONST_INT.
* dwarf2out.c (add_const_value_attribute): If long < HOST_WIDE_INT,
fall back to add_AT_long_long for large CONST_INT.
From-SVN: r46204
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 13 |
2 files changed, 12 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8992aa8..c9753ca 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2001-10-11 Richard Henderson <rth@redhat.com> + * dwarf2out.c (add_const_value_attribute): If long < HOST_WIDE_INT, + fall back to add_AT_long_long for large CONST_INT. + +2001-10-11 Richard Henderson <rth@redhat.com> + * config/i386/i386.md (setcc splitters): Add four splitters to simplify compound compares that simplify_comparison can't handle. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 275e5b4..01613d9 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -8329,18 +8329,19 @@ add_const_value_attribute (die, rtl) HOST_WIDE_INT val = INTVAL (rtl); /* ??? We really should be using HOST_WIDE_INT throughout. */ - if (val < 0) + if (val < 0 && (long) val == val) { if ((long) val != val) abort (); add_AT_int (die, DW_AT_const_value, (long) val); } + else if ((unsigned long) val == (unsigned HOST_WIDE_INT) val) + add_AT_unsigned (die, DW_AT_const_value, (unsigned long) val); + else if (2*HOST_BITS_PER_LONG == HOST_BITS_PER_WIDE_INT) + add_AT_long_long (die, DW_AT_const_value, + val >> HOST_BITS_PER_LONG, val); else - { - if ((unsigned long) val != (unsigned HOST_WIDE_INT) val) - abort (); - add_AT_unsigned (die, DW_AT_const_value, (unsigned long) val); - } + abort (); } break; |