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]

[patch, moxie] Move NOP instruction


The following patch moves the moxie NOP instruction from opcode 0x00 to
0x0f.  As things stand after this change, all instructions starting in
0x00 and 0xff are illegal instructions.  This should help with
debugging.

I'm checking this change in.  The corresponding GDB simulator change has
already been committed.

AG


2010-02-03  Anthony Green  <green@moxielogic.com>

	* moxie-opc.c (moxie_form1_opc_info): Move "nop" from 0x00 to
	0x0f, and make 0x00 an illegal instruction.


Index: moxie-opc.c
===================================================================
RCS file: /cvs/src/src/opcodes/moxie-opc.c,v
retrieving revision 1.3
diff -u -r1.3 moxie-opc.c
--- moxie-opc.c	11 Jun 2009 11:27:58 -0000	1.3
+++ moxie-opc.c	3 Feb 2010 12:41:15 -0000
@@ -50,9 +50,12 @@
    oooo         - form 3 opcode number
    vvvvvvvvvv   - 10-bit immediate value.  */
 
+/* Note that currently two opcodes are reserved as bad, so that all
+   instructions starting with 0x00 and 0xff fault.  */
+
 const moxie_opc_info_t moxie_form1_opc_info[64] =
   {
-    { 0x00, MOXIE_F1_NARG, "nop" },
+    { 0x00, MOXIE_F1_NARG, "bad" },  // Reserved as bad.
     { 0x01, MOXIE_F1_A4,   "ldi.l" },
     { 0x02, MOXIE_F1_AB,   "mov" },
     { 0x03, MOXIE_F1_M,    "jsra" },
@@ -67,7 +70,7 @@
     { 0x0c, MOXIE_F1_ABi4, "ldo.l" },
     { 0x0d, MOXIE_F1_AiB4, "sto.l" },
     { 0x0e, MOXIE_F1_AB,   "cmp" },
-    { 0x0f, MOXIE_F1_NARG, "bad" },
+    { 0x0f, MOXIE_F1_NARG, "nop" },
     { 0x10, MOXIE_F1_NARG, "bad" },
     { 0x11, MOXIE_F1_NARG, "bad" },
     { 0x12, MOXIE_F1_NARG, "bad" },
@@ -143,7 +146,7 @@
     { 0x0c, MOXIE_F3_NARG, "bad" },
     { 0x0d, MOXIE_F3_NARG, "bad" },
     { 0x0e, MOXIE_F3_NARG, "bad" },
-    { 0x0f, MOXIE_F3_NARG, "bad" }
+    { 0x0f, MOXIE_F3_NARG, "bad" }  // Reserved as bad.
   };
 
 

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