sparc: reorder wr instructions in sparc_opcodes to fix diagnostics
authorJose E. Marchesi <jose.marchesi@oracle.com>
Thu, 24 Mar 2016 17:20:45 +0000 (10:20 -0700)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Thu, 24 Mar 2016 17:20:45 +0000 (10:20 -0700)
This patch changes the location of several variants of the `wr'
instruction in sparc_opcodes.  This is to get the assembler to emit the
right diagnostics when an invalid %asrN register is used in an
instruction.

opcodes/ChangeLog
opcodes/sparc-opc.c

index b0fec5e4a52a8eeaed98b11375e6a76d9491e2d0..3678971802f4814a9dc2ffc039cdbf2fed1dd4a8 100644 (file)
@@ -1,3 +1,8 @@
+2016-03-22  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+       * sparc-opc.c (sparc_opcodes): Reorder entries for `rd' in order
+       to get a proper diagnostic when an invalid ASR register is used.
+
 2016-03-22  Nick Clifton  <nickc@redhat.com>
 
        * configure: Regenerate.
index 7ad75e08319ced2f5c583592951a05c3236e6f6f..e681a2ff6806095faba98a1e7f130d19b289a9a7 100644 (file)
@@ -933,12 +933,6 @@ const struct sparc_opcode sparc_opcodes[] = {
 
 { "pause", F3(2, 0x30, 1)|RD(27)|RS1(0), F3(~2, ~0x30, ~1)|RD(~27)|RS1(~0), "i", 0, HWCAP_PAUSE, 0, v9b }, /* wr %g0,i,%pause */
 
-{ "rd",        F3(2, 0x28, 0),                 F3(~2, ~0x28, ~0)|SIMM13(~0),           "M,d", 0, 0, 0, v8 }, /* rd %asrX,r */
-{ "rd",        F3(2, 0x28, 0),                 F3(~2, ~0x28, ~0)|RS1_G0|SIMM13(~0),    "y,d", 0, 0, 0, v6 }, /* rd %y,r */
-{ "rd",        F3(2, 0x29, 0),                 F3(~2, ~0x29, ~0)|RS1_G0|SIMM13(~0),    "p,d", 0, 0, 0, v6notv9 }, /* rd %psr,r */
-{ "rd",        F3(2, 0x2a, 0),                 F3(~2, ~0x2a, ~0)|RS1_G0|SIMM13(~0),    "w,d", 0, 0, 0, v6notv9 }, /* rd %wim,r */
-{ "rd",        F3(2, 0x2b, 0),                 F3(~2, ~0x2b, ~0)|RS1_G0|SIMM13(~0),    "t,d", 0, 0, 0, v6notv9 }, /* rd %tbr,r */
-
 { "rd",        F3(2, 0x28, 0)|RS1(2),          F3(~2, ~0x28, ~0)|RS1(~2)|SIMM13(~0),   "E,d", 0, 0, 0, v9 }, /* rd %ccr,r */
 { "rd",        F3(2, 0x28, 0)|RS1(3),          F3(~2, ~0x28, ~0)|RS1(~3)|SIMM13(~0),   "o,d", 0, 0, 0, v9 }, /* rd %asi,r */
 { "rd",        F3(2, 0x28, 0)|RS1(4),          F3(~2, ~0x28, ~0)|RS1(~4)|SIMM13(~0),   "W,d", 0, 0, 0, v9 }, /* rd %tick,r */
@@ -957,6 +951,12 @@ const struct sparc_opcode sparc_opcodes[] = {
 { "rd",        F3(2, 0x28, 0)|RS1(26),         F3(~2, ~0x28, ~0)|RS1(~26)|SIMM13(~0),  "/,d", 0, HWCAP_CBCOND, 0, v9b }, /* rd %cfr,r */
 { "rd",        F3(2, 0x28, 0)|RS1(28),         F3(~2, ~0x28, ~0)|RS1(~28)|SIMM13(~0),  "/,d", 0, 0, HWCAP2_MWAIT, v9b }, /* rd %mwait,r */
 
+{ "rd",        F3(2, 0x28, 0),                 F3(~2, ~0x28, ~0)|SIMM13(~0),           "M,d", 0, 0, 0, v8 }, /* rd %asrX,r */
+{ "rd",        F3(2, 0x28, 0),                 F3(~2, ~0x28, ~0)|RS1_G0|SIMM13(~0),    "y,d", 0, 0, 0, v6 }, /* rd %y,r */
+{ "rd",        F3(2, 0x29, 0),                 F3(~2, ~0x29, ~0)|RS1_G0|SIMM13(~0),    "p,d", 0, 0, 0, v6notv9 }, /* rd %psr,r */
+{ "rd",        F3(2, 0x2a, 0),                 F3(~2, ~0x2a, ~0)|RS1_G0|SIMM13(~0),    "w,d", 0, 0, 0, v6notv9 }, /* rd %wim,r */
+{ "rd",        F3(2, 0x2b, 0),                 F3(~2, ~0x2b, ~0)|RS1_G0|SIMM13(~0),    "t,d", 0, 0, 0, v6notv9 }, /* rd %tbr,r */
+
 { "rdpr",      F3(2, 0x2a, 0),         F3(~2, ~0x2a, ~0)|SIMM13(~0),   "?,d", 0, 0, 0, v9 },   /* rdpr %priv,r */
 { "wrpr",      F3(2, 0x32, 0),         F3(~2, ~0x32, ~0),              "1,2,!", 0, 0, 0, v9 }, /* wrpr r1,r2,%priv */
 { "wrpr",      F3(2, 0x32, 0),         F3(~2, ~0x32, ~0)|SIMM13(~0),   "1,!", 0, 0, 0, v9 },   /* wrpr r1,%priv */
This page took 0.027839 seconds and 4 git commands to generate.