print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info)

{

  fprintf_ftype       fprintf = info->fprintf_func;

  void *              stream = info->stream;

  unsigned long       inst, prev_inst;

  struct op_code_struct * op, *pop;

  int                 immval = 0;

  bfd_boolean         immfound = FALSE;

  static bfd_vma prev_insn_addr = -1; /*init the prev insn addr */

  static int     prev_insn_vma = -1;  /*init the prev insn vma */

  int            curr_insn_vma = info->buffer_vma;



  info->bytes_per_chunk = 4;



  inst = read_insn_microblaze (memaddr, info, &op);

  if (inst == 0) {

    return -1;

  }

  

  if (prev_insn_vma == curr_insn_vma) {

  if (memaddr-(info->bytes_per_chunk) == prev_insn_addr) {

    prev_inst = read_insn_microblaze (prev_insn_addr, info, &pop);

    if (prev_inst == 0)

      return -1;

    if (pop->instr == imm) {

      immval = (get_int_field_imm(prev_inst) << 16) & 0xffff0000;

      immfound = TRUE;

    }

    else {

      immval = 0;

      immfound = FALSE;

    }

  }

  }

  /* make curr insn as prev insn */

  prev_insn_addr = memaddr;

  prev_insn_vma = curr_insn_vma;



  if (op->name == 0) {

    fprintf (stream, ".short 0x%04lx", inst);

  }

  else

    {

      fprintf (stream, "%s", op->name);

      

      switch (op->inst_type)

	{

  case INST_TYPE_RD_R1_R2:

     fprintf(stream, "\t%s, %s, %s", get_field_rd(inst), get_field_r1(inst), get_field_r2(inst));

     break;

        case INST_TYPE_RD_R1_IMM:

	  fprintf(stream, "\t%s, %s, %s", get_field_rd(inst), get_field_r1(inst), get_field_imm(inst));

	  if (info->print_address_func && get_int_field_r1(inst) == 0 && info->symbol_at_address_func) {

	    if (immfound)

	      immval |= (get_int_field_imm(inst) & 0x0000ffff);

	    else {

	      immval = get_int_field_imm(inst);

	      if (immval & 0x8000)

		immval |= 0xFFFF0000;

	    }

	    if (immval > 0 && info->symbol_at_address_func(immval, info)) {

	      fprintf (stream, "\t// ");

	      info->print_address_func (immval, info);

	    }

	  }

	  break;

	case INST_TYPE_RD_R1_IMM5:

	  fprintf(stream, "\t%s, %s, %s", get_field_rd(inst), get_field_r1(inst), get_field_imm5(inst));

	  break;

	case INST_TYPE_RD_RFSL:

	  fprintf(stream, "\t%s, %s", get_field_rd(inst), get_field_rfsl(inst));

	  break;

	case INST_TYPE_R1_RFSL:

	  fprintf(stream, "\t%s, %s", get_field_r1(inst), get_field_rfsl(inst));

	  break;

	case INST_TYPE_RD_SPECIAL:

	  fprintf(stream, "\t%s, %s", get_field_rd(inst), get_field_special(inst, op));

	  break;

	case INST_TYPE_SPECIAL_R1:

	  fprintf(stream, "\t%s, %s", get_field_special(inst, op), get_field_r1(inst));

	  break;

	case INST_TYPE_RD_R1:

	  fprintf(stream, "\t%s, %s", get_field_rd(inst), get_field_r1(inst));

	  break;

	case INST_TYPE_R1_R2:

	  fprintf(stream, "\t%s, %s", get_field_r1(inst), get_field_r2(inst));

	  break;

	case INST_TYPE_R1_IMM:

	  fprintf(stream, "\t%s, %s", get_field_r1(inst), get_field_imm(inst));

	  /* The non-pc relative instructions are returns, which shouldn't 

	     have a label printed */

	  if (info->print_address_func && op->inst_offset_type == INST_PC_OFFSET && info->symbol_at_address_func) {

	    if (immfound)

	      immval |= (get_int_field_imm(inst) & 0x0000ffff);

	    else {

	      immval = get_int_field_imm(inst);

	      if (immval & 0x8000)

		immval |= 0xFFFF0000;

	    }

	    immval += memaddr;

	    if (immval > 0 && info->symbol_at_address_func(immval, info)) {

	      fprintf (stream, "\t// ");

	      info->print_address_func (immval, info);

	    } else {

	      fprintf (stream, "\t\t// ");

	      fprintf (stream, "%x", immval);

	    }

	  }

	  break;

        case INST_TYPE_RD_IMM:

	  fprintf(stream, "\t%s, %s", get_field_rd(inst), get_field_imm(inst));

	  if (info->print_address_func && info->symbol_at_address_func) {

	    if (immfound)

	      immval |= (get_int_field_imm(inst) & 0x0000ffff);

	    else {

	      immval = get_int_field_imm(inst);

	      if (immval & 0x8000)

		immval |= 0xFFFF0000;

	    }

	    if (op->inst_offset_type == INST_PC_OFFSET)

	      immval += (int) memaddr;

	    if (info->symbol_at_address_func(immval, info)) {

	      fprintf (stream, "\t// ");

	      info->print_address_func (immval, info);

	    } 

	  }

	  break;

        case INST_TYPE_IMM:

	  fprintf(stream, "\t%s", get_field_imm(inst));

	  if (info->print_address_func && info->symbol_at_address_func && op->instr != imm) {

	    if (immfound)

	      immval |= (get_int_field_imm(inst) & 0x0000ffff);

	    else {

	      immval = get_int_field_imm(inst);

	      if (immval & 0x8000)

		immval |= 0xFFFF0000;

	    }

	    if (op->inst_offset_type == INST_PC_OFFSET)

	      immval += (int) memaddr;

	    if (immval > 0 && info->symbol_at_address_func(immval, info)) {

	      fprintf (stream, "\t// ");

	      info->print_address_func (immval, info);

	    } else if (op->inst_offset_type == INST_PC_OFFSET) {

	      fprintf (stream, "\t\t// ");

	      fprintf (stream, "%x", immval);

	    }

	  }

	  break;

        case INST_TYPE_RD_R2:

	  fprintf(stream, "\t%s, %s", get_field_rd(inst), get_field_r2(inst));

	  break;

  case INST_TYPE_R2:

     fprintf(stream, "\t%s", get_field_r2(inst));

     break;

  case INST_TYPE_R1:

     fprintf(stream, "\t%s", get_field_r1(inst));

     break;

  case INST_TYPE_RD_R1_SPECIAL:

     fprintf(stream, "\t%s, %s", get_field_rd(inst), get_field_r2(inst));

     break;

  case INST_TYPE_RD_IMM15:

     fprintf(stream, "\t%s, %s", get_field_rd(inst), get_field_imm15(inst));

     break;

     /* For tuqula instruction */

  case INST_TYPE_RD:

     fprintf(stream, "\t%s", get_field_rd(inst));

     break;

  case INST_TYPE_RFSL:

     fprintf(stream, "\t%s", get_field_rfsl(inst));

     break;

  default:

	  /* if the disassembler lags the instruction set */

	  fprintf (stream, "\tundecoded operands, inst is 0x%04lx", inst);

	  break;

	}

    }

  

  /* Say how many bytes we consumed? */

  return 4;

}

print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info)

{

  fprintf_ftype       fprintf = info->fprintf_func;

  void *              stream = info->stream;

  unsigned long       inst, prev_inst;

  struct op_code_struct * op, *pop;

  int                 immval = 0;

  bfd_boolean         immfound = FALSE;

  static bfd_vma prev_insn_addr = -1; 

  static int     prev_insn_vma = -1;  

  int            curr_insn_vma = info->buffer_vma;



  info->bytes_per_chunk = 4;



  inst = read_insn_microblaze (memaddr, info, &op);

  if (inst == 0) {

    return -1;

  }

  

  if (prev_insn_vma == curr_insn_vma) {

  if (memaddr-(info->bytes_per_chunk) == prev_insn_addr) {

    prev_inst = read_insn_microblaze (prev_insn_addr, info, &pop);

    if (prev_inst == 0)

      return -1;

    if (pop->instr == imm) {

      immval = (get_int_field_imm(prev_inst) << 16) & 0xffff0000;

      immfound = TRUE;

    }

    else {

      immval = 0;

      immfound = FALSE;

    }

  }

  }

  

  prev_insn_addr = memaddr;

  prev_insn_vma = curr_insn_vma;



  if (op->name == 0) {

    fprintf (stream, ".short 0x%04lx", inst);

  }

  else

    {

      fprintf (stream, "%s", op->name);

      

      switch (op->inst_type)

	{

  case INST_TYPE_RD_R1_R2:

     fprintf(stream, "\t%s, %s, %s", get_field_rd(inst), get_field_r1(inst), get_field_r2(inst));

     break;

        case INST_TYPE_RD_R1_IMM:

	  fprintf(stream, "\t%s, %s, %s", get_field_rd(inst), get_field_r1(inst), get_field_imm(inst));

	  if (info->print_address_func && get_int_field_r1(inst) == 0 && info->symbol_at_address_func) {

	    if (immfound)

	      immval |= (get_int_field_imm(inst) & 0x0000ffff);

	    else {

	      immval = get_int_field_imm(inst);

	      if (immval & 0x8000)

		immval |= 0xFFFF0000;

	    }

	    if (immval > 0 && info->symbol_at_address_func(immval, info)) {

	      fprintf (stream, "\t

	      info->print_address_func (immval, info);

	    }

	  }

	  break;

	case INST_TYPE_RD_R1_IMM5:

	  fprintf(stream, "\t%s, %s, %s", get_field_rd(inst), get_field_r1(inst), get_field_imm5(inst));

	  break;

	case INST_TYPE_RD_RFSL:

	  fprintf(stream, "\t%s, %s", get_field_rd(inst), get_field_rfsl(inst));

	  break;

	case INST_TYPE_R1_RFSL:

	  fprintf(stream, "\t%s, %s", get_field_r1(inst), get_field_rfsl(inst));

	  break;

	case INST_TYPE_RD_SPECIAL:

	  fprintf(stream, "\t%s, %s", get_field_rd(inst), get_field_special(inst, op));

	  break;

	case INST_TYPE_SPECIAL_R1:

	  fprintf(stream, "\t%s, %s", get_field_special(inst, op), get_field_r1(inst));

	  break;

	case INST_TYPE_RD_R1:

	  fprintf(stream, "\t%s, %s", get_field_rd(inst), get_field_r1(inst));

	  break;

	case INST_TYPE_R1_R2:

	  fprintf(stream, "\t%s, %s", get_field_r1(inst), get_field_r2(inst));

	  break;

	case INST_TYPE_R1_IMM:

	  fprintf(stream, "\t%s, %s", get_field_r1(inst), get_field_imm(inst));

	  



	  if (info->print_address_func && op->inst_offset_type == INST_PC_OFFSET && info->symbol_at_address_func) {

	    if (immfound)

	      immval |= (get_int_field_imm(inst) & 0x0000ffff);

	    else {

	      immval = get_int_field_imm(inst);

	      if (immval & 0x8000)

		immval |= 0xFFFF0000;

	    }

	    immval += memaddr;

	    if (immval > 0 && info->symbol_at_address_func(immval, info)) {

	      fprintf (stream, "\t

	      info->print_address_func (immval, info);

	    } else {

	      fprintf (stream, "\t\t

	      fprintf (stream, "%x", immval);

	    }

	  }

	  break;

        case INST_TYPE_RD_IMM:

	  fprintf(stream, "\t%s, %s", get_field_rd(inst), get_field_imm(inst));

	  if (info->print_address_func && info->symbol_at_address_func) {

	    if (immfound)

	      immval |= (get_int_field_imm(inst) & 0x0000ffff);

	    else {

	      immval = get_int_field_imm(inst);

	      if (immval & 0x8000)

		immval |= 0xFFFF0000;

	    }

	    if (op->inst_offset_type == INST_PC_OFFSET)

	      immval += (int) memaddr;

	    if (info->symbol_at_address_func(immval, info)) {

	      fprintf (stream, "\t

	      info->print_address_func (immval, info);

	    } 

	  }

	  break;

        case INST_TYPE_IMM:

	  fprintf(stream, "\t%s", get_field_imm(inst));

	  if (info->print_address_func && info->symbol_at_address_func && op->instr != imm) {

	    if (immfound)

	      immval |= (get_int_field_imm(inst) & 0x0000ffff);

	    else {

	      immval = get_int_field_imm(inst);

	      if (immval & 0x8000)

		immval |= 0xFFFF0000;

	    }

	    if (op->inst_offset_type == INST_PC_OFFSET)

	      immval += (int) memaddr;

	    if (immval > 0 && info->symbol_at_address_func(immval, info)) {

	      fprintf (stream, "\t

	      info->print_address_func (immval, info);

	    } else if (op->inst_offset_type == INST_PC_OFFSET) {

	      fprintf (stream, "\t\t

	      fprintf (stream, "%x", immval);

	    }

	  }

	  break;

        case INST_TYPE_RD_R2:

	  fprintf(stream, "\t%s, %s", get_field_rd(inst), get_field_r2(inst));

	  break;

  case INST_TYPE_R2:

     fprintf(stream, "\t%s", get_field_r2(inst));

     break;

  case INST_TYPE_R1:

     fprintf(stream, "\t%s", get_field_r1(inst));

     break;

  case INST_TYPE_RD_R1_SPECIAL:

     fprintf(stream, "\t%s, %s", get_field_rd(inst), get_field_r2(inst));

     break;

  case INST_TYPE_RD_IMM15:

     fprintf(stream, "\t%s, %s", get_field_rd(inst), get_field_imm15(inst));

     break;

     

  case INST_TYPE_RD:

     fprintf(stream, "\t%s", get_field_rd(inst));

     break;

  case INST_TYPE_RFSL:

     fprintf(stream, "\t%s", get_field_rfsl(inst));

     break;

  default:

	  

	  fprintf (stream, "\tundecoded operands, inst is 0x%04lx", inst);

	  break;

	}

    }

  

  

  return 4;

}

FUNC_0 (bfd_vma VAR_0, struct disassemble_info * VAR_1)

{

  fprintf_ftype       fprintf = VAR_1->fprintf_func;

  void *              VAR_2 = VAR_1->VAR_2;

  unsigned long       VAR_3, VAR_4;

  struct op_code_struct * VAR_5, *VAR_6;

  int                 VAR_7 = 0;

  bfd_boolean         immfound = FALSE;

  static bfd_vma VAR_8 = -1; 

  static int     VAR_9 = -1;  

  int            VAR_10 = VAR_1->buffer_vma;



  VAR_1->bytes_per_chunk = 4;



  VAR_3 = read_insn_microblaze (VAR_0, VAR_1, &VAR_5);

  if (VAR_3 == 0) {

    return -1;

  }

  

  if (VAR_9 == VAR_10) {

  if (VAR_0-(VAR_1->bytes_per_chunk) == VAR_8) {

    VAR_4 = read_insn_microblaze (VAR_8, VAR_1, &VAR_6);

    if (VAR_4 == 0)

      return -1;

    if (VAR_6->instr == imm) {

      VAR_7 = (get_int_field_imm(VAR_4) << 16) & 0xffff0000;

      immfound = TRUE;

    }

    else {

      VAR_7 = 0;

      immfound = FALSE;

    }

  }

  }

  

  VAR_8 = VAR_0;

  VAR_9 = VAR_10;



  if (VAR_5->name == 0) {

    fprintf (VAR_2, ".short 0x%04lx", VAR_3);

  }

  else

    {

      fprintf (VAR_2, "%s", VAR_5->name);

      

      switch (VAR_5->inst_type)

	{

  case INST_TYPE_RD_R1_R2:

     fprintf(VAR_2, "\t%s, %s, %s", get_field_rd(VAR_3), get_field_r1(VAR_3), get_field_r2(VAR_3));

     break;

        case INST_TYPE_RD_R1_IMM:

	  fprintf(VAR_2, "\t%s, %s, %s", get_field_rd(VAR_3), get_field_r1(VAR_3), get_field_imm(VAR_3));

	  if (VAR_1->print_address_func && get_int_field_r1(VAR_3) == 0 && VAR_1->symbol_at_address_func) {

	    if (immfound)

	      VAR_7 |= (get_int_field_imm(VAR_3) & 0x0000ffff);

	    else {

	      VAR_7 = get_int_field_imm(VAR_3);

	      if (VAR_7 & 0x8000)

		VAR_7 |= 0xFFFF0000;

	    }

	    if (VAR_7 > 0 && VAR_1->symbol_at_address_func(VAR_7, VAR_1)) {

	      fprintf (VAR_2, "\t

	      VAR_1->print_address_func (VAR_7, VAR_1);

	    }

	  }

	  break;

	case INST_TYPE_RD_R1_IMM5:

	  fprintf(VAR_2, "\t%s, %s, %s", get_field_rd(VAR_3), get_field_r1(VAR_3), get_field_imm5(VAR_3));

	  break;

	case INST_TYPE_RD_RFSL:

	  fprintf(VAR_2, "\t%s, %s", get_field_rd(VAR_3), get_field_rfsl(VAR_3));

	  break;

	case INST_TYPE_R1_RFSL:

	  fprintf(VAR_2, "\t%s, %s", get_field_r1(VAR_3), get_field_rfsl(VAR_3));

	  break;

	case INST_TYPE_RD_SPECIAL:

	  fprintf(VAR_2, "\t%s, %s", get_field_rd(VAR_3), get_field_special(VAR_3, VAR_5));

	  break;

	case INST_TYPE_SPECIAL_R1:

	  fprintf(VAR_2, "\t%s, %s", get_field_special(VAR_3, VAR_5), get_field_r1(VAR_3));

	  break;

	case INST_TYPE_RD_R1:

	  fprintf(VAR_2, "\t%s, %s", get_field_rd(VAR_3), get_field_r1(VAR_3));

	  break;

	case INST_TYPE_R1_R2:

	  fprintf(VAR_2, "\t%s, %s", get_field_r1(VAR_3), get_field_r2(VAR_3));

	  break;

	case INST_TYPE_R1_IMM:

	  fprintf(VAR_2, "\t%s, %s", get_field_r1(VAR_3), get_field_imm(VAR_3));

	  



	  if (VAR_1->print_address_func && VAR_5->inst_offset_type == INST_PC_OFFSET && VAR_1->symbol_at_address_func) {

	    if (immfound)

	      VAR_7 |= (get_int_field_imm(VAR_3) & 0x0000ffff);

	    else {

	      VAR_7 = get_int_field_imm(VAR_3);

	      if (VAR_7 & 0x8000)

		VAR_7 |= 0xFFFF0000;

	    }

	    VAR_7 += VAR_0;

	    if (VAR_7 > 0 && VAR_1->symbol_at_address_func(VAR_7, VAR_1)) {

	      fprintf (VAR_2, "\t

	      VAR_1->print_address_func (VAR_7, VAR_1);

	    } else {

	      fprintf (VAR_2, "\t\t

	      fprintf (VAR_2, "%x", VAR_7);

	    }

	  }

	  break;

        case INST_TYPE_RD_IMM:

	  fprintf(VAR_2, "\t%s, %s", get_field_rd(VAR_3), get_field_imm(VAR_3));

	  if (VAR_1->print_address_func && VAR_1->symbol_at_address_func) {

	    if (immfound)

	      VAR_7 |= (get_int_field_imm(VAR_3) & 0x0000ffff);

	    else {

	      VAR_7 = get_int_field_imm(VAR_3);

	      if (VAR_7 & 0x8000)

		VAR_7 |= 0xFFFF0000;

	    }

	    if (VAR_5->inst_offset_type == INST_PC_OFFSET)

	      VAR_7 += (int) VAR_0;

	    if (VAR_1->symbol_at_address_func(VAR_7, VAR_1)) {

	      fprintf (VAR_2, "\t

	      VAR_1->print_address_func (VAR_7, VAR_1);

	    } 

	  }

	  break;

        case INST_TYPE_IMM:

	  fprintf(VAR_2, "\t%s", get_field_imm(VAR_3));

	  if (VAR_1->print_address_func && VAR_1->symbol_at_address_func && VAR_5->instr != imm) {

	    if (immfound)

	      VAR_7 |= (get_int_field_imm(VAR_3) & 0x0000ffff);

	    else {

	      VAR_7 = get_int_field_imm(VAR_3);

	      if (VAR_7 & 0x8000)

		VAR_7 |= 0xFFFF0000;

	    }

	    if (VAR_5->inst_offset_type == INST_PC_OFFSET)

	      VAR_7 += (int) VAR_0;

	    if (VAR_7 > 0 && VAR_1->symbol_at_address_func(VAR_7, VAR_1)) {

	      fprintf (VAR_2, "\t

	      VAR_1->print_address_func (VAR_7, VAR_1);

	    } else if (VAR_5->inst_offset_type == INST_PC_OFFSET) {

	      fprintf (VAR_2, "\t\t

	      fprintf (VAR_2, "%x", VAR_7);

	    }

	  }

	  break;

        case INST_TYPE_RD_R2:

	  fprintf(VAR_2, "\t%s, %s", get_field_rd(VAR_3), get_field_r2(VAR_3));

	  break;

  case INST_TYPE_R2:

     fprintf(VAR_2, "\t%s", get_field_r2(VAR_3));

     break;

  case INST_TYPE_R1:

     fprintf(VAR_2, "\t%s", get_field_r1(VAR_3));

     break;

  case INST_TYPE_RD_R1_SPECIAL:

     fprintf(VAR_2, "\t%s, %s", get_field_rd(VAR_3), get_field_r2(VAR_3));

     break;

  case INST_TYPE_RD_IMM15:

     fprintf(VAR_2, "\t%s, %s", get_field_rd(VAR_3), get_field_imm15(VAR_3));

     break;

     

  case INST_TYPE_RD:

     fprintf(VAR_2, "\t%s", get_field_rd(VAR_3));

     break;

  case INST_TYPE_RFSL:

     fprintf(VAR_2, "\t%s", get_field_rfsl(VAR_3));

     break;

  default:

	  

	  fprintf (VAR_2, "\tundecoded operands, VAR_3 is 0x%04lx", VAR_3);

	  break;

	}

    }

  

  

  return 4;

}

FUNC_0 (bfd_vma VAR_0, struct disassemble_info * VAR_1)
{ fprintf_ftype       fprintf = VAR_1->fprintf_func; void *              VAR_2 = VAR_1->VAR_2; unsigned long       VAR_3, VAR_4; struct op_code_struct * VAR_5, *VAR_6; int                 VAR_7 = 0; bfd_boolean         immfound = FALSE; static bfd_vma VAR_8 = -1; static int     VAR_9 = -1; int            VAR_10 = VAR_1->buffer_vma; VAR_1->bytes_per_chunk = 4; VAR_3 = read_insn_microblaze (VAR_0, VAR_1, &VAR_5); if (VAR_3 == 0) { return -1; } if (VAR_9 == VAR_10) { if (VAR_0-(VAR_1->bytes_per_chunk) == VAR_8) { VAR_4 = read_insn_microblaze (VAR_8, VAR_1, &VAR_6); if (VAR_4 == 0)
return -1; if (VAR_6->instr == imm) { VAR_7 = (get_int_field_imm(VAR_4) << 16) & 0xffff0000; immfound = TRUE; } else { VAR_7 = 0; immfound = FALSE; } } } VAR_8 = VAR_0; VAR_9 = VAR_10; if (VAR_5->name == 0) { fprintf (VAR_2, ".short 0x%04lx", VAR_3); } else
{ fprintf (VAR_2, "%s", VAR_5->name); switch (VAR_5->inst_type)
{ case INST_TYPE_RD_R1_R2:
fprintf(VAR_2, "\t%s, %s, %s", get_field_rd(VAR_3), get_field_r1(VAR_3), get_field_r2(VAR_3)); break; case INST_TYPE_RD_R1_IMM:
fprintf(VAR_2, "\t%s, %s, %s", get_field_rd(VAR_3), get_field_r1(VAR_3), get_field_imm(VAR_3)); if (VAR_1->print_address_func && get_int_field_r1(VAR_3) == 0 && VAR_1->symbol_at_address_func) { if (immfound)
VAR_7 |= (get_int_field_imm(VAR_3) & 0x0000ffff); else { VAR_7 = get_int_field_imm(VAR_3); if (VAR_7 & 0x8000)
VAR_7 |= 0xFFFF0000; } if (VAR_7 > 0 && VAR_1->symbol_at_address_func(VAR_7, VAR_1)) { fprintf (VAR_2, "\t
VAR_1->print_address_func (VAR_7, VAR_1); } } break; case INST_TYPE_RD_R1_IMM5:
fprintf(VAR_2, "\t%s, %s, %s", get_field_rd(VAR_3), get_field_r1(VAR_3), get_field_imm5(VAR_3)); break; case INST_TYPE_RD_RFSL:
fprintf(VAR_2, "\t%s, %s", get_field_rd(VAR_3), get_field_rfsl(VAR_3)); break; case INST_TYPE_R1_RFSL:
fprintf(VAR_2, "\t%s, %s", get_field_r1(VAR_3), get_field_rfsl(VAR_3)); break; case INST_TYPE_RD_SPECIAL:
fprintf(VAR_2, "\t%s, %s", get_field_rd(VAR_3), get_field_special(VAR_3, VAR_5)); break; case INST_TYPE_SPECIAL_R1:
fprintf(VAR_2, "\t%s, %s", get_field_special(VAR_3, VAR_5), get_field_r1(VAR_3)); break; case INST_TYPE_RD_R1:
fprintf(VAR_2, "\t%s, %s", get_field_rd(VAR_3), get_field_r1(VAR_3)); break; case INST_TYPE_R1_R2:
fprintf(VAR_2, "\t%s, %s", get_field_r1(VAR_3), get_field_r2(VAR_3)); break; case INST_TYPE_R1_IMM:
fprintf(VAR_2, "\t%s, %s", get_field_r1(VAR_3), get_field_imm(VAR_3)); if (VAR_1->print_address_func && VAR_5->inst_offset_type == INST_PC_OFFSET && VAR_1->symbol_at_address_func) { if (immfound)
VAR_7 |= (get_int_field_imm(VAR_3) & 0x0000ffff); else { VAR_7 = get_int_field_imm(VAR_3); if (VAR_7 & 0x8000)
VAR_7 |= 0xFFFF0000; } VAR_7 += VAR_0; if (VAR_7 > 0 && VAR_1->symbol_at_address_func(VAR_7, VAR_1)) { fprintf (VAR_2, "\t
VAR_1->print_address_func (VAR_7, VAR_1); } else { fprintf (VAR_2, "\t\t
fprintf (VAR_2, "%x", VAR_7); } } break; case INST_TYPE_RD_IMM:
fprintf(VAR_2, "\t%s, %s", get_field_rd(VAR_3), get_field_imm(VAR_3)); if (VAR_1->print_address_func && VAR_1->symbol_at_address_func) { if (immfound)
VAR_7 |= (get_int_field_imm(VAR_3) & 0x0000ffff); else { VAR_7 = get_int_field_imm(VAR_3); if (VAR_7 & 0x8000)
VAR_7 |= 0xFFFF0000; } if (VAR_5->inst_offset_type == INST_PC_OFFSET)
VAR_7 += (int) VAR_0; if (VAR_1->symbol_at_address_func(VAR_7, VAR_1)) { fprintf (VAR_2, "\t
VAR_1->print_address_func (VAR_7, VAR_1); } } break; case INST_TYPE_IMM:
fprintf(VAR_2, "\t%s", get_field_imm(VAR_3)); if (VAR_1->print_address_func && VAR_1->symbol_at_address_func && VAR_5->instr != imm) { if (immfound)
VAR_7 |= (get_int_field_imm(VAR_3) & 0x0000ffff); else { VAR_7 = get_int_field_imm(VAR_3); if (VAR_7 & 0x8000)
VAR_7 |= 0xFFFF0000; } if (VAR_5->inst_offset_type == INST_PC_OFFSET)
VAR_7 += (int) VAR_0; if (VAR_7 > 0 && VAR_1->symbol_at_address_func(VAR_7, VAR_1)) { fprintf (VAR_2, "\t
VAR_1->print_address_func (VAR_7, VAR_1); } else if (VAR_5->inst_offset_type == INST_PC_OFFSET) { fprintf (VAR_2, "\t\t
fprintf (VAR_2, "%x", VAR_7); } } break; case INST_TYPE_RD_R2:
fprintf(VAR_2, "\t%s, %s", get_field_rd(VAR_3), get_field_r2(VAR_3)); break; case INST_TYPE_R2:
fprintf(VAR_2, "\t%s", get_field_r2(VAR_3)); break; case INST_TYPE_R1:
fprintf(VAR_2, "\t%s", get_field_r1(VAR_3)); break; case INST_TYPE_RD_R1_SPECIAL:
fprintf(VAR_2, "\t%s, %s", get_field_rd(VAR_3), get_field_r2(VAR_3)); break; case INST_TYPE_RD_IMM15:
fprintf(VAR_2, "\t%s, %s", get_field_rd(VAR_3), get_field_imm15(VAR_3)); break; case INST_TYPE_RD:
fprintf(VAR_2, "\t%s", get_field_rd(VAR_3)); break; case INST_TYPE_RFSL:
fprintf(VAR_2, "\t%s", get_field_rfsl(VAR_3)); break; default:
fprintf (VAR_2, "\tundecoded operands, VAR_3 is 0x%04lx", VAR_3); break; } } return 4; }