|
|
|
@ -945,39 +945,6 @@ after_prologue (CORE_ADDR pc) |
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|
/* Decode a MIPS32 instruction that saves a register in the stack, and
|
|
|
|
set the appropriate bit in the general register mask or float register mask |
|
|
|
to indicate which register is saved. This is a helper function |
|
|
|
for mips_find_saved_regs. */ |
|
|
|
|
|
|
|
static void |
|
|
|
mips32_decode_reg_save (t_inst inst, unsigned long *gen_mask, |
|
|
|
unsigned long *float_mask) |
|
|
|
{ |
|
|
|
int reg; |
|
|
|
|
|
|
|
if ((inst & 0xffe00000) == 0xafa00000 /* sw reg,n($sp) */ |
|
|
|
|| (inst & 0xffe00000) == 0xafc00000 /* sw reg,n($r30) */ |
|
|
|
|| (inst & 0xffe00000) == 0xffa00000) /* sd reg,n($sp) */ |
|
|
|
{ |
|
|
|
/* It might be possible to use the instruction to
|
|
|
|
find the offset, rather than the code below which |
|
|
|
is based on things being in a certain order in the |
|
|
|
frame, but figuring out what the instruction's offset |
|
|
|
is relative to might be a little tricky. */ |
|
|
|
reg = (inst & 0x001f0000) >> 16; |
|
|
|
*gen_mask |= (1 << reg); |
|
|
|
} |
|
|
|
else if ((inst & 0xffe00000) == 0xe7a00000 /* swc1 freg,n($sp) */ |
|
|
|
|| (inst & 0xffe00000) == 0xe7c00000 /* swc1 freg,n($r30) */ |
|
|
|
|| (inst & 0xffe00000) == 0xf7a00000) /* sdc1 freg,n($sp) */ |
|
|
|
|
|
|
|
{ |
|
|
|
reg = ((inst & 0x001f0000) >> 16); |
|
|
|
*float_mask |= (1 << reg); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/* Decode a MIPS16 instruction that saves a register in the stack, and
|
|
|
|
set the appropriate bit in the general register or float register mask |
|
|
|
to indicate which register is saved. This is a helper function |
|
|
|
@ -1040,20 +1007,6 @@ mips16_fetch_instruction (CORE_ADDR addr) |
|
|
|
return extract_unsigned_integer (buf, instlen); |
|
|
|
} |
|
|
|
|
|
|
|
static ULONGEST |
|
|
|
mips32_fetch_instruction (CORE_ADDR addr) |
|
|
|
{ |
|
|
|
char buf[MIPS_INSTLEN]; |
|
|
|
int instlen; |
|
|
|
int status; |
|
|
|
instlen = MIPS_INSTLEN; |
|
|
|
status = deprecated_read_memory_nobpt (addr, buf, instlen); |
|
|
|
if (status) |
|
|
|
memory_error (status, addr); |
|
|
|
return extract_unsigned_integer (buf, instlen); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* These the fields of 32 bit mips instructions */ |
|
|
|
#define mips32_op(x) (x >> 26) |
|
|
|
#define itype_op(x) (x >> 26) |
|
|
|
|