aboutsummaryrefslogtreecommitdiff
path: root/opcodes/i386-gen.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2009-09-24 16:37:09 +0000
committerH.J. Lu <hjl.tools@gmail.com>2009-09-24 16:37:09 +0000
commit2bf05e57303ade685e40991a7779de56ced5d46f (patch)
tree4d303fc4c4233d11bc529bac70a7e64eec55e0d9 /opcodes/i386-gen.c
parent935bd1e079100b6d6fa0fa7cfd7c20a7f588cfea (diff)
downloadfsf-binutils-gdb-2bf05e57303ade685e40991a7779de56ced5d46f.zip
fsf-binutils-gdb-2bf05e57303ade685e40991a7779de56ced5d46f.tar.gz
fsf-binutils-gdb-2bf05e57303ade685e40991a7779de56ced5d46f.tar.bz2
gas/
2009-09-24 H.J. Lu <hongjiu.lu@intel.com> * config/tc-i386.c (build_vex_prefix): Check vex == 2 instead of vex256. opcodes/ 2009-09-24 H.J. Lu <hongjiu.lu@intel.com> * i386-gen.c (opcode_modifiers): Remove Vex256. (set_bitfield): Handle XXX=V. * i386-opc.h (Vex): Update comments. (Vex256): Removed. (VexNDS): Updated. (i386_opcode_modifier): Change vex to 2 bits. Remove vex256. * i386-opc.tbl: Replace "Vex|Vex256" with Vex=2. * i386-tbl.h: Regenerated.
Diffstat (limited to 'opcodes/i386-gen.c')
-rw-r--r--opcodes/i386-gen.c24
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