sim: d10v: push down sd/cpu vars

By itself, this commit doesn't really change anything.  It lays the
groundwork for using the cpu state in follow up commits, both for
engine state and for cpu state.  Splitting things up this way so it
is easier to see how things have changed.
This commit is contained in:
Mike Frysinger
2015-11-15 02:57:42 -08:00
parent a572cc6fd4
commit 679546067e
6 changed files with 543 additions and 500 deletions

View File

@@ -30,7 +30,7 @@ write_header (void)
for (opcode = (struct d10v_opcode *)d10v_opcodes; opcode->name; opcode++)
if (opcode->format != OPCODE_FAKE)
printf("void OP_%lX (void);\t\t/* %s */\n", opcode->opcode, opcode->name);
printf ("void OP_%lX (SIM_DESC, SIM_CPU *);\t\t/* %s */\n", opcode->opcode, opcode->name);
}
@@ -43,7 +43,7 @@ write_template (void)
struct d10v_opcode *opcode;
int i,j;
printf ("#include \"d10v_sim.h\"\n");
printf ("#include \"sim-main.h\"\n");
printf ("#include \"simops.h\"\n");
for (opcode = (struct d10v_opcode *)d10v_opcodes; opcode->name; opcode++)
@@ -103,7 +103,7 @@ write_opcodes (void)
int i, j;
/* write out opcode table */
printf ("#include \"d10v_sim.h\"\n");
printf ("#include \"sim-main.h\"\n");
printf ("#include \"simops.h\"\n\n");
printf ("struct simops Simops[] = {\n");
@@ -150,5 +150,5 @@ write_opcodes (void)
printf ("},\n");
}
}
printf ("{ 0,0,0,0,0,0,0,(void (*)(void))0,0,{0,0,0}},\n};\n");
printf ("{ 0,0,0,0,0,0,0,(void (*)())0,0,{0,0,0}},\n};\n");
}