From 21217bd0046bac65c93395d55186771c2633af04 Mon Sep 17 00:00:00 2001 From: "James E. Wilson" Date: Thu, 8 Jun 2000 17:25:22 +0000 Subject: [PATCH] Fix DWARF2 64-bit enum debugging support, for debugging IA-64 emacs bugs. * dwarf2out.c (ASM_OUTPUT_DWARF_DATA8): Add new macro that uses UNALIGNED_DOUBLE_INT_ASM_OP. Rename old macro to ASM_OUTPUT_DWARF_CONST_DOUBLE. (output_die, case dw_val_class_unsigned_const): Correct call to ASM_OUTPUT_DWARF_DATA8. (output_die, case dw_val_class_long_long): Use ASM_OUTPUT_DWARF_CONST_DOUBLE. * tree.c (host_integerp): Accept unsigned HOST_WIDE_INT values when pos is zero. From-SVN: r34457 --- gcc/ChangeLog | 10 ++++++++++ gcc/dwarf2out.c | 21 +++++++++++++-------- gcc/tree.c | 4 +++- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 18956ddb437..ecbc2153078 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,15 @@ 2000-06-08 James E. Wilson + * dwarf2out.c (ASM_OUTPUT_DWARF_DATA8): Add new macro that uses + UNALIGNED_DOUBLE_INT_ASM_OP. Rename old macro to + ASM_OUTPUT_DWARF_CONST_DOUBLE. + (output_die, case dw_val_class_unsigned_const): Correct call to + ASM_OUTPUT_DWARF_DATA8. + (output_die, case dw_val_class_long_long): Use + ASM_OUTPUT_DWARF_CONST_DOUBLE. + * tree.c (host_integerp): Accept unsigned HOST_WIDE_INT values when + pos is zero. + * config/ia64/ia64-protos.h (ia64_output_end_prologue): Add. (output_function_prologue): Fix mispelling. (output_function_prologue, output_function_epilogue): Reorder to diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 609006848b7..81230d0cac2 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -405,6 +405,12 @@ static void dwarf2out_frame_debug_expr PARAMS ((rtx, const char *)); fprintf ((FILE), "\t%s\t0x%x", UNALIGNED_INT_ASM_OP, (unsigned) (VALUE)) #endif +#ifndef ASM_OUTPUT_DWARF_DATA8 +#define ASM_OUTPUT_DWARF_DATA8(FILE,VALUE) \ + fprintf ((FILE), "\t%s\t0x%lx", UNALIGNED_DOUBLE_INT_ASM_OP, \ + (unsigned long) (VALUE)) +#endif + #ifndef ASM_OUTPUT_DWARF_DATA #define ASM_OUTPUT_DWARF_DATA(FILE,VALUE) \ fprintf ((FILE), "\t%s\t0x%lx", UNALIGNED_OFFSET_ASM_OP, \ @@ -417,8 +423,8 @@ static void dwarf2out_frame_debug_expr PARAMS ((rtx, const char *)); (unsigned long) (VALUE)) #endif -#ifndef ASM_OUTPUT_DWARF_DATA8 -#define ASM_OUTPUT_DWARF_DATA8(FILE,HIGH_VALUE,LOW_VALUE) \ +#ifndef ASM_OUTPUT_DWARF_CONST_DOUBLE +#define ASM_OUTPUT_DWARF_CONST_DOUBLE(FILE,HIGH_VALUE,LOW_VALUE) \ do { \ if (WORDS_BIG_ENDIAN) \ { \ @@ -2011,6 +2017,7 @@ typedef struct pubname_struct *pubname_ref; typedef dw_die_ref *arange_ref; /* Describe a double word constant value. */ +/* ??? Every instance of long_long in the code really means CONST_DOUBLE. */ typedef struct dw_long_long_struct { @@ -5098,9 +5105,7 @@ output_die (die) ASM_OUTPUT_DWARF_DATA4 (asm_out_file, AT_unsigned (a)); break; case 8: - ASM_OUTPUT_DWARF_DATA8 (asm_out_file, - a->dw_attr_val.v.val_long_long.hi, - a->dw_attr_val.v.val_long_long.low); + ASM_OUTPUT_DWARF_DATA8 (asm_out_file, AT_unsigned (a)); break; default: abort (); @@ -5114,9 +5119,9 @@ output_die (die) ASM_COMMENT_START, dwarf_attr_name (a->dw_attr)); fputc ('\n', asm_out_file); - ASM_OUTPUT_DWARF_DATA8 (asm_out_file, - a->dw_attr_val.v.val_long_long.hi, - a->dw_attr_val.v.val_long_long.low); + ASM_OUTPUT_DWARF_CONST_DOUBLE (asm_out_file, + a->dw_attr_val.v.val_long_long.hi, + a->dw_attr_val.v.val_long_long.low); if (flag_debug_asm) fprintf (asm_out_file, diff --git a/gcc/tree.c b/gcc/tree.c index 2a356edba8d..9eee62b0c2f 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -4306,7 +4306,9 @@ host_integerp (t, pos) && ((TREE_INT_CST_HIGH (t) == 0 && (HOST_WIDE_INT) TREE_INT_CST_LOW (t) >= 0) || (! pos && TREE_INT_CST_HIGH (t) == -1 - && (HOST_WIDE_INT) TREE_INT_CST_LOW (t) < 0))); + && (HOST_WIDE_INT) TREE_INT_CST_LOW (t) < 0) + || (! pos && TREE_INT_CST_HIGH (t) == 0 + && TREE_UNSIGNED (TREE_TYPE (t))))); } /* Return the HOST_WIDE_INT least significant bits of T if it is an