1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-27 09:37:38 +01:00

(finish_prologue): use NELEMS() instead of corresponding open code.

(create_state_record_for): Turn on UNW_PI_FLAG_IA64_RBS_SWITCH when a procedure
	has saved all of ar.bsp, ar.bspstore, and ar.rnat.

(Logical change 1.40)
This commit is contained in:
mostang.com!davidm 2003-01-21 17:41:20 +00:00
parent 03db644db3
commit a393d743f0

View file

@ -1,5 +1,5 @@
/* libunwind - a platform-independent unwind library
Copyright (C) 2001-2002 Hewlett-Packard Co
Copyright (C) 2001-2003 Hewlett-Packard Co
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of libunwind.
@ -210,8 +210,7 @@ finish_prologue (struct ia64_state_record *sr)
/* First, resolve implicit register save locations (see Section
"11.4.2.3 Rules for Using Unwind Descriptors", rule 3). */
for (i = 0; i < (int) sizeof (unw.save_order) / sizeof (unw.save_order[0]);
++i)
for (i = 0; i < NELEMS (unw.save_order); ++i)
{
reg = sr->curr.reg + unw.save_order[i];
if (reg->where == IA64_WHERE_GR_SAVE)
@ -972,6 +971,17 @@ create_state_record_for (struct cursor *c, struct ia64_state_record *sr,
sr->curr.reg[IA64_REG_RP].val = sr->return_link_reg;
}
if ((sr->curr.reg[IA64_REG_BSP].when != IA64_WHEN_NEVER
&& sr->curr.reg[IA64_REG_BSP].when >= sr->when_target)
&& (sr->curr.reg[IA64_REG_BSPSTORE].when != IA64_WHEN_NEVER
&& sr->curr.reg[IA64_REG_BSPSTORE].when >= sr->when_target)
&& (sr->curr.reg[IA64_REG_RNAT].when != IA64_WHEN_NEVER
&& sr->curr.reg[IA64_REG_RNAT].when >= sr->when_target))
{
debug (10, "unwind: func 0x%lx may switch the register-backing-store\n",
c->pi.start_ip);
c->pi.flags |= UNW_PI_FLAG_IA64_RBS_SWITCH;
}
out:
#if UNW_DEBUG
if (unw.debug_level > 0)