#include "../opcodes/sh-opc.h"
+
+
/* Prologue looks like
[mov.l <regs>,@-r15]...
[sts.l pr,@-r15]
struct frame_info *fi;
struct frame_saved_regs *fsr;
{
- int where[16];
+ int where[NUM_REGS];
int rn;
int have_fp = 0;
int depth;
depth += -((char) (insn & 0xff));
insn = read_memory_integer (pc, 2);
}
- else break;
+ else
+ break;
}
/* Now we know how deep things are, we can work out their addresses */
if (have_fp)
{
-
fsr->regs[SP_REGNUM] = read_memory_integer (fsr->regs[FP_REGNUM], 4);
}
else
fsr->regs[SP_REGNUM] = fi->frame - 4;
}
- /* Remember the address of the frame pointer */
/* Work out the return pc - either from the saved pr or the pr
value */
set_current_frame (create_new_frame (read_register (FP_REGNUM),
read_pc ()));
}
+
+
+_initialize_sh_tdep ()
+{
+ extern int sim_memory_size;
+ /* FIXME, there should be a way to make a CORE_ADDR variable settable. */
+ add_show_from_set
+ (add_set_cmd ("memory_size", class_support, var_uinteger,
+ (char *) &sim_memory_size,
+ "Set simulated memory size of simulator target.", &setlist),
+ &showlist);
+}