LONGEST offset;
int regnum, pushreg;
struct bound_minimal_symbol msymbol;
- unsigned prologs[32];
+ const int first_saved_reg = 13; /* The first saved register. */
+ /* PROLOGS are addresses of the subroutine prologs, PROLOGS[n]
+ is the address of __prolog_$rN.
+ __prolog_$rN pushes registers from 13 through n inclusive.
+ So for example CALL __prolog_$r15 is equivalent to:
+ PUSH $r13
+ PUSH $r14
+ PUSH $r15
+ Note that PROLOGS[0] through PROLOGS[12] are unused. */
+ CORE_ADDR prologs[32];
cache->saved_regs[FT32_PC_REGNUM] = 0;
cache->framesize = 0;
- for (regnum = 0; regnum < 32; regnum++)
+ for (regnum = first_saved_reg; regnum < 32; regnum++)
{
char prolog_symbol[32];
}
else if (FT32_IS_CALL (inst))
{
- for (regnum = 0; regnum < 32; regnum++)
+ for (regnum = first_saved_reg; regnum < 32; regnum++)
{
if ((4 * (inst & 0x3ffff)) == prologs[regnum])
{
- for (pushreg = 13; pushreg <= regnum; pushreg++)
+ for (pushreg = first_saved_reg; pushreg <= regnum;
+ pushreg++)
{
cache->framesize += 4;
cache->saved_regs[FT32_R0_REGNUM + pushreg] =