[testsuite] Unbuffer the output in gdb.base/multi-forks.c
[deliverable/binutils-gdb.git] / gdb / mips-tdep.c
index ca17864f68b5fa6be3dbcf57016d35af215939f8..63c1560f568c849838933bff8f154606cd2642e4 100644 (file)
@@ -1518,10 +1518,8 @@ mips_insn_size (enum mips_isa isa, ULONGEST insn)
   switch (isa)
     {
     case ISA_MICROMIPS:
-      if (micromips_op (insn) == 0x1f)
-        return 3 * MIPS_INSN16_SIZE;
-      else if (((micromips_op (insn) & 0x4) == 0x4)
-              || ((micromips_op (insn) & 0x7) == 0x0))
+      if ((micromips_op (insn) & 0x4) == 0x4
+         || (micromips_op (insn) & 0x7) == 0x0)
         return 2 * MIPS_INSN16_SIZE;
       else
         return MIPS_INSN16_SIZE;
@@ -1881,12 +1879,6 @@ micromips_next_pc (struct frame_info *frame, CORE_ADDR pc)
   pc += MIPS_INSN16_SIZE;
   switch (mips_insn_size (ISA_MICROMIPS, insn))
     {
-    /* 48-bit instructions.  */
-    case 3 * MIPS_INSN16_SIZE: /* POOL48A: bits 011111 */
-      /* No branch or jump instructions in this category.  */
-      pc += 2 * MIPS_INSN16_SIZE;
-      break;
-
     /* 32-bit instructions.  */
     case 2 * MIPS_INSN16_SIZE:
       insn <<= 16;
@@ -2993,13 +2985,6 @@ micromips_scan_prologue (struct gdbarch *gdbarch,
       loc += MIPS_INSN16_SIZE;
       switch (mips_insn_size (ISA_MICROMIPS, insn))
        {
-       /* 48-bit instructions.  */
-       case 3 * MIPS_INSN16_SIZE:
-         /* No prologue instructions in this category.  */
-         this_non_prologue_insn = 1;
-         loc += 2 * MIPS_INSN16_SIZE;
-         break;
-
        /* 32-bit instructions.  */
        case 2 * MIPS_INSN16_SIZE:
          insn <<= 16;
@@ -4041,11 +4026,6 @@ micromips_deal_with_atomic_sequence (struct gdbarch *gdbarch,
          its destination address.  */
       switch (mips_insn_size (ISA_MICROMIPS, insn))
        {
-       /* 48-bit instructions.  */
-       case 3 * MIPS_INSN16_SIZE: /* POOL48A: bits 011111 */
-         loc += 2 * MIPS_INSN16_SIZE;
-         break;
-
        /* 32-bit instructions.  */
        case 2 * MIPS_INSN16_SIZE:
          switch (micromips_op (insn))
@@ -6769,11 +6749,6 @@ micromips_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
       loc += MIPS_INSN16_SIZE;
       switch (mips_insn_size (ISA_MICROMIPS, insn))
        {
-       /* 48-bit instructions.  */
-       case 3 * MIPS_INSN16_SIZE:
-         /* No epilogue instructions in this category.  */
-         return 0;
-
        /* 32-bit instructions.  */
        case 2 * MIPS_INSN16_SIZE:
          insn <<= 16;
@@ -7122,9 +7097,7 @@ mips_breakpoint_from_pc (struct gdbarch *gdbarch,
          int size;
 
          insn = mips_fetch_instruction (gdbarch, ISA_MICROMIPS, pc, &err);
-         size = (err != 0
-                 ? 2 : (mips_insn_size (ISA_MICROMIPS, insn) == 2
-                        ? 2 : 4));
+         size = err ? 2 : mips_insn_size (ISA_MICROMIPS, insn);
          *pcptr = unmake_compact_addr (pc);
          *lenptr = size;
          return (size == 2) ? micromips16_big_breakpoint
@@ -7174,9 +7147,7 @@ mips_breakpoint_from_pc (struct gdbarch *gdbarch,
          int size;
 
          insn = mips_fetch_instruction (gdbarch, ISA_MICROMIPS, pc, &err);
-         size = (err != 0
-                 ? 2 : (mips_insn_size (ISA_MICROMIPS, insn) == 2
-                        ? 2 : 4));
+         size = err ? 2 : mips_insn_size (ISA_MICROMIPS, insn);
          *pcptr = unmake_compact_addr (pc);
          *lenptr = size;
          return (size == 2) ? micromips16_little_breakpoint
@@ -7376,12 +7347,14 @@ micromips_insn_at_pc_has_delay_slot (struct gdbarch *gdbarch,
 {
   ULONGEST insn;
   int status;
+  int size;
 
   insn = mips_fetch_instruction (gdbarch, ISA_MICROMIPS, addr, &status);
   if (status)
     return 0;
+  size = mips_insn_size (ISA_MICROMIPS, insn);
   insn <<= 16;
-  if (mips_insn_size (ISA_MICROMIPS, insn) == 2 * MIPS_INSN16_SIZE)
+  if (size == 2 * MIPS_INSN16_SIZE)
     {
       insn |= mips_fetch_instruction (gdbarch, ISA_MICROMIPS, addr, &status);
       if (status)
This page took 0.025075 seconds and 4 git commands to generate.