opcodes/gas: blackfin: support OUTC debug insn

The disassembler has partial (but incomplete/broken) support already for
the pseudo debug insn OUTC, so let's fix it up and finish it.  And now
that the disassembler can handle it, make sure our assembler can output
it too.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
Mike Frysinger
2010-09-22 20:59:00 +00:00
parent 59a82d2333
commit 73a63ccf2f
8 changed files with 88 additions and 4 deletions

View File

@@ -4550,7 +4550,7 @@ decode_pseudoDEBUG_0 (TIword iw0, disassemble_info *outf)
else if (grp == 0 && fn == 2)
{
OUTS (outf, "OUTC");
OUTS (outf, "OUTC ");
OUTS (outf, dregs (reg));
}
else if (fn == 0)
@@ -4569,6 +4569,21 @@ decode_pseudoDEBUG_0 (TIword iw0, disassemble_info *outf)
return 2;
}
static int
decode_pseudoOChar_0 (TIword iw0, disassemble_info *outf)
{
/* psedoOChar
+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
| 1 | 1 | 1 | 1 | 1 | 0 | 0 | 1 |.ch............................|
+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+ */
int ch = ((iw0 >> PseudoChr_ch_bits) & PseudoChr_ch_mask);
OUTS (outf, "OUTC ");
OUTS (outf, uimm8 (ch));
return 2;
}
static int
decode_pseudodbg_assert_0 (TIword iw0, TIword iw1, disassemble_info *outf)
{
@@ -4713,10 +4728,8 @@ _print_insn_bfin (bfd_vma pc, disassemble_info *outf)
rv = decode_dsp32shiftimm_0 (iw0, iw1, outf);
else if ((iw0 & 0xff00) == 0xf800)
rv = decode_pseudoDEBUG_0 (iw0, outf);
#if 0
else if ((iw0 & 0xFF00) == 0xF900)
rv = decode_pseudoOChar_0 (iw0, iw1, pc, outf);
#endif
rv = decode_pseudoOChar_0 (iw0, outf);
else if ((iw0 & 0xFF00) == 0xf000 && (iw1 & 0x0000) == 0x0000)
rv = decode_pseudodbg_assert_0 (iw0, iw1, outf);