From 23959f19da3c187d51f98cb740d9556a83cd45b8 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Tue, 27 Apr 2004 23:24:01 +0000 Subject: [PATCH] re PR debug/14829 (Bootstrap comparison failure on hppa64-hp-hpux11.11) PR debug/14829 * dwarf2out.c (reg_number): Rename to dbx_reg_number. Adjust all callers. (multiple_reg_loc_descriptor, reg_loc_descriptor): Use gcc register number for indexing hard_regno_nregs array. From-SVN: r81233 --- gcc/ChangeLog | 8 ++++++++ gcc/dwarf2out.c | 19 ++++++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 42936724fc3..8b567508deb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2004-04-27 John David Anglin + + PR debug/14829 + * dwarf2out.c (reg_number): Rename to dbx_reg_number. Adjust all + callers. + (multiple_reg_loc_descriptor, reg_loc_descriptor): Use gcc register + number for indexing hard_regno_nregs array. + 2004-04-27 Geoffrey Keating * config/darwin.h (STARTFILE_SPEC): Use %s to find crt2.o. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 4cf97124adf..83c6821c4da 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -3785,7 +3785,7 @@ static bool is_subrange_type (tree); static dw_die_ref subrange_type_die (tree, dw_die_ref); static dw_die_ref modified_type_die (tree, int, int, dw_die_ref); static int type_is_enum (tree); -static unsigned int reg_number (rtx); +static unsigned int dbx_reg_number (rtx); static dw_loc_descr_ref reg_loc_descriptor (rtx); static dw_loc_descr_ref one_reg_loc_descriptor (unsigned int); static dw_loc_descr_ref multiple_reg_loc_descriptor (rtx, rtx); @@ -8240,10 +8240,10 @@ type_is_enum (tree type) return TREE_CODE (type) == ENUMERAL_TYPE; } -/* Return the register number described by a given RTL node. */ +/* Return the DBX register number described by a given RTL node. */ static unsigned int -reg_number (rtx rtl) +dbx_reg_number (rtx rtl) { unsigned regno = REGNO (rtl); @@ -8265,10 +8265,10 @@ reg_loc_descriptor (rtx rtl) if (REGNO (rtl) >= FIRST_PSEUDO_REGISTER) return 0; - reg = reg_number (rtl); + reg = dbx_reg_number (rtl); regs = targetm.dwarf_register_span (rtl); - if (hard_regno_nregs[reg][GET_MODE (rtl)] > 1 + if (hard_regno_nregs[REGNO (rtl)][GET_MODE (rtl)] > 1 || regs) return multiple_reg_loc_descriptor (rtl, regs); else @@ -8297,8 +8297,8 @@ multiple_reg_loc_descriptor (rtx rtl, rtx regs) unsigned reg; dw_loc_descr_ref loc_result = NULL; - reg = reg_number (rtl); - nregs = hard_regno_nregs[reg][GET_MODE (rtl)]; + reg = dbx_reg_number (rtl); + nregs = hard_regno_nregs[REGNO (rtl)][GET_MODE (rtl)]; /* Simple, contiguous registers. */ if (regs == NULL_RTX) @@ -8478,7 +8478,8 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, bool can_use_fbreg) memory) so DWARF consumers need to be aware of the subtle distinction between OP_REG and OP_BASEREG. */ if (REGNO (rtl) < FIRST_PSEUDO_REGISTER) - mem_loc_result = based_loc_descr (reg_number (rtl), 0, can_use_fbreg); + mem_loc_result = based_loc_descr (dbx_reg_number (rtl), 0, + can_use_fbreg); break; case MEM: @@ -8549,7 +8550,7 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, bool can_use_fbreg) case PLUS: plus: if (is_based_loc (rtl)) - mem_loc_result = based_loc_descr (reg_number (XEXP (rtl, 0)), + mem_loc_result = based_loc_descr (dbx_reg_number (XEXP (rtl, 0)), INTVAL (XEXP (rtl, 1)), can_use_fbreg); else -- 2.30.2