From: Joel Brobecker Date: Fri, 1 Oct 2004 00:43:21 +0000 (+0000) Subject: * mips-tdep.c (mips32_decode_reg_save): Remove, unused. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2de118d36ef736f2ff022dafc3fd7fc8de4407ce;p=binutils-gdb.git * mips-tdep.c (mips32_decode_reg_save): Remove, unused. (mips32_fetch_instruction): Remove, unused. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ccac3389c24..a2aeda23fca 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2004-09-30 Joel Brobecker + + * mips-tdep.c (mips32_decode_reg_save): Remove, unused. + (mips32_fetch_instruction): Remove, unused. + 2004-09-30 Joel Brobecker * mips-tdep.c (mips_insn16_frame_cache): Remove dead code or diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index ba8722cc967..05f823ee87a 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -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)