X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=opcodes%2Fi386-gen.c;h=337f93cc41b19e80479f2d1f43b7ee526d98296d;hb=4ded9dda7cac16de63928596e8c7e29984515089;hp=9c94e78fdf9271cf409b8fcea64433c79db34ba1;hpb=8a9036a406bc608a880e90462ac24b5fbfa4a30f;p=deliverable%2Fbinutils-gdb.git diff --git a/opcodes/i386-gen.c b/opcodes/i386-gen.c index 9c94e78fdf..337f93cc41 100644 --- a/opcodes/i386-gen.c +++ b/opcodes/i386-gen.c @@ -347,7 +347,6 @@ static bitfield opcode_modifiers[] = BITFIELD (Rex64), BITFIELD (Ugh), BITFIELD (Vex), - BITFIELD (Vex256), BITFIELD (VexNDS), BITFIELD (VexNDD), BITFIELD (VexW0), @@ -540,6 +539,29 @@ set_bitfield (const char *f, bitfield *array, int value, return; } + if (value) + { + const char *v = strchr (f, '='); + + if (v) + { + size_t n = v - f; + char *end; + + for (i = 0; i < size; i++) + if (strncasecmp (array[i].name, f, n) == 0) + { + value = strtol (v + 1, &end, 0); + if (*end == '\0') + { + array[i].value = value; + return; + } + break; + } + } + } + if (lineno != -1) fail (_("%s: %d: Unknown bitfield: %s\n"), filename, lineno, f); else @@ -876,7 +898,7 @@ process_i386_opcodes (FILE *table) xcalloc, free); fprintf (table, "\n/* i386 opcode table. */\n\n"); - fprintf (table, "const template i386_optab[] =\n{\n"); + fprintf (table, "const insn_template i386_optab[] =\n{\n"); /* Put everything on opcode array. */ while (!feof (fp))