diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-10-15 20:44:46 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-10-15 20:44:46 +0000 |
commit | e1791cb8b5fa2b3688101452b11420908224f9bc (patch) | |
tree | 0ed20111dcc0b796c0bd3bdfc39966ee0758e534 /opcodes | |
parent | 6ccfe592c6fa585688b4be29561e3eb762e77eec (diff) | |
download | gdb-e1791cb8b5fa2b3688101452b11420908224f9bc.zip gdb-e1791cb8b5fa2b3688101452b11420908224f9bc.tar.gz gdb-e1791cb8b5fa2b3688101452b11420908224f9bc.tar.bz2 |
gas: blackfin: fix encoding of BYTEOP2M insn
The BYTEOP2M parser incorrectly calls BYTEOP2P to generate the opcode.
Once we've fixed that, it's easy to see that the disassembler also likes
to decode this insn incorrectly. So fix that and then add some tests.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/ChangeLog | 4 | ||||
-rw-r--r-- | opcodes/bfin-dis.c | 16 |
2 files changed, 12 insertions, 8 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 668eeb7..98dedc3 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,7 @@ +2010-10-15 Mike Frysinger <vapier@gentoo.org> + + * bfin-dis.c (decode_dsp32alu_0): Call imm5d() for BYTEOP2M. + 2010-10-14 H.J. Lu <hongjiu.lu@intel.com> * i386-opc.tbl: Remove CheckRegSize from movq. diff --git a/opcodes/bfin-dis.c b/opcodes/bfin-dis.c index 0aec087..ebacd46 100644 --- a/opcodes/bfin-dis.c +++ b/opcodes/bfin-dis.c @@ -3388,11 +3388,11 @@ decode_dsp32alu_0 (TIword iw0, TIword iw1, disassemble_info *outf) OUTS (outf, " = BYTEOP2M ("); OUTS (outf, dregs (src0 + 1)); OUTS (outf, ":"); - OUTS (outf, imm5 (src0)); + OUTS (outf, imm5d (src0)); OUTS (outf, ", "); OUTS (outf, dregs (src1 + 1)); OUTS (outf, ":"); - OUTS (outf, imm5 (src1)); + OUTS (outf, imm5d (src1)); OUTS (outf, ") (TH"); if (s == 1) OUTS (outf, ", R)"); @@ -3405,11 +3405,11 @@ decode_dsp32alu_0 (TIword iw0, TIword iw1, disassemble_info *outf) OUTS (outf, " = BYTEOP2M ("); OUTS (outf, dregs (src0 + 1)); OUTS (outf, ":"); - OUTS (outf, imm5 (src0)); + OUTS (outf, imm5d (src0)); OUTS (outf, ", "); OUTS (outf, dregs (src1 + 1)); OUTS (outf, ":"); - OUTS (outf, imm5 (src1)); + OUTS (outf, imm5d (src1)); OUTS (outf, ") (TL"); if (s == 1) OUTS (outf, ", R)"); @@ -3422,11 +3422,11 @@ decode_dsp32alu_0 (TIword iw0, TIword iw1, disassemble_info *outf) OUTS (outf, " = BYTEOP2M ("); OUTS (outf, dregs (src0 + 1)); OUTS (outf, ":"); - OUTS (outf, imm5 (src0)); + OUTS (outf, imm5d (src0)); OUTS (outf, ", "); OUTS (outf, dregs (src1 + 1)); OUTS (outf, ":"); - OUTS (outf, imm5 (src1)); + OUTS (outf, imm5d (src1)); OUTS (outf, ") (RNDH"); if (s == 1) OUTS (outf, ", R)"); @@ -3439,11 +3439,11 @@ decode_dsp32alu_0 (TIword iw0, TIword iw1, disassemble_info *outf) OUTS (outf, " = BYTEOP2M ("); OUTS (outf, dregs (src0 + 1)); OUTS (outf, ":"); - OUTS (outf, imm5 (src0)); + OUTS (outf, imm5d (src0)); OUTS (outf, ", "); OUTS (outf, dregs (src1 + 1)); OUTS (outf, ":"); - OUTS (outf, imm5 (src1)); + OUTS (outf, imm5d (src1)); OUTS (outf, ") (RNDL"); if (s == 1) OUTS (outf, ", R)"); |