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: [CFT] re-organize var-tracking frame_base


On Mon, Aug 22, 2005 at 12:46:40AM -0700, Richard Henderson wrote:
> On Mon, Aug 22, 2005 at 03:43:12AM -0400, Jakub Jelinek wrote:
> > Guess we should special case a one entry location list for DW_AT_frame_base
> > that covers the whole function and in that case instead put it inline.
> 
> What options did you use for this?  I got a 2 entry list in 
> my testing...

Oops, sorry, posted wrong part of the .s.  The source is:

int
foo(int x, int y)
{
  char s[128];
  bar(s);
  return x + y;
}

main(){}

bar(char *s)
{
  memset(s,'a',128);
  return s[0];
}

./cc1 -O2 -g -dA R.c

For foo and bar the frame_base is the expected 2 entry location list, e.g.:
.LLLST3:
        .uaxword        .LLFB2-.LLtext0 ! Location list begin address (*.LLLST3)
        .uaxword        .LLCFI1-.LLtext0        ! Location list end address (*.LLLST3)
        .uahalf 0x3     ! Location expression size
        .byte   0x7e    ! DW_OP_breg14
        .byte   0xff,0xf        ! sleb128 2047
        .uaxword        .LLCFI1-.LLtext0        ! Location list begin address (*.LLLST3)
        .uaxword        .LLFE2-.LLtext0 ! Location list end address (*.LLLST3)
        .uahalf 0x3     ! Location expression size
        .byte   0x8e    ! DW_OP_breg30
        .byte   0xff,0xf        ! sleb128 2047
        .uaxword        0x0     ! Location list terminator begin (*.LLLST3)
        .uaxword        0x0     ! Location list terminator end (*.LLLST3)

but for main which has no FDE instructions there is a one entry:
.LLLST0:
        .uaxword        .LLFB3-.LLtext0 ! Location list begin address (*.LLLST0)
        .uaxword        .LLFE3-.LLtext0 ! Location list end address (*.LLLST0)
        .uahalf 0x3     ! Location expression size
        .byte   0x7e    ! DW_OP_breg14
        .byte   0xff,0xf        ! sleb128 2047
        .uaxword        0x0     ! Location list terminator begin (*.LLLST0)
        .uaxword        0x0     ! Location list terminator end (*.LLLST0)
which ought to be an inline DW_OP_breg14 (or DW_OP_reg14?), rather than
location list.

	Jakub


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