- switch( datum_class )
- {
- case CLASS_X:
- sprintf( tmp_str, "0x%0x(R%d)", instr_data->address,
- instr_data->arg_reg[datum_value] );
- strcat( out_str, tmp_str );
- break;
- case CLASS_BA:
- sprintf( tmp_str, "r%d(#%x)", instr_data->arg_reg[datum_value],
- instr_data->displacement);
- strcat( out_str, tmp_str );
- break;
- case CLASS_BX:
- sprintf( tmp_str, "r%d(R%d)", instr_data->arg_reg[datum_value],
- instr_data->arg_reg[ARG_RX] );
- strcat( out_str, tmp_str );
- break;
- case CLASS_DISP:
- sprintf( tmp_str, "#0x%0x", instr_data->displacement );
- strcat( out_str, tmp_str );
- break;
- case CLASS_IMM:
- sprintf( tmp_str, "#0x%0x", instr_data->immediate );
- strcat( out_str, tmp_str );
- break;
- case CLASS_CC:
- sprintf( tmp_str, "%s", codes[instr_data->cond_code] );
- strcat( out_str, tmp_str );
- break;
- case CLASS_CTRL:
- sprintf( tmp_str, "0x%0x", instr_data->ctrl_code );
- strcat( out_str, tmp_str );
- break;
- case CLASS_DA:
- case CLASS_ADDRESS:
- sprintf( tmp_str, "#0x%0x", instr_data->address );
- strcat( out_str, tmp_str );
- break;
- case CLASS_IR:
- sprintf( tmp_str, "@R%d", instr_data->arg_reg[datum_value] );
- strcat( out_str, tmp_str );
- break;
- case CLASS_FLAGS:
- sprintf( tmp_str, "0x%0x", instr_data->flags );
- strcat( out_str, tmp_str );
- break;
- case CLASS_REG_BYTE:
- if( instr_data->arg_reg[datum_value] >= 0x8 )
- {
- sprintf( tmp_str, "rl%d",
- instr_data->arg_reg[datum_value] - 0x8 );
- }
- else
- {
- sprintf( tmp_str, "rh%d", instr_data->arg_reg[datum_value] );
- }
- strcat( out_str, tmp_str );
- break;
- case CLASS_REG_WORD:
- sprintf( tmp_str, "r%d", instr_data->arg_reg[datum_value] );
- strcat( out_str, tmp_str );
- break;
- case CLASS_REG_QUAD:
- sprintf( tmp_str, "rq%d", instr_data->arg_reg[datum_value] );
- strcat( out_str, tmp_str );
- break;
- case CLASS_REG_LONG:
- sprintf( tmp_str, "rr%d", instr_data->arg_reg[datum_value] );
- strcat( out_str, tmp_str );
- break;
- default:
- break;
- }
- }
+ switch (datum_class)
+ {
+ case CLASS_X:
+ sprintf (tmp_str, "0x%0lx(r%ld)", instr_data->address,
+ instr_data->arg_reg[datum_value]);
+ strcat (out_str, tmp_str);
+ break;
+ case CLASS_BA:
+ if (is_segmented)
+ sprintf (tmp_str, "rr%ld(#0x%lx)", instr_data->arg_reg[datum_value],
+ instr_data->immediate);
+ else
+ sprintf (tmp_str, "r%ld(#0x%lx)", instr_data->arg_reg[datum_value],
+ instr_data->immediate);
+ strcat (out_str, tmp_str);
+ break;
+ case CLASS_BX:
+ if (is_segmented)
+ sprintf (tmp_str, "rr%ld(r%ld)", instr_data->arg_reg[datum_value],
+ instr_data->arg_reg[ARG_RX]);
+ else
+ sprintf (tmp_str, "r%ld(r%ld)", instr_data->arg_reg[datum_value],
+ instr_data->arg_reg[ARG_RX]);
+ strcat (out_str, tmp_str);
+ break;
+ case CLASS_DISP:
+ sprintf (tmp_str, "0x%0lx", instr_data->displacement);
+ strcat (out_str, tmp_str);
+ break;
+ case CLASS_IMM:
+ if (datum_value == ARG_IMM2) /* True with EI/DI instructions only. */
+ {
+ print_intr (tmp_str, instr_data->interrupts);
+ strcat (out_str, tmp_str);
+ break;
+ }
+ sprintf (tmp_str, "#0x%0lx", instr_data->immediate);
+ strcat (out_str, tmp_str);
+ break;
+ case CLASS_CC:
+ sprintf (tmp_str, "%s", codes[instr_data->cond_code]);
+ strcat (out_str, tmp_str);
+ break;
+ case CLASS_CTRL:
+ sprintf (tmp_str, "%s", ctrl_names[instr_data->ctrl_code]);
+ strcat (out_str, tmp_str);
+ break;
+ case CLASS_DA:
+ case CLASS_ADDRESS:
+ sprintf (tmp_str, "0x%0lx", instr_data->address);
+ strcat (out_str, tmp_str);
+ break;
+ case CLASS_IR:
+ if (is_segmented)
+ sprintf (tmp_str, "@rr%ld", instr_data->arg_reg[datum_value]);
+ else
+ sprintf (tmp_str, "@r%ld", instr_data->arg_reg[datum_value]);
+ strcat (out_str, tmp_str);
+ break;
+ case CLASS_IRO:
+ sprintf (tmp_str, "@r%ld", instr_data->arg_reg[datum_value]);
+ strcat (out_str, tmp_str);
+ break;
+ case CLASS_FLAGS:
+ print_flags(tmp_str, instr_data->flags);
+ strcat (out_str, tmp_str);
+ break;
+ case CLASS_REG_BYTE:
+ if (instr_data->arg_reg[datum_value] >= 0x8)
+ sprintf (tmp_str, "rl%ld",
+ instr_data->arg_reg[datum_value] - 0x8);
+ else
+ sprintf (tmp_str, "rh%ld", instr_data->arg_reg[datum_value]);
+ strcat (out_str, tmp_str);
+ break;
+ case CLASS_REG_WORD:
+ sprintf (tmp_str, "r%ld", instr_data->arg_reg[datum_value]);
+ strcat (out_str, tmp_str);
+ break;
+ case CLASS_REG_QUAD:
+ sprintf (tmp_str, "rq%ld", instr_data->arg_reg[datum_value]);
+ strcat (out_str, tmp_str);
+ break;
+ case CLASS_REG_LONG:
+ sprintf (tmp_str, "rr%ld", instr_data->arg_reg[datum_value]);
+ strcat (out_str, tmp_str);
+ break;
+ case CLASS_PR:
+ if (is_segmented)
+ sprintf (tmp_str, "rr%ld", instr_data->arg_reg[datum_value]);
+ else
+ sprintf (tmp_str, "r%ld", instr_data->arg_reg[datum_value]);
+ strcat (out_str, tmp_str);
+ break;
+ default:
+ abort ();
+ break;
+ }
+ }