diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-11-15 02:57:42 -0800 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-11-15 21:46:13 -0500 |
commit | 267b3b8e068f5043419991175bdbc56eb7a575be (patch) | |
tree | 95ccaa415abddee402e0cfffd1710e2380f26597 /sim/cr16/gencode.c | |
parent | 137fbfd2818b5d1443f5f628e28b55b4e23037d1 (diff) | |
download | gdb-267b3b8e068f5043419991175bdbc56eb7a575be.zip gdb-267b3b8e068f5043419991175bdbc56eb7a575be.tar.gz gdb-267b3b8e068f5043419991175bdbc56eb7a575be.tar.bz2 |
sim: cr16: 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.
Diffstat (limited to 'sim/cr16/gencode.c')
-rw-r--r-- | sim/cr16/gencode.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sim/cr16/gencode.c b/sim/cr16/gencode.c index 3065ebf..6d56908 100644 --- a/sim/cr16/gencode.c +++ b/sim/cr16/gencode.c @@ -53,8 +53,9 @@ write_header (void) /* Loop over instruction table until a full match is found. */ for ( ; i < NUMOPCODES; i++) - printf("void OP_%lX_%X (void);\t\t/* %s */\n", cr16_instruction[i].match, - (32 - cr16_instruction[i].match_bits), cr16_instruction[i].mnemonic); + printf("void OP_%lX_%X (SIM_DESC, SIM_CPU *);\t\t/* %s */\n", + cr16_instruction[i].match, (32 - cr16_instruction[i].match_bits), + cr16_instruction[i].mnemonic); } @@ -66,15 +67,16 @@ write_template (void) { int i = 0,j, k, flags; - printf ("#include \"cr16_sim.h\"\n"); + printf ("#include \"sim-main.h\"\n"); printf ("#include \"simops.h\"\n\n"); for ( ; i < NUMOPCODES; i++) { if (cr16_instruction[i].size != 0) { - printf("/* %s */\nvoid\nOP_%lX_%X ()\n{\n", cr16_instruction[i].mnemonic, - cr16_instruction[i].match, (32 - cr16_instruction[i].match_bits)); + printf ("/* %s */\nvoid\nOP_%lX_%X (SIM_DESC sd, SIM_CPU *cpu)\n{\n", + cr16_instruction[i].mnemonic, cr16_instruction[i].match, + (32 - cr16_instruction[i].match_bits)); /* count operands. */ j = 0; @@ -129,7 +131,7 @@ write_opcodes (void) int i = 0, j = 0, k; /* write out opcode table. */ - printf ("#include \"cr16_sim.h\"\n"); + printf ("#include \"sim-main.h\"\n"); printf ("#include \"simops.h\"\n\n"); printf ("struct simops Simops[] = {\n"); |