[PATCH 5/8] x86: re-order two fields of struct insn_template
Jan Beulich
jbeulich@suse.com
Mon Mar 22 16:44:55 GMT 2021
To facilitate a subsequent table parser change, re-order CPU flags and
opcode modifier fields. No functional change intended.
gas/
2021-03-XX Jan Beulich <jbeulich@suse.com>
* config/tc-i386.c (output_i386_opcode): Invoke
process_i386_cpu_flag() slightly later.
(process_i386_opcodes): Likewise.
opcodes/
2021-03-XX Jan Beulich <jbeulich@suse.com>
* i386-opc.h (struct insn_template): Move cpu_flags field past
opcode_modifier one.
* i386-tbl.h: Re-generate.
--- a/opcodes/i386-gen.c
+++ b/opcodes/i386-gen.c
@@ -1410,8 +1410,6 @@ output_i386_opcode (FILE *table, const c
fprintf (table, " { \"%s\", %s, %s, %s, %u,\n",
name, base_opcode, extension_opcode, opcode_length, i);
- process_i386_cpu_flag (table, cpu_flags, 0, ",", " ", lineno);
-
if (process_i386_opcode_modifier (table, opcode_modifier,
operand_types, lineno))
{
@@ -1449,6 +1447,8 @@ output_i386_opcode (FILE *table, const c
}
}
+ process_i386_cpu_flag (table, cpu_flags, 0, ",", " ", lineno);
+
fprintf (table, " { ");
for (i = 0; i < ARRAY_SIZE (operand_types); i++)
@@ -1836,10 +1836,10 @@ process_i386_opcodes (FILE *table)
fprintf (table, " { NULL, 0, 0, 0, 0,\n");
- process_i386_cpu_flag (table, "0", 0, ",", " ", -1);
-
process_i386_opcode_modifier (table, "0", NULL, -1);
+ process_i386_cpu_flag (table, "0", 0, ",", " ", -1);
+
fprintf (table, " { ");
process_i386_operand_type (table, "0", stage_opcodes, "\t ", -1);
fprintf (table, " } }\n");
--- a/opcodes/i386-opc.h
+++ b/opcodes/i386-opc.h
@@ -951,14 +951,14 @@ typedef struct insn_template
/* how many operands */
unsigned char operands;
- /* cpu feature flags */
- i386_cpu_flags cpu_flags;
-
/* the bits in opcode_modifier are used to generate the final opcode from
the base_opcode. These bits also are used to detect alternate forms of
the same instruction */
i386_opcode_modifier opcode_modifier;
+ /* cpu feature flags */
+ i386_cpu_flags cpu_flags;
+
/* operand_types[i] describes the type of operand i. This is made
by OR'ing together all of the possible type masks. (e.g.
'operand_types[i] = Reg|Imm' specifies that operand i can be
More information about the Binutils
mailing list