Add support for SIGILL (reserved-instruction-exception).
[deliverable/binutils-gdb.git] / sim / d10v / gencode.c
index 71e92e8e746bb742fda8b2f029f2ec3cf9af0ab1..2d1269be996dda380744dce672b380c1180b6cca 100644 (file)
@@ -1,4 +1,10 @@
-#include "d10v_sim.h"
+#include "config.h"
+#include <stdio.h>
+#include <ctype.h>
+#include <limits.h>
+#include "ansidecl.h"
+#include "callback.h"
+#include "opcode/d10v.h"
 
 static void write_header PARAMS ((void));
 static void write_opcodes PARAMS ((void));
@@ -122,7 +128,7 @@ write_opcodes ()
              if ((flags & OPERAND_REG) || (flags & OPERAND_NUM) || (flags & OPERAND_ADDR))
                j++;
            }
-         printf ("%d,{",j);
+         printf ("%d,",j);
          
          j = 0;
          for (i=0;i<6;i++)
@@ -131,7 +137,9 @@ write_opcodes ()
              int shift = d10v_operands[opcode->operands[i]].shift;
              if ((flags & OPERAND_REG) || (flags & OPERAND_NUM)|| (flags & OPERAND_ADDR))
                {
-                 if (j)
+                 if (j == 0)
+                   printf ("{");
+                 else
                    printf (", ");
                  if ((flags & OPERAND_REG) && (opcode->format == LONG_L))
                    shift += 15;
@@ -139,8 +147,10 @@ write_opcodes ()
                  j = 1;
                }
            }
-         printf ("}},\n");
+         if (j)
+           printf ("}");
+         printf ("},\n");
        }
     }
-  printf ("{ 0,0,0,0,0,0,NULL,0,{ }},\n};\n");
+  printf ("{ 0,0,0,0,0,0,0,(void (*)(void))0,0,{0,0,0}},\n};\n");
 }
This page took 0.023371 seconds and 4 git commands to generate.