OSDN Git Service

PR debug/48853
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 5 May 2011 15:48:18 +0000 (15:48 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 5 May 2011 15:48:18 +0000 (15:48 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173436 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/dwarf2out.c

index a2094b0..c19519f 100644 (file)
@@ -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
index 382d918..8f2635b 100644 (file)
@@ -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;