mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-18 12:24:38 +08:00
Stop GDB getting confused over r29 and FP. print $r29 and info
registers r29 gave different values.
This commit is contained in:
parent
fc23c14efc
commit
ea45efcfe3
@ -1,3 +1,17 @@
|
||||
Mon Apr 27 14:37:49 1998 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* config/v850/tm-v850.h (REGISTER_BYTE): FP_REGNUM and
|
||||
FP_RAW_REGNUM use the same register location.
|
||||
|
||||
* v850-tdep.c (v850_scan_prologue): Use FP_RAW_REGNUM instead of
|
||||
FP_REGNUM.
|
||||
(v850_frame_chain): Ditto.
|
||||
|
||||
* config/v850/tm-v850.h (REGISTER_NAMES): Add "fp".
|
||||
(NUM_REGS): Update.
|
||||
(FP_REGNUM): Update.
|
||||
(FP_RAW_REGNUM): Define.
|
||||
|
||||
Mon May 25 13:31:27 1998 Keith Seitz <keiths@cygnus.com>
|
||||
|
||||
* remote.c (remote_open_1): If an error occurs starting the remote,
|
||||
|
@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#define TARGET_BYTE_ORDER LITTLE_ENDIAN
|
||||
|
||||
#define NUM_REGS 65
|
||||
#define NUM_REGS 66
|
||||
|
||||
#define REGISTER_NAMES \
|
||||
{ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
|
||||
@ -32,7 +32,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
"sr8", "sr9", "sr10", "sr11", "sr12", "sr13", "sr14", "sr15", \
|
||||
"sr16", "sr17", "sr18", "sr19", "sr20", "sr21", "sr22", "sr23", \
|
||||
"sr24", "sr25", "sr26", "sr27", "sr28", "sr29", "sr30", "sr31", \
|
||||
"pc" }
|
||||
\
|
||||
"pc", "fp" }
|
||||
|
||||
#define REGISTER_BYTES (NUM_REGS * 4)
|
||||
|
||||
@ -51,13 +52,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
#define R12_REGNUM 12
|
||||
#define SAVE2_START_REGNUM 20
|
||||
#define SAVE2_END_REGNUM 29
|
||||
#define FP_REGNUM 29
|
||||
#define EP_REGNUM 30
|
||||
#define SAVE3_START_REGNUM 31
|
||||
#define SAVE3_END_REGNUM 31
|
||||
#define RP_REGNUM 31
|
||||
#define PS_REGNUM 37
|
||||
#define PC_REGNUM 64
|
||||
#define FP_REGNUM 65
|
||||
#define FP_RAW_REGNUM 29
|
||||
|
||||
#define TARGET_READ_FP() read_register (FP_RAW_REGNUM)
|
||||
#define TARGET_WRITE_FP(VAL) write_register (FP_REGNUM, (VAL))
|
||||
|
||||
#define REGISTER_VIRTUAL_TYPE(REG) builtin_type_int
|
||||
|
||||
|
@ -180,10 +180,10 @@ v850_scan_prologue (pc, pi)
|
||||
pi->frameoffset += ((insn & 0x1f) ^ 0x10) - 0x10;
|
||||
else if (insn == ((SP_REGNUM << 11) | 0x0600 | SP_REGNUM)) /* addi <imm>,sp,sp */
|
||||
pi->frameoffset += read_memory_integer (current_pc + 2, 2);
|
||||
else if (insn == ((FP_REGNUM << 11) | 0x0000 | SP_REGNUM)) /* mov sp,fp */
|
||||
else if (insn == ((FP_RAW_REGNUM << 11) | 0x0000 | SP_REGNUM)) /* mov sp,fp */
|
||||
{
|
||||
fp_used = 1;
|
||||
pi->framereg = FP_REGNUM;
|
||||
pi->framereg = FP_RAW_REGNUM;
|
||||
}
|
||||
|
||||
else if (insn == ((R12_REGNUM << 11) | 0x0640 | R0_REGNUM)) /* movhi hi(const),r0,r12 */
|
||||
@ -198,7 +198,7 @@ v850_scan_prologue (pc, pi)
|
||||
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] */
|
||||
&& (insn & 0x07ff) == (0x0760 | FP_RAW_REGNUM))) /* st.w <reg>,<offset>[fp] */
|
||||
&& pifsr
|
||||
&& (((reg = (insn >> 11) & 0x1f) >= SAVE1_START_REGNUM && reg <= SAVE1_END_REGNUM)
|
||||
|| (reg >= SAVE2_START_REGNUM && reg <= SAVE2_END_REGNUM)
|
||||
@ -324,7 +324,7 @@ v850_frame_chain (fi)
|
||||
/* First, find out who called us */
|
||||
callers_pc = FRAME_SAVED_PC (fi);
|
||||
/* If caller is a call-dummy, then our FP bears no relation to his FP! */
|
||||
fp = v850_find_callers_reg (fi, FP_REGNUM);
|
||||
fp = v850_find_callers_reg (fi, FP_RAW_REGNUM);
|
||||
if (PC_IN_CALL_DUMMY(callers_pc, fp, fp))
|
||||
return fp; /* caller is call-dummy: return oldest value of FP */
|
||||
|
||||
@ -337,7 +337,7 @@ v850_frame_chain (fi)
|
||||
if (pi.start_function)
|
||||
return 0; /* Don't chain beyond the start function */
|
||||
|
||||
if (pi.framereg == FP_REGNUM)
|
||||
if (pi.framereg == FP_RAW_REGNUM)
|
||||
return v850_find_callers_reg (fi, pi.framereg);
|
||||
|
||||
return fi->frame - pi.frameoffset;
|
||||
|
Loading…
Reference in New Issue
Block a user