aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2004-10-01 00:20:13 +0000
committerJoel Brobecker <brobecker@gnat.com>2004-10-01 00:20:13 +0000
commita9fe69d1f7544cfb3754ec90391046229a6c2f6f (patch)
tree0cb95f163c0d6ba1830e798d631dd92dcddca69c /gdb
parent76a9da429a9ac1141a335a36ee49ba8576da408c (diff)
downloadgdb-a9fe69d1f7544cfb3754ec90391046229a6c2f6f.zip
gdb-a9fe69d1f7544cfb3754ec90391046229a6c2f6f.tar.gz
gdb-a9fe69d1f7544cfb3754ec90391046229a6c2f6f.tar.bz2
* mips-tdep.c (mips_insn16_frame_cache): Remove dead code or
conditions that will always be true.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/mips-tdep.c17
2 files changed, 8 insertions, 14 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8c8e5b2..ccac338 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-30 Joel Brobecker <brobecker@gnat.com>
+
+ * mips-tdep.c (mips_insn16_frame_cache): Remove dead code or
+ conditions that will always be true.
+
2004-09-30 Mark Kettenis <kettenis@gnu.org>
* vaxbsd-nat.c: Include "target,h" and "inf-ptrace.h".
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index e9dc623..ba8722c 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -1850,24 +1850,14 @@ mips_insn16_frame_cache (struct frame_info *next_frame, void **this_cache)
/* If the address is odd, assume this is MIPS16 code. */
addr = PROC_LOW_ADDR (proc_desc);
- mips16 = pc_is_mips16 (addr);
/* Scan through this function's instructions preceding the
current PC, and look for those that save registers. */
while (addr < frame_pc_unwind (next_frame))
{
- if (mips16)
- {
- mips16_decode_reg_save (mips16_fetch_instruction (addr),
- &gen_save_found);
- addr += MIPS16_INSTLEN;
- }
- else
- {
- mips32_decode_reg_save (mips32_fetch_instruction (addr),
- &gen_save_found, &float_save_found);
- addr += MIPS_INSTLEN;
- }
+ mips16_decode_reg_save (mips16_fetch_instruction (addr),
+ &gen_save_found);
+ addr += MIPS16_INSTLEN;
}
gen_mask = gen_save_found;
float_mask = float_save_found;
@@ -1891,7 +1881,6 @@ mips_insn16_frame_cache (struct frame_info *next_frame, void **this_cache)
order of that normally used by gcc. Therefore, we have to fetch
the first instruction of the function, and if it's an entry
instruction that saves $s0 or $s1, correct their saved addresses. */
- if (pc_is_mips16 (PROC_LOW_ADDR (proc_desc)))
{
ULONGEST inst = mips16_fetch_instruction (PROC_LOW_ADDR (proc_desc));
if ((inst & 0xf81f) == 0xe809 && (inst & 0x700) != 0x700)