libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libunwind] Re: Need help with unw_dyn_region_info_t


From: David Mosberger
Subject: [libunwind] Re: Need help with unw_dyn_region_info_t
Date: Fri, 27 Aug 2004 00:58:23 -0700

>>>>> On Thu, 26 Aug 2004 13:02:14 +0100, "Thomas Hallgren" <address@hidden> 
>>>>> said:

  Thomas> I'm trying to use _U_dyn_register for our generated code but
  Thomas> I have some problems understanding how to setup the
  Thomas> unw_dyn_op_t entries that describes my regions.

  Thomas> A prolog typically looks something like this:

  Thomas> alloc r35=ar.pfs,13,8,0
  Thomas> mov r36=b0

Something along the lines of this should do:

_U_dyn_op_save_reg(op0, _U_QP_TRUE, 0, UNW_IA64_AR_PFS, UNW_IA64_GR + 35);
_U_dyn_op_save_reg(op1, _U_QP_TRUE, 1, UNW_IA64_RP, UNW_IA64_GR + 36);

The "when" values of 0 and 1 are correct assuming the "alloc" is the
first instruction in the region and the "mov" is the second (always counting
3 instructions/bundle, regardless of the template).

  Thomas> and the corresponding epilog is:

  Thomas> mov.i ar.pfs=r35
  Thomas> mov.sptk b0=r36,0x8185d010
  Thomas> br.ret.sptk.few b0

These don't need any descriptors because the save-locations (r35 and
r36) remain valid throughout the rest of the procedure).

        --david


reply via email to

[Prev in Thread] Current Thread [Next in Thread]