diff options
Diffstat (limited to 'opcodes/i386-gen.c')
-rw-r--r-- | opcodes/i386-gen.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/opcodes/i386-gen.c b/opcodes/i386-gen.c index fb1c78e..337f93c 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 |