From cf2a44ca4934c5c5a91959240d48b37937730c4b Mon Sep 17 00:00:00 2001 From: "hp.com!davidm" Date: Fri, 20 May 2005 14:58:46 +0000 Subject: [PATCH] Use update_nat() instead of equivalent open code. (Logical change 1.301) --- src/ia64/Gregs.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/src/ia64/Gregs.c b/src/ia64/Gregs.c index d3b55e64..91019ec1 100644 --- a/src/ia64/Gregs.c +++ b/src/ia64/Gregs.c @@ -361,7 +361,7 @@ tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp, int write) { ia64_loc_t loc, reg_loc, nat_loc; - unw_word_t nat, mask, val; + unw_word_t mask, val; uint8_t nat_bitnr; 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) || IA64_IS_FP_LOC (loc))) - { - /* We're dealing with a NaT bit stored in memory. */ - mask = (unw_word_t) 1 << nat_bitnr; - - 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; - } + /* We're dealing with a NaT bit stored in memory. */ + return update_nat(c, loc, (unw_word_t) 1 << nat_bitnr, valp, write); break; case UNW_IA64_GR + 15 ... UNW_IA64_GR + 18: