1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2025-01-09 19:03:43 +01:00

Use update_nat() instead of equivalent open code.

(Logical change 1.301)
This commit is contained in:
hp.com!davidm 2005-05-20 14:58:46 +00:00
parent 2bc0aee843
commit cf2a44ca49

View file

@ -361,7 +361,7 @@ tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
int write) int write)
{ {
ia64_loc_t loc, reg_loc, nat_loc; ia64_loc_t loc, reg_loc, nat_loc;
unw_word_t nat, mask, val; unw_word_t mask, val;
uint8_t nat_bitnr; uint8_t nat_bitnr;
int ret; int ret;
@ -498,25 +498,8 @@ tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
} }
if (!(IA64_IS_REG_LOC (loc) || IA64_IS_UC_LOC (loc) if (!(IA64_IS_REG_LOC (loc) || IA64_IS_UC_LOC (loc)
|| IA64_IS_FP_LOC (loc))) || IA64_IS_FP_LOC (loc)))
{
/* We're dealing with a NaT bit stored in memory. */ /* We're dealing with a NaT bit stored in memory. */
mask = (unw_word_t) 1 << nat_bitnr; return update_nat(c, loc, (unw_word_t) 1 << nat_bitnr, valp, write);
if ((ret = ia64_get (c, loc, &nat)) < 0)
return ret;
if (write)
{
if (*valp)
nat |= mask;
else
nat &= ~mask;
ret = ia64_put (c, loc, nat);
}
else
*valp = (nat & mask) != 0;
return ret;
}
break; break;
case UNW_IA64_GR + 15 ... UNW_IA64_GR + 18: case UNW_IA64_GR + 15 ... UNW_IA64_GR + 18: