diff options
author | Michael Meissner <gnu@the-meissners.org> | 1996-12-20 00:44:15 +0000 |
---|---|---|
committer | Michael Meissner <gnu@the-meissners.org> | 1996-12-20 00:44:15 +0000 |
commit | b71f8719a0d91752c377d8cf5fa91cd48ad7d425 (patch) | |
tree | 3a6f30bad416ed304b1d7a440a77dc7e59185e97 /gdb/v850-tdep.c | |
parent | f8dfe411d2233195ae71052e535c54dd7ecb370b (diff) | |
download | gdb-b71f8719a0d91752c377d8cf5fa91cd48ad7d425.zip gdb-b71f8719a0d91752c377d8cf5fa91cd48ad7d425.tar.gz gdb-b71f8719a0d91752c377d8cf5fa91cd48ad7d425.tar.bz2 |
Recognize -mep mode when used to store the stack frame
Diffstat (limited to 'gdb/v850-tdep.c')
-rw-r--r-- | gdb/v850-tdep.c | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c index f7149c4..ac3e13c 100644 --- a/gdb/v850-tdep.c +++ b/gdb/v850-tdep.c @@ -65,6 +65,7 @@ v850_scan_prologue (pc, pi) CORE_ADDR func_addr, prologue_end, current_pc; struct pifsr *pifsr; int fp_used; + int ep_used; /* First, figure out the bounds of the prologue so that we can limit the search to something reasonable. */ @@ -104,6 +105,7 @@ v850_scan_prologue (pc, pi) pi->frameoffset = 0; pi->framereg = SP_REGNUM; fp_used = 0; + ep_used = 0; pifsr = pi->pifsrs; for (current_pc = func_addr; current_pc < prologue_end; current_pc += 2) @@ -125,18 +127,30 @@ v850_scan_prologue (pc, pi) fp_used = 1; pi->framereg = FP_REGNUM; } - else if ((insn & 0x07ff) == (0x0760 | SP_REGNUM) /* st.w <reg>,<offset>[sp] */ - || (fp_used - && (insn & 0x07ff) == (0x0760 | FP_REGNUM))) /* st.w <reg>,<offset>[fp] */ - if (pifsr) - { - pifsr->framereg = insn & 0x1f; - pifsr->reg = (insn >> 11) & 0x1f; /* Extract <reg> */ - - pifsr->offset = read_memory_integer (current_pc + 2, 2) & ~1; + else if (insn == 0xf003) /* mov sp,ep */ + ep_used = 1; + else if (insn == 0xf001) /* mov r1,ep */ + ep_used = 0; + else if (((insn & 0x07ff) == (0x0760 | SP_REGNUM) /* st.w <reg>,<offset>[sp] */ + || (fp_used + && (insn & 0x07ff) == (0x0760 | FP_REGNUM))) /* st.w <reg>,<offset>[fp] */ + && pifsr) + { + pifsr->framereg = insn & 0x1f; + pifsr->reg = (insn >> 11) & 0x1f; /* Extract <reg> */ + pifsr->offset = read_memory_integer (current_pc + 2, 2) & ~1; + pifsr++; + } - pifsr++; - } + else if (ep_used /* sst.w <reg>,<offset>[ep] */ + && ((insn & 0x0781) == 0x0501) + && pifsr) + { + pifsr->framereg = 3; + pifsr->reg = (insn >> 11) & 0x1f; /* Extract <reg> */ + pifsr->offset = (insn & 0x007e) << 2; + pifsr++; + } if ((insn & 0x0780) >= 0x0600) /* Four byte instruction? */ current_pc += 2; |