This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PING: [PATCH] Fix up typed DWARF stack support for POINTERS_EXTEND_UNSIGNED targets (PR debug/48853)


On Tue, May 10, 2011 at 2:52 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Mon, May 09, 2011 at 01:35:39PM -0700, H.J. Lu wrote:
>> (gdb) call debug_rtx (rtl)
>> (var_location d (mem/s/j:SI (plus:DI (subreg:DI (ashift:SI
>> (entry_value:SI (reg:SI 5 di [ i ]))
>> ? ? ? ? ? ? ? ? (const_int 2 [0x2])) 0)
>> ? ? ? ? (symbol_ref:DI ("a") <var_decl 0x7ffff0606000 a>)) [0 a S4 A32]))
>> (gdb)
>
> Ugh, paradoxical subreg? ?Doesn't that say that the upper 32-bits are
> undefined? ?Surely that ought to be zero_extend, sign_extend or something
> similarly well defined...
>

With

[hjl@gnu-6 pr48853]$ cat x.i
extern void abort (void);
int a[1024];
volatile short int v;

int
foo (int i, int j)
{
  int d = a[i];
  ++v;
  return ++j;
}

rtl expansion has

;; Start of basic block ( 2) -> 3
;; Pred edge  2 [100.0%]  (fallthru)
(note 6 4 7 3 [bb 3] NOTE_INSN_BASIC_BLOCK)

(debug_insn 7 6 8 3 (var_location:SI D#1 (mem/s/j:SI (plus:DI (subreg:DI (ashift
:SI (entry_value:SI (reg:SI 5 di [ i ]))
                    (const_int 2 [0x2])) 0)
            (symbol_ref:DI ("a")  <var_decl 0x7ffff0a83000 a>)) [0 a S4 A32])) x
.i:8 -1
     (nil))


Where should I look?

Thanks.

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]