]> rtime.felk.cvut.cz Git - fpga/lx-cpu1/binutils-tumbl.git/blobdiff - opcodes/microblaze-dis.c
MBTumbl: Halt has only range between 0 - 31
[fpga/lx-cpu1/binutils-tumbl.git] / opcodes / microblaze-dis.c
index eb215a4cd49fc7d220caa041c84bd91f78f40012..fa6e902996978c8587cb34b774fa6da636b8ae1e 100644 (file)
@@ -345,18 +345,24 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info)
            }
          break;
         case INST_TYPE_IMM:
+        case INST_TYPE_IMM5:
          print_func (stream, "\t%s", get_field_imm (inst));
          if (info->print_address_func && info->symbol_at_address_func
              && op->instr != imm)
            {
-             if (immfound)
+             if ((immfound) && (op->inst_type != INST_TYPE_IMM5))
                immval |= (get_int_field_imm (inst) & 0x0000ffff);
              else
                {
+          if (op->inst_type == INST_TYPE_IMM5)
+            immval = get_int_field_imm5 (inst);
+          else
+          {
                  immval = get_int_field_imm (inst);
                  if (immval & 0x8000)
-                   immval |= 0xFFFF0000;
+                         immval |= 0xFFFF0000;
                }
+    }
              if (op->inst_offset_type == INST_PC_OFFSET)
                immval += (int) memaddr;
              if (immval > 0 && info->symbol_at_address_func (immval, info))