+/* Macro used when generating the patterns for an extension
+ instruction. */
+#define INSERT_XOP(OP, NAME, CODE, MASK, CPU, ARG, FLG) \
+ do { \
+ (OP)->name = NAME; \
+ (OP)->opcode = CODE; \
+ (OP)->mask = MASK; \
+ (OP)->cpu = CPU; \
+ (OP)->insn_class = ARITH; \
+ (OP)->subclass = NONE; \
+ memcpy ((OP)->operands, (ARG), MAX_INSN_ARGS); \
+ memcpy ((OP)->flags, (FLG), MAX_INSN_FLGS); \
+ (OP++); \
+ } while (0)
+
+/* Typedef to hold the extension instruction definition. */
+typedef struct ExtInstruction
+{
+ /* Name. */
+ char *name;
+
+ /* Major opcode. */
+ char major;
+
+ /* Minor(sub) opcode. */
+ char minor;
+
+ /* Flags, holds the syntax class and modifiers. */
+ char flags;
+
+ /* Syntax class. Use by assembler. */
+ unsigned char syntax;
+
+ /* Syntax class modifier. Used by assembler. */
+ unsigned char modsyn;
+
+ /* Suffix class. Used by assembler. */
+ unsigned char suffix;
+
+ /* Pointer to the next extension instruction. */
+ struct ExtInstruction* next;
+} extInstruction_t;