summaryrefslogtreecommitdiffstats
path: root/opcodes/i386-gen.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2007-09-26 04:42:47 +0000
committerH.J. Lu <hjl.tools@gmail.com>2007-09-26 04:42:47 +0000
commit4dffcebc10670489b064181a62e9588e72fb566a (patch)
tree5afda928aebbd6b85b99edaa635d72b92c598f01 /opcodes/i386-gen.c
parentc828a49faf94e9b2cba6d2870a5bfeaef2da5a3f (diff)
downloadppe42-binutils-4dffcebc10670489b064181a62e9588e72fb566a.tar.gz
ppe42-binutils-4dffcebc10670489b064181a62e9588e72fb566a.zip
gas/
2007-09-25 H.J. Lu <hongjiu.lu@intel.com> * config/tc-i386.c (output_insn): Use i.tm.opcode_length to check opcode length. opcodes/ 2007-09-25 H.J. Lu <hongjiu.lu@intel.com> * i386-gen.c (process_i386_opcodes): Process opcode_length. * i386-opc.h (template): Add opcode_length. * 386-opc.tbl: Likewise. * i386-tbl.h: Regenerated.
Diffstat (limited to 'opcodes/i386-gen.c')
-rw-r--r--opcodes/i386-gen.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/opcodes/i386-gen.c b/opcodes/i386-gen.c
index ddac29205b..a017639128 100644
--- a/opcodes/i386-gen.c
+++ b/opcodes/i386-gen.c
@@ -591,6 +591,7 @@ process_i386_opcodes (FILE *table)
unsigned int i;
char *str, *p, *last;
char *name, *operands, *base_opcode, *extension_opcode;
+ char *opcode_length;
char *cpu_flags, *opcode_modifier, *operand_types [MAX_OPERANDS];
if (fp == NULL)
@@ -652,6 +653,12 @@ process_i386_opcodes (FILE *table)
if (str >= last)
abort ();
+ /* Find opcode_length. */
+ opcode_length = next_field (str, ',', &str);
+
+ if (str >= last)
+ abort ();
+
/* Find cpu_flags. */
cpu_flags = next_field (str, ',', &str);
@@ -707,8 +714,9 @@ process_i386_opcodes (FILE *table)
}
}
- fprintf (table, " { \"%s\", %s, %s, %s,\n",
- name, operands, base_opcode, extension_opcode);
+ fprintf (table, " { \"%s\", %s, %s, %s, %s,\n",
+ name, operands, base_opcode, extension_opcode,
+ opcode_length);
process_i386_cpu_flag (table, cpu_flags, 0, ",", " ");
@@ -737,7 +745,7 @@ process_i386_opcodes (FILE *table)
fclose (fp);
- fprintf (table, " { NULL, 0, 0, 0,\n");
+ fprintf (table, " { NULL, 0, 0, 0, 0,\n");
process_i386_cpu_flag (table, "0", 0, ",", " ");
OpenPOWER on IntegriCloud