From 2de118d36ef736f2ff022dafc3fd7fc8de4407ce Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Fri, 1 Oct 2004 00:43:21 +0000 Subject: [PATCH] * mips-tdep.c (mips32_decode_reg_save): Remove, unused. (mips32_fetch_instruction): Remove, unused. --- gdb/ChangeLog | 5 +++++ gdb/mips-tdep.c | 47 ----------------------------------------------- 2 files changed, 5 insertions(+), 47 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ccac338..a2aeda2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 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 conditions that will always be true. diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index ba8722c..05f823e 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) -- 2.7.4