projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix crash when exiting TUI with gdb -tui
[deliverable/binutils-gdb.git]
/
sim
/
d10v
/
gencode.c
diff --git
a/sim/d10v/gencode.c
b/sim/d10v/gencode.c
index 2d1269be996dda380744dce672b380c1180b6cca..9f8a41c93694f1376c006fd6668be572d1d039c0 100644
(file)
--- a/
sim/d10v/gencode.c
+++ b/
sim/d10v/gencode.c
@@
-2,18
+2,16
@@
#include <stdio.h>
#include <ctype.h>
#include <limits.h>
#include <stdio.h>
#include <ctype.h>
#include <limits.h>
+#include <string.h>
#include "ansidecl.h"
#include "ansidecl.h"
-#include "callback.h"
#include "opcode/d10v.h"
#include "opcode/d10v.h"
-static void write_header
PARAMS ((void)
);
-static void write_opcodes
PARAMS ((void)
);
-static void write_template
PARAMS ((void)
);
+static void write_header
(void
);
+static void write_opcodes
(void
);
+static void write_template
(void
);
int
int
-main (argc, argv)
- int argc;
- char *argv[];
+main (int argc, char *argv[])
{
if ((argc > 1) && (strcmp (argv[1],"-h") == 0))
write_header();
{
if ((argc > 1) && (strcmp (argv[1],"-h") == 0))
write_header();
@@
-26,13
+24,13
@@
main (argc, argv)
static void
static void
-write_header ()
+write_header (
void
)
{
struct d10v_opcode *opcode;
for (opcode = (struct d10v_opcode *)d10v_opcodes; opcode->name; opcode++)
if (opcode->format != OPCODE_FAKE)
{
struct d10v_opcode *opcode;
for (opcode = (struct d10v_opcode *)d10v_opcodes; opcode->name; opcode++)
if (opcode->format != OPCODE_FAKE)
- printf
("void OP_%X PARAMS ((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);
}
}
@@
-40,19
+38,19
@@
write_header ()
/* to be filled out */
static void
/* to be filled out */
static void
-write_template ()
+write_template (
void
)
{
struct d10v_opcode *opcode;
int i,j;
{
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++)
{
if (opcode->format != OPCODE_FAKE)
{
printf ("#include \"simops.h\"\n");
for (opcode = (struct d10v_opcode *)d10v_opcodes; opcode->name; opcode++)
{
if (opcode->format != OPCODE_FAKE)
{
- printf("/* %s */\nvoid\nOP_%
X ()\n{\n",opcode->name,
opcode->opcode);
+ printf("/* %s */\nvoid\nOP_%
lX ()\n{\n", opcode->name,
opcode->opcode);
/* count operands */
j = 0;
/* count operands */
j = 0;
@@
-88,24
+86,24
@@
write_template ()
long Opcodes[512];
static int curop=0;
long Opcodes[512];
static int curop=0;
+static void
check_opcodes( long op)
{
int i;
for (i=0;i<curop;i++)
if (Opcodes[i] == op)
check_opcodes( long op)
{
int i;
for (i=0;i<curop;i++)
if (Opcodes[i] == op)
- fprintf(stderr,"DUPLICATE OPCODES: %
x\n",
op);
+ fprintf(stderr,"DUPLICATE OPCODES: %
lx\n",
op);
}
}
-
static void
static void
-write_opcodes ()
+write_opcodes (
void
)
{
struct d10v_opcode *opcode;
int i, j;
/* write out opcode table */
{
struct d10v_opcode *opcode;
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");
printf ("#include \"simops.h\"\n\n");
printf ("struct simops Simops[] = {\n");
@@
-113,7
+111,7
@@
write_opcodes ()
{
if (opcode->format != OPCODE_FAKE)
{
{
if (opcode->format != OPCODE_FAKE)
{
- printf (" { %ld,%d,%ld,%d,%d,%d,%d,OP_%
X,", opcode->opcode,
+ printf (" { %ld,%d,%ld,%d,%d,%d,%d,OP_%
lX,", opcode->opcode,
(opcode->format & LONG_OPCODE) ? 1 : 0, opcode->mask, opcode->format,
opcode->cycles, opcode->unit, opcode->exec_type, opcode->opcode);
(opcode->format & LONG_OPCODE) ? 1 : 0, opcode->mask, opcode->format,
opcode->cycles, opcode->unit, opcode->exec_type, opcode->opcode);
@@
-152,5
+150,5
@@
write_opcodes ()
printf ("},\n");
}
}
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");
}
}
This page took
0.024153 seconds
and
4
git commands to generate.