diff options
Diffstat (limited to 'opcodes/z8kgen.c')
-rw-r--r-- | opcodes/z8kgen.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/opcodes/z8kgen.c b/opcodes/z8kgen.c index 9fb7de2..2012bc4 100644 --- a/opcodes/z8kgen.c +++ b/opcodes/z8kgen.c @@ -904,14 +904,14 @@ static void internal (void) { int c = count (); - struct op *new = xmalloc (sizeof (struct op) * c); + struct op *new_op = xmalloc (sizeof (struct op) * c); struct op *p = opt; - memcpy (new, p, c * sizeof (struct op)); + memcpy (new_op, p, c * sizeof (struct op)); /* Sort all names in table alphabetically. */ - qsort (new, c, sizeof (struct op), (int (*)(const void *, const void *))func); + qsort (new_op, c, sizeof (struct op), (int (*)(const void *, const void *))func); - p = new; + p = new_op; while (p->flags && p->flags[0] != '*') { /* If there are any @rs, sub the ssss into a ssn0, (rs), (ssn0). */ @@ -960,12 +960,12 @@ gas (void) struct op *p = opt; int idx = -1; char *oldname = ""; - struct op *new = xmalloc (sizeof (struct op) * c); + struct op *new_op = xmalloc (sizeof (struct op) * c); - memcpy (new, p, c * sizeof (struct op)); + memcpy (new_op, p, c * sizeof (struct op)); /* Sort all names in table alphabetically. */ - qsort (new, c, sizeof (struct op), (int (*)(const void *, const void *)) func); + qsort (new_op, c, sizeof (struct op), (int (*)(const void *, const void *)) func); printf ("/* DO NOT EDIT! -*- buffer-read-only: t -*-\n"); printf (" This file is automatically generated by z8kgen. */\n\n"); @@ -1279,19 +1279,19 @@ gas (void) printf ("#ifdef DEFINE_TABLE\n"); printf ("const opcode_entry_type z8k_table[] = {\n"); - while (new->flags && new->flags[0]) + while (new_op->flags && new_op->flags[0]) { int nargs; int length; - printf ("\n/* %s *** %s */\n", new->bits, new->name); + printf ("\n/* %s *** %s */\n", new_op->bits, new_op->name); printf ("{\n"); printf ("#ifdef NICENAMES\n"); - printf ("\"%s\",%d,%d,", new->name, new->type, new->cycles); + printf ("\"%s\",%d,%d,", new_op->name, new_op->type, new_op->cycles); { int answer = 0; - char *p = new->flags; + char *p = new_op->flags; while (*p) { @@ -1306,20 +1306,20 @@ gas (void) printf ("#endif\n"); - nargs = chewname (&new->name); + nargs = chewname (&new_op->name); printf ("\n\t"); - chewbits (new->bits, &length); + chewbits (new_op->bits, &length); length /= 2; if (length & 1) abort(); - if (strcmp (oldname, new->name) != 0) + if (strcmp (oldname, new_op->name) != 0) idx++; printf (",%d,%d,%d", nargs, length, idx); - oldname = new->name; + oldname = new_op->name; printf ("},\n"); - new++; + new_op++; } printf ("\n/* end marker */\n"); printf ("{\n#ifdef NICENAMES\nNULL,0,0,\n0,\n#endif\n"); |