static void
sh_nofp_frame_init_saved_regs (struct frame_info *fi)
{
- int where[NUM_REGS];
+ int where[NUM_REGS + NUM_PSEUDO_REGS];
int rn;
int have_fp = 0;
int depth;
fi->extra_info->leaf_function = 1;
fi->extra_info->f_offset = 0;
- for (rn = 0; rn < NUM_REGS; rn++)
+ for (rn = 0; rn < NUM_REGS + NUM_PSEUDO_REGS; rn++)
where[rn] = -1;
depth = 0;
/* Now we know how deep things are, we can work out their addresses */
- for (rn = 0; rn < NUM_REGS; rn++)
+ for (rn = 0; rn < NUM_REGS + NUM_PSEUDO_REGS; rn++)
{
if (where[rn] >= 0)
{
static void
sh_fp_frame_init_saved_regs (struct frame_info *fi)
{
- int where[NUM_REGS];
+ int where[NUM_REGS + NUM_PSEUDO_REGS];
int rn;
int have_fp = 0;
int depth;
fi->extra_info->leaf_function = 1;
fi->extra_info->f_offset = 0;
- for (rn = 0; rn < NUM_REGS; rn++)
+ for (rn = 0; rn < NUM_REGS + NUM_PSEUDO_REGS; rn++)
where[rn] = -1;
depth = 0;
/* Now we know how deep things are, we can work out their addresses */
- for (rn = 0; rn < NUM_REGS; rn++)
+ for (rn = 0; rn < NUM_REGS + NUM_PSEUDO_REGS; rn++)
{
if (where[rn] >= 0)
{
if (have_fp)
{
- fi->saved_regs[SP_REGNUM] = read_memory_integer (fi->saved_regs[FP_REGNUM], 4);
+ fi->saved_regs[SP_REGNUM] =
+ read_memory_integer (fi->saved_regs[FP_REGNUM], 4);
}
else
{
by assuming it's always FP. */
fi->frame = generic_read_register_dummy (fi->pc, fi->frame,
SP_REGNUM);
- fi->extra_info->return_pc = generic_read_register_dummy (fi->pc, fi->frame,
+ fi->extra_info->return_pc = generic_read_register_dummy (fi->pc,
+ fi->frame,
PC_REGNUM);
fi->extra_info->f_offset = -(CALL_DUMMY_LENGTH + 4);
fi->extra_info->leaf_function = 0;
else
{
FRAME_INIT_SAVED_REGS (fi);
- fi->extra_info->return_pc = sh_find_callers_reg (fi, gdbarch_tdep (current_gdbarch)->PR_REGNUM);
+ fi->extra_info->return_pc =
+ sh_find_callers_reg (fi, gdbarch_tdep (current_gdbarch)->PR_REGNUM);
}
}
FRAME_INIT_SAVED_REGS (frame);
/* Copy regs from where they were saved in the frame */
- for (regnum = 0; regnum < NUM_REGS; regnum++)
+ for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++)
if (frame->saved_regs[regnum])
- write_register (regnum, read_memory_integer (frame->saved_regs[regnum], 4));
+ write_register (regnum,
+ read_memory_integer (frame->saved_regs[regnum], 4));
write_register (PC_REGNUM, frame->extra_info->return_pc);
write_register (SP_REGNUM, fp + 4);