From: Michael Meissner Date: Fri, 20 Dec 1996 00:44:15 +0000 (+0000) Subject: Recognize -mep mode when used to store the stack frame X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b71f8719a0d91752c377d8cf5fa91cd48ad7d425;p=binutils-gdb.git Recognize -mep mode when used to store the stack frame --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 252d145cba1..debf0cbe2a3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +start-sanitize-v850 +Thu Dec 19 19:42:44 1996 Michael Meissner + + * v850-tdep.c (v850_scan_prologue): Deal with -mep shorting + register saves by using the ep register. + +end-sanitize-v850 start-sanitize-m32r Thu Dec 19 15:57:16 1996 Doug Evans diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c index f7149c46d39..ac3e13caafa 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 ,[sp] */ - || (fp_used - && (insn & 0x07ff) == (0x0760 | FP_REGNUM))) /* st.w ,[fp] */ - if (pifsr) - { - pifsr->framereg = insn & 0x1f; - pifsr->reg = (insn >> 11) & 0x1f; /* Extract */ - - 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 ,[sp] */ + || (fp_used + && (insn & 0x07ff) == (0x0760 | FP_REGNUM))) /* st.w ,[fp] */ + && pifsr) + { + pifsr->framereg = insn & 0x1f; + pifsr->reg = (insn >> 11) & 0x1f; /* Extract */ + pifsr->offset = read_memory_integer (current_pc + 2, 2) & ~1; + pifsr++; + } - pifsr++; - } + else if (ep_used /* sst.w ,[ep] */ + && ((insn & 0x0781) == 0x0501) + && pifsr) + { + pifsr->framereg = 3; + pifsr->reg = (insn >> 11) & 0x1f; /* Extract */ + pifsr->offset = (insn & 0x007e) << 2; + pifsr++; + } if ((insn & 0x0780) >= 0x0600) /* Four byte instruction? */ current_pc += 2;