diff --git a/src/ia64/Gregs-ia64.c b/src/ia64/Gregs-ia64.c index 9f46393b..5d53256e 100644 --- a/src/ia64/Gregs-ia64.c +++ b/src/ia64/Gregs-ia64.c @@ -242,14 +242,6 @@ access_nat (struct cursor *c, unw_fpreg_t tmp; int ret; - if (IA64_IS_UC_LOC (reg_loc)) - { - if (write) - return ia64_put (c, nat_loc, *valp); - else - return ia64_get (c, nat_loc, valp); - } - if (IA64_IS_FP_LOC (reg_loc)) { /* NaT bit is saved as a NaTVal. This happens when a general @@ -295,6 +287,16 @@ access_nat (struct cursor *c, return ret; } + if ((IA64_IS_REG_LOC (nat_loc) + && (unsigned) (IA64_GET_REG (nat_loc) - UNW_IA64_NAT) < 128) + || IA64_IS_UC_LOC (reg_loc)) + { + if (write) + return ia64_put (c, nat_loc, *valp); + else + return ia64_get (c, nat_loc, valp); + } + if (IA64_IS_NULL_LOC (nat_loc)) { /* NaT bit is not saved. This happens if a general register is