From: Jakub Jelinek Date: Thu, 5 May 2011 15:48:18 +0000 (+0200) Subject: re PR debug/48853 (Wrong DWARF codegen when Pmode != ptr_mode) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1e30c57853f8dd58129daee2b88a18b8a78c9832;p=gcc.git re PR debug/48853 (Wrong DWARF codegen when Pmode != ptr_mode) PR debug/48853 * dwarf2out.c (mem_loc_descriptor) : Pass mem_mode instead of mode as 3rd argument to recursive call. (mem_loc_descriptor) : If POINTERS_EXTEND_UNSIGNED, don't emit DW_OP_GNU_regval_type if mode is Pmode and mem_mode is not VOIDmode. (mem_loc_descriptor) : If POINTERS_EXTEND_UNSIGNED, don't give up if mode is Pmode and mem_mode is not VOIDmode. (mem_loc_descriptor) : If POINTERS_EXTEND_UNSIGNED, use int_loc_descriptor if mode is Pmode and mem_mode is not VOIDmode. From-SVN: r173436 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a2094b0c5d6..c19519f0a94 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2011-05-05 Jakub Jelinek + + PR debug/48853 + * dwarf2out.c (mem_loc_descriptor) : Pass mem_mode + instead of mode as 3rd argument to recursive call. + (mem_loc_descriptor) : If POINTERS_EXTEND_UNSIGNED, don't + emit DW_OP_GNU_regval_type if mode is Pmode and mem_mode is not + VOIDmode. + (mem_loc_descriptor) : If POINTERS_EXTEND_UNSIGNED, + don't give up if mode is Pmode and mem_mode is not VOIDmode. + (mem_loc_descriptor) : If POINTERS_EXTEND_UNSIGNED, + use int_loc_descriptor if mode is Pmode and mem_mode is not VOIDmode. + 2011-05-05 Julian Brown * config/arm/neon.md (vec_set_internal): Fix misplaced diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 382d9183d90..8f2635bd7b7 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -13883,7 +13883,7 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, mem_loc_result = mem_loc_descriptor (SUBREG_REG (rtl), GET_MODE (SUBREG_REG (rtl)), - mode, initialized); + mem_mode, initialized); if (mem_loc_result == NULL) break; type_die = base_type_for_mode (mode, 0); @@ -13906,7 +13906,11 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, case REG: if (GET_MODE_CLASS (mode) != MODE_INT - || GET_MODE_SIZE (mode) > DWARF2_ADDR_SIZE) + || (GET_MODE_SIZE (mode) > DWARF2_ADDR_SIZE +#ifdef POINTERS_EXTEND_UNSIGNED + && (mode != Pmode || mem_mode == VOIDmode) +#endif + )) { dw_die_ref type_die; @@ -14049,8 +14053,12 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, pool. */ case CONST: case SYMBOL_REF: - if (GET_MODE_SIZE (mode) > DWARF2_ADDR_SIZE - || GET_MODE_CLASS (mode) != MODE_INT) + if (GET_MODE_CLASS (mode) != MODE_INT + || (GET_MODE_SIZE (mode) > DWARF2_ADDR_SIZE +#ifdef POINTERS_EXTEND_UNSIGNED + && (mode != Pmode || mem_mode == VOIDmode) +#endif + )) break; if (GET_CODE (rtl) == SYMBOL_REF && SYMBOL_REF_TLS_MODEL (rtl) != TLS_MODEL_NONE) @@ -14288,7 +14296,13 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, break; case CONST_INT: - if (GET_MODE_SIZE (mode) <= DWARF2_ADDR_SIZE) + if (GET_MODE_SIZE (mode) <= DWARF2_ADDR_SIZE +#ifdef POINTERS_EXTEND_UNSIGNED + || (mode == Pmode + && mem_mode != VOIDmode + && trunc_int_for_mode (INTVAL (rtl), ptr_mode) == INTVAL (rtl)) +#endif + ) { mem_loc_result = int_loc_descriptor (INTVAL (rtl)); break;