1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-12-23 03:53:43 +01:00

(common_init): Take initial sp and bsp values as arguments instead of

reading them via ia64_get().

(Logical change 1.296)
This commit is contained in:
hp.com!davidm 2005-05-20 12:47:59 +00:00
parent 6ad2531a11
commit 4992f1c936

View file

@ -26,7 +26,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include "unwind_i.h" #include "unwind_i.h"
static ALWAYS_INLINE int static ALWAYS_INLINE int
common_init (struct cursor *c) common_init (struct cursor *c, unw_word_t sp, unw_word_t bsp)
{ {
unw_word_t bspstore; unw_word_t bspstore;
uint8_t *natp; uint8_t *natp;
@ -37,7 +37,7 @@ common_init (struct cursor *c)
ia64_validate_cache (c->as, c->as_arg); ia64_validate_cache (c->as, c->as_arg);
c->cfm_loc = IA64_REG_LOC (c, UNW_IA64_CFM); c->cfm_loc = IA64_REG_LOC (c, UNW_IA64_CFM);
c->loc[IA64_REG_BSP] = IA64_REG_LOC (c, UNW_IA64_AR_BSP); c->loc[IA64_REG_BSP] = IA64_NULL_LOC;
c->loc[IA64_REG_BSPSTORE] = IA64_REG_LOC (c, UNW_IA64_AR_BSPSTORE); c->loc[IA64_REG_BSPSTORE] = IA64_REG_LOC (c, UNW_IA64_AR_BSPSTORE);
c->loc[IA64_REG_PFS] = IA64_REG_LOC (c, UNW_IA64_AR_PFS); c->loc[IA64_REG_PFS] = IA64_REG_LOC (c, UNW_IA64_AR_PFS);
c->loc[IA64_REG_RNAT] = IA64_REG_LOC (c, UNW_IA64_AR_RNAT); c->loc[IA64_REG_RNAT] = IA64_REG_LOC (c, UNW_IA64_AR_RNAT);
@ -98,15 +98,8 @@ common_init (struct cursor *c)
if (ret < 0) if (ret < 0)
return ret; return ret;
ret = ia64_get (c, IA64_REG_LOC (c, UNW_IA64_GR + 12), &c->sp); c->sp = c->psp = sp;
if (ret < 0) c->bsp = bsp;
return ret;
c->psp = c->sp;
ret = ia64_get (c, c->loc[IA64_REG_BSP], &c->bsp);
if (ret < 0)
return ret;
ret = ia64_get (c, c->loc[IA64_REG_BSPSTORE], &bspstore); ret = ia64_get (c, c->loc[IA64_REG_BSPSTORE], &bspstore);
if (ret < 0) if (ret < 0)