aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorAlexis Deruell <alexis.deruelle@gmail.com>2017-01-27 12:00:55 +0000
committerNick Clifton <nickc@redhat.com>2017-01-27 12:00:55 +0000
commit8ec5cf65a8213988a9f861e6a94d12311e9b04c3 (patch)
treee7916fdb1c23bb7e0e03f533812e0a7b41af99f2 /opcodes
parent0348d4be1676171b00c3609bea1e01c18af4ea98 (diff)
downloadgdb-8ec5cf65a8213988a9f861e6a94d12311e9b04c3.zip
gdb-8ec5cf65a8213988a9f861e6a94d12311e9b04c3.tar.gz
gdb-8ec5cf65a8213988a9f861e6a94d12311e9b04c3.tar.bz2
Fix disassembling of TIC6X parallel instructions where the previous fetch packet ended with a 32-bit insn.
PR 21056 opcodes * tic6x-dis.c (print_insn_tic6x): Correct displaying of parallel instructions when the previous fetch packet ends with a 32-bit instruction. gas * testsuite/gas/tic6x/insns16-parallel.s: New test case. * testsuite/gas/tic6x/insns16-parallel.d: New test driver.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog7
-rw-r--r--opcodes/tic6x-dis.c13
2 files changed, 18 insertions, 2 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 270bcda..3070ad5 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,10 @@
+2017-01-27 Alexis Deruell <alexis.deruelle@gmail.com>
+
+ PR 21056
+ * tic6x-dis.c (print_insn_tic6x): Correct displaying of parallel
+ instructions when the previous fetch packet ends with a 32-bit
+ instruction.
+
2017-01-24 Dimitar Dimitrov <dimitar@dinux.eu>
* pru-opc.c: Remove vague reference to a future GDB port.
diff --git a/opcodes/tic6x-dis.c b/opcodes/tic6x-dis.c
index d94d662..1a6f575 100644
--- a/opcodes/tic6x-dis.c
+++ b/opcodes/tic6x-dis.c
@@ -510,8 +510,17 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info)
prev_header_based
= tic6x_check_fetch_packet_header (fp_prev, &prev_header, info);
- if (prev_header_based && prev_header.word_compact[6])
- p_bit = prev_header.p_bits[13];
+ if (prev_header_based)
+ {
+ if (prev_header.word_compact[6])
+ p_bit = prev_header.p_bits[13];
+ else
+ {
+ unsigned int prev_opcode = tic6x_extract_32 (fp_prev + 24,
+ info);
+ p_bit = (prev_opcode & 0x1) ? TRUE : FALSE;
+ }
+ }
else
{
unsigned int prev_opcode = tic6x_extract_32 (fp_prev + 28,