This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

C6X: fix branch disassembly bug


I have committed this patch to fix a bug where the TI C6X disassembler 
failed to disassemble some valid instructions because of a typo in the 
table of opcode formats.

Index: gas/testsuite/ChangeLog
===================================================================
RCS file: /cvs/src/src/gas/testsuite/ChangeLog,v
retrieving revision 1.1658
diff -u -r1.1658 ChangeLog
--- gas/testsuite/ChangeLog	21 Apr 2010 18:09:52 -0000	1.1658
+++ gas/testsuite/ChangeLog	21 Apr 2010 18:56:02 -0000
@@ -1,3 +1,8 @@
+2010-04-21  Joseph Myers  <joseph@codesourcery.com>
+
+	* gas/tic6x/insns-c674x.s, gas/tic6x/insns-c674x.d: Also test
+	"b .S2 b3".
+
 2010-04-21  H.J. Lu  <hongjiu.lu@intel.com>
 
 	PR gas/11509
Index: gas/testsuite/gas/tic6x/insns-c674x.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/tic6x/insns-c674x.d,v
retrieving revision 1.1
diff -u -r1.1 insns-c674x.d
--- gas/testsuite/gas/tic6x/insns-c674x.d	25 Mar 2010 21:12:29 -0000	1.1
+++ gas/testsuite/gas/tic6x/insns-c674x.d	21 Apr 2010 18:56:02 -0000
@@ -176,6 +176,7 @@
 [0-9a-f]+[048c] <[^>]*> 007744b2[ \t]+avgu4 \.M2 b26,b29,b0
 [0-9a-f]+[048c] <[^>]*> a49874b2[ \t]+\[a2\] avgu4 \.M2X b3,a6,b9
 [0-9a-f]+[048c] <[^>]*> 00100362[ \t]+b \.S2 b4
+[0-9a-f]+[048c] <[^>]*> 000c0362[ \t]+b \.S2 b3
 [0-9a-f]+[048c] <[^>]*> 60101362[ \t]+\[b2\] b \.S2X a4
 [0-9a-f]+[048c] <[^>]*> b0100362[ \t]+\[!a2\] b \.S2 b4
 [0-9a-f]+[048c] <[^>]*> 00101362[ \t]+b \.S2X a4
@@ -1565,4 +1566,3 @@
 [0-9a-f]+[048c] <[^>]*> 74800042[ \t]+\[!b2\] mvk \.D2 0,b9
 [0-9a-f]+[048c] <[^>]*> c5000028[ \t]+\[a0\] mvk \.S1 0,a10
 [0-9a-f]+[048c] <[^>]*> 0580002a[ \t]+mvk \.S2 0,b11
-[0-9a-f]+[048c] <[^>]*> 00000000[ \t]+nop 1
Index: gas/testsuite/gas/tic6x/insns-c674x.s
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/tic6x/insns-c674x.s,v
retrieving revision 1.1
diff -u -r1.1 insns-c674x.s
--- gas/testsuite/gas/tic6x/insns-c674x.s	25 Mar 2010 21:12:29 -0000	1.1
+++ gas/testsuite/gas/tic6x/insns-c674x.s	21 Apr 2010 18:56:02 -0000
@@ -173,6 +173,7 @@
 	avgu4 .M2 b26,b29,b0
 	[a2] avgu4 .M2X b3,a6,b9
 	b .S2 b4
+	b .S2 b3
 	[b2] b .S2X a4
 	[!a2] call .S2 b4
 	call .S2X a4
Index: include/opcode/ChangeLog
===================================================================
RCS file: /cvs/src/src/include/opcode/ChangeLog,v
retrieving revision 1.404
diff -u -r1.404 ChangeLog
--- include/opcode/ChangeLog	15 Apr 2010 10:26:09 -0000	1.404
+++ include/opcode/ChangeLog	21 Apr 2010 18:56:02 -0000
@@ -1,3 +1,7 @@
+2010-04-21  Joseph Myers  <joseph@codesourcery.com>
+
+	* tic6x-insn-formats.h (s_branch): Correct typo in bitmask.
+
 2010-04-15  Nick Clifton  <nickc@redhat.com>
 
 	* alpha.h: Update copyright notice to use GPLv3.
Index: include/opcode/tic6x-insn-formats.h
===================================================================
RCS file: /cvs/src/src/include/opcode/tic6x-insn-formats.h,v
retrieving revision 1.1
diff -u -r1.1 tic6x-insn-formats.h
--- include/opcode/tic6x-insn-formats.h	25 Mar 2010 21:12:32 -0000	1.1
+++ include/opcode/tic6x-insn-formats.h	21 Apr 2010 18:56:02 -0000
@@ -124,7 +124,7 @@
     CFLDS3(FLD(s, 1, 1), FLD(src1, 13, 3), FLD(src2, 16, 12)))
 FMT(s_branch_nop_reg, 32, 0x800360, 0xf830ffc,
     CFLDS4(FLD(s, 1, 1), FLD(x, 12, 1), FLD(src1, 13, 3), FLD(src2, 18, 5)))
-FMT(s_branch, 32, 0x360, 0xf8feffc,
+FMT(s_branch, 32, 0x360, 0xf83effc,
     CFLDS3(FLD(s, 1, 1), FLD(x, 12, 1), FLD(src2, 18, 5)))
 FMT(s_mvk, 32, 0x28, 0x3c,
     CFLDS4(FLD(s, 1, 1), FLD(h, 6, 1), FLD(cst, 7, 16), FLD(dst, 23, 5)))

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]