diff options
author | Jakub Jelinek <jakub@redhat.com> | 2011-05-05 17:48:18 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-05-05 17:48:18 +0200 |
commit | 1e30c57853f8dd58129daee2b88a18b8a78c9832 (patch) | |
tree | 4eb0f93df76956fa766321ba6afe5567ce6c096d /gcc | |
parent | d19eb6206237cc0627687a33a387c883a5139566 (diff) | |
download | gcc-1e30c57853f8dd58129daee2b88a18b8a78c9832.zip gcc-1e30c57853f8dd58129daee2b88a18b8a78c9832.tar.gz gcc-1e30c57853f8dd58129daee2b88a18b8a78c9832.tar.bz2 |
re PR debug/48853 (Wrong DWARF codegen when Pmode != ptr_mode)
PR debug/48853
* dwarf2out.c (mem_loc_descriptor) <case SUBREG>: Pass mem_mode
instead of mode as 3rd argument to recursive call.
(mem_loc_descriptor) <case REG>: 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) <case SYMBOL_REF>: If POINTERS_EXTEND_UNSIGNED,
don't give up if mode is Pmode and mem_mode is not VOIDmode.
(mem_loc_descriptor) <case CONST_INT>: If POINTERS_EXTEND_UNSIGNED,
use int_loc_descriptor if mode is Pmode and mem_mode is not VOIDmode.
From-SVN: r173436
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 13 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 24 |
2 files changed, 32 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a2094b0..c19519f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2011-05-05 Jakub Jelinek <jakub@redhat.com> + + PR debug/48853 + * dwarf2out.c (mem_loc_descriptor) <case SUBREG>: Pass mem_mode + instead of mode as 3rd argument to recursive call. + (mem_loc_descriptor) <case REG>: 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) <case SYMBOL_REF>: If POINTERS_EXTEND_UNSIGNED, + don't give up if mode is Pmode and mem_mode is not VOIDmode. + (mem_loc_descriptor) <case CONST_INT>: If POINTERS_EXTEND_UNSIGNED, + use int_loc_descriptor if mode is Pmode and mem_mode is not VOIDmode. + 2011-05-05 Julian Brown <julian@codesourcery.com> * config/arm/neon.md (vec_set<mode>_internal): Fix misplaced diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 382d918..8f2635b 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; |