aboutsummaryrefslogtreecommitdiff
path: root/opcodes/bfin-dis.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-10-15 20:44:46 +0000
committerMike Frysinger <vapier@gentoo.org>2010-10-15 20:44:46 +0000
commite1791cb8b5fa2b3688101452b11420908224f9bc (patch)
tree0ed20111dcc0b796c0bd3bdfc39966ee0758e534 /opcodes/bfin-dis.c
parent6ccfe592c6fa585688b4be29561e3eb762e77eec (diff)
downloadgdb-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/bfin-dis.c')
-rw-r--r--opcodes/bfin-dis.c16
1 files changed, 8 insertions, 8 deletions
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)");