summaryrefslogtreecommitdiff
path: root/src/tilegx
diff options
context:
space:
mode:
authorDoug Moore <dougm@rice.edu>2017-08-06 22:48:22 -0500
committerDave Watson <davejwatson@fb.com>2017-08-07 09:05:27 -0700
commit6150f2f426e6bd374d699f4afd608605181dec30 (patch)
treea51b417bc48839920395e6560e5fb039edf53f76 /src/tilegx
parente360c3ddbd1fa182b6e5f7bf22a7b9836a9c1cd4 (diff)
downloadlibunwind-6150f2f426e6bd374d699f4afd608605181dec30.tar.gz
Better imitate the choice of which register to identify as ip
for tilegx.
Diffstat (limited to 'src/tilegx')
-rw-r--r--src/tilegx/Gregs.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/tilegx/Gregs.c b/src/tilegx/Gregs.c
index 57c61256..565c6f44 100644
--- a/src/tilegx/Gregs.c
+++ b/src/tilegx/Gregs.c
@@ -53,8 +53,14 @@ tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
if (write)
{
- if (reg == UNW_TILEGX_PC)
- c->dwarf.ip = *valp; /* update the IP cache */
+ if (ci->dwarf.use_prev_instr == 0) {
+ if (reg == UNW_TILEGX_PC)
+ c->dwarf.ip = *valp; /* update the IP cache */
+ }
+ else {
+ if (reg == UNW_TILEGX_R55)
+ c->dwarf.ip = *valp; /* update the IP cache */
+ }
return dwarf_put (&c->dwarf, loc, *valp);
}
else