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]

[Committed] fix z8k translate opcodes


Hi,

the description of the translate opcodes (trdb, trdrb, trib, trirb, trtdb, trtdrb, trtib, trtirb) was
wrong. The counter register is a word register, not a byte register.

Tristan, please consider the patch for inclusion into 2.23.1.

regards,
chris


gas/testsuite/ChangeLog:


2012-10-26 Christian Groessler <chris@groessler.org>

        * gas/z8k/z8k.exp: Run translate-ops test.
        * gas/z8k/translate-ops.s: New file.
        * gas/z8k/translate-ops.d: New file.

opcodes/ChangeLog:

2012-10-26 Christian Groessler <chris@groessler.org>

        * z8kgen.c (struct op): Fix encoding for translate opcodes (trdb,
        trdrb, trib, trirb, trtdb, trtdrb, trtib, trtirb).  Remove
        non-existing opcode trtrb.
        * z8k-opc.h: Regenerate.



Index: opcodes/z8kgen.c
===================================================================
RCS file: /cvs/src/src/opcodes/z8kgen.c,v
retrieving revision 1.20
diff -u -r1.20 z8kgen.c
--- opcodes/z8kgen.c    18 May 2012 05:31:15 -0000      1.20
+++ opcodes/z8kgen.c    26 Oct 2012 08:10:58 -0000
@@ -514,15 +514,14 @@
   {"-ZS---", 17, 32, "0101 1100 ddN0 1000 address_dst", "testl address_dst(rd)", 0},
   {"-ZS---", 13, 32, "1001 1100 dddd 1000", "testl rrd", 0},

-  {"-ZSV--", 25, 8, "1011 1000 ddN0 1000 0000 aaaa ssN0 0000", "trdb @rd,@rs,rba", 0},
-  {"-ZSV--", 25, 8, "1011 1000 ddN0 1100 0000 aaaa ssN0 0000", "trdrb @rd,@rs,rba", 0},
-  {"-ZSV--", 25, 8, "1011 1000 ddN0 0000 0000 rrrr ssN0 0000", "trib @rd,@rs,rbr", 0},
-  {"-ZSV--", 25, 8, "1011 1000 ddN0 0100 0000 rrrr ssN0 0000", "trirb @rd,@rs,rbr", 0},
-  {"-ZSV--", 25, 8, "1011 1000 aaN0 1010 0000 rrrr bbN0 0000", "trtdb @ra,@rb,rbr", 0},
-  {"-ZSV--", 25, 8, "1011 1000 aaN0 1110 0000 rrrr bbN0 1110", "trtdrb @ra,@rb,rbr", 0},
-  {"-ZSV--", 25, 8, "1011 1000 aaN0 0010 0000 rrrr bbN0 0000", "trtib @ra,@rb,rbr", 0},
-  {"-ZSV--", 25, 8, "1011 1000 aaN0 0110 0000 rrrr bbN0 1110", "trtirb @ra,@rb,rbr", 0},
-  {"-ZSV--", 25, 8, "1011 1000 aaN0 1010 0000 rrrr bbN0 0000", "trtrb @ra,@rb,rbr", 0},
+  {"---V--", 25, 8, "1011 1000 ddN0 1000 0000 rrrr ssN0 0000", "trdb @rd,@rs,rr", 0},
+  {"---V--", 25, 8, "1011 1000 ddN0 1100 0000 rrrr ssN0 0000", "trdrb @rd,@rs,rr", 0},
+  {"---V--", 25, 8, "1011 1000 ddN0 0000 0000 rrrr ssN0 0000", "trib @rd,@rs,rr", 0},
+  {"---V--", 25, 8, "1011 1000 ddN0 0100 0000 rrrr ssN0 0000", "trirb @rd,@rs,rr", 0},
+  {"-Z-V--", 25, 8, "1011 1000 aaN0 1010 0000 rrrr bbN0 0000", "trtdb @ra,@rb,rr", 0},
+  {"-Z-V--", 25, 8, "1011 1000 aaN0 1110 0000 rrrr bbN0 1110", "trtdrb @ra,@rb,rr", 0},
+  {"-Z-V--", 25, 8, "1011 1000 aaN0 0010 0000 rrrr bbN0 0000", "trtib @ra,@rb,rr", 0},
+  {"-Z-V--", 25, 8, "1011 1000 aaN0 0110 0000 rrrr bbN0 1110", "trtirb @ra,@rb,rr", 0},

   {"--S---", 11, 16, "0000 1101 ddN0 0110", "tset @rd", 0},
   {"--S---", 14, 16, "0100 1101 0000 0110 address_dst", "tset address_dst", 0},
Index: gas/testsuite/gas/z8k/z8k.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/z8k/z8k.exp,v
retrieving revision 1.5
diff -u -r1.5 z8k.exp
--- gas/testsuite/gas/z8k/z8k.exp       8 Dec 2006 21:56:03 -0000       1.5
+++ gas/testsuite/gas/z8k/z8k.exp       26 Oct 2012 08:10:57 -0000
@@ -49,4 +49,8 @@
 # labels starting with register names test

      run_dump_test "reglabel"
+
+# translate operations
+
+     run_dump_test "translate-ops"
 }
Index: gas/testsuite/gas/z8k/translate-ops.d
===================================================================
RCS file: gas/testsuite/gas/z8k/translate-ops.d
diff -N gas/testsuite/gas/z8k/translate-ops.d
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/z8k/translate-ops.d       26 Oct 2012 08:14:07 -0000      1.1
@@ -0,0 +1,17 @@
+#as:
+#objdump: -dr
+#name: translate-ops
+
+.*: +file format coff-z8k
+
+Disassembly of section \.text:
+
+0*00000000 <\.text>:
+   0:  b828 0640       trdb    @rr2,@rr4,r6
+   4:  b82c 0640       trdrb   @rr2,@rr4,r6
+   8:  b8c0 07a0       trib    @rr12,@rr10,r7
+   c:  b8c4 08a0       trirb   @rr12,@rr10,r8
+  10:  b86a 0a80       trtdb   @rr6,@rr8,r10
+  14:  b88e 034e       trtdrb  @rr8,@rr4,r3
+  18:  b8a2 0c20       trtib   @rr10,@rr2,r12
+  1c:  b826 064e       trtirb  @rr2,@rr4,r6
Index: gas/testsuite/gas/z8k/translate-ops.s
===================================================================
RCS file: gas/testsuite/gas/z8k/translate-ops.s
diff -N gas/testsuite/gas/z8k/translate-ops.s
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/z8k/translate-ops.s       26 Oct 2012 08:14:07 -0000      1.1
@@ -0,0 +1,15 @@
+! translate opcodes
+
+       .text
+       .z8001
+
+       trdb    @rr2,@rr4,r6
+       trdrb   @rr2,@rr4,r6
+       trib    @rr12,@rr10,r7
+       trirb   @rr12,@rr10,r8
+       trtdb   @rr6,@rr8,r10
+       trtdrb  @rr8,@rr4,r3
+       trtib   @rr10,@rr2,r12
+       trtirb  @rr2,@rr4,r6
+
+       .end




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