* mips-tdep.c (mips16_get_imm): Fix calculation of extended immediate.
authorMark Alexander <marka@cygnus>
Tue, 4 Feb 1997 17:18:56 +0000 (17:18 +0000)
committerMark Alexander <marka@cygnus>
Tue, 4 Feb 1997 17:18:56 +0000 (17:18 +0000)
(mips16_heuristic_proc_desc): Recognize jal(x) instruction.

gdb/ChangeLog
gdb/mips-tdep.c

index 07c5f9ad6d675b29c86cfbc4166ead97ec4cab6e..bea87530f50010b0cb3288ee4cbca976898e4c4f 100644 (file)
@@ -1,3 +1,8 @@
+Tue Feb 04 09:04:37 1997  Mark Alexander  <marka@cygnus.com>
+
+       * mips-tdep.c (mips16_get_imm): Fix calculation of extended immediate.
+       (mips16_heuristic_proc_desc): Recognize jal(x) instruction.
+
 Mon Feb 03 17:57:58 1997  Mark Alexander  <marka@cygnus.com>
 
        * mips-tdep.c (mips16_decode_reg_save): Distinguish between
index 75f10d1e5612f4aef68cc623c02a1d3c70af52c8..5369259a1a6ac1f42d1d85af7e4b5324dd0b9e8c 100644 (file)
@@ -651,7 +651,7 @@ mips16_get_imm (prev_inst, inst, nbits, scale, is_signed)
 
   if ((prev_inst & 0xf800) == 0xf000)  /* prev instruction was EXTEND? */
     {
-      offset = ((prev_inst & 0x1f) << 11) | (prev_inst & 0x7e00);
+      offset = ((prev_inst & 0x1f) << 11) | (prev_inst & 0x7e0);
       if (offset & 0x8000)             /* check for negative extend */
        offset = 0 - (0x10000 - (offset & 0xffff));
       return offset | (inst & 0x1f);
@@ -788,6 +788,8 @@ mips16_heuristic_proc_desc(start_pc, limit_pc, next_frame, sp)
              temp_saved_regs.regs[reg] = sp + offset;
            }
        }
+      else if ((inst & 0xf800) == 0x1800)      /* jal(x) */
+       cur_pc += MIPS16_INSTLEN;               /* 32-bit instruction */
     }
 }