From 8a1e0a2bcd7c2d5bdd7afe7e8e3641719d1914ad Mon Sep 17 00:00:00 2001 From: "hp.com!davidm" Date: Tue, 17 May 2005 21:28:19 +0000 Subject: [PATCH] Auto merged 2005/05/17 14:14:23-07:00 hp.com!davidm (tdep_access_reg): Access AR.EC via ec_loc instead of cfm_loc. (Logical change 1.293) --- src/ia64/Gregs.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/ia64/Gregs.c b/src/ia64/Gregs.c index a480f0b9..b0cf152b 100644 --- a/src/ia64/Gregs.c +++ b/src/ia64/Gregs.c @@ -323,8 +323,8 @@ 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; int ret, readonly = 0; - unw_word_t nat, mask; uint8_t nat_bitnr; switch (reg) @@ -418,15 +418,17 @@ tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp, return update_nat (c, nat_loc, mask, valp, write); case UNW_IA64_AR_EC: + if ((ret = ia64_get (c, c->ec_loc, &val)) < 0) + return ret; + if (write) { - c->cfm = ((c->cfm & ~((unw_word_t) 0x3f << 52)) - | ((*valp & 0x3f) << 52)); - return ia64_put (c, c->cfm_loc, c->cfm); + val = ((val & ~((unw_word_t) 0x3f << 52)) | ((*valp & 0x3f) << 52)); + return ia64_put (c, c->ec_loc, val); } else { - *valp = (c->cfm >> 52) & 0x3f; + *valp = (val >> 52) & 0x3f; return 0; }