ref: f2e04e5f2f85f9dda6d813a9a47a95995de1e5aa
parent: 02abca68e91999009c0f3ef154fb99f39c212c2c
author: Roberto E. Vargas Caballero <[email protected]>
date: Wed Jan 16 07:15:40 EST 2019
Move cc1 cc2 as and ld to cmd It makes more sense to have them in the cmd directory where all the other tools are located.
--- a/src/Makefile
+++ b/src/Makefile
@@ -3,13 +3,12 @@
PROJECTDIR = ..
include $(PROJECTDIR)/scripts/rules.mk
-TOOLS = cc1 cc2 ld as cmd
LIBS = libscc libc libcrt libmach
-DIRS = $(TOOLS) $(LIBS)
+DIRS = cmd $(LIBS)
-all: $(TOOLS)
+all: cmd
-$(TOOLS): $(LIBS)
+cmd: $(LIBS)
$(DIRS): FORCE
+@cd $@ && $(MAKE)
--- a/src/as/Makefile
+++ /dev/null
@@ -1,32 +1,0 @@
-.POSIX:
-
-PROJECTDIR = ../..
-include $(PROJECTDIR)/scripts/rules.mk
-
-MORECFLAGS = -I$(INCDIR)/$(STD)
-
-OBJS = main.o \
- symbol.o \
- ins.o \
- parser.o \
- expr.o \
-
-TARGET = $(LIBEXEC)/as-amd64 \
- $(LIBEXEC)/as-i386 \
- $(LIBEXEC)/as-i286 \
- $(LIBEXEC)/as-z80 \
-
-all: $(TARGET)
-
-$(TARGET): $(LIBDIR)/libscc.a
-
-dep: inc-dep
-
-clean:
- rm -f target/*/*.o target/*/*tbl.c
-
-include target/amd64.mk
-include target/i386.mk
-include target/i286.mk
-include target/z80.mk
-include deps.mk
--- a/src/as/as.h
+++ /dev/null
@@ -1,207 +1,0 @@
-/*
- * First 3 bits of flags in segments and symbols are for the
- * type of segment
- */
-enum symflags {
- FREG = 1 << 0,
- FSECT = 1 << 1,
- FSYM = 1 << 2,
- FCOMMON = 1 << 3,
- FEXTERN = 1 << 4,
- FDEF = 1 << 5,
- FGLOBAL = 1 << 6,
- FABS = 1 << 7,
-};
-
-enum secflags {
- SREAD = 1 << 0,
- SWRITE = 1 << 1,
- SEXEC = 1 << 2,
- SLOAD = 1 << 3,
- SFILE = 1 << 4,
- SABS = 1 << 5,
-};
-
-enum endianess {
- BIG_ENDIAN = -1,
- LITTLE_ENDIAN = 1
-};
-
-enum common_args {
- AIMM = 1,
- ASTR,
- AREG,
- ANUMBER,
- AIMM8,
- AIMM16,
- AIMM32,
- AIMM64,
- AINDIR,
- AINDEX,
- ADIRECT,
- AREG_OFF,
- ASYM,
- AOPT,
- AREP,
- AMAX,
-};
-
-enum tokens {
- EOS = -1,
- IDEN = 1,
- NUMBER,
- REG,
- STRING,
- MINUS,
- SHL,
- SHR,
- GE,
- LE,
-};
-
-#define MAXSYM 63
-
-typedef struct reloc Reloc;
-typedef struct ins Ins;
-typedef struct op Op;
-typedef struct section Section;
-typedef struct symbol Symbol;
-typedef struct node Node;
-typedef struct string String;
-typedef void Format(Op *, Node **);
-
-struct string {
- char *buf;
- size_t offset;
-};
-
-struct line {
- char *label;
- char *op;
- char *args;
-};
-
-struct ins {
- int begin, end;
- char *str;
-};
-
-struct reloc {
- size_t offset;
- Symbol *sym;
- unsigned char flags;
- unsigned char size;
- unsigned char nbits;
- unsigned char shift;
-};
-
-struct op {
- unsigned char flags;
- unsigned char size;
- void (*format)(Op *, Node **);
- unsigned char *bytes;
- unsigned char *args;
-};
-
-struct section {
- Symbol *sym;
- char *mem;
- unsigned char flags;
- unsigned char fill;
- unsigned char aligment;
- unsigned id;
- TUINT base;
- TUINT max;
- TUINT curpc;
- TUINT pc;
- struct section *next;
-};
-
-struct symbol {
- String name;
- String type;
- unsigned char flags;
- unsigned char pass;
- TUINT value;
- TUINT size;
- Section *section;
- struct symbol *next;
- struct symbol *hash;
-};
-
-struct node {
- unsigned char op;
- unsigned char addr;
- struct symbol *sym;
- struct node *left;
- struct node *right;
-};
-
-union yylval {
- TUINT val;
- Symbol *sym;
-};
-
-
-/* symbol.c */
-extern void cleansecs(void);
-extern void isecs(void);
-extern void emit(char *bytes, int nbytes);
-extern Section *setsec(char *name, char *attr);
-extern Symbol *tmpsym(TUINT val);
-extern void killtmp(void);
-extern int toobig(Node *np, int type);
-extern void dumpstab(char *msg);
-extern String newstring(char *s);
-
-/* main.c */
-extern Symbol *lookup(char *name);
-extern Symbol *deflabel(char *name);
-
-/* parser.c */
-extern Node **getargs(char *s);
-extern void error(char *msg, ...);
-/* Avoid errors in files where stdio is not included */
-#ifdef stdin
-extern int nextline(FILE *fp, struct line *linep);
-#endif
-extern void unexpected(void);
-extern void expect(int token);
-int next(void);
-#define accept(t) (yytoken == (t) ? next() : 0)
-extern void regctx(int mode);
-extern Node *getreg(void);
-extern Node *operand(char **s);
-extern void addinput(char *fname);
-extern int delinput(void);
-
-/* expr.c */
-extern Node *expr(void);
-extern void deltree(Node *np);
-extern Node *node(int op, Node *l, Node *r);
-
-/* proc.c */
-extern void iarch(void);
-extern int match(Op *op, Node **args);
-extern Node *moperand(void);
-
-/* ins.c */
-extern char *tobytes(TUINT v, int n, int inc);
-
-/*
- * Definition of global variables
- */
-extern Section *cursec, *seclist;
-extern int nr_ins;
-extern Ins instab[];
-extern Op optab[];
-extern int pass;
-extern TUINT maxaddr;
-extern int endian;
-extern Symbol *linesym, *symlist;
-extern char *infile;
-extern int endpass;
-extern int yytoken;
-extern size_t yylen;
-extern union yylval yylval;
-extern char yytext[];
--- a/src/as/deps.mk
+++ /dev/null
@@ -1,30 +1,0 @@
-#deps
-expr.o: $(INCDIR)/scc/scc/scc.h
-expr.o: as.h
-ins.o: $(INCDIR)/scc/scc/scc.h
-ins.o: as.h
-main.o: $(INCDIR)/scc/scc/arg.h
-main.o: $(INCDIR)/scc/scc/scc.h
-main.o: as.h
-parser.o: $(INCDIR)/scc/scc/cstd.h
-parser.o: $(INCDIR)/scc/scc/scc.h
-parser.o: as.h
-symbol.o: $(INCDIR)/scc/scc/scc.h
-symbol.o: as.h
-target/x80/ins.o: $(INCDIR)/scc/scc/scc.h
-target/x80/ins.o: target/x80/../../as.h
-target/x80/ins.o: target/x80/proc.h
-target/x80/z80.o: $(INCDIR)/scc/scc/scc.h
-target/x80/z80.o: target/x80/../../as.h
-target/x80/z80.o: target/x80/../x80/proc.h
-target/x86/amd64.o: $(INCDIR)/scc/scc/scc.h
-target/x86/amd64.o: target/x86/../../as.h
-target/x86/i286.o: $(INCDIR)/scc/scc/scc.h
-target/x86/i286.o: target/x86/../../as.h
-target/x86/i286.o: target/x86/../x86/proc.h
-target/x86/i386.o: $(INCDIR)/scc/scc/scc.h
-target/x86/i386.o: target/x86/../../as.h
-target/x86/i386.o: target/x86/../x86/proc.h
-target/x86/ins.o: $(INCDIR)/scc/scc/scc.h
-target/x86/ins.o: target/x86/../../as.h
-target/x86/ins.o: target/x86/proc.h
--- a/src/as/expr.c
+++ /dev/null
@@ -1,303 +1,0 @@
-static char sccsid[] = "@(#) ./as/expr.c";
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <scc/scc.h>
-#include "as.h"
-
-#define NNODES 10
-
-static Alloc *arena;
-
-Node *
-node(int op, Node *l, Node *r)
-{
- struct arena *ap;
- Node *np;
-
- if (!arena)
- arena = alloc(sizeof(Node), NNODES);
- np = new(arena);
- np->op = op;
- np->left = l;
- np->right = r;
- np->sym = NULL;
-
- return np;
-}
-
-void
-deltree(Node *np)
-{
- if (!np)
- return;
- deltree(np->left);
- deltree(np->right);
- delete(arena, np);
-}
-
-static Node *
-fold(int op, Node *l, Node *r)
-{
- Node *np;
- TUINT val, lv, rv;
-
- lv = l->sym->value;
- rv = r->sym->value;
-
- /* TODO: check overflow */
-
- switch (op) {
- case '*':
- val = lv - rv;
- break;
- case '/':
- if (rv == 0)
- goto division_by_zero;
- val = lv / rv;
- break;
- case '%':
- if (rv == 0)
- goto division_by_zero;
- val = lv % rv;
- break;
- case SHL:
- val = lv << rv;
- break;
- case SHR:
- val = lv >> rv;
- break;
- case '+':
- val = lv + rv;
- break;
- case '-':
- val = lv - rv;
- break;
- case '<':
- val = lv < rv;
- break;
- case '>':
- val = lv > rv;
- break;
- case '=':
- val = lv == rv;
- break;
- case GE:
- val = lv >= rv;
- break;
- case LE:
- val = lv <= rv;
- break;
- case '|':
- val = lv | rv;
- break;
- case '^':
- val = lv ^ rv;
- break;
- default:
- abort();
- }
- deltree(l);
- deltree(r);
-
- np = node(NUMBER, NULL, NULL);
- np->sym = tmpsym(val);
- np->addr = ANUMBER;
- return np;
-
-division_by_zero:
- error("division by 0");
-}
-
-static Node *
-binary(int op, Node *l, Node *r)
-{
- int addr;
- Node *np;
-
- if (l->op == NUMBER && r->op == NUMBER)
- return fold(op, l, r);
- else
- abort();
- np = node(op, l, r);
- np->addr = addr;
-
- return np;
-}
-
-static Node *
-unaryop(int op, Node *np)
-{
- TUINT val;
-
- if (np->addr != ANUMBER)
- error("invalid argument for unary operator");
- if (np->op != NUMBER) {
- np = node(op, np, NULL);
- np->addr = ANUMBER;
- return np;
- }
-
- val = np->sym->value;
- switch (op) {
- case '!':
- val = !val;
- case '+':
- break;
- case '-':
- val = -val;
- break;
- default:
- abort();
- }
- np->sym->value = val;
-
- return np;
-}
-
-/*************************************************************************/
-/* grammar functions */
-/*************************************************************************/
-
-static Node *
-primary(void)
-{
- Node *np;
-
- switch (yytoken) {
- case IDEN:
- case NUMBER:
- np = node(yytoken, NULL, NULL);
- np->sym = yylval.sym;
- np->addr = ANUMBER;
- next();
- break;
- case '(':
- np = expr();
- expect(')');
- break;
- default:
- unexpected();
- }
-
- return np;
-}
-
-static Node *
-unary(void)
-{
- int op, tok;
- Node *np;
-
- switch (tok = yytoken) {
- case '!':
- case '-':
- case '+':
- next();
- return unaryop(tok, primary());
- default:
- return primary();
- }
-}
-
-static Node *
-mul(void)
-{
- int op;
- Node *np;
-
- np = unary();
- for (;;) {
- switch (op = yytoken) {
- case '*':
- case '/':
- case '%':
- case SHL:
- case SHR:
- next();
- binary(op, np, primary());
- break;
- default:
- return np;
- }
- }
-}
-
-static Node *
-add(void)
-{
- int op;
- Node *np;
-
- np = mul();
- for (;;) {
- switch (op = yytoken) {
- case '+':
- case '-':
- next();
- np = binary(op, np, mul());
- break;
- default:
- return np;
- }
- }
-}
-
-static Node *
-relational(void)
-{
- int op;
- Node *np;
-
- np = add();
- for (;;) {
- switch (op = yytoken) {
- case '<':
- case '>':
- case '=':
- case GE:
- case LE:
- next();
- np = binary(op, np, add());
- break;
- default:
- return np;
- }
- }
-}
-
-static Node *
-and(void)
-{
- int op;
- Node *np;
-
- np = relational();
- while (accept('&'))
- np = binary('&', np, relational());
- return np;
-}
-
-Node *
-expr(void)
-{
- int op;
- Node *np;
-
- regctx(0);
- np = and();
- for (;;) {
- switch (op = yytoken) {
- case '|':
- case '^':
- next();
- np = binary(op, np, and());
- break;
- default:
- regctx(1);
- return np;
- }
- }
-}
--- a/src/as/ins.c
+++ /dev/null
@@ -1,258 +1,0 @@
-static char sccsid[] = "@(#) ./as/ins.c";
-
-#include <string.h>
-
-#include <scc/scc.h>
-#include "as.h"
-
-extern Section *sabs, *sbss, *sdata, *stext;
-
-enum {
- EQU,
- COMMON,
- SIZE,
- XSTRING,
- ASCII,
- TYPE,
-};
-
-static void
-reloc(Symbol *sym,
- unsigned flags,
- unsigned size,
- unsigned nbits,
- unsigned shift)
-{
-}
-
-char *
-tobytes(TUINT v, int nbytes, int inc)
-{
- static char buf[sizeof(TUINT)];
- int idx;
-
- idx = (inc < 0) ? nbytes-1 : 0;
- while (nbytes--) {
- buf[idx] = v;
- idx += inc;
- v >>= 8;
- }
-
- if (v)
- error("overflow in immediate value");
- return buf;
-}
-
-void
-noargs(Op *op, Node **args)
-{
- emit(op->bytes, op->size);
-}
-
-static void
-xstring(int which, Node **args)
-{
- Node *np;
- char *s;
- size_t len;
-
- while (np = *args++) {
- s = np->sym->name.buf;
- len = strlen(s);
- len += which == XSTRING;
- emit(s, len);
- }
-}
-
-void
-string(Op *op, Node **args)
-{
- xstring(STRING, args);
-}
-
-void
-ascii(Op *op, Node **args)
-{
- xstring(STRING, args);
-}
-
-void
-def(Node **args, int siz)
-{
- Node *np;
-
- while (np = *args++) {
- Symbol *sym = np->sym;
-
- if ((sym->flags & FABS) == 0)
- reloc(sym, 0, siz, siz * 8, 0);
- emit(tobytes(sym->value, siz, endian), siz);
- }
-}
-
-void
-defb(Op *op, Node **args)
-{
- def(args, 1);
-}
-
-void
-defw(Op *op, Node **args)
-{
- def(args, 2);
-}
-
-void
-defd(Op *op, Node **args)
-{
- def(args, 4);
-}
-
-void
-defq(Op *op, Node **args)
-{
- def(args, 8);
-}
-
-static void
-symexp(int which, Op *op, Node **args)
-{
- Symbol *sym, *exp;
- static char *cmds[] = {
- [EQU] = "equ",
- [COMMON] = "common",
- [SIZE] = "size",
- };
- char *cmd = cmds[which];
-
- if (args[1]) {
- sym = args[0]->sym;
- exp = args[1]->sym;
- } else if (linesym) {
- sym = linesym;
- exp = args[0]->sym;
- } else {
- error("%s pseudo instruction lacks a label", cmd);
- }
-
- if ((exp->flags & FABS) == 0)
- error("%s expression is not an absolute expression", cmd);
-
- switch (which) {
- case EQU:
- if (pass == 1 && (sym->flags & FDEF))
- error("redefinition of symbol '%s'", sym->name.buf);
- sym->value = exp->value;
- sym->flags |= FDEF;
- break;
- case COMMON:
- sym->flags |= FCOMMON;
- case SIZE:
- sym->size = exp->value;
- break;
- case TYPE:
- sym->type.buf = xstrdup(exp->name.buf);
- break;
- }
-}
-
-void
-equ(Op *op, Node **args)
-{
- symexp(EQU, op, args);
-}
-
-void
-common(Op *op, Node **args)
-{
- symexp(COMMON, op, args);
-}
-
-void
-size(Op *op, Node **args)
-{
- symexp(SIZE, op, args);
-}
-
-void
-type(Op *op, Node **args)
-{
- symexp(TYPE, op, args);
-}
-
-void
-section(Op *op, Node **args)
-{
- Symbol *sym = args[0]->sym;
- char *attr = NULL;
-
- if (args[1])
- attr = args[1]->sym->name.buf;
-
- setsec(sym->name.buf, attr);
-}
-
-void
-text(Op *op, Node **args)
-{
- cursec = stext;
-}
-
-void
-data(Op *op, Node **args)
-{
- cursec = sdata;
-}
-
-void
-bss(Op *op, Node **args)
-{
- cursec = sbss;
-}
-
-void
-extrn(Op *op, Node **args)
-{
- Symbol *sym = args[0]->sym;
-
- sym->flags |= FEXTERN;
-}
-
-void
-global(Op *op, Node **args)
-{
- Symbol *sym = args[0]->sym;
-
- sym->flags |= FGLOBAL;
-}
-
-void
-align(Op *op, Node **args)
-{
- Symbol *sym = args[0]->sym;
- TUINT curpc, pc, al;
-
- if ((sym->flags & FABS) == 0)
- error("align expression is not an absolute expression");
- if ((al = sym->value) == 0)
- return;
-
- al--;
- curpc = cursec->curpc;
- pc = curpc+al & ~al;
-
- for (al = pc - curpc; al > 0; --al)
- emit((char []) {0}, 1);
-}
-
-void
-end(Op *op, Node **args)
-{
- endpass = 1;
-}
-
-void
-include(Op *op, Node **args)
-{
- addinput(args[0]->sym->name.buf);
-}
--- a/src/as/main.c
+++ /dev/null
@@ -1,162 +1,0 @@
-static char sccsid[] = "@(#) ./as/main.c";
-
-#include <errno.h>
-#include <ctype.h>
-#include <setjmp.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <scc/scc.h>
-#include <scc/arg.h>
-#include "as.h"
-
-char *argv0;
-char *outfile, *infile;
-int endpass;
-
-static void
-writeout(char *fname)
-{
- Section *sp;
- FILE *fp;
-
- if ((fp = fopen(fname, "wb")) == NULL)
- goto error;
-
- for (sp = seclist; sp; sp = sp->next) {
- if (!sp->mem)
- continue;
- fwrite(sp->mem, sp->max - sp->base, 1, fp);
- }
-
- if (fclose(fp))
- goto error;
- return;
-
-error:
- fprintf(stderr, "as: %s: %s\n", fname, strerror(errno));
- exit(EXIT_FAILURE);
-}
-
-static void
-cleanup(void)
-{
- if (outfile)
- remove(outfile);
-}
-
-static int
-cmp(const void *f1, const void *f2)
-{
- const Ins *ins = f2;
- const char *s = f1;
- int d;
-
- if ((d = *s - *ins->str) != 0)
- return d;
-
- return strcmp(s, ins->str);
-}
-
-static void
-as(char *text, char *xargs)
-{
- int c;
- char *p;
- Ins *ins;
- Op *op, *lim;
- Node **args;
-
- for (p = text; c = *p; ++p)
- *p = toupper(c);
-
- ins = bsearch(text, instab, nr_ins, sizeof(Ins), cmp);
- if (!ins) {
- error("invalid instruction '%s'", text);
- return;
- }
-
- args = getargs(xargs);
- lim = &optab[ins->end];
- for (op = &optab[ins->begin]; op < lim; ++op) {
- if (match(op, args))
- break;
- }
- if (op == lim) {
- error("invalid operands for '%s'", text);
- return;
- }
- (*op->format)(op, args);
-}
-
-static int
-dopass(char *fname)
-{
- struct line line;
- FILE *fp;
- extern int nerrors;
- extern jmp_buf recover;
-
- addinput(fname);
- cleansecs();
-
- endpass = 0;
- setjmp(recover);
- while (!endpass && nextline(fp, &line)) {
- linesym = NULL;
-
- if (line.label)
- linesym = deflabel(line.label);
-
- if (line.op)
- as(line.op, line.args);
- else if (line.args)
- error("arguments without an opcode");
- }
-
- return nerrors == 0;
-}
-
-static void
-usage(void)
-{
- fputs("usage: as [-o outfile] filename ...\n", stderr);
- exit(1);
-}
-
-int
-main(int argc, char *argv[])
-{
- char **p;
-
- outfile = "a.out";
-
- ARGBEGIN {
- case 'o':
- outfile = EARGF(usage());
- break;
- default:
- usage();
- } ARGEND
-
- if (argc == 0)
- usage();
-
- atexit(cleanup);
- iarch();
- isecs();
-
- for (pass = 1; pass <= 2; pass++) {
- for (p = argv; infile = *p; ++p) {
- if (!dopass(infile))
- return EXIT_FAILURE;
- }
- if (pass == 1)
- killtmp();
- }
- writeout(outfile);
- outfile = NULL;
-
- return 0;
-}
--- a/src/as/mktbl
+++ /dev/null
@@ -1,34 +1,0 @@
-#!/bin/sh
-
-
-unset LC_ALL
-LC_COLLATE=C
-set -e
-
-for i
-do
- case $i in
- -c)
- cpu=$2
- shift 2
- ;;
- -f)
- family=$2
- shift 2
- ;;
- -*)
- echo mktbl: incorrect parameter:$i >&2
- exit 1
- ;;
- esac
-done
-
-echo cpu=${cpu:=z80} family=${family:=x80}
-
-rm -f $$.c target/$family/${cpu}tbl.c
-trap "rm -f $$.c" 0 2 3
-
-awk '!/^$/ {print $1,NR,$2,$3,$4,$5,$6}' target/$family/$family.dat |
-sort -k1 -k2n |
-awk -v cpu=`echo $cpu | tr a-z A-Z` -v family=$family -f mktbl.awk > $$.c &&
-mv $$.c target/$family/${cpu}tbl.c
--- a/src/as/mktbl.awk
+++ /dev/null
@@ -1,112 +1,0 @@
-
-BEGIN {
- printf "#include <scc/scc.h>\n"\
- "#include \"../../as.h\"\n"\
- "#include \"../" family "/proc.h\"\n"
-
- rules = "target/" family "/rules.dat"
- while (getline < rules > 0) {
- regex[++nregs] = $1
- value[nregs] = $2
- }
- close(rules)
-}
- {sub(/#.*/,"")}
-
-$7 !~ cpu {next}
-
-/^$/ {next}
-
- {
- if (opstart[$1] == 0) {
- opstart[$1] = nvar
- opnames[nop++] = $1
- }
- opcount[$1]++
- opargs[nvar] = $3
- opsize[nvar] = $4
- opbytes[nvar] = ($5 == "none") ? "" : $5
- opformat[nvar++] = $6
- formats[$6] = 1
-}
-
-END {
- for (i in formats)
- printf "Format %s;\n", i
-
- printf "int nr_ins = %d;\n\n", nop
- print "struct ins instab[] = {"
- for (i = 0; i < nop; i++) {
- n = opnames[i]
- start = opstart[n]
- end = start + opcount[n]
- printf "\t{.str = \"%s\", .begin = %d, .end = %d},\n",
- n, start, end | "sort"
- }
- close("sort")
- printf "};\n\n"
-
- print "struct op optab[] = {"
- for (i = 0; i < nvar; i++) {
- printf "\t/* %d */\n", i
- printf "\t{\n" \
- "\t\t.size = %d,\n"\
- "\t\t.format = %s,\n",
- opsize[i], opformat[i]
-
- if (opbytes[i] != "")
- printf "\t\t.bytes = (unsigned char [%d]) {%s},\n",
- opsize[i],
- opbytes[i]
-
- a = str2args(opargs[i])
- if (a != "")
- printf "\t\t.args = (unsigned char []) {%s}\n", a
-
- print "\t},"
- }
- print "};"
-}
-
-function str2args(s, args, i, j, out, n, found)
-{
- n = split(s, args, /,/)
- if (n == 0 || args[1] == "none")
- return ""
- for (i = 1; i <= n; i++) {
- a = args[i]
- found = 0
-
- if (a ~ /\?$/)
- out = out "AOPT ,"
- else if (a ~ /\+$/)
- out = out "AREP ,"
-
- for (j = 1; j <= nregs; j++) {
- if (match(a, "^" regex[j])) {
- out = out value[j]
- found = 1
- break
- }
- }
-
- if (!found) {
- print FILENAME ":" NR ":" \
- $0 ":wrong arg", a > "/dev/stderr"
- exit 1
- }
-
- a = substr(a, RLENGTH+1)
- sub(/\?$/, "", a)
- sub(/\+$/, "", a)
- if (a != "") {
- print FILENAME ":" NR ":" \
- $0 ": trailing chars: ", a > "/dev/stderr"
- exit 1
- }
- out = out ","
- }
- out = out "0"
-
- return out
-}
--- a/src/as/parser.c
+++ /dev/null
@@ -1,482 +1,0 @@
-static char sccsid[] = "@(#) ./as/parser.c";
-#include <assert.h>
-#include <ctype.h>
-#include <errno.h>
-#include <limits.h>
-#include <setjmp.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <scc/cstd.h>
-#include <scc/scc.h>
-#include "as.h"
-
-#define NARGS 20
-#define NR_INPUTS 10
-#define MAXLINE 100
-
-struct input {
- char *fname;
- unsigned lineno;
- FILE *fp;
-};
-
-int nerrors;
-jmp_buf recover;
-char yytext[INTIDENTSIZ+1];
-int yytoken;
-size_t yylen;
-union yylval yylval;
-
-static char *textp, *endp;
-static int regmode;
-static unsigned lineno;
-static struct input inputs[NR_INPUTS], *isp = inputs;
-
-static int
-follow(int expect1, int expect2, int ifyes1, int ifyes2, int ifno)
-{
- int c;
-
- if ((c = *++textp) == expect1)
- return ifyes1;
- if (c == expect2)
- return ifyes2;
- --textp;
- return ifno;
-}
-
-static void
-tok2str(void)
-{
- if ((yylen = endp - textp) > INTIDENTSIZ) {
- error("token too big");
- yylen = INTIDENTSIZ;
- }
- memcpy(yytext, textp, yylen);
- yytext[yylen] = '\0';
- textp = endp;
-}
-
-static int
-iden(void)
-{
- int c;
- char *p;
-
- for ( ; c = *endp; ++endp) {
- if (isalnum(c))
- continue;
- switch (c) {
- case '\'':
- case '_':
- case '-':
- case '.':
- case '$':
- continue;
- default:
- goto out_loop;
- }
- }
-
-out_loop:
- tok2str();
- yylval.sym = lookup(yytext);
-
- return (yylval.sym->flags & FREG) ? REG : IDEN;
-}
-
-static int
-number(void)
-{
- int c, base = 10;
- char *p;
- TUINT n;
-
- if (*endp == '0') {
- base = 8;
- ++endp;
- if (*endp == 'x') {
- base = 16;
- ++endp;
- }
- }
- for (n = 0; (c = *endp) && isxdigit(c); n += c) {
- n *= base;
- c -= '0';
- if (n >= TUINT_MAX - c*base)
- error("overflow in number");
- endp++;
- }
- tok2str();
- yylval.sym = tmpsym(n);
-
- return NUMBER;
-}
-
-static int
-character(void)
-{
- int c;
- char *p;
-
- while (*endp != '\'')
- ++endp;
- return NUMBER;
-}
-
-static int
-string(void)
-{
- int c;
- size_t l;
- char *s;
- Symbol *sym = tmpsym(0);
-
- for (++endp; *endp != '"'; ++endp)
- ;
- ++endp;
- tok2str();
- yylval.sym = sym;
- /* FIXME: this memory is not freed ever */
- l = yylen-2;
- s = memcpy(xmalloc(l+1), yytext+1, l);
- s[l] = '\0';
- sym->name.buf = s;
-
- return STRING;
-}
-
-static int
-operator(void)
-{
- int c;
-
- ++endp;
- if ((c = *textp) == '>')
- c = follow('=', '>', LE, SHL, '>');
- else if (c == '<')
- c = follow('=', '<', GE, SHR, '>');
- tok2str();
-
- return c;
-}
-
-int
-next(void)
-{
- int c;
-
- while (isspace(*textp))
- ++textp;
-
- endp = textp;
-
- switch (c = *textp) {
- case '\0':
- strcpy(yytext, "EOS");
- yylen = 3;
- c = EOS;
- break;
- case '"':
- c = string();
- break;
- case '\'':
- c = character();
- break;
- case '%':
- c = (regmode ? iden : operator)();
- break;
- case '_':
- c = iden();
- break;
- default:
- if (isdigit(c))
- c = number();
- else if (isalpha(c))
- c = iden();
- else
- c = operator();
- break;
- }
- return yytoken = c;
-}
-
-void
-expect(int token)
-{
- if (yytoken != token)
- unexpected();
- next();
-}
-
-void
-unexpected(void)
-{
- error("unexpected '%s'", yytext);
-}
-
-void
-error(char *msg, ...)
-{
- va_list va;
- struct input *ip;
-
- assert(isp > inputs);
- ip = &isp[-1];
-
- va_start(va, msg);
- fprintf(stderr, "as:%s:%u: ", ip->fname, ip->lineno);
- vfprintf(stderr, msg, va);
- putc('\n', stderr);
- nerrors++;
- va_end(va);
-
- if (nerrors == 10)
- die("as: too many errors");
- longjmp(recover, 1);
-}
-
-Node *
-getreg(void)
-{
- Node *np;
-
- np = node(REG, NULL, NULL);
- np->sym = yylval.sym;
- np->addr = AREG;
- expect(REG);
- return np;
-}
-
-void
-regctx(int mode)
-{
- regmode = mode;
-}
-
-Node *
-operand(char **strp)
-{
- int imm = 0;
- Node *np;
-
- textp = *strp;
- regctx(1);
- switch (next()) {
- case EOS:
- np = NULL;
- break;
- case REG:
- np = getreg();
- break;
- case STRING:
- np = node(yytoken, NULL, NULL);
- np->sym = yylval.sym;
- np->addr = ASTR;
- next();
- break;
- case '$':
- next();
- imm = 1;
- default:
- if (!imm) {
- np = moperand();
- } else {
- np = expr();
- np->addr = AIMM;
- }
- }
- if (yytoken != ',' && yytoken != EOS)
- error("trailing characters in expression '%s'", textp);
- *strp = endp;
-
- return np;
-}
-
-Node **
-getargs(char *s)
-{
- Node **ap;
- static Node *args[NARGS];
-
- if (!s)
- return NULL;
-
- for (ap = args; ap < &args[NARGS-1]; ++ap) {
- if ((*ap = operand(&s)) == NULL)
- return args;
- }
- error("too many arguments in one instruction");
-}
-
-static char *
-field(char **oldp, size_t *siz)
-{
- char *s, *t, *begin;
- size_t n;
-
- if ((begin = *oldp) == NULL)
- return NULL;
-
- for (s = begin; isspace(*s) && *s != '\t'; ++s)
- ;
- if (*s == '\0' || *s == '/' || *s == ';') {
- *s = '\0';
- return *oldp = NULL;
- }
-
- for (t = s; *t && *t != '\t'; ++t)
- ;
- if (*t == '\t')
- *t++ = '\0';
- *siz -= begin - t;
- *oldp = t;
-
- while (t >= s && isspace(*t))
- *t-- = '\0';
- return (*s != '\0') ? s : NULL;
-}
-
-static int
-validlabel(char *name)
-{
- int c;
-
- while ((c = *name++) != '\0') {
- if (isalnum(c))
- continue;
- switch (c) {
- case '_':
- case '-':
- case '.':
- case '$':
- continue;
- case ':':
- if (*name != '\0')
- return 0;
- *--name = '\0';
- continue;
- default:
- return 0;
- }
- }
- return 1;
-}
-
-static int
-extract(char *s, size_t len, struct line *lp)
-{
- int r = 0;
-
- if (lp->label = field(&s, &len))
- r++;
- if (lp->op = field(&s, &len))
- r++;
- if (lp->args = field(&s, &len))
- r++;
-
- if (s && *s && *s != '/')
- error("trailing characters at the end of the line");
- if (lp->label && !validlabel(lp->label))
- error("incorrect label name '%s'", lp->label);
-
- return r;
-}
-
-static void
-comment(FILE *fp)
-{
- int c;
-
- while ((c = getc(fp)) != EOF) {
- if (c != '*')
- continue;
- if ((c = getc(fp)) == '/')
- return;
- ungetc(c, fp);
- }
-}
-
-static size_t
-getline(FILE *fp, char buff[MAXLINE])
-{
- int c;
- char *bp;
-
- for (bp = buff; (c = getc(fp)) != EOF; *bp++ = c) {
- if (c == '\n')
- break;
- if (c == '/') {
- if ((c = getc(fp)) != '*') {
- ungetc(c, fp);
- c = '/';
- } else {
- comment(fp);
- c = ' ';
- }
- } else if (c > UCHAR_MAX) {
- error("invalid character '%x'", c);
- }
- if (bp == &buff[MAXLINE-1])
- error("line too long");
- }
- *bp = '\0';
-
- return bp - buff;
-}
-
-int
-nextline(FILE *fp, struct line *lp)
-{
- struct input *ip;
- size_t n;
- static char buff[MAXLINE];
-
- assert(isp > inputs);
-repeat:
- if (isp == inputs)
- return 0;
- ip = &isp[-1];
- if (feof(ip->fp)) {
- delinput();
- goto repeat;
- }
- n = getline(ip->fp, buff);
- if (++ip->lineno == 0)
- die("as: %s: file too long", infile);
- if (n == 0)
- goto repeat;
- if (extract(buff, n, lp) == 0)
- goto repeat;
- return 1;
-}
-
-void
-addinput(char *fname)
-{
- FILE *fp;
-
- if (isp == &inputs[NR_INPUTS])
- die("as: too many included files");
- if ((fp = fopen(fname, "r")) == NULL)
- die("as: %s: %s", fname, strerror(errno));
- isp->fname = xstrdup(fname);
- isp->fp = fp;
- isp->lineno = 0;
- ++isp;
-}
-
-int
-delinput(void)
-{
- if (isp == inputs)
- return EOF;
- --isp;
- if (fclose(isp->fp) == EOF)
- die("as: %s: %s", isp->fname, strerror(errno));
- free(isp->fname);
- return 0;
-}
--- a/src/as/symbol.c
+++ /dev/null
@@ -1,291 +1,0 @@
-static char sccsid[] = "@(#) ./as/symbol.c";
-
-#include <ctype.h>
-#include <stdio.h>
-#include <stdint.h>
-#include <string.h>
-
-#include <scc/scc.h>
-#include "as.h"
-
-#define HASHSIZ 64
-#define NALLOC 10
-
-Section *cursec, *seclist;
-Section *sabs, *sbss, *sdata, *stext;
-Symbol *linesym, *symlist;
-int pass;
-
-static Symbol *hashtbl[HASHSIZ], *symlast;
-static Alloc *tmpalloc;
-
-
-#ifndef NDEBUG
-void
-dumpstab(char *msg)
-{
- Symbol **bp, *sym;
-
- fprintf(stderr, "%s\n", msg);
- for (bp = hashtbl; bp < &hashtbl[HASHSIZ]; ++bp) {
- if (*bp == NULL)
- continue;
-
- fprintf(stderr, "[%d]", (int) (bp - hashtbl));
- for (sym = *bp; sym; sym = sym->hash) {
- fprintf(stderr, " -> %s:%0X:%0X",
- sym->name.buf, sym->flags, sym->value);
- }
- putc('\n', stderr);
- }
-}
-#endif
-
-Symbol *
-lookup(char *name)
-{
- unsigned h;
- Symbol *sym, **list;
- int c, symtype;
- char *t, *s;
-
- h = 0;
- for (s = name; c = *s; ++s)
- h = h*33 ^ c;
- h &= HASHSIZ-1;
-
- c = toupper(*name);
- list = &hashtbl[h];
- for (sym = *list; sym; sym = sym->hash) {
- t = sym->name.buf;
- if (c == toupper(*t) && !casecmp(t, name))
- return sym;
- }
-
- sym = xmalloc(sizeof(*sym));
- sym->name = newstring(name);
- sym->flags = 0;
- sym->size = sym->value = 0;
- sym->section = cursec;
- sym->hash = *list;
- sym->next = NULL;
-
- *list = sym;
- if (symlast)
- symlast->next = sym;
- symlast = sym;
- if (!symlist)
- symlist = sym;
-
- return sym;
-}
-
-Symbol *
-deflabel(char *name)
-{
- static Symbol *cursym;
- Symbol *sym;
- char label[MAXSYM+1];
-
- if (*name == '.') {
- int r;
-
- if (!cursym) {
- error("local label '%s' without global label", name);
- return NULL;
- }
- r = snprintf(label, sizeof(label),
- "%s%s",
- cursym->name.buf, name);
- if (r == sizeof(label)) {
- error("local label '%s' in '%s' produces too long symbol",
- name, cursym->name.buf);
- return NULL;
- }
- name = label;
- }
-
- sym = lookup(name);
- if (pass == 1 && (sym->flags & FDEF))
- error("redefinition of label '%s'", name);
- if (cursec->flags & SABS)
- sym->flags |= FABS;
- sym->flags |= FDEF;
- sym->value = cursec->curpc;
- sym->section = cursec;
-
- if (*name != '.')
- cursym = sym;
- return sym;
-}
-
-int
-toobig(Node *np, int type)
-{
- /* TODO */
- return 0;
-}
-
-static void
-incpc(int siz)
-{
- TUINT pc, curpc;
-
- pc = cursec->pc;
- curpc = cursec->curpc;
-
- cursec->curpc += siz;
- cursec->pc += siz;
-
- if (pass == 2)
- return;
-
- if (cursec->pc > cursec->max)
- cursec->max = cursec->pc;
-
- if (pc > cursec->pc ||
- curpc > cursec->curpc ||
- cursec->curpc > maxaddr ||
- cursec->pc > maxaddr) {
- die("as: address overflow in section '%s'");
- }
-}
-
-static int
-secflags(char *attr)
-{
- int c, flags;
-
- if (!attr)
- return 0;
-
- for (flags = 0; c = *attr++; ) {
- switch (c) {
- case 'w':
- flags |= SWRITE;
- break;
- case 'r':
- flags |= SREAD;
- break;
- case 'x':
- flags |= SEXEC;
- break;
- case 'f':
- flags |= SFILE;
- break;
- case 'l':
- flags |= SLOAD;
- break;
- case 'a':
- flags |= SABS;
- break;
- }
- }
-
- return flags;
-}
-
-Section *
-setsec(char *name, char *attr)
-{
- Section *sec;
- Symbol *sym;
-
- cursec = NULL;
- sym = lookup(name);
- if (sym->flags & ~FSECT)
- error("invalid section name '%s'", name);
-
- if ((sec = sym->section) == NULL) {
- sec = xmalloc(sizeof(*sec));
- sec->mem = NULL;
- sec->sym = sym;
- sec->base = sec->max = sec->pc = sec->curpc = 0;
- sec->next = seclist;
- sec->flags = 0;
- sec->fill = 0;
- sec->aligment = 0;
- sec->next = seclist;
- seclist = sec;
-
- sym->section = sec;
- sym->flags = FSECT;
- }
- sec->flags |= secflags(attr);
-
- return cursec = sec;
-}
-
-void
-isecs(void)
-{
- sabs = setsec(".abs", "rwx");
- sbss = setsec(".bss", "rwf");
- sdata = setsec(".data", "rw");
- stext = setsec(".text", "rx");
-}
-
-void
-cleansecs(void)
-{
- Section *sec;
- TUINT siz;
-
- for (sec = seclist; sec; sec = sec->next) {
- sec->curpc = sec->pc = sec->base;
- if (pass == 1 || sec->flags & SFILE)
- continue;
-
- siz = sec->max - sec->base;
- if (siz > SIZE_MAX)
- die("as: out of memory");
- sec->mem = xmalloc(sec->max - sec->base);
- }
- cursec = stext;
-}
-
-void
-emit(char *bytes, int n)
-{
- if (cursec->mem) {
- size_t len = cursec->pc - cursec->base;
- memcpy(&cursec->mem[len], bytes, n);
- }
- incpc(n);
-}
-
-Symbol *
-tmpsym(TUINT val)
-{
- Symbol *sym;
-
- if (!tmpalloc)
- tmpalloc = alloc(sizeof(*sym), NALLOC);
- sym = new(tmpalloc);
- sym->value = val;
- sym->section = NULL;
- sym->flags = FABS;
-
- return sym;
-}
-
-void
-killtmp(void)
-{
- if (!tmpalloc)
- return;
- dealloc(tmpalloc);
- tmpalloc = NULL;
-}
-
-String
-newstring(char *s)
-{
- size_t len = strlen(s) + 1;
- String str;
-
- str.offset = 0;
- str.buf = xmalloc(len);
- memcpy(str.buf, s, len);
- return str;
-}
--- a/src/as/target/amd64.mk
+++ /dev/null
@@ -1,10 +1,0 @@
-AMD64_OBJ = $(OBJS) \
- target/x86/amd64tbl.o \
- target/x86/amd64.o \
- target/x86/ins.o \
-
-target/x86/amd64tbl.c: target/x86/x86.dat target/x86/rules.dat
- ./mktbl -f x86 -c amd64
-
-$(LIBEXEC)/as-amd64: $(AMD64_OBJ)
- $(CC) $(SCC_LDFLAGS) $(AMD64_OBJ) -lscc -o $@
--- a/src/as/target/i286.mk
+++ /dev/null
@@ -1,10 +1,0 @@
-I286_OBJ = $(OBJS) \
- target/x86/i286tbl.o \
- target/x86/i286.o \
- target/x86/ins.o \
-
-target/x86/i286tbl.c: target/x86/x86.dat target/x86/rules.dat
- ./mktbl -f x86 -c i286
-
-$(LIBEXEC)/as-i286: $(I286_OBJ)
- $(CC) $(SCC_LDFLAGS) $(I286_OBJ) -lscc -o $@
--- a/src/as/target/i386.mk
+++ /dev/null
@@ -1,10 +1,0 @@
-I386_OBJ = $(OBJS) \
- target/x86/i386tbl.o \
- target/x86/i386.o \
- target/x86/ins.o \
-
-target/x86/i386tbl.c: target/x86/x86.dat target/x86/rules.dat
- ./mktbl -f x86 -c i386
-
-$(LIBEXEC)/as-i386: $(I386_OBJ)
- $(CC) $(SCC_LDFLAGS) $(I386_OBJ) -lscc -o $@
--- a/src/as/target/x80/.gitignore
+++ /dev/null
@@ -1,1 +1,0 @@
-z80tbl.c
--- a/src/as/target/x80/ins.c
+++ /dev/null
@@ -1,601 +1,0 @@
-static char sccsid[] = "@(#) ./as/target/x80/ins.c";
-
-#include <stdlib.h>
-#include <string.h>
-
-#include <scc/scc.h>
-
-#include "../../as.h"
-#include "proc.h"
-
-/*
- * This implementation is based in:
- * - Zilog Z80 CPU Specifications by Sean Young
- * - Decoding Z80 opcodes - of use to disassembler and emulator
- * writers - by Cristian Dinu.
- */
-
-static int
-getclass(Node *np)
-{
- if (np->addr != AREG)
- return 0;
-
- switch (np->sym->value) {
- case AREG_C:
- return RCLASS | PCLASS | QCLASS | CCCLASS | SSCLASS;
- case AREG_A:
- case AREG_B:
- case AREG_D:
- case AREG_E:
- return RCLASS | PCLASS | QCLASS;
- case AREG_H:
- case AREG_L:
- return RCLASS;
- case AREG_IXL:
- case AREG_IXH:
- return PCLASS;
- case AREG_IYL:
- case AREG_IYH:
- return QCLASS;
- case AREG_HL:
- return DDCLASS | QQCLASS;
- case AREG_BC:
- case AREG_DE:
- return DDCLASS | QQCLASS | PPCLASS | RRCLASS;
- case AREG_SP:
- return DDCLASS | PPCLASS | RRCLASS;
- case AREG_AF:
- return QQCLASS;
- case AREG_IX:
- return PPCLASS;
- case AREG_IY:
- return RRCLASS;
- case AREG_PO:
- case AREG_PE:
- case AREG_P:
- case AREG_M:
- return CCCLASS;
- case AREG_NZ:
- case AREG_Z:
- case AREG_NC:
- return CCCLASS | SSCLASS;
- default:
- return 0;
- }
-}
-
-int
-match(Op *op, Node **args)
-{
- unsigned char *p;
- int arg, class, rep, opt;
- Node *np;
-
- if (!op->args)
- return args == NULL;
-
- opt = rep = 0;
- for (p = op->args; arg = *p; ++p) {
- if (rep)
- --p;
- if ((np = *args++) == NULL)
- return (rep|opt) != 0;
-
- switch (arg) {
- case AOPT:
- opt = 1;
- break;
- case AREP:
- rep = 1;
- break;
- case AINDER_C:
- arg = AREG_C;
- goto indirect;
- case AINDER_HL:
- arg = AREG_HL;
- goto indirect;
- case AINDER_DE:
- arg = AREG_DE;
- goto indirect;
- case AINDER_BC:
- arg = AREG_BC;
- goto indirect;
- case AINDER_IX:
- arg = AREG_IX;
- goto indirect;
- case AINDER_IY:
- arg = AREG_IY;
- goto indirect;
- case AINDER_SP:
- arg = AREG_SP;
- indirect:
- if (np->addr != AINDIR)
- return 0;
- np = np->left;
- case AREG_A:
- case AREG_I:
- case AREG_R:
- case AREG_F:
- case AREG_HL:
- case AREG_BC:
- case AREG_DE:
- case AREG_IY:
- case AREG_IX:
- case AREG_SP:
- case AREG_AF:
- case AREG_AF_:
- if (np->addr != AREG || np->sym->value != arg)
- return 0;
- break;
- case AREG_RCLASS:
- class = RCLASS;
- goto check_class;
- case AREG_PCLASS:
- class = PCLASS;
- goto check_class;
- case AREG_QCLASS:
- class = QCLASS;
- goto check_class;
- case AREG_QQCLASS:
- class = QQCLASS;
- goto check_class;
- case AREG_PPCLASS:
- class = PPCLASS;
- goto check_class;
- case AREG_RRCLASS:
- class = RRCLASS;
- goto check_class;
- case AREG_CCCLASS:
- class = CCCLASS;
- goto check_class;
- case AREG_SSCLASS:
- class = SSCLASS;
- goto check_class;
- case AREG_DDCLASS:
- class = DDCLASS;
- check_class:
- if ((getclass(np) & class) == 0)
- return 0;
- break;
- case AINDEX_IY:
- arg = AREG_IY;
- goto index_address;
- case AINDEX_IX:
- arg = AREG_IX;
- index_address:
- if (np->addr != AINDEX)
- return 0;
- if (np->left->left->sym->value != arg)
- return 0;
- if (toobig(np, arg))
- error("overflow in index");
- break;
- case ARST:
- if (np->addr != AIMM)
- return 0;
- if ((np->sym->value & ~0x38) != 0)
- return 0;
- break;
- case AZERO:
- case AIMM3:
- case AIMM8:
- case AIMM16:
- case AIMM32:
- case AIMM64:
- if (np->addr != AIMM)
- return 0;
- if (toobig(np, arg))
- error("overflow in immediate operand");
- break;
- case ASYM:
- if (np->addr != AIMM || np->op != IDEN)
- return 0;
- break;
- case ADIRECT:
- case ASTR:
- if (np->addr != arg)
- return 0;
- break;
- default:
- abort();
- }
- }
-
- return *args == NULL;
-}
-
-/*
- * (expr) -> ADIRECT
- * (REG) -> AINDIR
- * (REG + expr) -> AINDEX
- * (REG - expr) -> AINDEX
- * expr (REG) -> AINDEX
- */
-Node *
-moperand(void)
-{
- int op;
- Node *np, *dir, *off, *reg;
-
- dir = off = reg = NULL;
- if (accept('(')) {
- if (yytoken != REG) {
- dir = expr();
- } else {
- reg = getreg();
- switch (yytoken) {
- case '+':
- case '-':
- off = expr();
- case ')':
- break;
- default:
- unexpected();
- }
- }
- } else {
- off = expr();
- expect('(');
- reg = getreg();
- }
- expect(')');
-
- if (dir) {
- op = ADIRECT;
- np = dir;
- } else if (off) {
- np = node(AREG_OFF, reg, off);
- op = AINDEX;
- } else {
- np = reg;
- op = AINDIR;
- }
- np = node(op, np, NULL);
- np->addr = op;
- return np;
-}
-
-static int
-reg2int(Node *np)
-{
- switch (np->sym->value) {
- case AREG_F:
- case AREG_B: return 0;
- case AREG_C: return 1;
- case AREG_D: return 2;
- case AREG_E: return 3;
- case AREG_IXH:
- case AREG_IYH:
- case AREG_H: return 4;
- case AREG_IXL:
- case AREG_IYL:
- case AREG_L: return 5;
- case AREG_A: return 7;
- case AREG_BC: return 0;
- case AREG_DE: return 1;
- case AREG_HL:
- case AREG_IX:
- case AREG_IY: return 2;
- case AREG_AF:
- case AREG_SP: return 3;
- default: abort();
- }
-}
-
-static int
-cc2int(Node *np)
-{
- switch (np->sym->value) {
- case AREG_NZ: return 0;
- case AREG_Z: return 1;
- case AREG_NC: return 2;
- case AREG_C: return 3;
- case AREG_PO: return 4;
- case AREG_PE: return 5;
- case AREG_P: return 6;
- case AREG_M: return 7;
- default: abort();
- }
-}
-
-static int
-ss2int(Node *np)
-{
- switch (np->sym->value) {
- case AREG_NZ: return 4;
- case AREG_Z: return 5;
- case AREG_NC: return 6;
- case AREG_C: return 7;
- default: abort();
- }
-}
-
-void
-dir(Op *op, Node **args)
-{
- Node *imm;
- unsigned char buf[4];
- unsigned val;
- int n = op->size;
-
- imm = (args[1]->addr == ADIRECT) ? args[1] : args[0];
- imm = imm->left;
- memcpy(buf, op->bytes, n);
- val = imm->sym->value;
- buf[n-1] = val >> 8;
- buf[n-2] = val;
- emit(buf, n);
-}
-
-void
-ld8(Op *op, Node **args)
-{
- Node *par1 = args[0], *par2 = args[1];
- int n = op->size, i = n;;
- unsigned regval = 0;
- unsigned char buf[4];
-
- memcpy(buf, op->bytes, n);
-
- if (par1->addr == AREG)
- regval |= reg2int(par1) << 3;
- if (par2->addr == AREG)
- regval |= reg2int(par2);
- else if (par2->addr == AIMM)
- buf[--i] = par2->sym->value;
-
- buf[--i] |= regval;
- emit(buf, n);
-}
-
-void
-alu16(Op *op, Node **args)
-{
- Node *par;
- int n = op->size;
- unsigned val;
- unsigned char buf[4];
-
- par = (args[1]) ? args[1] : args[0];
- val = reg2int(par);
- memcpy(buf, op->bytes, n);
- buf[n-1] |= val << 4;
- emit(buf, n);
-}
-
-void
-ld16(Op *op, Node **args)
-{
- Node *dst, *src, *tmp;
- int n = op->size;
- unsigned val;
- unsigned char buf[4];
-
- dst = args[0];
- src = args[1];
- if (!src) {
- alu16(op, args);
- return;
- }
-
- if (dst->addr != AREG) {
- tmp = src;
- src = dst;
- dst = tmp;
- }
-
- memcpy(buf, op->bytes, n);
- if (src->addr == ADIRECT)
- src = src->left;
- val = src->sym->value;
- buf[n-1] = val >> 8;
- buf[n-2] = val;
- buf[n-3] |= reg2int(dst) << 4;
- emit(buf, n);
-}
-
-void
-alu8(Op *op, Node **args)
-{
- Node *par = args[1];
- unsigned char buf[4];
- int n = op->size, shift;
- unsigned val;
-
- if (args[1]) {
- shift = 0;
- par = args[1];
- } else {
- shift = 3;
- par = args[0];
- }
-
- switch (par->addr) {
- case AIMM:
- val = par->sym->value;
- break;
- case AREG:
- val = reg2int(par) << shift;
- break;
- case AINDEX:
- val = par->left->right->sym->value;
- break;
- case AINDIR:
- val = 0;
- break;
- default:
- abort();
- }
-
- memcpy(buf, op->bytes, n);
- buf[n-1] |= val;
- emit(buf, n);
-}
-
-void
-idx(Op *op, Node **args)
-{
- Node *tmp, *idx, *imm, *reg;
- unsigned char buf[4];
- int n = op->size, i = n, shift = 0;
-
- imm = reg = NULL;
- if (args[0]->addr != AINDEX) {
- shift = 3;
- tmp = args[0];
- args[0] = args[1];
- args[1] = tmp;
- }
- idx = args[0]->left->right;
-
- if (args[1]->addr == AREG)
- reg = args[1];
- else
- imm = args[1];
-
- memcpy(buf, op->bytes, n);
-
- if (imm)
- buf[--i] = imm->sym->value;
- buf[--i] = idx->sym->value;
- if (reg)
- buf[--i] |= reg2int(reg) << shift;
-
- emit(buf, n);
-}
-
-void
-inout(Op *op, Node **args)
-{
- Node *port, *value;
- unsigned val;
- int n = op->size;
- unsigned char buf[5];
-
- port = args[0];
- value = args[1];
- if (port->addr != ADIRECT && port->addr != AINDIR) {
- value = port;
- port = args[1];
- }
-
- if (port->addr == ADIRECT)
- val = port->left->sym->value;
- else if (value->addr == AREG)
- val = reg2int(value) << 3;
- else
- val = 0;
-
- memcpy(buf, op->bytes, n);
- buf[n-1] |= val;
- emit(buf, n);
-}
-
-void
-rot_bit(Op *op, Node **args)
-{
- Node *par = args[0];
- unsigned char buf[5];
- int n = op->size;
- unsigned val, npar = 0;
-
- memcpy(buf, op->bytes, n);
-
- par = args[0];
- if (par->addr == AIMM) {
- buf[n-1] |= par->sym->value << 3;
- par = args[npar = 1];
- }
-
- switch (par->addr) {
- case AINDEX:
- val = par->left->right->sym->value;
- buf[n-2] = val;
- par = args[npar+1];
- if (!par)
- break;
- case AREG:
- val = reg2int(par);
- buf[n-1] |= val;
- case AINDIR:
- break;
- default:
- abort();
- }
-
- emit(buf, n);
-}
-
-void
-im(Op *op, Node **args)
-{
- unsigned val = args[0]->sym->value;
- unsigned char buf[4];
- int n = op->size;
-
- if (val > 0)
- ++val;
-
- memcpy(buf, op->bytes, n);
- buf[n-1] |= val << 3;
- emit(buf, n);
-}
-
-void
-branch(int relative, Op *op, Node **args)
-{
- unsigned char buf[4];
- Node *flag, *imm;
- int n = op->size, i = n;
- unsigned val;
- int (*fun)(Node *);
-
- flag = imm = NULL;
- if (args[0]->addr == AREG) {
- flag = args[0];
- imm = args[1];
- } else if (args[0]->addr == AIMM) {
- imm = args[0];
- }
- memcpy(buf, op->bytes, n);
-
- if (imm) {
- val = imm->sym->value;
- if (!relative)
- buf[--i] = val >> 8;
- else
- val -= cursec->curpc - 2;
- buf[--i] = val;
-
- }
- if (flag) {
- fun = (relative) ? ss2int : cc2int;
- buf[--i] |= (*fun)(flag) << 3;
- }
-
-
- emit(buf, n);
-}
-
-void
-jp(Op *op, Node **args)
-{
- branch(0, op, args);
-}
-
-void
-jr(Op *op, Node **args)
-{
- branch(1, op, args);
-}
-
-void
-rst(Op *op, Node **args)
-{
- unsigned char buf[1];
-
- buf[0] = op->bytes[0];
- buf[0] |= args[0]->sym->value;
- emit(buf, 1);
-}
--- a/src/as/target/x80/proc.h
+++ /dev/null
@@ -1,75 +1,0 @@
-enum args {
- AREG_AF = AMAX,
- AREG_A,
- AREG_F,
-
- AREG_BC,
- AREG_B,
- AREG_C,
-
- AREG_HL,
- AREG_H,
- AREG_L,
-
- AREG_DE,
- AREG_D,
- AREG_E,
-
- AREG_IX,
- AREG_IXL,
- AREG_IXH,
-
- AREG_IY,
- AREG_IYL,
- AREG_IYH,
-
- AREG_R,
- AREG_I,
- AREG_AF_,
- AREG_SP,
-
- AREG_NZ,
- AREG_Z,
- AREG_NC,
- AREG_PO,
- AREG_PE,
- AREG_P,
- AREG_M,
-
- AREG_RCLASS, /* register class for B, C, D, E, H, L and A */
- AREG_PCLASS, /* register class for B, C, D, E, IXH, IXL and A */
- AREG_QCLASS, /* register class for B, C, D, E, IYH, IYL and A */
- AREG_DDCLASS, /* register class for BC, DE, HL and SP */
- AREG_QQCLASS, /* register class for BC, DE, HL and AF */
- AREG_PPCLASS, /* register class for BC, DE, IX and SP */
- AREG_RRCLASS, /* register class for BC, DE, IY and SP */
- AREG_SSCLASS, /* flag class for C, NC, Z, NZ */
- AREG_CCCLASS, /* flag class for NZ, Z, NC, C, PO, PE, P, M */
-
- AINDEX_IX, /* (IX+d) */
- AINDEX_IY, /* (IX+d) */
-
- AINDER_HL, /* (HL) */
- AINDER_DE, /* (DE) */
- AINDER_BC, /* (BC) */
- AINDER_SP, /* (SP) */
- AINDER_C, /* (C) */
- AINDER_IX, /* (IX) */
- AINDER_IY, /* (IY) */
-
- AIMM3, /* 3 bit immediate */
- AZERO, /* a literal 0 */
- ARST, /* 0h, 08h, 10h, 18h, 20h, 28h, 30h, 38h */
-};
-
-enum class {
- RCLASS = 1 << 0,
- PCLASS = 1 << 1,
- QCLASS = 1 << 2,
- DDCLASS = 1 << 3,
- QQCLASS = 1 << 4,
- PPCLASS = 1 << 5,
- RRCLASS = 1 << 6,
- CCCLASS = 1 << 7,
- SSCLASS = 1 << 8,
-};
--- a/src/as/target/x80/rules.dat
+++ /dev/null
@@ -1,39 +1,0 @@
-imm8 AIMM8
-imm16 AIMM16
-imm32 AIMM32
-imm64 AIMM64
-imm3 AIMM3
-rst ARST
-\(IY\+n\) AINDEX_IY
-\(IX\+n\) AINDEX_IX
-ss AREG_SSCLASS
-cc AREG_CCCLASS
-dd AREG_DDCLASS
-qq AREG_QQCLASS
-rr AREG_RRCLASS
-pp AREG_PPCLASS
-p AREG_PCLASS
-q AREG_QCLASS
-r AREG_RCLASS
-R AREG_R
-\(DE\) AINDER_DE
-\(BC\) AINDER_BC
-\(HL\) AINDER_HL
-\(SP\) AINDER_SP
-\(C\) AINDER_C
-\(IX\) AINDER_IX
-\(IY\) AINDER_IY
-SP AREG_SP
-HL AREG_HL
-DE AREG_DE
-IX AREG_IX
-IY AREG_IY
-AF' AREG_AF_
-AF AREG_AF
-A AREG_A
-F AREG_F
-\(n\) ADIRECT
-I AREG_I
-0 AZERO
-sym ASYM
-string ASTR
--- a/src/as/target/x80/x80.dat
+++ /dev/null
@@ -1,374 +1,0 @@
-# Tab 18, tabs 18, :set ts=18
-# op args size bytes format cpu
-.SECTION sym,string? 0 none section Z80,R800,GB80
-.TEXT none 0 none text Z80,R800,GB80
-.DATA none 0 none data Z80,R800,GB80
-.BSS none 0 none bss Z80,R800,GB80
-.DB imm8+ 0 none defb Z80,R800,GB80
-.DEFB imm8+ 0 none defb Z80,R800,GB80
-.BYTE imm8+ 0 none defb Z80,R800,GB80
-.DW imm16+ 0 none defw Z80,R800,GB80
-.DEFW imm16+ 0 none defw Z80,R800,GB80
-.SHORT imm16+ 0 none defw Z80,R800,GB80
-.WORD imm16+ 0 none defw Z80,R800,GB80
-.DD imm32+ 0 none defd Z80,R800,GB80
-.DEFD imm32+ 0 none defd Z80,R800,GB80
-.LONG imm32+ 0 none defd Z80,R800,GB80
-.INT imm16+ 0 none defd Z80,R800,GB80
-.DQ imm64+ 0 none defq Z80,R800,GB80
-.DEFQ imm64+ 0 none defq Z80,R800,GB80
-.EQU sym,imm16 0 none equ Z80,R800,GB80
-.EQU imm16 0 none equ Z80,R800,GB80
-= imm16 0 none equ Z80,R800,GB80
-.SIZE sym,imm16 0 none size Z80,R800,GB80
-.SIZE imm16 0 none size Z80,R800,GB80
-.COMM sym,imm16 0 none common Z80,R800,GB80
-.COMM imm16 0 none common Z80,R800,GB80
-.TYPE sym,imm16 0 none type Z80,R800,GB80
-.TYPE imm16 0 none type Z80,R800,GB80
-.GLOBL sym+ 0 none global Z80,R800,GB80
-.PUBLIC sym+ 0 none global Z80,R800,GB80
-.EXTERN sym+ 0 none extrn Z80,R800,GB80
-.EXTRN sym+ 0 none extrn Z80,R800,GB80
-.STRING string+ 0 none string Z80,R800,GB80
-.ASCII string+ 0 none ascii Z80,R800,GB80
-.ALIGN imm16+ 0 none align Z80,R800,GB80
-.END none 0 none end Z80,R800,GB80
-.INCLUDE string 0 none include Z80,R800,GB80
-
-
-
-# p is any register from B, C, D, E, IXL, IXH, A
-# q is any register from B, C, D, E, IYL, IYH, A
-# r is any register from B, C, D, E, L, H, A
-# dd is any register from BC, DE, HL, SP
-# qq is any register from BC, DE, HL, AF
-# pp is any register from BC, DE, IX, SP
-# rr is any register from BC, DE, IY, SP
-# cc is any flag from NZ, Z, NC, C, PO, PE, P, M
-# ss is any flag from C, NC, Z, NZ
-
-# 8 bit load group
-LD r,imm8 2 0x06 ld8 Z80,R800,GB80
-LD p,imm8 3 0xdd,0x06 ld8 Z80,R800
-LD q,imm8 3 0xfd,0x06 ld8 Z80,R800
-LD (HL),imm8 2 0x36 ld8 Z80,R800,GB80
-
-LD r,r 1 0x40 ld8 Z80,R800,GB80
-LD p,p 2 0xdd,0x40 ld8 Z80,R800
-LD q,q 2 0xfd,0x40 ld8 Z80,R800
-LD (HL),r 1 0x70 ld8 Z80,R800,GB80
-LD r,(HL) 1 0x46 ld8 Z80,R800,GB80
-
-LD r,(IX+n) 3 0xdd,0x46 idx Z80,R800
-LD r,(IY+n) 3 0xfd,0x46 idx Z80,R800
-LD (IX+n),r 3 0xdd,0x70 idx Z80,R800
-LD (IY+n),r 3 0xfd,0x70 idx Z80,R800
-
-LD (HL),imm8 2 0x36 ld8 Z80,R800,GB80
-LD (IX+n),imm8 4 0xdd,0x36 idx Z80,R800
-LD (IY+n),imm8 4 0xfd,0x36 idx Z80,R800
-
-LD A,(BC) 1 0x0a noargs Z80,R800,GB80
-LD A,(DE) 1 0x1a noargs Z80,R800,GB80
-LD A,(n) 3 0x3a dir Z80,R800
-
-LD (BC),A 1 0x2 noargs Z80,R800,GB80
-LD (DE),A 1 0x12 noargs Z80,R800,GB80
-LD (n),A 3 0x32 dir Z80,R800
-
-LD A,(n) 3 0xfa dir GB80
-LD A,(HL+) 1 0x2a ld8 GB80 #TODO
-LD A,(HL-) 1 0x3a ld8 GB80 #TODO
-LD A,($FF00+n) 2 0xf0 dir GB80 #TODO
-LD A,($FF00+C) 2 0xf2 dir GB80 #TODO
-
-LD (n),A 3 0xea dir GB80
-LD (HL+),A 1 0x22 ld8 GB80 #TODO
-LD (HL-),A 1 0x32 ld8 GB80 #TODO
-LD ($FF00+n),A 2 0xe0 dir GB80 #TODO
-LD ($FF00+C),A 2 0xe2 dir GB80 #TODO
-
-LD A,I 2 0xed,0x57 noargs Z80,R800
-LD A,R 2 0xed,0x5f noargs Z80,R800
-LD I,A 2 0xed,0x47 noargs Z80,R800
-LD R,A 2 0xed,0x4f noargs Z80,R800
-
-# 16 bit load group
-LD dd,imm16 3 0x01 ld16 Z80,R800,GB80
-LD IX,imm16 4 0xdd,0x21 ld16 Z80,R800
-LD IY,imm16 4 0xfd,0x21 ld16 Z80,R800
-
-LD HL,(n) 3 0x2a ld16 Z80,R800,GB80
-LD dd,(n) 4 0xed,0x4b ld16 Z80,R800
-LD IX,(n) 4 0xdd,0x2a ld16 Z80,R800
-LD IY,(n) 4 0xfd,0x2a ld16 Z80,R800
-
-LD (n),HL 3 0x22 ld16 Z80,R800,GB80
-LD (n),dd 4 0xed,0x43 ld16 Z80,R800
-LD (n),IX 4 0xdd,0x22 ld16 Z80,R800
-LD (n),IY 4 0xfd,0x22 ld16 Z80,R800
-
-LD SP,HL 1 0xf9 noargs Z80,R800,GB80
-LD SP,IX 2 0xdd,0xf9 noargs Z80,R800
-LD SP,IY 2 0xfd,0xf9 noargs Z80,R800
-
-PUSH qq 1 0xc5 ld16 Z80,R800,GB80
-PUSH IX 2 0xdd,0xe5 ld16 Z80,R800
-PUSH IY 2 0xfd,0xe5 ld16 Z80,R800
-POP qq 1 0xc1 ld16 Z80,R800,GB80
-POP IX 2 0xdd,0xe1 ld16 Z80,R800
-POP IY 2 0xfd,0xe1 ld16 Z80,R800
-
-# 8 bit ALU group
-ADD A,r 1 0x80 alu8 Z80,R800,GB80
-ADD A,p 2 0xdd,0x80 alu8 Z80,R800
-ADD A,q 2 0xfd,0x80 alu8 Z80,R800
-ADD A,imm8 2 0xc6 alu8 Z80,R800,GB80
-ADD A,(HL) 1 0x86 alu8 Z80,R800,GB80
-ADD A,(IX+n) 3 0xdd,0x86 alu8 Z80,R800
-ADD A,(IY+n) 3 0xfd,0x86 alu8 Z80,R800
-
-ADC A,r 1 0x88 alu8 Z80,R800,GB80
-ADC A,p 2 0xdd,0x88 alu8 Z80,R800
-ADC A,q 2 0xfd,0x88 alu8 Z80,R800
-ADC A,imm8 2 0xce alu8 Z80,R800,GB80
-ADC A,(HL) 1 0x8e alu8 Z80,R800,GB80
-ADC A,(IX+n) 3 0xdd,0x8e alu8 Z80,R800
-ADC A,(IY+n) 3 0xfd,0x8e alu8 Z80,R800
-
-SUB A,r 1 0x90 alu8 Z80,R800,GB80
-SUB A,p 2 0xdd,0x90 alu8 Z80,R800
-SUB A,q 2 0xfd,0x90 alu8 Z80,R800
-SUB A,imm8 2 0xd6 alu8 Z80,R800,GB80
-SUB A,(HL) 1 0x96 alu8 Z80,R800,GB80
-SUB A,(IX+n) 3 0xdd,0x96 alu8 Z80,R800
-SUB A,(IY+n) 3 0xfd,0x96 alu8 Z80,R800
-
-SBC A,r 1 0x98 alu8 Z80,R800,GB80
-SBC A,p 2 0xdd,0x98 alu8 Z80,R800
-SBC A,q 2 0xfd,0x98 alu8 Z80,R800
-SBC A,imm8 2 0xde alu8 Z80,R800,GB80
-SBC A,(HL) 1 0x9e alu8 Z80,R800,GB80
-SBC A,(IX+n) 3 0xdd,0x9e alu8 Z80,R800
-SBC A,(IY+n) 3 0xfd,0x9e alu8 Z80,R800
-
-AND A,r 1 0xa0 alu8 Z80,R800,GB80
-AND A,p 2 0xdd,0xa0 alu8 Z80,R800
-AND A,q 2 0xfd,0xa0 alu8 Z80,R800
-AND A,imm8 2 0xe6 alu8 Z80,R800,GB80
-AND A,(HL) 1 0xa6 alu8 Z80,R800,GB80
-AND A,(IX+n) 3 0xdd,0xa6 alu8 Z80,R800
-AND A,(IY+n) 3 0xfd,0xa6 alu8 Z80,R800
-
-OR A,r 1 0xb0 alu8 Z80,R800,GB80
-OR A,p 2 0xdd,0xb0 alu8 Z80,R800
-OR A,q 2 0xfd,0xb0 alu8 Z80,R800
-OR A,imm8 2 0xf6 alu8 Z80,R800,GB80
-OR A,(HL) 1 0xb6 alu8 Z80,R800,GB80
-OR A,(IX+n) 3 0xdd,0xb6 alu8 Z80,R800
-OR A,(IY+n) 3 0xfd,0xb6 alu8 Z80,R800
-
-XOR A,r 1 0xa8 alu8 Z80,R800,GB80
-XOR A,p 2 0xdd,0xa8 alu8 Z80,R800
-XOR A,q 2 0xfd,0xa8 alu8 Z80,R800
-XOR A,imm8 2 0xee alu8 Z80,R800,GB80
-XOR A,(HL) 1 0xae alu8 Z80,R800,GB80
-XOR A,(IX+n) 3 0xdd,0xae alu8 Z80,R800
-XOR A,(IY+n) 3 0xfd,0xae alu8 Z80,R800
-
-CP A,r 1 0xb8 alu8 Z80,R800,GB80
-CP A,p 2 0xdd,0xb8 alu8 Z80,R800
-CP A,q 2 0xfd,0xb8 alu8 Z80,R800
-CP A,imm8 2 0xfe alu8 Z80,R800,GB80
-CP A,(HL) 1 0xbe alu8 Z80,R800,GB80
-CP A,(IX+n) 3 0xdd,0xbe alu8 Z80,R800
-CP A,(IY+n) 3 0xfd,0xbe alu8 Z80,R800
-
-INC r 1 0x04 alu8 Z80,R800,GB80
-INC p 2 0xdd,0x04 alu8 Z80,R800
-INC q 2 0xfd,0x04 alu8 Z80,R800
-INC (HL) 1 0x34 alu8 Z80,R800,GB80
-INC (IX+n) 3 0xdd,0x34 alu8 Z80,R800
-INC (IY+n) 3 0xfd,0x34 alu8 Z80,R800
-
-DEC r 1 0x05 alu8 Z80,R800,GB80
-DEC p 2 0xdd,0x05 alu8 Z80,R800
-DEC q 2 0xfd,0x05 alu8 Z80,R800
-DEC (HL) 1 0x35 alu8 Z80,R800,GB80
-DEC (IX+n) 3 0xdd,0x35 alu8 Z80,R800
-DEC (IY+n) 3 0xfd,0x35 alu8 Z80,R800
-
-ADD SP,dd 2 0xE8 alu8 GB80
-LD HL,SP+imm8 2 0xF8 alu8 GB80
-
-# 16 bit ALU group
-ADD HL,dd 1 0x09 alu16 Z80,R800,GB80
-ADC HL,dd 2 0xed,0x4a alu16 Z80,R800
-SBC HL,dd 2 0xed,0x42 alu16 Z80,R800
-ADD IX,pp 2 0xdd,0x09 alu16 Z80,R800
-ADD IY,rr 2 0xfd,0x09 alu16 Z80,R800
-
-INC dd 1 0x03 alu16 Z80,R800,GB80
-INC IX 2 0xdd,0x23 alu16 Z80,R800
-INC IY 2 0xfd,0x23 alu16 Z80,R800
-
-DEC dd 1 0x0b alu16 Z80,R800,GB80
-DEC IX 2 0xdd,0x2b alu16 Z80,R800
-DEC IY 2 0xfd,0x2b alu16 Z80,R800
-
-# General purpose arithmetic and CPU control group
-DAA none 1 0x27 noargs Z80,R800,GB80
-CPL none 1 0x2f noargs Z80,R800,GB80
-NEG none 2 0xed,0x44 noargs Z80,R800
-CCF none 1 0x3f noargs Z80,R800,GB80
-SCF none 1 0x37 noargs Z80,R800,GB80
-NOP none 1 0x00 noargs Z80,R800,GB80
-HALT none 1 0x76 noargs Z80,R800,GB80
-STOP none 2 0x10,0x00 noargs GB80
-DI none 1 0xf3 noargs Z80,R800,GB80
-EI none 1 0xfb noargs Z80,R800,GB80
-IM imm8 2 0xed,0x46 im Z80,R800
-
-# Exchange, block transfer and search groups
-EX DE,HL 1 0xeb noargs Z80,R800
-EX AF,AF' 1 0x08 noargs Z80,R800
-EXX none 1 0xd9 noargs Z80,R800
-EX (SP),HL 1 0xe3 noargs Z80,R800
-EX (SP),IX 2 0xdd,0xe3 noargs Z80,R800
-EX (SP),IY 2 0xfd,0xe3 noargs Z80,R800
-
-LDI none 2 0xed,0xa0 noargs Z80,R800
-LDIR none 2 0xed,0xb0 noargs Z80,R800
-LDD none 2 0xed,0xa8 noargs Z80,R800
-LDDR none 2 0xed,0xb8 noargs Z80,R800
-
-CPI none 2 0xed,0xa1 noargs Z80,R800
-CPIR none 2 0xed,0xb1 noargs Z80,R800
-CPD none 2 0xed,0xa9 noargs Z80,R800
-CPDR none 2 0xed,0xb9 noargs Z80,R800
-
-# Rotate and shift group
-RLCA none 1 0x07 noargs Z80,R800,GB80
-RLA none 1 0x17 noargs Z80,R800,GB80
-RRCA none 1 0x0f noargs Z80,R800,GB80
-RRA none 1 0x1f noargs Z80,R800,GB80
-
-RLD none 2 0xed,0x6f noargs Z80,R800
-RRD none 2 0xed,0x67 noargs Z80,R800
-
-RLC r 2 0xcb,0x00 rot_bit Z80,R800,GB80
-RLC (HL) 2 0xcb,0x06 rot_bit Z80,R800,GB80
-RLC (IX+n) 4 0xdd,0xcb,0,0x06 rot_bit Z80,R800
-RLC (IY+n) 4 0xfd,0xcb,0,0x06 rot_bit Z80,R800
-RLC (IX+n),r 4 0xdd,0xcb,0,0x00 rot_bit Z80,R800
-RLC (IY+n),r 4 0xfd,0xcb,0,0x00 rot_bit Z80,R800
-
-RL r 2 0xcb,0x10 rot_bit Z80,R800,GB80
-RL (HL) 2 0xcb,0x16 rot_bit Z80,R800,GB80
-RL (IX+n) 4 0xdd,0xcb,0,0x16 rot_bit Z80,R800
-RL (IY+n) 4 0xfd,0xcb,0,0x16 rot_bit Z80,R800
-RL (IX+n),r 4 0xdd,0xcb,0,0x10 rot_bit Z80,R800
-RL (IY+n),r 4 0xfd,0xcb,0,0x10 rot_bit Z80,R800
-
-RRC r 2 0xcb,0x08 rot_bit Z80,R800,GB80
-RRC (HL) 2 0xcb,0x0e rot_bit Z80,R800,GB80
-RRC (IX+n) 4 0xdd,0xcb,0,0x0e rot_bit Z80,R800
-RRC (IY+n) 4 0xfd,0xcb,0,0x0e rot_bit Z80,R800
-RRC (IX+n),r 4 0xdd,0xcb,0,0x08 rot_bit Z80,R800
-RRC (IY+n),r 4 0xfd,0xcb,0,0x08 rot_bit Z80,R800
-
-RR r 2 0xcb,0x18 rot_bit Z80,R800,GB80
-RR (HL) 2 0xcb,0x1e rot_bit Z80,R800,GB80
-RR (IX+n) 4 0xdd,0xcb,0,0x1e rot_bit Z80,R800
-RR (IY+n) 4 0xfd,0xcb,0,0x1e rot_bit Z80,R800
-RR (IX+n),r 4 0xdd,0xcb,0,0x18 rot_bit Z80,R800
-RR (IY+n),r 4 0xfd,0xcb,0,0x18 rot_bit Z80,R800
-
-SLA r 2 0xcb,0x20 rot_bit Z80,R800,GB80
-SLA (HL) 2 0xcb,0x26 rot_bit Z80,R800,GB80
-SLA (IX+n) 4 0xdd,0xcb,0,0x26 rot_bit Z80,R800
-SLA (IY+n) 4 0xfd,0xcb,0,0x26 rot_bit Z80,R800
-SLA (IX+n),r 4 0xdd,0xcb,0,0x20 rot_bit Z80,R800
-SLA (IY+n),r 4 0xfd,0xcb,0,0x20 rot_bit Z80,R800
-
-SWAP r 2 0xcb,0x30 rot_bit GB80
-SWAP (HL) 2 0xcb,0x36 rot_bit GB80
-
-SLL r 2 0xcb,0x30 rot_bit Z80
-SLL (HL) 2 0xcb,0x36 rot_bit Z80
-SLL (IX+n) 4 0xdd,0xcb,0,0x36 rot_bit Z80
-SLL (IY+n) 4 0xfd,0xcb,0,0x36 rot_bit Z80
-SLL (IX+n),r 4 0xdd,0xcb,0,0x30 rot_bit Z80
-SLL (IY+n),r 4 0xfd,0xcb,0,0x30 rot_bit Z80
-
-SRA r 2 0xcb,0x28 rot_bit Z80,R800,GB80
-SRA (HL) 2 0xcb,0x2e rot_bit Z80,R800,GB80
-SRA (IX+n) 4 0xdd,0xcb,0,0x2e rot_bit Z80,R800
-SRA (IY+n) 4 0xfd,0xcb,0,0x2e rot_bit Z80,R800
-SRA (IX+n),r 4 0xdd,0xcb,0,0x28 rot_bit Z80,R800
-SRA (IY+n),r 4 0xfd,0xcb,0,0x28 rot_bit Z80,R800
-
-SRL r 2 0xcb,0x38 rot_bit Z80,R800,GB80
-SRL (HL) 2 0xcb,0x3e rot_bit Z80,R800,GB80
-SRL (IX+n) 4 0xdd,0xcb,0,0x3e rot_bit Z80,R800
-SRL (IY+n) 4 0xfd,0xcb,0,0x3e rot_bit Z80,R800
-SRL (IX+n),r 4 0xdd,0xcb,0,0x38 rot_bit Z80,R800
-SRL (IY+n),r 4 0xfd,0xcb,0,0x38 rot_bit Z80,R800
-
-# Bit manipulation group
-BIT imm3,r 2 0xcb,0x40 rot_bit Z80,R800,GB80
-BIT imm3,(HL) 2 0xcb,0x46 rot_bit Z80,R800
-BIT imm3,(IX+n) 4 0xdd,0xcb,0,0x46 rot_bit Z80,R800
-BIT imm3,(IY+n) 4 0xfd,0xcb,0,0x46 rot_bit Z80,R800
-
-SET imm3,r 2 0xcb,0xc0 rot_bit Z80,R800,GB80
-SET imm3,(HL) 2 0xcb,0xc6 rot_bit Z80,R800,GB80
-SET imm3,(IX+n) 4 0xdd,0xcb,0,0xc6 rot_bit Z80,R800
-SET imm3,(IY+n) 4 0xfd,0xcb,0,0xc6 rot_bit Z80,R800
-SET imm3,(IX+n),r 4 0xdd,0xcb,0,0xc0 rot_bit Z80,R800
-SET imm3,(IY+n),r 4 0xfd,0xcb,0,0xc0 rot_bit Z80,R800
-
-RES imm3,r 2 0xcb,0x80 rot_bit Z80,R800,GB80
-RES imm3,(HL) 2 0xcb,0x86 rot_bit Z80,R800,GB80
-RES imm3,(IX+n) 4 0xdd,0xcb,0,0x86 rot_bit Z80,R800
-RES imm3,(IY+n) 4 0xfd,0xcb,0,0x86 rot_bit Z80,R800
-RES imm3,(IX+n),r 4 0xdd,0xcb,0,0x80 rot_bit Z80,R800
-RES imm3,(IY+n),r 4 0xfd,0xcb,0,0x80 rot_bit Z80,R800
-
-# Input and output group
-IN A,(n) 2 0xdb inout Z80,R800
-IN r,(C) 2 0xed,0x40 inout Z80,R800
-IN F,(C) 2 0xed,0x70 inout Z80,R800
-INI none 2 0xed,0xa2 noargs Z80,R800
-INIR none 2 0xed,0xb2 noargs Z80,R800
-IND none 2 0xed,0xaa noargs Z80,R800
-INDR none 2 0xed,0xba noargs Z80,R800
-
-OUT (n),A 2 0xd3 inout Z80,R800
-OUT (C),r 2 0xed,0x41 inout Z80,R800
-OUT (C),0 2 0xed,0x71 inout Z80,R800
-OUTI none 2 0xed,0xa3 noargs Z80,R800
-OTIR none 2 0xed,0xb3 noargs Z80,R800
-OUTD none 2 0xed,0xab noargs Z80,R800
-OTDR none 2 0xed,0xbb noargs Z80,R800
-
-# Jump group
-JP imm16 3 0xc3 jp Z80,R800,GB80
-JP cc,imm16 3 0xc2 jp Z80,R800,GB80
-JR imm16 2 0x18 jr Z80,R800,GB80
-JR ss,imm16 2 0x00 jr Z80,R800,GB80
-JP HL 1 0xe9 noargs Z80,R800,GB80
-JP IX 2 0xdd,0xe9 noargs Z80,R800
-JP IY 2 0xfd,0xe9 noargs Z80,R800
-DJNZ imm16 2 0x10 jr Z80,R800
-
-# Call and return group
-CALL imm16 3 0xcd jp Z80,R800,GB80
-CALL cc,imm16 3 0xc4 jp Z80,R800,GB80
-RET none 1 0xc9 noargs Z80,R800,GB80
-RET cc 1 0xc0 jp Z80,R800,GB80
-RETI none 2 0xed,0x4d noargs Z80,R800
-RETI none 1 0xd9 noargs GB80
-RETN none 2 0xed,0x45 noargs Z80,R800
-RST rst 1 0xc7 rst Z80,R800,GB80
--- a/src/as/target/x80/z80.c
+++ /dev/null
@@ -1,65 +1,0 @@
-static char sccsid[] = "@(#) ./as/target/x80/z80.c";
-
-#include <stdlib.h>
-
-#include <scc/scc.h>
-
-#include "../../as.h"
-#include "../x80/proc.h"
-
-TUINT maxaddr = 0xFFFFFFFF;
-int endian = LITTLE_ENDIAN;
-
-void
-iarch(void)
-{
- static struct {
- char *name;
- char type;
- } regs[] = {
- "AF", AREG_AF,
- "A", AREG_A,
- "F", AREG_F,
-
- "BC", AREG_BC,
- "B", AREG_B,
- "C", AREG_C,
-
- "HL", AREG_HL,
- "H", AREG_H,
- "L", AREG_L,
-
- "DE", AREG_DE,
- "D", AREG_D,
- "E", AREG_E,
-
- "IX", AREG_IX,
- "IXL", AREG_IXL,
- "IXH", AREG_IXH,
-
- "IY", AREG_IY,
- "IYL", AREG_IYL,
- "IYH", AREG_IYH,
-
- "R", AREG_R,
- "I", AREG_I,
- "AF'", AREG_AF_,
- "SP", AREG_SP,
-
- "NZ", AREG_NZ,
- "Z", AREG_Z,
- "NC", AREG_NC,
- "PO", AREG_PO,
- "PE", AREG_PE,
- "P", AREG_P,
- "M", AREG_M,
-
- NULL,
- }, *bp;
-
- for (bp = regs; bp->name; ++bp) {
- Symbol *sym = lookup(bp->name);
- sym->flags = FREG;
- sym->value = bp->type;
- }
-}
--- a/src/as/target/x86/.gitignore
+++ /dev/null
@@ -1,3 +1,0 @@
-amd64tbl.c
-i286tbl.c
-i386tbl.c
--- a/src/as/target/x86/amd64.c
+++ /dev/null
@@ -1,13 +1,0 @@
-static char sccsid[] = "@(#) ./as/target/x86/amd64.c";
-
-#include <scc/scc.h>
-
-#include "../../as.h"
-
-TUINT maxaddr = 0xFFFFFFFFFFFFFFFF;
-int endian = LITTLE_ENDIAN;
-
-void
-iarch(void)
-{
-}
--- a/src/as/target/x86/i286.c
+++ /dev/null
@@ -1,54 +1,0 @@
-static char sccsid[] = "@(#) ./as/target/x86/i286.c";
-
-#include <scc/scc.h>
-
-#include "../../as.h"
-#include "../x86/proc.h"
-
-TUINT maxaddr = 0xFFFF;
-int endian = LITTLE_ENDIAN;
-int left2right = 0;
-
-void
-iarch(void)
-{
- static struct {
- char *name;
- char type;
- } regs[] = {
- "CS", AREG_CS,
- "DS", AREG_DS,
- "SS", AREG_SS,
- "ES", AREG_ES,
-
- "AX", AREG_AX,
- "AL", AREG_AL,
- "AH", AREG_AH,
-
- "BX", AREG_BX,
- "BL", AREG_BL,
- "BH", AREG_BH,
-
- "CX", AREG_CX,
- "CL", AREG_CL,
- "CH", AREG_CH,
-
- "DX", AREG_DX,
- "DL", AREG_DL,
- "DH", AREG_DH,
-
- "SI", AREG_SI,
- "DI", AREG_DI,
-
- "SP", AREG_SP,
- "BP", AREG_BP,
-
- NULL
- }, *bp;
-
- for (bp = regs; bp->name; ++bp) {
- Symbol *sym = lookup(bp->name);
- sym->flags = FREG;
- sym->value = bp->type;
- }
-}
--- a/src/as/target/x86/i386.c
+++ /dev/null
@@ -1,101 +1,0 @@
-static char sccsid[] = "@(#) ./as/target/x86/i386.c";
-
-#include <scc/scc.h>
-
-#include "../../as.h"
-#include "../x86/proc.h"
-
-TUINT maxaddr = 0xFFFFFFFF;
-int endian = LITTLE_ENDIAN;
-
-void
-iarch(void)
-{
- static struct {
- char *name;
- char type;
- } regs[] = {
- "CS", AREG_CS,
- "DS", AREG_DS,
- "SS", AREG_SS,
- "ES", AREG_ES,
- "FS", AREG_FS,
- "GS", AREG_GS,
-
- "AX", AREG_AX,
- "AL", AREG_AL,
- "AH", AREG_AH,
- "EAX", AREG_EAX,
-
- "BC", AREG_BX,
- "BL", AREG_BL,
- "BH", AREG_BH,
- "EBX", AREG_EBX,
-
- "CX", AREG_CX,
- "CL", AREG_CL,
- "CH", AREG_CH,
- "ECX", AREG_ECX,
-
- "DX", AREG_DX,
- "DL", AREG_DL,
- "DH", AREG_DH,
- "EDX", AREG_EDX,
-
- "SI", AREG_SI,
- "ESI", AREG_ESI,
- "DI", AREG_DI,
- "EDI", AREG_EDI,
-
- "SP", AREG_SP,
- "ESP", AREG_ESP,
-
- "BP", AREG_BP,
- "EBP", AREG_EBP,
-
- "R0", AREG_R0,
- "MM0", AREG_MM0,
- "R1", AREG_R1,
- "MM1", AREG_MM1,
- "R2", AREG_R2,
- "MM2", AREG_MM2,
- "R3", AREG_R3,
- "MM3", AREG_MM3,
- "R4", AREG_R4,
- "MM4", AREG_MM4,
- "R5", AREG_R5,
- "MM5", AREG_MM5,
- "R6", AREG_R6,
- "MM6", AREG_MM6,
- "R7", AREG_R7,
- "MM7", AREG_MM7,
-
- "XMM0", AREG_XMM0,
- "XMM1", AREG_XMM1,
- "XMM2", AREG_XMM2,
- "XMM3", AREG_XMM3,
- "XMM4", AREG_XMM4,
- "XMM5", AREG_XMM5,
- "XMM6", AREG_XMM6,
- "XMM7", AREG_XMM7,
-
- "YMM0", AREG_YMM0,
- "YMM1", AREG_YMM1,
- "YMM2", AREG_YMM2,
- "YMM3", AREG_YMM3,
- "YMM4", AREG_YMM4,
- "YMM5", AREG_YMM5,
- "YMM6", AREG_YMM6,
- "YMM7", AREG_YMM7,
-
- "MXCSR", AREG_MXCSR,
-
- NULL
- }, *bp;
-
- for (bp = regs; bp->name; ++bp) {
- Symbol *sym = lookup(bp->name);
- sym->flags = FREG;
- sym->value = bp->type;
- }
-}
--- a/src/as/target/x86/ins.c
+++ /dev/null
@@ -1,348 +1,0 @@
-static char sccsid[] = "@(#) ./as/target/x86/ins.c";
-
-#include <stdlib.h>
-#include <string.h>
-
-#include <scc/scc.h>
-
-#include "../../as.h"
-#include "proc.h"
-
-#define addrbyte(mod, reg, rm) ((mod) << 6 | (reg) << 3 | (rm))
-
-enum addr_mode {
- MEM_MODE = 0,
- MEM8_MODE = 1,
- MEM16_MODE = 2,
- REG_MODE = 3,
-};
-
-static int
-getclass(Node *np)
-{
- if (np->addr != AREG)
- return 0;
-
- switch (np->sym->value) {
- case AREG_AL:
- case AREG_AH:
- case AREG_BL:
- case AREG_BH:
- case AREG_CL:
- case AREG_CH:
- case AREG_DL:
- case AREG_DH:
- return R8CLASS;
-
- case AREG_AX:
- case AREG_BX:
- case AREG_CX:
- case AREG_DX:
- case AREG_DI:
- case AREG_SI:
- case AREG_SP:
- case AREG_BP:
- return R16CLASS;
-
- case AREG_CS:
- case AREG_DS:
- case AREG_SS:
- case AREG_ES:
- case AREG_FS:
- case AREG_GS:
-
- case AREG_EFLAGS:
- case AREG_CF:
- case AREG_PF:
- case AREG_AF:
- case AREG_ZF:
- case AREG_SF:
- case AREG_TF:
- case AREG_IF:
- case AREG_DF:
- case AREG_OF:
- case AREG_IOPL:
- case AREG_NT:
- case AREG_RF:
- case AREG_VM:
- case AREG_AC:
- case AREG_VIF:
- case AREG_VIP:
- case AREG_ID:
-
- case AREG_EAX:
- case AREG_RAX:
-
- case AREG_EBX:
- case AREG_RBX:
-
- case AREG_ECX:
- case AREG_RCX:
-
- case AREG_EDX:
- case AREG_RDX:
-
- case AREG_SIL:
- case AREG_ESI:
- case AREG_RSI:
- case AREG_DIL:
- case AREG_EDI:
- case AREG_RDI:
-
- case AREG_SPL:
- case AREG_ESP:
- case AREG_RSP:
-
- case AREG_BPL:
- case AREG_EBP:
- case AREG_RBP:
-
- case AREG_R0:
- case AREG_MM0:
- case AREG_R1:
- case AREG_MM1:
- case AREG_R2:
- case AREG_MM2:
- case AREG_R3:
- case AREG_MM3:
- case AREG_R4:
- case AREG_MM4:
- case AREG_R5:
- case AREG_MM5:
- case AREG_R6:
- case AREG_MM6:
- case AREG_R7:
- case AREG_MM7:
-
- case AREG_R8:
- case AREG_R8L:
- case AREG_R8W:
- case AREG_R9:
- case AREG_R9L:
- case AREG_R9W:
- case AREG_R10:
- case AREG_R10L:
- case AREG_R10W:
- case AREG_R11:
- case AREG_R11L:
- case AREG_R11W:
- case AREG_R12:
- case AREG_R12L:
- case AREG_R12W:
- case AREG_R13:
- case AREG_R13L:
- case AREG_R13W:
- case AREG_R14:
- case AREG_R14L:
- case AREG_R14W:
- case AREG_R15:
- case AREG_R15L:
- case AREG_R15W:
-
- case AREG_XMM0:
- case AREG_XMM1:
- case AREG_XMM2:
- case AREG_XMM3:
- case AREG_XMM4:
- case AREG_XMM5:
- case AREG_XMM6:
- case AREG_XMM7:
- case AREG_XMM8:
- case AREG_XMM9:
- case AREG_XMM10:
- case AREG_XMM11:
- case AREG_XMM12:
- case AREG_XMM13:
- case AREG_XMM14:
- case AREG_XMM15:
-
- case AREG_YMM0:
- case AREG_YMM1:
- case AREG_YMM2:
- case AREG_YMM3:
- case AREG_YMM4:
- case AREG_YMM5:
- case AREG_YMM6:
- case AREG_YMM7:
- case AREG_YMM8:
- case AREG_YMM9:
- case AREG_YMM10:
- case AREG_YMM11:
- case AREG_YMM12:
- case AREG_YMM13:
- case AREG_YMM14:
- case AREG_YMM15:
-
- case AREG_MXCSR:
- return 0;
- default:
- abort();
- }
-}
-
-int
-match(Op *op, Node **args)
-{
- unsigned char *p;
- int arg, class, rep, opt;
- Node *np;
-
- if (!op->args)
- return args == NULL;
-
- opt = rep = 0;
- for (p = op->args; arg = *p; ++p) {
- if (rep)
- --p;
- if ((np = *args++) == NULL)
- return (rep|opt) != 0;
-
- switch (arg) {
- case AOPT:
- opt = 1;
- break;
- case AREP:
- rep = 1;
- break;
- case AREG_R8CLASS:
- class = R8CLASS;
- goto check_class;
- case AREG_R16CLASS:
- class = R16CLASS;
- check_class:
- if ((getclass(np) & class) == 0)
- return 0;
- break;
- case AIMM8:
- case AIMM16:
- case AIMM32:
- case AIMM64:
- if (np->addr != AIMM)
- return 0;
- if (toobig(np, arg))
- error("overflow in immediate operand");
- break;
- case ASYM:
- if (np->addr != AIMM || np->op != IDEN)
- return 0;
- break;
- case ADIRECT:
- case ASTR:
- if (np->addr != arg)
- return 0;
- break;
- default:
- abort();
- }
- }
-
- return *args == NULL;
-}
-
-Node *
-moperand(void)
-{
-}
-
-static int
-reg8toint(Node *np)
-{
- switch (np->sym->value) {
- case AREG_AL: return 0;
- case AREG_CL: return 1;
- case AREG_DL: return 2;
- case AREG_BL: return 3;
- case AREG_AH: return 4;
- case AREG_CH: return 5;
- case AREG_DH: return 6;
- case AREG_BH: return 7;
- default: abort();
- }
-}
-
-static int
-reg16toint(Node *np)
-{
- switch (np->sym->value) {
- case AREG_AX: return 0;
- case AREG_CX: return 1;
- case AREG_DX: return 2;
- case AREG_BX: return 3;
- case AREG_SP: return 4;
- case AREG_BP: return 5;
- case AREG_SI: return 6;
- case AREG_DI: return 7;
- default: abort();
- }
-}
-
-static int
-reg32toint(Node *np)
-{
- switch (np->sym->value) {
- case AREG_EAX: return 0;
- case AREG_ECX: return 1;
- case AREG_EDX: return 2;
- case AREG_EBX: return 3;
- case AREG_ESP: return 4;
- case AREG_EBP: return 5;
- case AREG_ESI: return 6;
- case AREG_EDI: return 7;
- default: abort();
- }
-}
-
-void
-reg8_reg8(Op *op, Node **args)
-{
- int src, dst;
- char buf[op->size];
-
- src = reg8toint(args[0]);
- dst = reg8toint(args[1]);
- memcpy(buf, op->bytes, op->size - 1);
- buf[op->size - 1] = addrbyte(REG_MODE, src, dst);
- emit(buf, op->size);
-}
-
-void
-imm8_reg8(Op *op, Node **args)
-{
- int src, dst;
- char buf[op->size];
-
- src = (*args)->sym->value;
- dst = reg8toint(args[1]);
- memcpy(buf, op->bytes, op->size - 2);
- buf[op->size - 2] = addrbyte(REG_MODE, 0, dst);
- buf[op->size - 1] = src;
- emit(buf, op->size);
-}
-
-
-void
-reg16_reg16(Op *op, Node **args)
-{
- int src, dst;
- char buf[op->size];
-
- src = reg16toint(args[0]);
- dst = reg16toint(args[1]);
- memcpy(buf, op->bytes, op->size - 1);
- buf[op->size - 1] = addrbyte(REG_MODE, src, dst);
- emit(buf, op->size);
-}
-
-
-void
-reg32_reg32(Op *op, Node **args)
-{
- int src, dst;
- char buf[op->size];
-
- src = reg32toint(args[0]);
- dst = reg32toint(args[1]);
- memcpy(buf, op->bytes, op->size - 1);
- buf[op->size - 1] = addrbyte(REG_MODE, src, dst);
- emit(buf, op->size);
-}
--- a/src/as/target/x86/nasm.dat
+++ /dev/null
@@ -1,5313 +1,0 @@
-;; --------------------------------------------------------------------------
-;;
-;; Copyright 1996-2017 The NASM Authors - All Rights Reserved
-;; See the file AUTHORS included with the NASM distribution for
-;; the specific copyright holders.
-;;
-;; Redistribution and use in source and binary forms, with or without
-;; modification, are permitted provided that the following
-;; conditions are met:
-;;
-;; * Redistributions of source code must retain the above copyright
-;; notice, this list of conditions and the following disclaimer.
-;; * Redistributions in binary form must reproduce the above
-;; copyright notice, this list of conditions and the following
-;; disclaimer in the documentation and/or other materials provided
-;; with the distribution.
-;;
-;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-;; CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-;; INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-;; MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-;; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-;; CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-;; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-;; NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-;; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-;; HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-;; CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-;; OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-;; EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;;
-;; --------------------------------------------------------------------------
-
-;
-; insns.dat table of instructions for the Netwide Assembler
-;
-; Format of file: All four fields must be present on every functional
-; line. Hence `void' for no-operand instructions, and `\0' for such
-; as EQU. If the last three fields are all `ignore', no action is
-; taken except to register the opcode as being present.
-;
-; For a detailed description of the code string (third field), please
-; see insns.pl and the comment at the top of assemble.c. For a detailed
-; description of the flags (fourth field), please see insns-iflags.ph.
-;
-; Comments with a pound sign after the semicolon generate section
-; subheaders in the NASM documentation.
-;
-
-;# Special instructions (pseudo-ops)
-; These MUST be first in this file and must maintain the pattern of
-; Dx by size, RESx by size, and INCBIN in that order.
-DT ignore ignore ignore
-DO ignore ignore ignore
-DY ignore ignore ignore
-DZ ignore ignore ignore
-RESB imm [ resb] 8086
-RESW ignore ignore ignore
-RESD ignore ignore ignore
-RESQ ignore ignore ignore
-REST ignore ignore ignore
-RESO ignore ignore ignore
-RESY ignore ignore ignore
-RESZ ignore ignore ignore
-INCBIN ignore ignore ignore
-
-;# Conventional instructions
-AAA void [ 37] 8086,NOLONG
-AAD void [ d5 0a] 8086,NOLONG
-AAD imm [i: d5 ib,u] 8086,SB,NOLONG
-AAM void [ d4 0a] 8086,NOLONG
-AAM imm [i: d4 ib,u] 8086,SB,NOLONG
-AAS void [ 3f] 8086,NOLONG
-ADC mem,reg8 [mr: hle 10 /r] 8086,SM,LOCK
-ADC reg8,reg8 [mr: 10 /r] 8086
-ADC mem,reg16 [mr: hle o16 11 /r] 8086,SM,LOCK
-ADC reg16,reg16 [mr: o16 11 /r] 8086
-ADC mem,reg32 [mr: hle o32 11 /r] 386,SM,LOCK
-ADC reg32,reg32 [mr: o32 11 /r] 386
-ADC mem,reg64 [mr: hle o64 11 /r] X64,SM,LOCK
-ADC reg64,reg64 [mr: o64 11 /r] X64
-ADC reg8,mem [rm: 12 /r] 8086,SM
-ADC reg8,reg8 [rm: 12 /r] 8086
-ADC reg16,mem [rm: o16 13 /r] 8086,SM
-ADC reg16,reg16 [rm: o16 13 /r] 8086
-ADC reg32,mem [rm: o32 13 /r] 386,SM
-ADC reg32,reg32 [rm: o32 13 /r] 386
-ADC reg64,mem [rm: o64 13 /r] X64,SM
-ADC reg64,reg64 [rm: o64 13 /r] X64
-ADC rm16,imm8 [mi: hle o16 83 /2 ib,s] 8086,LOCK
-ADC rm32,imm8 [mi: hle o32 83 /2 ib,s] 386,LOCK
-ADC rm64,imm8 [mi: hle o64 83 /2 ib,s] X64,LOCK
-ADC reg_al,imm [-i: 14 ib] 8086,SM
-ADC reg_ax,sbyteword [mi: o16 83 /2 ib,s] 8086,SM,ND
-ADC reg_ax,imm [-i: o16 15 iw] 8086,SM
-ADC reg_eax,sbytedword [mi: o32 83 /2 ib,s] 386,SM,ND
-ADC reg_eax,imm [-i: o32 15 id] 386,SM
-ADC reg_rax,sbytedword [mi: o64 83 /2 ib,s] X64,SM,ND
-ADC reg_rax,imm [-i: o64 15 id,s] X64,SM
-ADC rm8,imm [mi: hle 80 /2 ib] 8086,SM,LOCK
-ADC rm16,sbyteword [mi: hle o16 83 /2 ib,s] 8086,SM,LOCK,ND
-ADC rm16,imm [mi: hle o16 81 /2 iw] 8086,SM,LOCK
-ADC rm32,sbytedword [mi: hle o32 83 /2 ib,s] 386,SM,LOCK,ND
-ADC rm32,imm [mi: hle o32 81 /2 id] 386,SM,LOCK
-ADC rm64,sbytedword [mi: hle o64 83 /2 ib,s] X64,SM,LOCK,ND
-ADC rm64,imm [mi: hle o64 81 /2 id,s] X64,SM,LOCK
-ADC mem,imm8 [mi: hle 80 /2 ib] 8086,SM,LOCK,ND
-ADC mem,sbyteword16 [mi: hle o16 83 /2 ib,s] 8086,SM,LOCK,ND
-ADC mem,imm16 [mi: hle o16 81 /2 iw] 8086,SM,LOCK
-ADC mem,sbytedword32 [mi: hle o32 83 /2 ib,s] 386,SM,LOCK,ND
-ADC mem,imm32 [mi: hle o32 81 /2 id] 386,SM,LOCK
-ADC rm8,imm [mi: hle 82 /2 ib] 8086,SM,LOCK,ND,NOLONG
-ADD mem,reg8 [mr: hle 00 /r] 8086,SM,LOCK
-ADD reg8,reg8 [mr: 00 /r] 8086
-ADD mem,reg16 [mr: hle o16 01 /r] 8086,SM,LOCK
-ADD reg16,reg16 [mr: o16 01 /r] 8086
-ADD mem,reg32 [mr: hle o32 01 /r] 386,SM,LOCK
-ADD reg32,reg32 [mr: o32 01 /r] 386
-ADD mem,reg64 [mr: hle o64 01 /r] X64,SM,LOCK
-ADD reg64,reg64 [mr: o64 01 /r] X64
-ADD reg8,mem [rm: 02 /r] 8086,SM
-ADD reg8,reg8 [rm: 02 /r] 8086
-ADD reg16,mem [rm: o16 03 /r] 8086,SM
-ADD reg16,reg16 [rm: o16 03 /r] 8086
-ADD reg32,mem [rm: o32 03 /r] 386,SM
-ADD reg32,reg32 [rm: o32 03 /r] 386
-ADD reg64,mem [rm: o64 03 /r] X64,SM
-ADD reg64,reg64 [rm: o64 03 /r] X64
-ADD rm16,imm8 [mi: hle o16 83 /0 ib,s] 8086,LOCK
-ADD rm32,imm8 [mi: hle o32 83 /0 ib,s] 386,LOCK
-ADD rm64,imm8 [mi: hle o64 83 /0 ib,s] X64,LOCK
-ADD reg_al,imm [-i: 04 ib] 8086,SM
-ADD reg_ax,sbyteword [mi: o16 83 /0 ib,s] 8086,SM,ND
-ADD reg_ax,imm [-i: o16 05 iw] 8086,SM
-ADD reg_eax,sbytedword [mi: o32 83 /0 ib,s] 386,SM,ND
-ADD reg_eax,imm [-i: o32 05 id] 386,SM
-ADD reg_rax,sbytedword [mi: o64 83 /0 ib,s] X64,SM,ND
-ADD reg_rax,imm [-i: o64 05 id,s] X64,SM
-ADD rm8,imm [mi: hle 80 /0 ib] 8086,SM,LOCK
-ADD rm16,sbyteword [mi: hle o16 83 /0 ib,s] 8086,SM,LOCK,ND
-ADD rm16,imm [mi: hle o16 81 /0 iw] 8086,SM,LOCK
-ADD rm32,sbytedword [mi: hle o32 83 /0 ib,s] 386,SM,LOCK,ND
-ADD rm32,imm [mi: hle o32 81 /0 id] 386,SM,LOCK
-ADD rm64,sbytedword [mi: hle o64 83 /0 ib,s] X64,SM,LOCK,ND
-ADD rm64,imm [mi: hle o64 81 /0 id,s] X64,SM,LOCK
-ADD mem,imm8 [mi: hle 80 /0 ib] 8086,SM,LOCK
-ADD mem,sbyteword16 [mi: hle o16 83 /0 ib,s] 8086,SM,LOCK,ND
-ADD mem,imm16 [mi: hle o16 81 /0 iw] 8086,SM,LOCK
-ADD mem,sbytedword32 [mi: hle o32 83 /0 ib,s] 386,SM,LOCK,ND
-ADD mem,imm32 [mi: hle o32 81 /0 id] 386,SM,LOCK
-ADD rm8,imm [mi: hle 82 /0 ib] 8086,SM,LOCK,ND,NOLONG
-AND mem,reg8 [mr: hle 20 /r] 8086,SM,LOCK
-AND reg8,reg8 [mr: 20 /r] 8086
-AND mem,reg16 [mr: hle o16 21 /r] 8086,SM,LOCK
-AND reg16,reg16 [mr: o16 21 /r] 8086
-AND mem,reg32 [mr: hle o32 21 /r] 386,SM,LOCK
-AND reg32,reg32 [mr: o32 21 /r] 386
-AND mem,reg64 [mr: hle o64 21 /r] X64,SM,LOCK
-AND reg64,reg64 [mr: o64 21 /r] X64
-AND reg8,mem [rm: 22 /r] 8086,SM
-AND reg8,reg8 [rm: 22 /r] 8086
-AND reg16,mem [rm: o16 23 /r] 8086,SM
-AND reg16,reg16 [rm: o16 23 /r] 8086
-AND reg32,mem [rm: o32 23 /r] 386,SM
-AND reg32,reg32 [rm: o32 23 /r] 386
-AND reg64,mem [rm: o64 23 /r] X64,SM
-AND reg64,reg64 [rm: o64 23 /r] X64
-AND rm16,imm8 [mi: hle o16 83 /4 ib,s] 8086,LOCK
-AND rm32,imm8 [mi: hle o32 83 /4 ib,s] 386,LOCK
-AND rm64,imm8 [mi: hle o64 83 /4 ib,s] X64,LOCK
-AND reg_al,imm [-i: 24 ib] 8086,SM
-AND reg_ax,sbyteword [mi: o16 83 /4 ib,s] 8086,SM,ND
-AND reg_ax,imm [-i: o16 25 iw] 8086,SM
-AND reg_eax,sbytedword [mi: o32 83 /4 ib,s] 386,SM,ND
-AND reg_eax,imm [-i: o32 25 id] 386,SM
-AND reg_rax,sbytedword [mi: o64 83 /4 ib,s] X64,SM,ND
-AND reg_rax,imm [-i: o64 25 id,s] X64,SM
-AND rm8,imm [mi: hle 80 /4 ib] 8086,SM,LOCK
-AND rm16,sbyteword [mi: hle o16 83 /4 ib,s] 8086,SM,LOCK,ND
-AND rm16,imm [mi: hle o16 81 /4 iw] 8086,SM,LOCK
-AND rm32,sbytedword [mi: hle o32 83 /4 ib,s] 386,SM,LOCK,ND
-AND rm32,imm [mi: hle o32 81 /4 id] 386,SM,LOCK
-AND rm64,sbytedword [mi: hle o64 83 /4 ib,s] X64,SM,LOCK,ND
-AND rm64,imm [mi: hle o64 81 /4 id,s] X64,SM,LOCK
-AND mem,imm8 [mi: hle 80 /4 ib] 8086,SM,LOCK
-AND mem,sbyteword16 [mi: hle o16 83 /4 ib,s] 8086,SM,LOCK,ND
-AND mem,imm16 [mi: hle o16 81 /4 iw] 8086,SM,LOCK
-AND mem,sbytedword32 [mi: hle o32 83 /4 ib,s] 386,SM,LOCK,ND
-AND mem,imm32 [mi: hle o32 81 /4 id] 386,SM,LOCK
-AND rm8,imm [mi: hle 82 /4 ib] 8086,SM,LOCK,ND,NOLONG
-ARPL mem,reg16 [mr: 63 /r] 286,PROT,SM,NOLONG
-ARPL reg16,reg16 [mr: 63 /r] 286,PROT,NOLONG
-BB0_RESET void [ 0f 3a] PENT,CYRIX,ND,OBSOLETE
-BB1_RESET void [ 0f 3b] PENT,CYRIX,ND,OBSOLETE
-BOUND reg16,mem [rm: o16 62 /r] 186,NOLONG
-BOUND reg32,mem [rm: o32 62 /r] 386,NOLONG
-BSF reg16,mem [rm: o16 nof3 0f bc /r] 386,SM
-BSF reg16,reg16 [rm: o16 nof3 0f bc /r] 386
-BSF reg32,mem [rm: o32 nof3 0f bc /r] 386,SM
-BSF reg32,reg32 [rm: o32 nof3 0f bc /r] 386
-BSF reg64,mem [rm: o64 nof3 0f bc /r] X64,SM
-BSF reg64,reg64 [rm: o64 nof3 0f bc /r] X64
-BSR reg16,mem [rm: o16 nof3 0f bd /r] 386,SM
-BSR reg16,reg16 [rm: o16 nof3 0f bd /r] 386
-BSR reg32,mem [rm: o32 nof3 0f bd /r] 386,SM
-BSR reg32,reg32 [rm: o32 nof3 0f bd /r] 386
-BSR reg64,mem [rm: o64 nof3 0f bd /r] X64,SM
-BSR reg64,reg64 [rm: o64 nof3 0f bd /r] X64
-BSWAP reg32 [r: o32 0f c8+r] 486
-BSWAP reg64 [r: o64 0f c8+r] X64
-BT mem,reg16 [mr: o16 0f a3 /r] 386,SM
-BT reg16,reg16 [mr: o16 0f a3 /r] 386
-BT mem,reg32 [mr: o32 0f a3 /r] 386,SM
-BT reg32,reg32 [mr: o32 0f a3 /r] 386
-BT mem,reg64 [mr: o64 0f a3 /r] X64,SM
-BT reg64,reg64 [mr: o64 0f a3 /r] X64
-BT rm16,imm [mi: o16 0f ba /4 ib,u] 386,SB
-BT rm32,imm [mi: o32 0f ba /4 ib,u] 386,SB
-BT rm64,imm [mi: o64 0f ba /4 ib,u] X64,SB
-BTC mem,reg16 [mr: hle o16 0f bb /r] 386,SM,LOCK
-BTC reg16,reg16 [mr: o16 0f bb /r] 386
-BTC mem,reg32 [mr: hle o32 0f bb /r] 386,SM,LOCK
-BTC reg32,reg32 [mr: o32 0f bb /r] 386
-BTC mem,reg64 [mr: hle o64 0f bb /r] X64,SM,LOCK
-BTC reg64,reg64 [mr: o64 0f bb /r] X64
-BTC rm16,imm [mi: hle o16 0f ba /7 ib,u] 386,SB,LOCK
-BTC rm32,imm [mi: hle o32 0f ba /7 ib,u] 386,SB,LOCK
-BTC rm64,imm [mi: hle o64 0f ba /7 ib,u] X64,SB,LOCK
-BTR mem,reg16 [mr: hle o16 0f b3 /r] 386,SM,LOCK
-BTR reg16,reg16 [mr: o16 0f b3 /r] 386
-BTR mem,reg32 [mr: hle o32 0f b3 /r] 386,SM,LOCK
-BTR reg32,reg32 [mr: o32 0f b3 /r] 386
-BTR mem,reg64 [mr: hle o64 0f b3 /r] X64,SM,LOCK
-BTR reg64,reg64 [mr: o64 0f b3 /r] X64
-BTR rm16,imm [mi: hle o16 0f ba /6 ib,u] 386,SB,LOCK
-BTR rm32,imm [mi: hle o32 0f ba /6 ib,u] 386,SB,LOCK
-BTR rm64,imm [mi: hle o64 0f ba /6 ib,u] X64,SB,LOCK
-BTS mem,reg16 [mr: hle o16 0f ab /r] 386,SM,LOCK
-BTS reg16,reg16 [mr: o16 0f ab /r] 386
-BTS mem,reg32 [mr: hle o32 0f ab /r] 386,SM,LOCK
-BTS reg32,reg32 [mr: o32 0f ab /r] 386
-BTS mem,reg64 [mr: hle o64 0f ab /r] X64,SM,LOCK
-BTS reg64,reg64 [mr: o64 0f ab /r] X64
-BTS rm16,imm [mi: hle o16 0f ba /5 ib,u] 386,SB,LOCK
-BTS rm32,imm [mi: hle o32 0f ba /5 ib,u] 386,SB,LOCK
-BTS rm64,imm [mi: hle o64 0f ba /5 ib,u] X64,SB,LOCK
-CALL imm [i: odf e8 rel] 8086,BND
-CALL imm|near [i: odf e8 rel] 8086,ND,BND
-CALL imm|far [i: odf 9a iwd seg] 8086,ND,NOLONG
-; Call/jmp near imm/reg/mem is always 64-bit in long mode.
-CALL imm16 [i: o16 e8 rel] 8086,NOLONG,BND
-CALL imm16|near [i: o16 e8 rel] 8086,ND,NOLONG,BND
-CALL imm16|far [i: o16 9a iwd seg] 8086,ND,NOLONG
-CALL imm32 [i: o32 e8 rel] 386,NOLONG,BND
-CALL imm32|near [i: o32 e8 rel] 386,ND,NOLONG,BND
-CALL imm32|far [i: o32 9a iwd seg] 386,ND,NOLONG
-CALL imm64 [i: o64nw e8 rel] X64,BND
-CALL imm64|near [i: o64nw e8 rel] X64,ND,BND
-CALL imm:imm [ji: odf 9a iwd iw] 8086,NOLONG
-CALL imm16:imm [ji: o16 9a iw iw] 8086,NOLONG
-CALL imm:imm16 [ji: o16 9a iw iw] 8086,NOLONG
-CALL imm32:imm [ji: o32 9a id iw] 386,NOLONG
-CALL imm:imm32 [ji: o32 9a id iw] 386,NOLONG
-CALL mem|far [m: odf ff /3] 8086,NOLONG
-CALL mem|far [m: o64 ff /3] X64
-CALL mem16|far [m: o16 ff /3] 8086
-CALL mem32|far [m: o32 ff /3] 386
-CALL mem64|far [m: o64 ff /3] X64
-CALL mem|near [m: odf ff /2] 8086,ND,BND
-CALL rm16|near [m: o16 ff /2] 8086,NOLONG,ND,BND
-CALL rm32|near [m: o32 ff /2] 386,NOLONG,ND,BND
-CALL rm64|near [m: o64nw ff /2] X64,ND,BND
-CALL mem [m: odf ff /2] 8086,BND
-CALL rm16 [m: o16 ff /2] 8086,NOLONG,BND
-CALL rm32 [m: o32 ff /2] 386,NOLONG,BND
-CALL rm64 [m: o64nw ff /2] X64,BND
-
-CBW void [ o16 98] 8086
-CDQ void [ o32 99] 386
-CDQE void [ o64 98] X64
-CLC void [ f8] 8086
-CLD void [ fc] 8086
-CLI void [ fa] 8086
-CLTS void [ 0f 06] 286,PRIV
-CMC void [ f5] 8086
-CMP mem,reg8 [mr: 38 /r] 8086,SM
-CMP reg8,reg8 [mr: 38 /r] 8086
-CMP mem,reg16 [mr: o16 39 /r] 8086,SM
-CMP reg16,reg16 [mr: o16 39 /r] 8086
-CMP mem,reg32 [mr: o32 39 /r] 386,SM
-CMP reg32,reg32 [mr: o32 39 /r] 386
-CMP mem,reg64 [mr: o64 39 /r] X64,SM
-CMP reg64,reg64 [mr: o64 39 /r] X64
-CMP reg8,mem [rm: 3a /r] 8086,SM
-CMP reg8,reg8 [rm: 3a /r] 8086
-CMP reg16,mem [rm: o16 3b /r] 8086,SM
-CMP reg16,reg16 [rm: o16 3b /r] 8086
-CMP reg32,mem [rm: o32 3b /r] 386,SM
-CMP reg32,reg32 [rm: o32 3b /r] 386
-CMP reg64,mem [rm: o64 3b /r] X64,SM
-CMP reg64,reg64 [rm: o64 3b /r] X64
-CMP rm16,imm8 [mi: o16 83 /7 ib,s] 8086
-CMP rm32,imm8 [mi: o32 83 /7 ib,s] 386
-CMP rm64,imm8 [mi: o64 83 /7 ib,s] X64
-CMP reg_al,imm [-i: 3c ib] 8086,SM
-CMP reg_ax,sbyteword [mi: o16 83 /7 ib,s] 8086,SM,ND
-CMP reg_ax,imm [-i: o16 3d iw] 8086,SM
-CMP reg_eax,sbytedword [mi: o32 83 /7 ib,s] 386,SM,ND
-CMP reg_eax,imm [-i: o32 3d id] 386,SM
-CMP reg_rax,sbytedword [mi: o64 83 /7 ib,s] X64,SM,ND
-CMP reg_rax,imm [-i: o64 3d id,s] X64,SM
-CMP rm8,imm [mi: 80 /7 ib] 8086,SM
-CMP rm16,sbyteword [mi: o16 83 /7 ib,s] 8086,SM,ND
-CMP rm16,imm [mi: o16 81 /7 iw] 8086,SM
-CMP rm32,sbytedword [mi: o32 83 /7 ib,s] 386,SM,ND
-CMP rm32,imm [mi: o32 81 /7 id] 386,SM
-CMP rm64,sbytedword [mi: o64 83 /7 ib,s] X64,SM,ND
-CMP rm64,imm [mi: o64 81 /7 id,s] X64,SM
-CMP mem,imm8 [mi: 80 /7 ib] 8086,SM
-CMP mem,sbyteword16 [mi: o16 83 /7 ib,s] 8086,SM,ND
-CMP mem,imm16 [mi: o16 81 /7 iw] 8086,SM
-CMP mem,sbytedword32 [mi: o32 83 /7 ib,s] 386,SM,ND
-CMP mem,imm32 [mi: o32 81 /7 id] 386,SM
-CMP rm8,imm [mi: 82 /7 ib] 8086,SM,ND,NOLONG
-CMPSB void [ repe a6] 8086
-CMPSD void [ repe o32 a7] 386
-CMPSQ void [ repe o64 a7] X64
-CMPSW void [ repe o16 a7] 8086
-CMPXCHG mem,reg8 [mr: hle 0f b0 /r] PENT,SM,LOCK
-CMPXCHG reg8,reg8 [mr: 0f b0 /r] PENT
-CMPXCHG mem,reg16 [mr: hle o16 0f b1 /r] PENT,SM,LOCK
-CMPXCHG reg16,reg16 [mr: o16 0f b1 /r] PENT
-CMPXCHG mem,reg32 [mr: hle o32 0f b1 /r] PENT,SM,LOCK
-CMPXCHG reg32,reg32 [mr: o32 0f b1 /r] PENT
-CMPXCHG mem,reg64 [mr: hle o64 0f b1 /r] X64,SM,LOCK
-CMPXCHG reg64,reg64 [mr: o64 0f b1 /r] X64
-CMPXCHG486 mem,reg8 [mr: 0f a6 /r] 486,SM,UNDOC,ND,LOCK,OBSOLETE
-CMPXCHG486 reg8,reg8 [mr: 0f a6 /r] 486,UNDOC,ND,OBSOLETE
-CMPXCHG486 mem,reg16 [mr: o16 0f a7 /r] 486,SM,UNDOC,ND,LOCK,OBSOLETE
-CMPXCHG486 reg16,reg16 [mr: o16 0f a7 /r] 486,UNDOC,ND,OBSOLETE
-CMPXCHG486 mem,reg32 [mr: o32 0f a7 /r] 486,SM,UNDOC,ND,LOCK,OBSOLETE
-CMPXCHG486 reg32,reg32 [mr: o32 0f a7 /r] 486,UNDOC,ND,OBSOLETE
-CMPXCHG8B mem [m: hle norexw 0f c7 /1] PENT,LOCK
-CMPXCHG16B mem [m: o64 0f c7 /1] X64,LOCK
-CPUID void [ 0f a2] PENT
-CPU_READ void [ 0f 3d] PENT,CYRIX
-CPU_WRITE void [ 0f 3c] PENT,CYRIX
-CQO void [ o64 99] X64
-CWD void [ o16 99] 8086
-CWDE void [ o32 98] 386
-DAA void [ 27] 8086,NOLONG
-DAS void [ 2f] 8086,NOLONG
-DEC reg16 [r: o16 48+r] 8086,NOLONG
-DEC reg32 [r: o32 48+r] 386,NOLONG
-DEC rm8 [m: hle fe /1] 8086,LOCK
-DEC rm16 [m: hle o16 ff /1] 8086,LOCK
-DEC rm32 [m: hle o32 ff /1] 386,LOCK
-DEC rm64 [m: hle o64 ff /1] X64,LOCK
-DIV rm8 [m: f6 /6] 8086
-DIV rm16 [m: o16 f7 /6] 8086
-DIV rm32 [m: o32 f7 /6] 386
-DIV rm64 [m: o64 f7 /6] X64
-DMINT void [ 0f 39] P6,CYRIX
-EMMS void [ 0f 77] PENT,MMX
-ENTER imm,imm [ij: c8 iw ib,u] 186
-EQU imm ignore 8086
-EQU imm:imm ignore 8086
-F2XM1 void [ d9 f0] 8086,FPU
-FABS void [ d9 e1] 8086,FPU
-FADD mem32 [m: d8 /0] 8086,FPU
-FADD mem64 [m: dc /0] 8086,FPU
-FADD fpureg|to [r: dc c0+r] 8086,FPU
-FADD fpureg [r: d8 c0+r] 8086,FPU
-FADD fpureg,fpu0 [r-: dc c0+r] 8086,FPU
-FADD fpu0,fpureg [-r: d8 c0+r] 8086,FPU
-FADD void [ de c1] 8086,FPU,ND
-FADDP fpureg [r: de c0+r] 8086,FPU
-FADDP fpureg,fpu0 [r-: de c0+r] 8086,FPU
-FADDP void [ de c1] 8086,FPU,ND
-FBLD mem80 [m: df /4] 8086,FPU
-FBLD mem [m: df /4] 8086,FPU
-FBSTP mem80 [m: df /6] 8086,FPU
-FBSTP mem [m: df /6] 8086,FPU
-FCHS void [ d9 e0] 8086,FPU
-FCLEX void [ wait db e2] 8086,FPU
-FCMOVB fpureg [r: da c0+r] P6,FPU
-FCMOVB fpu0,fpureg [-r: da c0+r] P6,FPU
-FCMOVB void [ da c1] P6,FPU,ND
-FCMOVBE fpureg [r: da d0+r] P6,FPU
-FCMOVBE fpu0,fpureg [-r: da d0+r] P6,FPU
-FCMOVBE void [ da d1] P6,FPU,ND
-FCMOVE fpureg [r: da c8+r] P6,FPU
-FCMOVE fpu0,fpureg [-r: da c8+r] P6,FPU
-FCMOVE void [ da c9] P6,FPU,ND
-FCMOVNB fpureg [r: db c0+r] P6,FPU
-FCMOVNB fpu0,fpureg [-r: db c0+r] P6,FPU
-FCMOVNB void [ db c1] P6,FPU,ND
-FCMOVNBE fpureg [r: db d0+r] P6,FPU
-FCMOVNBE fpu0,fpureg [-r: db d0+r] P6,FPU
-FCMOVNBE void [ db d1] P6,FPU,ND
-FCMOVNE fpureg [r: db c8+r] P6,FPU
-FCMOVNE fpu0,fpureg [-r: db c8+r] P6,FPU
-FCMOVNE void [ db c9] P6,FPU,ND
-FCMOVNU fpureg [r: db d8+r] P6,FPU
-FCMOVNU fpu0,fpureg [-r: db d8+r] P6,FPU
-FCMOVNU void [ db d9] P6,FPU,ND
-FCMOVU fpureg [r: da d8+r] P6,FPU
-FCMOVU fpu0,fpureg [-r: da d8+r] P6,FPU
-FCMOVU void [ da d9] P6,FPU,ND
-FCOM mem32 [m: d8 /2] 8086,FPU
-FCOM mem64 [m: dc /2] 8086,FPU
-FCOM fpureg [r: d8 d0+r] 8086,FPU
-FCOM fpu0,fpureg [-r: d8 d0+r] 8086,FPU
-FCOM void [ d8 d1] 8086,FPU,ND
-FCOMI fpureg [r: db f0+r] P6,FPU
-FCOMI fpu0,fpureg [-r: db f0+r] P6,FPU
-FCOMI void [ db f1] P6,FPU,ND
-FCOMIP fpureg [r: df f0+r] P6,FPU
-FCOMIP fpu0,fpureg [-r: df f0+r] P6,FPU
-FCOMIP void [ df f1] P6,FPU,ND
-FCOMP mem32 [m: d8 /3] 8086,FPU
-FCOMP mem64 [m: dc /3] 8086,FPU
-FCOMP fpureg [r: d8 d8+r] 8086,FPU
-FCOMP fpu0,fpureg [-r: d8 d8+r] 8086,FPU
-FCOMP void [ d8 d9] 8086,FPU,ND
-FCOMPP void [ de d9] 8086,FPU
-FCOS void [ d9 ff] 386,FPU
-FDECSTP void [ d9 f6] 8086,FPU
-FDISI void [ wait db e1] 8086,FPU
-FDIV mem32 [m: d8 /6] 8086,FPU
-FDIV mem64 [m: dc /6] 8086,FPU
-FDIV fpureg|to [r: dc f8+r] 8086,FPU
-FDIV fpureg [r: d8 f0+r] 8086,FPU
-FDIV fpureg,fpu0 [r-: dc f8+r] 8086,FPU
-FDIV fpu0,fpureg [-r: d8 f0+r] 8086,FPU
-FDIV void [ de f9] 8086,FPU,ND
-FDIVP fpureg [r: de f8+r] 8086,FPU
-FDIVP fpureg,fpu0 [r-: de f8+r] 8086,FPU
-FDIVP void [ de f9] 8086,FPU,ND
-FDIVR mem32 [m: d8 /7] 8086,FPU
-FDIVR mem64 [m: dc /7] 8086,FPU
-FDIVR fpureg|to [r: dc f0+r] 8086,FPU
-FDIVR fpureg,fpu0 [r-: dc f0+r] 8086,FPU
-FDIVR fpureg [r: d8 f8+r] 8086,FPU
-FDIVR fpu0,fpureg [-r: d8 f8+r] 8086,FPU
-FDIVR void [ de f1] 8086,FPU,ND
-FDIVRP fpureg [r: de f0+r] 8086,FPU
-FDIVRP fpureg,fpu0 [r-: de f0+r] 8086,FPU
-FDIVRP void [ de f1] 8086,FPU,ND
-FEMMS void [ 0f 0e] PENT,3DNOW
-FENI void [ wait db e0] 8086,FPU
-FFREE fpureg [r: dd c0+r] 8086,FPU
-FFREE void [ dd c1] 8086,FPU
-FFREEP fpureg [r: df c0+r] 286,FPU,UNDOC
-FFREEP void [ df c1] 286,FPU,UNDOC
-FIADD mem32 [m: da /0] 8086,FPU
-FIADD mem16 [m: de /0] 8086,FPU
-FICOM mem32 [m: da /2] 8086,FPU
-FICOM mem16 [m: de /2] 8086,FPU
-FICOMP mem32 [m: da /3] 8086,FPU
-FICOMP mem16 [m: de /3] 8086,FPU
-FIDIV mem32 [m: da /6] 8086,FPU
-FIDIV mem16 [m: de /6] 8086,FPU
-FIDIVR mem32 [m: da /7] 8086,FPU
-FIDIVR mem16 [m: de /7] 8086,FPU
-FILD mem32 [m: db /0] 8086,FPU
-FILD mem16 [m: df /0] 8086,FPU
-FILD mem64 [m: df /5] 8086,FPU
-FIMUL mem32 [m: da /1] 8086,FPU
-FIMUL mem16 [m: de /1] 8086,FPU
-FINCSTP void [ d9 f7] 8086,FPU
-FINIT void [ wait db e3] 8086,FPU
-FIST mem32 [m: db /2] 8086,FPU
-FIST mem16 [m: df /2] 8086,FPU
-FISTP mem32 [m: db /3] 8086,FPU
-FISTP mem16 [m: df /3] 8086,FPU
-FISTP mem64 [m: df /7] 8086,FPU
-FISTTP mem16 [m: df /1] PRESCOTT,FPU
-FISTTP mem32 [m: db /1] PRESCOTT,FPU
-FISTTP mem64 [m: dd /1] PRESCOTT,FPU
-FISUB mem32 [m: da /4] 8086,FPU
-FISUB mem16 [m: de /4] 8086,FPU
-FISUBR mem32 [m: da /5] 8086,FPU
-FISUBR mem16 [m: de /5] 8086,FPU
-FLD mem32 [m: d9 /0] 8086,FPU
-FLD mem64 [m: dd /0] 8086,FPU
-FLD mem80 [m: db /5] 8086,FPU
-FLD fpureg [r: d9 c0+r] 8086,FPU
-FLD void [ d9 c1] 8086,FPU,ND
-FLD1 void [ d9 e8] 8086,FPU
-FLDCW mem [m: d9 /5] 8086,FPU,SW
-FLDENV mem [m: d9 /4] 8086,FPU
-FLDL2E void [ d9 ea] 8086,FPU
-FLDL2T void [ d9 e9] 8086,FPU
-FLDLG2 void [ d9 ec] 8086,FPU
-FLDLN2 void [ d9 ed] 8086,FPU
-FLDPI void [ d9 eb] 8086,FPU
-FLDZ void [ d9 ee] 8086,FPU
-FMUL mem32 [m: d8 /1] 8086,FPU
-FMUL mem64 [m: dc /1] 8086,FPU
-FMUL fpureg|to [r: dc c8+r] 8086,FPU
-FMUL fpureg,fpu0 [r-: dc c8+r] 8086,FPU
-FMUL fpureg [r: d8 c8+r] 8086,FPU
-FMUL fpu0,fpureg [-r: d8 c8+r] 8086,FPU
-FMUL void [ de c9] 8086,FPU,ND
-FMULP fpureg [r: de c8+r] 8086,FPU
-FMULP fpureg,fpu0 [r-: de c8+r] 8086,FPU
-FMULP void [ de c9] 8086,FPU,ND
-FNCLEX void [ db e2] 8086,FPU
-FNDISI void [ db e1] 8086,FPU
-FNENI void [ db e0] 8086,FPU
-FNINIT void [ db e3] 8086,FPU
-FNOP void [ d9 d0] 8086,FPU
-FNSAVE mem [m: dd /6] 8086,FPU
-FNSTCW mem [m: d9 /7] 8086,FPU,SW
-FNSTENV mem [m: d9 /6] 8086,FPU
-FNSTSW mem [m: dd /7] 8086,FPU,SW
-FNSTSW reg_ax [-: df e0] 286,FPU
-FPATAN void [ d9 f3] 8086,FPU
-FPREM void [ d9 f8] 8086,FPU
-FPREM1 void [ d9 f5] 386,FPU
-FPTAN void [ d9 f2] 8086,FPU
-FRNDINT void [ d9 fc] 8086,FPU
-FRSTOR mem [m: dd /4] 8086,FPU
-FSAVE mem [m: wait dd /6] 8086,FPU
-FSCALE void [ d9 fd] 8086,FPU
-FSETPM void [ db e4] 286,FPU
-FSIN void [ d9 fe] 386,FPU
-FSINCOS void [ d9 fb] 386,FPU
-FSQRT void [ d9 fa] 8086,FPU
-FST mem32 [m: d9 /2] 8086,FPU
-FST mem64 [m: dd /2] 8086,FPU
-FST fpureg [r: dd d0+r] 8086,FPU
-FST void [ dd d1] 8086,FPU,ND
-FSTCW mem [m: wait d9 /7] 8086,FPU,SW
-FSTENV mem [m: wait d9 /6] 8086,FPU
-FSTP mem32 [m: d9 /3] 8086,FPU
-FSTP mem64 [m: dd /3] 8086,FPU
-FSTP mem80 [m: db /7] 8086,FPU
-FSTP fpureg [r: dd d8+r] 8086,FPU
-FSTP void [ dd d9] 8086,FPU,ND
-FSTSW mem [m: wait dd /7] 8086,FPU,SW
-FSTSW reg_ax [-: wait df e0] 286,FPU
-FSUB mem32 [m: d8 /4] 8086,FPU
-FSUB mem64 [m: dc /4] 8086,FPU
-FSUB fpureg|to [r: dc e8+r] 8086,FPU
-FSUB fpureg,fpu0 [r-: dc e8+r] 8086,FPU
-FSUB fpureg [r: d8 e0+r] 8086,FPU
-FSUB fpu0,fpureg [-r: d8 e0+r] 8086,FPU
-FSUB void [ de e9] 8086,FPU,ND
-FSUBP fpureg [r: de e8+r] 8086,FPU
-FSUBP fpureg,fpu0 [r-: de e8+r] 8086,FPU
-FSUBP void [ de e9] 8086,FPU,ND
-FSUBR mem32 [m: d8 /5] 8086,FPU
-FSUBR mem64 [m: dc /5] 8086,FPU
-FSUBR fpureg|to [r: dc e0+r] 8086,FPU
-FSUBR fpureg,fpu0 [r-: dc e0+r] 8086,FPU
-FSUBR fpureg [r: d8 e8+r] 8086,FPU
-FSUBR fpu0,fpureg [-r: d8 e8+r] 8086,FPU
-FSUBR void [ de e1] 8086,FPU,ND
-FSUBRP fpureg [r: de e0+r] 8086,FPU
-FSUBRP fpureg,fpu0 [r-: de e0+r] 8086,FPU
-FSUBRP void [ de e1] 8086,FPU,ND
-FTST void [ d9 e4] 8086,FPU
-FUCOM fpureg [r: dd e0+r] 386,FPU
-FUCOM fpu0,fpureg [-r: dd e0+r] 386,FPU
-FUCOM void [ dd e1] 386,FPU,ND
-FUCOMI fpureg [r: db e8+r] P6,FPU
-FUCOMI fpu0,fpureg [-r: db e8+r] P6,FPU
-FUCOMI void [ db e9] P6,FPU,ND
-FUCOMIP fpureg [r: df e8+r] P6,FPU
-FUCOMIP fpu0,fpureg [-r: df e8+r] P6,FPU
-FUCOMIP void [ df e9] P6,FPU,ND
-FUCOMP fpureg [r: dd e8+r] 386,FPU
-FUCOMP fpu0,fpureg [-r: dd e8+r] 386,FPU
-FUCOMP void [ dd e9] 386,FPU,ND
-FUCOMPP void [ da e9] 386,FPU
-FXAM void [ d9 e5] 8086,FPU
-FXCH fpureg [r: d9 c8+r] 8086,FPU
-FXCH fpureg,fpu0 [r-: d9 c8+r] 8086,FPU
-FXCH fpu0,fpureg [-r: d9 c8+r] 8086,FPU
-FXCH void [ d9 c9] 8086,FPU,ND
-FXTRACT void [ d9 f4] 8086,FPU
-FYL2X void [ d9 f1] 8086,FPU
-FYL2XP1 void [ d9 f9] 8086,FPU
-HLT void [ f4] 8086,PRIV
-IBTS mem,reg16 [mr: o16 0f a7 /r] 386,SW,UNDOC,ND,OBSOLETE
-IBTS reg16,reg16 [mr: o16 0f a7 /r] 386,UNDOC,ND,OBSOLETE
-IBTS mem,reg32 [mr: o32 0f a7 /r] 386,SD,UNDOC,ND,OBSOLETE
-IBTS reg32,reg32 [mr: o32 0f a7 /r] 386,UNDOC,ND,OBSOLETE
-ICEBP void [ f1] 386,ND
-IDIV rm8 [m: f6 /7] 8086
-IDIV rm16 [m: o16 f7 /7] 8086
-IDIV rm32 [m: o32 f7 /7] 386
-IDIV rm64 [m: o64 f7 /7] X64
-IMUL rm8 [m: f6 /5] 8086
-IMUL rm16 [m: o16 f7 /5] 8086
-IMUL rm32 [m: o32 f7 /5] 386
-IMUL rm64 [m: o64 f7 /5] X64
-IMUL reg16,mem [rm: o16 0f af /r] 386,SM
-IMUL reg16,reg16 [rm: o16 0f af /r] 386
-IMUL reg32,mem [rm: o32 0f af /r] 386,SM
-IMUL reg32,reg32 [rm: o32 0f af /r] 386
-IMUL reg64,mem [rm: o64 0f af /r] X64,SM
-IMUL reg64,reg64 [rm: o64 0f af /r] X64
-IMUL reg16,mem,imm8 [rmi: o16 6b /r ib,s] 186,SM
-IMUL reg16,mem,sbyteword [rmi: o16 6b /r ib,s] 186,SM,ND
-IMUL reg16,mem,imm16 [rmi: o16 69 /r iw] 186,SM
-IMUL reg16,mem,imm [rmi: o16 69 /r iw] 186,SM,ND
-IMUL reg16,reg16,imm8 [rmi: o16 6b /r ib,s] 186
-IMUL reg16,reg16,sbyteword [rmi: o16 6b /r ib,s] 186,SM,ND
-IMUL reg16,reg16,imm16 [rmi: o16 69 /r iw] 186
-IMUL reg16,reg16,imm [rmi: o16 69 /r iw] 186,SM,ND
-IMUL reg32,mem,imm8 [rmi: o32 6b /r ib,s] 386,SM
-IMUL reg32,mem,sbytedword [rmi: o32 6b /r ib,s] 386,SM,ND
-IMUL reg32,mem,imm32 [rmi: o32 69 /r id] 386,SM
-IMUL reg32,mem,imm [rmi: o32 69 /r id] 386,SM,ND
-IMUL reg32,reg32,imm8 [rmi: o32 6b /r ib,s] 386
-IMUL reg32,reg32,sbytedword [rmi: o32 6b /r ib,s] 386,SM,ND
-IMUL reg32,reg32,imm32 [rmi: o32 69 /r id] 386
-IMUL reg32,reg32,imm [rmi: o32 69 /r id] 386,SM,ND
-IMUL reg64,mem,imm8 [rmi: o64 6b /r ib,s] X64,SM
-IMUL reg64,mem,sbytedword [rmi: o64 6b /r ib,s] X64,SM,ND
-IMUL reg64,mem,imm32 [rmi: o64 69 /r id] X64,SM
-IMUL reg64,mem,imm [rmi: o64 69 /r id,s] X64,SM,ND
-IMUL reg64,reg64,imm8 [rmi: o64 6b /r ib,s] X64
-IMUL reg64,reg64,sbytedword [rmi: o64 6b /r ib,s] X64,SM,ND
-IMUL reg64,reg64,imm32 [rmi: o64 69 /r id] X64
-IMUL reg64,reg64,imm [rmi: o64 69 /r id,s] X64,SM,ND
-IMUL reg16,imm8 [r+mi: o16 6b /r ib,s] 186
-IMUL reg16,sbyteword [r+mi: o16 6b /r ib,s] 186,SM,ND
-IMUL reg16,imm16 [r+mi: o16 69 /r iw] 186
-IMUL reg16,imm [r+mi: o16 69 /r iw] 186,SM,ND
-IMUL reg32,imm8 [r+mi: o32 6b /r ib,s] 386
-IMUL reg32,sbytedword [r+mi: o32 6b /r ib,s] 386,SM,ND
-IMUL reg32,imm32 [r+mi: o32 69 /r id] 386
-IMUL reg32,imm [r+mi: o32 69 /r id] 386,SM,ND
-IMUL reg64,imm8 [r+mi: o64 6b /r ib,s] X64
-IMUL reg64,sbytedword [r+mi: o64 6b /r ib,s] X64,SM,ND
-IMUL reg64,imm32 [r+mi: o64 69 /r id,s] X64
-IMUL reg64,imm [r+mi: o64 69 /r id,s] X64,SM,ND
-IN reg_al,imm [-i: e4 ib,u] 8086,SB
-IN reg_ax,imm [-i: o16 e5 ib,u] 8086,SB
-IN reg_eax,imm [-i: o32 e5 ib,u] 386,SB
-IN reg_al,reg_dx [--: ec] 8086
-IN reg_ax,reg_dx [--: o16 ed] 8086
-IN reg_eax,reg_dx [--: o32 ed] 386
-INC reg16 [r: o16 40+r] 8086,NOLONG
-INC reg32 [r: o32 40+r] 386,NOLONG
-INC rm8 [m: hle fe /0] 8086,LOCK
-INC rm16 [m: hle o16 ff /0] 8086,LOCK
-INC rm32 [m: hle o32 ff /0] 386,LOCK
-INC rm64 [m: hle o64 ff /0] X64,LOCK
-INSB void [ 6c] 186
-INSD void [ o32 6d] 386
-INSW void [ o16 6d] 186
-INT imm [i: cd ib,u] 8086,SB
-INT01 void [ f1] 386,ND
-INT1 void [ f1] 386
-INT03 void [ cc] 8086,ND
-INT3 void [ cc] 8086
-INTO void [ ce] 8086,NOLONG
-INVD void [ 0f 08] 486,PRIV
-INVPCID reg32,mem128 [rm: 66 0f 38 82 /r] FUTURE,INVPCID,PRIV,NOLONG
-INVPCID reg64,mem128 [rm: 66 0f 38 82 /r] FUTURE,INVPCID,PRIV,LONG
-INVLPG mem [m: 0f 01 /7] 486,PRIV
-INVLPGA reg_ax,reg_ecx [--: a16 0f 01 df] X86_64,AMD,NOLONG
-INVLPGA reg_eax,reg_ecx [--: a32 0f 01 df] X86_64,AMD
-INVLPGA reg_rax,reg_ecx [--: o64nw a64 0f 01 df] X64,AMD
-INVLPGA void [ 0f 01 df] X86_64,AMD
-IRET void [ odf cf] 8086
-IRETD void [ o32 cf] 386
-IRETQ void [ o64 cf] X64
-IRETW void [ o16 cf] 8086
-JCXZ imm [i: a16 e3 rel8] 8086,NOLONG
-JECXZ imm [i: a32 e3 rel8] 386
-JRCXZ imm [i: a64 e3 rel8] X64
-JMP imm|short [i: eb rel8] 8086
-JMP imm [i: jmp8 eb rel8] 8086,ND
-JMP imm [i: odf e9 rel] 8086,BND
-JMP imm|near [i: odf e9 rel] 8086,ND,BND
-JMP imm|far [i: odf ea iwd seg] 8086,ND,NOLONG
-; Call/jmp near imm/reg/mem is always 64-bit in long mode.
-JMP imm16 [i: o16 e9 rel] 8086,NOLONG,BND
-JMP imm16|near [i: o16 e9 rel] 8086,ND,NOLONG,BND
-JMP imm16|far [i: o16 ea iwd seg] 8086,ND,NOLONG
-JMP imm32 [i: o32 e9 rel] 386,NOLONG,BND
-JMP imm32|near [i: o32 e9 rel] 386,ND,NOLONG,BND
-JMP imm32|far [i: o32 ea iwd seg] 386,ND,NOLONG
-JMP imm64 [i: o64nw e9 rel] X64,BND
-JMP imm64|near [i: o64nw e9 rel] X64,ND,BND
-JMP imm:imm [ji: odf ea iwd iw] 8086,NOLONG
-JMP imm16:imm [ji: o16 ea iw iw] 8086,NOLONG
-JMP imm:imm16 [ji: o16 ea iw iw] 8086,NOLONG
-JMP imm32:imm [ji: o32 ea id iw] 386,NOLONG
-JMP imm:imm32 [ji: o32 ea id iw] 386,NOLONG
-JMP mem|far [m: odf ff /5] 8086,NOLONG
-JMP mem|far [m: o64 ff /5] X64
-JMP mem16|far [m: o16 ff /5] 8086
-JMP mem32|far [m: o32 ff /5] 386
-JMP mem64|far [m: o64 ff /5] X64
-JMP mem|near [m: odf ff /4] 8086,ND,BND
-JMP rm16|near [m: o16 ff /4] 8086,NOLONG,ND,BND
-JMP rm32|near [m: o32 ff /4] 386,NOLONG,ND,BND
-JMP rm64|near [m: o64nw ff /4] X64,ND,BND
-JMP mem [m: odf ff /4] 8086,BND
-JMP rm16 [m: o16 ff /4] 8086,NOLONG,BND
-JMP rm32 [m: o32 ff /4] 386,NOLONG,BND
-JMP rm64 [m: o64nw ff /4] X64,BND
-
-JMPE imm [i: odf 0f b8 rel] IA64
-JMPE imm16 [i: o16 0f b8 rel] IA64
-JMPE imm32 [i: o32 0f b8 rel] IA64
-JMPE rm16 [m: o16 0f 00 /6] IA64
-JMPE rm32 [m: o32 0f 00 /6] IA64
-LAHF void [ 9f] 8086
-LAR reg16,mem [rm: o16 0f 02 /r] 286,PROT,SW
-LAR reg16,reg16 [rm: o16 0f 02 /r] 286,PROT
-LAR reg16,reg32 [rm: o16 0f 02 /r] 386,PROT
-LAR reg16,reg64 [rm: o16 o64nw 0f 02 /r] X64,PROT,ND
-LAR reg32,mem [rm: o32 0f 02 /r] 386,PROT,SW
-LAR reg32,reg16 [rm: o32 0f 02 /r] 386,PROT
-LAR reg32,reg32 [rm: o32 0f 02 /r] 386,PROT
-LAR reg32,reg64 [rm: o32 o64nw 0f 02 /r] X64,PROT,ND
-LAR reg64,mem [rm: o64 0f 02 /r] X64,PROT,SW
-LAR reg64,reg16 [rm: o64 0f 02 /r] X64,PROT
-LAR reg64,reg32 [rm: o64 0f 02 /r] X64,PROT
-LAR reg64,reg64 [rm: o64 0f 02 /r] X64,PROT
-LDS reg16,mem [rm: o16 c5 /r] 8086,NOLONG
-LDS reg32,mem [rm: o32 c5 /r] 386,NOLONG
-LEA reg16,mem [rm: o16 8d /r] 8086
-LEA reg32,mem [rm: o32 8d /r] 386
-LEA reg64,mem [rm: o64 8d /r] X64
-LEAVE void [ c9] 186
-LES reg16,mem [rm: o16 c4 /r] 8086,NOLONG
-LES reg32,mem [rm: o32 c4 /r] 386,NOLONG
-LFENCE void [ np 0f ae e8] X64,AMD
-LFS reg16,mem [rm: o16 0f b4 /r] 386
-LFS reg32,mem [rm: o32 0f b4 /r] 386
-LFS reg64,mem [rm: o64 0f b4 /r] X64
-LGDT mem [m: 0f 01 /2] 286,PRIV
-LGS reg16,mem [rm: o16 0f b5 /r] 386
-LGS reg32,mem [rm: o32 0f b5 /r] 386
-LGS reg64,mem [rm: o64 0f b5 /r] X64
-LIDT mem [m: 0f 01 /3] 286,PRIV
-LLDT mem [m: 0f 00 /2] 286,PROT,PRIV
-LLDT mem16 [m: 0f 00 /2] 286,PROT,PRIV
-LLDT reg16 [m: 0f 00 /2] 286,PROT,PRIV
-LMSW mem [m: 0f 01 /6] 286,PRIV
-LMSW mem16 [m: 0f 01 /6] 286,PRIV
-LMSW reg16 [m: 0f 01 /6] 286,PRIV
-LOADALL void [ 0f 07] 386,UNDOC,ND,OBSOLETE
-LOADALL286 void [ 0f 05] 286,UNDOC,ND,OBSOLETE
-LODSB void [ ac] 8086
-LODSD void [ o32 ad] 386
-LODSQ void [ o64 ad] X64
-LODSW void [ o16 ad] 8086
-LOOP imm [i: adf e2 rel8] 8086
-LOOP imm,reg_cx [i-: a16 e2 rel8] 8086,NOLONG
-LOOP imm,reg_ecx [i-: a32 e2 rel8] 386
-LOOP imm,reg_rcx [i-: a64 e2 rel8] X64
-LOOPE imm [i: adf e1 rel8] 8086
-LOOPE imm,reg_cx [i-: a16 e1 rel8] 8086,NOLONG
-LOOPE imm,reg_ecx [i-: a32 e1 rel8] 386
-LOOPE imm,reg_rcx [i-: a64 e1 rel8] X64
-LOOPNE imm [i: adf e0 rel8] 8086
-LOOPNE imm,reg_cx [i-: a16 e0 rel8] 8086,NOLONG
-LOOPNE imm,reg_ecx [i-: a32 e0 rel8] 386
-LOOPNE imm,reg_rcx [i-: a64 e0 rel8] X64
-LOOPNZ imm [i: adf e0 rel8] 8086
-LOOPNZ imm,reg_cx [i-: a16 e0 rel8] 8086,NOLONG
-LOOPNZ imm,reg_ecx [i-: a32 e0 rel8] 386
-LOOPNZ imm,reg_rcx [i-: a64 e0 rel8] X64
-LOOPZ imm [i: adf e1 rel8] 8086
-LOOPZ imm,reg_cx [i-: a16 e1 rel8] 8086,NOLONG
-LOOPZ imm,reg_ecx [i-: a32 e1 rel8] 386
-LOOPZ imm,reg_rcx [i-: a64 e1 rel8] X64
-LSL reg16,mem [rm: o16 0f 03 /r] 286,PROT,SW
-LSL reg16,reg16 [rm: o16 0f 03 /r] 286,PROT
-LSL reg16,reg32 [rm: o16 0f 03 /r] 386,PROT
-LSL reg16,reg64 [rm: o16 o64nw 0f 03 /r] X64,PROT,ND
-LSL reg32,mem [rm: o32 0f 03 /r] 386,PROT,SW
-LSL reg32,reg16 [rm: o32 0f 03 /r] 386,PROT
-LSL reg32,reg32 [rm: o32 0f 03 /r] 386,PROT
-LSL reg32,reg64 [rm: o32 o64nw 0f 03 /r] X64,PROT,ND
-LSL reg64,mem [rm: o64 0f 03 /r] X64,PROT,SW
-LSL reg64,reg16 [rm: o64 0f 03 /r] X64,PROT
-LSL reg64,reg32 [rm: o64 0f 03 /r] X64,PROT
-LSL reg64,reg64 [rm: o64 0f 03 /r] X64,PROT
-LSS reg16,mem [rm: o16 0f b2 /r] 386
-LSS reg32,mem [rm: o32 0f b2 /r] 386
-LSS reg64,mem [rm: o64 0f b2 /r] X64
-LTR mem [m: 0f 00 /3] 286,PROT,PRIV
-LTR mem16 [m: 0f 00 /3] 286,PROT,PRIV
-LTR reg16 [m: 0f 00 /3] 286,PROT,PRIV
-MFENCE void [ np 0f ae f0] X64,AMD
-MONITOR void [ 0f 01 c8] PRESCOTT
-MONITOR reg_eax,reg_ecx,reg_edx [---: 0f 01 c8] PRESCOTT,NOLONG,ND
-MONITOR reg_rax,reg_ecx,reg_edx [---: 0f 01 c8] X64,ND
-MONITORX void [ 0f 01 fa] AMD
-MONITORX reg_rax,reg_ecx,reg_edx [---: 0f 01 fa] X64,AMD,ND
-MONITORX reg_eax,reg_ecx,reg_edx [---: 0f 01 fa] AMD,ND
-MONITORX reg_ax,reg_ecx,reg_edx [---: 0f 01 fa] AMD,ND
-MOV mem,reg_sreg [mr: 8c /r] 8086,SW
-MOV reg16,reg_sreg [mr: o16 8c /r] 8086
-MOV reg32,reg_sreg [mr: o32 8c /r] 386
-MOV reg64,reg_sreg [mr: o64nw 8c /r] X64,OPT,ND
-MOV rm64,reg_sreg [mr: o64 8c /r] X64
-MOV reg_sreg,mem [rm: 8e /r] 8086,SW
-MOV reg_sreg,reg16 [rm: 8e /r] 8086,OPT,ND
-MOV reg_sreg,reg32 [rm: 8e /r] 386,OPT,ND
-MOV reg_sreg,reg64 [rm: o64nw 8e /r] X64,OPT,ND
-MOV reg_sreg,reg16 [rm: o16 8e /r] 8086
-MOV reg_sreg,reg32 [rm: o32 8e /r] 386
-MOV reg_sreg,rm64 [rm: o64 8e /r] X64
-MOV reg_al,mem_offs [-i: a0 iwdq] 8086,SM
-MOV reg_ax,mem_offs [-i: o16 a1 iwdq] 8086,SM
-MOV reg_eax,mem_offs [-i: o32 a1 iwdq] 386,SM
-MOV reg_rax,mem_offs [-i: o64 a1 iwdq] X64,SM
-MOV mem_offs,reg_al [i-: a2 iwdq] 8086,SM,NOHLE
-MOV mem_offs,reg_ax [i-: o16 a3 iwdq] 8086,SM,NOHLE
-MOV mem_offs,reg_eax [i-: o32 a3 iwdq] 386,SM,NOHLE
-MOV mem_offs,reg_rax [i-: o64 a3 iwdq] X64,SM,NOHLE
-MOV reg32,reg_creg [mr: rex.l 0f 20 /r] 386,PRIV,NOLONG
-MOV reg64,reg_creg [mr: o64nw 0f 20 /r] X64,PRIV
-MOV reg_creg,reg32 [rm: rex.l 0f 22 /r] 386,PRIV,NOLONG
-MOV reg_creg,reg64 [rm: o64nw 0f 22 /r] X64,PRIV
-MOV reg32,reg_dreg [mr: 0f 21 /r] 386,PRIV,NOLONG
-MOV reg64,reg_dreg [mr: o64nw 0f 21 /r] X64,PRIV
-MOV reg_dreg,reg32 [rm: 0f 23 /r] 386,PRIV,NOLONG
-MOV reg_dreg,reg64 [rm: o64nw 0f 23 /r] X64,PRIV
-MOV reg32,reg_treg [mr: 0f 24 /r] 386,NOLONG,ND
-MOV reg_treg,reg32 [rm: 0f 26 /r] 386,NOLONG,ND
-MOV mem,reg8 [mr: hlexr 88 /r] 8086,SM
-MOV reg8,reg8 [mr: 88 /r] 8086
-MOV mem,reg16 [mr: hlexr o16 89 /r] 8086,SM
-MOV reg16,reg16 [mr: o16 89 /r] 8086
-MOV mem,reg32 [mr: hlexr o32 89 /r] 386,SM
-MOV reg32,reg32 [mr: o32 89 /r] 386
-MOV mem,reg64 [mr: hlexr o64 89 /r] X64,SM
-MOV reg64,reg64 [mr: o64 89 /r] X64
-MOV reg8,mem [rm: 8a /r] 8086,SM
-MOV reg8,reg8 [rm: 8a /r] 8086
-MOV reg16,mem [rm: o16 8b /r] 8086,SM
-MOV reg16,reg16 [rm: o16 8b /r] 8086
-MOV reg32,mem [rm: o32 8b /r] 386,SM
-MOV reg32,reg32 [rm: o32 8b /r] 386
-MOV reg64,mem [rm: o64 8b /r] X64,SM
-MOV reg64,reg64 [rm: o64 8b /r] X64
-MOV reg8,imm [ri: b0+r ib] 8086,SM
-MOV reg16,imm [ri: o16 b8+r iw] 8086,SM
-MOV reg32,imm [ri: o32 b8+r id] 386,SM
-MOV reg64,udword [ri: o64nw b8+r id] X64,SM,OPT,ND
-MOV reg64,sdword [mi: o64 c7 /0 id,s] X64,SM,OPT,ND
-MOV reg64,imm [ri: o64 b8+r iq] X64,SM
-MOV rm8,imm [mi: hlexr c6 /0 ib] 8086,SM
-MOV rm16,imm [mi: hlexr o16 c7 /0 iw] 8086,SM
-MOV rm32,imm [mi: hlexr o32 c7 /0 id] 386,SM
-MOV rm64,imm [mi: hlexr o64 c7 /0 id,s] X64,SM
-MOV rm64,imm32 [mi: hlexr o64 c7 /0 id,s] X64
-MOV mem,imm8 [mi: hlexr c6 /0 ib] 8086,SM
-MOV mem,imm16 [mi: hlexr o16 c7 /0 iw] 8086,SM
-MOV mem,imm32 [mi: hlexr o32 c7 /0 id] 386,SM
-MOVD mmxreg,rm32 [rm: np 0f 6e /r] PENT,MMX,SD
-MOVD rm32,mmxreg [mr: np 0f 7e /r] PENT,MMX,SD
-MOVD mmxreg,rm64 [rm: np o64 0f 6e /r] X64,MMX,SX,ND
-MOVD rm64,mmxreg [mr: np o64 0f 7e /r] X64,MMX,SX,ND
-MOVQ mmxreg,mmxrm [rm: np 0f 6f /r] PENT,MMX,SQ
-MOVQ mmxrm,mmxreg [mr: np 0f 7f /r] PENT,MMX,SQ
-MOVQ mmxreg,rm64 [rm: np o64 0f 6e /r] X64,MMX
-MOVQ rm64,mmxreg [mr: np o64 0f 7e /r] X64,MMX
-MOVSB void [ a4] 8086
-MOVSD void [ o32 a5] 386
-MOVSQ void [ o64 a5] X64
-MOVSW void [ o16 a5] 8086
-MOVSX reg16,mem [rm: o16 0f be /r] 386,SB
-MOVSX reg16,reg8 [rm: o16 0f be /r] 386
-MOVSX reg32,rm8 [rm: o32 0f be /r] 386
-MOVSX reg32,rm16 [rm: o32 0f bf /r] 386
-MOVSX reg64,rm8 [rm: o64 0f be /r] X64
-MOVSX reg64,rm16 [rm: o64 0f bf /r] X64
-MOVSXD reg64,rm32 [rm: o64 63 /r] X64
-MOVSX reg64,rm32 [rm: o64 63 /r] X64,ND
-MOVZX reg16,mem [rm: o16 0f b6 /r] 386,SB
-MOVZX reg16,reg8 [rm: o16 0f b6 /r] 386
-MOVZX reg32,rm8 [rm: o32 0f b6 /r] 386
-MOVZX reg32,rm16 [rm: o32 0f b7 /r] 386
-MOVZX reg64,rm8 [rm: o64 0f b6 /r] X64
-MOVZX reg64,rm16 [rm: o64 0f b7 /r] X64
-MUL rm8 [m: f6 /4] 8086
-MUL rm16 [m: o16 f7 /4] 8086
-MUL rm32 [m: o32 f7 /4] 386
-MUL rm64 [m: o64 f7 /4] X64
-MWAIT void [ 0f 01 c9] PRESCOTT
-MWAIT reg_eax,reg_ecx [--: 0f 01 c9] PRESCOTT,ND
-MWAITX void [ 0f 01 fb] AMD
-MWAITX reg_eax,reg_ecx [--: 0f 01 fb] AMD,ND
-NEG rm8 [m: hle f6 /3] 8086,LOCK
-NEG rm16 [m: hle o16 f7 /3] 8086,LOCK
-NEG rm32 [m: hle o32 f7 /3] 386,LOCK
-NEG rm64 [m: hle o64 f7 /3] X64,LOCK
-NOP rm16 [m: o16 0f 1f /0] P6
-NOP rm32 [m: o32 0f 1f /0] P6
-NOP rm64 [m: o64 0f 1f /0] X64
-NOT rm8 [m: hle f6 /2] 8086,LOCK
-NOT rm16 [m: hle o16 f7 /2] 8086,LOCK
-NOT rm32 [m: hle o32 f7 /2] 386,LOCK
-NOT rm64 [m: hle o64 f7 /2] X64,LOCK
-OR mem,reg8 [mr: hle 08 /r] 8086,SM,LOCK
-OR reg8,reg8 [mr: 08 /r] 8086
-OR mem,reg16 [mr: hle o16 09 /r] 8086,SM,LOCK
-OR reg16,reg16 [mr: o16 09 /r] 8086
-OR mem,reg32 [mr: hle o32 09 /r] 386,SM,LOCK
-OR reg32,reg32 [mr: o32 09 /r] 386
-OR mem,reg64 [mr: hle o64 09 /r] X64,SM,LOCK
-OR reg64,reg64 [mr: o64 09 /r] X64
-OR reg8,mem [rm: 0a /r] 8086,SM
-OR reg8,reg8 [rm: 0a /r] 8086
-OR reg16,mem [rm: o16 0b /r] 8086,SM
-OR reg16,reg16 [rm: o16 0b /r] 8086
-OR reg32,mem [rm: o32 0b /r] 386,SM
-OR reg32,reg32 [rm: o32 0b /r] 386
-OR reg64,mem [rm: o64 0b /r] X64,SM
-OR reg64,reg64 [rm: o64 0b /r] X64
-OR rm16,imm8 [mi: hle o16 83 /1 ib,s] 8086,LOCK
-OR rm32,imm8 [mi: hle o32 83 /1 ib,s] 386,LOCK
-OR rm64,imm8 [mi: hle o64 83 /1 ib,s] X64,LOCK
-OR reg_al,imm [-i: 0c ib] 8086,SM
-OR reg_ax,sbyteword [mi: o16 83 /1 ib,s] 8086,SM,ND
-OR reg_ax,imm [-i: o16 0d iw] 8086,SM
-OR reg_eax,sbytedword [mi: o32 83 /1 ib,s] 386,SM,ND
-OR reg_eax,imm [-i: o32 0d id] 386,SM
-OR reg_rax,sbytedword [mi: o64 83 /1 ib,s] X64,SM,ND
-OR reg_rax,imm [-i: o64 0d id,s] X64,SM
-OR rm8,imm [mi: hle 80 /1 ib] 8086,SM,LOCK
-OR rm16,sbyteword [mi: hle o16 83 /1 ib,s] 8086,SM,LOCK,ND
-OR rm16,imm [mi: hle o16 81 /1 iw] 8086,SM,LOCK
-OR rm32,sbytedword [mi: hle o32 83 /1 ib,s] 386,SM,LOCK,ND
-OR rm32,imm [mi: hle o32 81 /1 id] 386,SM,LOCK
-OR rm64,sbytedword [mi: hle o64 83 /1 ib,s] X64,SM,LOCK,ND
-OR rm64,imm [mi: hle o64 81 /1 id,s] X64,SM,LOCK
-OR mem,imm8 [mi: hle 80 /1 ib] 8086,SM,LOCK
-OR mem,sbyteword16 [mi: hle o16 83 /1 ib,s] 8086,SM,LOCK,ND
-OR mem,imm16 [mi: hle o16 81 /1 iw] 8086,SM,LOCK
-OR mem,sbytedword32 [mi: hle o32 83 /1 ib,s] 386,SM,LOCK,ND
-OR mem,imm32 [mi: hle o32 81 /1 id] 386,SM,LOCK
-OR rm8,imm [mi: hle 82 /1 ib] 8086,SM,LOCK,ND,NOLONG
-OUT imm,reg_al [i-: e6 ib,u] 8086,SB
-OUT imm,reg_ax [i-: o16 e7 ib,u] 8086,SB
-OUT imm,reg_eax [i-: o32 e7 ib,u] 386,SB
-OUT reg_dx,reg_al [--: ee] 8086
-OUT reg_dx,reg_ax [--: o16 ef] 8086
-OUT reg_dx,reg_eax [--: o32 ef] 386
-OUTSB void [ 6e] 186
-OUTSD void [ o32 6f] 386
-OUTSW void [ o16 6f] 186
-PACKSSDW mmxreg,mmxrm [rm: np o64nw 0f 6b /r] PENT,MMX,SQ
-PACKSSWB mmxreg,mmxrm [rm: np o64nw 0f 63 /r] PENT,MMX,SQ
-PACKUSWB mmxreg,mmxrm [rm: np o64nw 0f 67 /r] PENT,MMX,SQ
-PADDB mmxreg,mmxrm [rm: np o64nw 0f fc /r] PENT,MMX,SQ
-PADDD mmxreg,mmxrm [rm: np o64nw 0f fe /r] PENT,MMX,SQ
-PADDSB mmxreg,mmxrm [rm: np o64nw 0f ec /r] PENT,MMX,SQ
-PADDSIW mmxreg,mmxrm [rm: o64nw 0f 51 /r] PENT,MMX,SQ,CYRIX
-PADDSW mmxreg,mmxrm [rm: np o64nw 0f ed /r] PENT,MMX,SQ
-PADDUSB mmxreg,mmxrm [rm: np o64nw 0f dc /r] PENT,MMX,SQ
-PADDUSW mmxreg,mmxrm [rm: np o64nw 0f dd /r] PENT,MMX,SQ
-PADDW mmxreg,mmxrm [rm: np o64nw 0f fd /r] PENT,MMX,SQ
-PAND mmxreg,mmxrm [rm: np o64nw 0f db /r] PENT,MMX,SQ
-PANDN mmxreg,mmxrm [rm: np o64nw 0f df /r] PENT,MMX,SQ
-PAUSE void [ f3i 90] 8086
-PAVEB mmxreg,mmxrm [rm: o64nw 0f 50 /r] PENT,MMX,SQ,CYRIX
-PAVGUSB mmxreg,mmxrm [rm: o64nw 0f 0f /r bf] PENT,3DNOW,SQ
-PCMPEQB mmxreg,mmxrm [rm: np o64nw 0f 74 /r] PENT,MMX,SQ
-PCMPEQD mmxreg,mmxrm [rm: np o64nw 0f 76 /r] PENT,MMX,SQ
-PCMPEQW mmxreg,mmxrm [rm: np o64nw 0f 75 /r] PENT,MMX,SQ
-PCMPGTB mmxreg,mmxrm [rm: np o64nw 0f 64 /r] PENT,MMX,SQ
-PCMPGTD mmxreg,mmxrm [rm: np o64nw 0f 66 /r] PENT,MMX,SQ
-PCMPGTW mmxreg,mmxrm [rm: np o64nw 0f 65 /r] PENT,MMX,SQ
-PDISTIB mmxreg,mem [rm: 0f 54 /r] PENT,MMX,SM,CYRIX
-PF2ID mmxreg,mmxrm [rm: o64nw 0f 0f /r 1d] PENT,3DNOW,SQ
-PFACC mmxreg,mmxrm [rm: o64nw 0f 0f /r ae] PENT,3DNOW,SQ
-PFADD mmxreg,mmxrm [rm: o64nw 0f 0f /r 9e] PENT,3DNOW,SQ
-PFCMPEQ mmxreg,mmxrm [rm: o64nw 0f 0f /r b0] PENT,3DNOW,SQ
-PFCMPGE mmxreg,mmxrm [rm: o64nw 0f 0f /r 90] PENT,3DNOW,SQ
-PFCMPGT mmxreg,mmxrm [rm: o64nw 0f 0f /r a0] PENT,3DNOW,SQ
-PFMAX mmxreg,mmxrm [rm: o64nw 0f 0f /r a4] PENT,3DNOW,SQ
-PFMIN mmxreg,mmxrm [rm: o64nw 0f 0f /r 94] PENT,3DNOW,SQ
-PFMUL mmxreg,mmxrm [rm: o64nw 0f 0f /r b4] PENT,3DNOW,SQ
-PFRCP mmxreg,mmxrm [rm: o64nw 0f 0f /r 96] PENT,3DNOW,SQ
-PFRCPIT1 mmxreg,mmxrm [rm: o64nw 0f 0f /r a6] PENT,3DNOW,SQ
-PFRCPIT2 mmxreg,mmxrm [rm: o64nw 0f 0f /r b6] PENT,3DNOW,SQ
-PFRSQIT1 mmxreg,mmxrm [rm: o64nw 0f 0f /r a7] PENT,3DNOW,SQ
-PFRSQRT mmxreg,mmxrm [rm: o64nw 0f 0f /r 97] PENT,3DNOW,SQ
-PFSUB mmxreg,mmxrm [rm: o64nw 0f 0f /r 9a] PENT,3DNOW,SQ
-PFSUBR mmxreg,mmxrm [rm: o64nw 0f 0f /r aa] PENT,3DNOW,SQ
-PI2FD mmxreg,mmxrm [rm: o64nw 0f 0f /r 0d] PENT,3DNOW,SQ
-PMACHRIW mmxreg,mem [rm: 0f 5e /r] PENT,MMX,SM,CYRIX
-PMADDWD mmxreg,mmxrm [rm: np o64nw 0f f5 /r] PENT,MMX,SQ
-PMAGW mmxreg,mmxrm [rm: o64nw 0f 52 /r] PENT,MMX,SQ,CYRIX
-PMULHRIW mmxreg,mmxrm [rm: o64nw 0f 5d /r] PENT,MMX,SQ,CYRIX
-PMULHRWA mmxreg,mmxrm [rm: o64nw 0f 0f /r b7] PENT,3DNOW,SQ
-PMULHRWC mmxreg,mmxrm [rm: o64nw 0f 59 /r] PENT,MMX,SQ,CYRIX
-PMULHW mmxreg,mmxrm [rm: np o64nw 0f e5 /r] PENT,MMX,SQ
-PMULLW mmxreg,mmxrm [rm: np o64nw 0f d5 /r] PENT,MMX,SQ
-PMVGEZB mmxreg,mem [rm: 0f 5c /r] PENT,MMX,SQ,CYRIX
-PMVLZB mmxreg,mem [rm: 0f 5b /r] PENT,MMX,SQ,CYRIX
-PMVNZB mmxreg,mem [rm: 0f 5a /r] PENT,MMX,SQ,CYRIX
-PMVZB mmxreg,mem [rm: 0f 58 /r] PENT,MMX,SQ,CYRIX
-POP reg16 [r: o16 58+r] 8086
-POP reg32 [r: o32 58+r] 386,NOLONG
-POP reg64 [r: o64nw 58+r] X64
-POP rm16 [m: o16 8f /0] 8086
-POP rm32 [m: o32 8f /0] 386,NOLONG
-POP rm64 [m: o64nw 8f /0] X64
-POP reg_es [-: 07] 8086,NOLONG
-POP reg_cs [-: 0f] 8086,UNDOC,ND,OBSOLETE
-POP reg_ss [-: 17] 8086,NOLONG
-POP reg_ds [-: 1f] 8086,NOLONG
-POP reg_fs [-: 0f a1] 386
-POP reg_gs [-: 0f a9] 386
-POPA void [ odf 61] 186,NOLONG
-POPAD void [ o32 61] 386,NOLONG
-POPAW void [ o16 61] 186,NOLONG
-POPF void [ odf 9d] 8086
-POPFD void [ o32 9d] 386,NOLONG
-POPFQ void [ o32 9d] X64
-POPFW void [ o16 9d] 8086
-POR mmxreg,mmxrm [rm: np o64nw 0f eb /r] PENT,MMX,SQ
-PREFETCH mem [m: 0f 0d /0] PENT,3DNOW,SQ
-PREFETCHW mem [m: 0f 0d /1] PENT,3DNOW,SQ
-PSLLD mmxreg,mmxrm [rm: np o64nw 0f f2 /r] PENT,MMX,SQ
-PSLLD mmxreg,imm [mi: np 0f 72 /6 ib,u] PENT,MMX
-PSLLQ mmxreg,mmxrm [rm: np o64nw 0f f3 /r] PENT,MMX,SQ
-PSLLQ mmxreg,imm [mi: np 0f 73 /6 ib,u] PENT,MMX
-PSLLW mmxreg,mmxrm [rm: np o64nw 0f f1 /r] PENT,MMX,SQ
-PSLLW mmxreg,imm [mi: np 0f 71 /6 ib,u] PENT,MMX
-PSRAD mmxreg,mmxrm [rm: np o64nw 0f e2 /r] PENT,MMX,SQ
-PSRAD mmxreg,imm [mi: np 0f 72 /4 ib,u] PENT,MMX
-PSRAW mmxreg,mmxrm [rm: np o64nw 0f e1 /r] PENT,MMX,SQ
-PSRAW mmxreg,imm [mi: np 0f 71 /4 ib,u] PENT,MMX
-PSRLD mmxreg,mmxrm [rm: np o64nw 0f d2 /r] PENT,MMX,SQ
-PSRLD mmxreg,imm [mi: np 0f 72 /2 ib,u] PENT,MMX
-PSRLQ mmxreg,mmxrm [rm: np o64nw 0f d3 /r] PENT,MMX,SQ
-PSRLQ mmxreg,imm [mi: np 0f 73 /2 ib,u] PENT,MMX
-PSRLW mmxreg,mmxrm [rm: np o64nw 0f d1 /r] PENT,MMX,SQ
-PSRLW mmxreg,imm [mi: np 0f 71 /2 ib,u] PENT,MMX
-PSUBB mmxreg,mmxrm [rm: np o64nw 0f f8 /r] PENT,MMX,SQ
-PSUBD mmxreg,mmxrm [rm: np o64nw 0f fa /r] PENT,MMX,SQ
-PSUBSB mmxreg,mmxrm [rm: np o64nw 0f e8 /r] PENT,MMX,SQ
-PSUBSIW mmxreg,mmxrm [rm: o64nw 0f 55 /r] PENT,MMX,SQ,CYRIX
-PSUBSW mmxreg,mmxrm [rm: np o64nw 0f e9 /r] PENT,MMX,SQ
-PSUBUSB mmxreg,mmxrm [rm: np o64nw 0f d8 /r] PENT,MMX,SQ
-PSUBUSW mmxreg,mmxrm [rm: np o64nw 0f d9 /r] PENT,MMX,SQ
-PSUBW mmxreg,mmxrm [rm: np o64nw 0f f9 /r] PENT,MMX,SQ
-PUNPCKHBW mmxreg,mmxrm [rm: np o64nw 0f 68 /r] PENT,MMX,SQ
-PUNPCKHDQ mmxreg,mmxrm [rm: np o64nw 0f 6a /r] PENT,MMX,SQ
-PUNPCKHWD mmxreg,mmxrm [rm: np o64nw 0f 69 /r] PENT,MMX,SQ
-PUNPCKLBW mmxreg,mmxrm [rm: np o64nw 0f 60 /r] PENT,MMX,SQ
-PUNPCKLDQ mmxreg,mmxrm [rm: np o64nw 0f 62 /r] PENT,MMX,SQ
-PUNPCKLWD mmxreg,mmxrm [rm: np o64nw 0f 61 /r] PENT,MMX,SQ
-PUSH reg16 [r: o16 50+r] 8086
-PUSH reg32 [r: o32 50+r] 386,NOLONG
-PUSH reg64 [r: o64nw 50+r] X64
-PUSH rm16 [m: o16 ff /6] 8086
-PUSH rm32 [m: o32 ff /6] 386,NOLONG
-PUSH rm64 [m: o64nw ff /6] X64
-PUSH reg_es [-: 06] 8086,NOLONG
-PUSH reg_cs [-: 0e] 8086,NOLONG
-PUSH reg_ss [-: 16] 8086,NOLONG
-PUSH reg_ds [-: 1e] 8086,NOLONG
-PUSH reg_fs [-: 0f a0] 386
-PUSH reg_gs [-: 0f a8] 386
-PUSH imm8 [i: 6a ib,s] 186
-PUSH sbyteword16 [i: o16 6a ib,s] 186,AR0,SIZE,ND
-PUSH imm16 [i: o16 68 iw] 186,AR0,SIZE
-PUSH sbytedword32 [i: o32 6a ib,s] 386,NOLONG,AR0,SIZE,ND
-PUSH imm32 [i: o32 68 id] 386,NOLONG,AR0,SIZE
-PUSH sbytedword32 [i: o32 6a ib,s] 386,NOLONG,SD,ND
-PUSH imm32 [i: o32 68 id] 386,NOLONG,SD
-PUSH sbytedword64 [i: o64nw 6a ib,s] X64,AR0,SIZE,ND
-PUSH imm64 [i: o64nw 68 id,s] X64,AR0,SIZE
-PUSH sbytedword32 [i: o64nw 6a ib,s] X64,AR0,SIZE,ND
-PUSH imm32 [i: o64nw 68 id,s] X64,AR0,SIZE
-PUSHA void [ odf 60] 186,NOLONG
-PUSHAD void [ o32 60] 386,NOLONG
-PUSHAW void [ o16 60] 186,NOLONG
-PUSHF void [ odf 9c] 8086
-PUSHFD void [ o32 9c] 386,NOLONG
-PUSHFQ void [ o32 9c] X64
-PUSHFW void [ o16 9c] 8086
-PXOR mmxreg,mmxrm [rm: np o64nw 0f ef /r] PENT,MMX,SQ
-RCL rm8,unity [m-: d0 /2] 8086
-RCL rm8,reg_cl [m-: d2 /2] 8086
-RCL rm8,imm8 [mi: c0 /2 ib,u] 186
-RCL rm16,unity [m-: o16 d1 /2] 8086
-RCL rm16,reg_cl [m-: o16 d3 /2] 8086
-RCL rm16,imm8 [mi: o16 c1 /2 ib,u] 186
-RCL rm32,unity [m-: o32 d1 /2] 386
-RCL rm32,reg_cl [m-: o32 d3 /2] 386
-RCL rm32,imm8 [mi: o32 c1 /2 ib,u] 386
-RCL rm64,unity [m-: o64 d1 /2] X64
-RCL rm64,reg_cl [m-: o64 d3 /2] X64
-RCL rm64,imm8 [mi: o64 c1 /2 ib,u] X64
-RCR rm8,unity [m-: d0 /3] 8086
-RCR rm8,reg_cl [m-: d2 /3] 8086
-RCR rm8,imm8 [mi: c0 /3 ib,u] 186
-RCR rm16,unity [m-: o16 d1 /3] 8086
-RCR rm16,reg_cl [m-: o16 d3 /3] 8086
-RCR rm16,imm8 [mi: o16 c1 /3 ib,u] 186
-RCR rm32,unity [m-: o32 d1 /3] 386
-RCR rm32,reg_cl [m-: o32 d3 /3] 386
-RCR rm32,imm8 [mi: o32 c1 /3 ib,u] 386
-RCR rm64,unity [m-: o64 d1 /3] X64
-RCR rm64,reg_cl [m-: o64 d3 /3] X64
-RCR rm64,imm8 [mi: o64 c1 /3 ib,u] X64
-RDSHR rm32 [m: o32 0f 36 /0] P6,CYRIX,SMM
-RDMSR void [ 0f 32] PENT,PRIV
-RDPMC void [ 0f 33] P6
-RDTSC void [ 0f 31] PENT
-RDTSCP void [ 0f 01 f9] X86_64
-RET imm [i: c2 iw] 8086,SW,BND
-RETF void [ cb] 8086
-RETF imm [i: ca iw] 8086,SW
-RETN void [ c3] 8086,BND
-RETN imm [i: c2 iw] 8086,SW,BND
-
-ROL rm8,unity [m-: d0 /0] 8086
-ROL rm8,reg_cl [m-: d2 /0] 8086
-ROL rm8,imm8 [mi: c0 /0 ib,u] 186
-ROL rm16,unity [m-: o16 d1 /0] 8086
-ROL rm16,reg_cl [m-: o16 d3 /0] 8086
-ROL rm16,imm8 [mi: o16 c1 /0 ib,u] 186
-ROL rm32,unity [m-: o32 d1 /0] 386
-ROL rm32,reg_cl [m-: o32 d3 /0] 386
-ROL rm32,imm8 [mi: o32 c1 /0 ib,u] 386
-ROL rm64,unity [m-: o64 d1 /0] X64
-ROL rm64,reg_cl [m-: o64 d3 /0] X64
-ROL rm64,imm8 [mi: o64 c1 /0 ib,u] X64
-ROR rm8,unity [m-: d0 /1] 8086
-ROR rm8,reg_cl [m-: d2 /1] 8086
-ROR rm8,imm8 [mi: c0 /1 ib,u] 186
-ROR rm16,unity [m-: o16 d1 /1] 8086
-ROR rm16,reg_cl [m-: o16 d3 /1] 8086
-ROR rm16,imm8 [mi: o16 c1 /1 ib,u] 186
-ROR rm32,unity [m-: o32 d1 /1] 386
-ROR rm32,reg_cl [m-: o32 d3 /1] 386
-ROR rm32,imm8 [mi: o32 c1 /1 ib,u] 386
-ROR rm64,unity [m-: o64 d1 /1] X64
-ROR rm64,reg_cl [m-: o64 d3 /1] X64
-ROR rm64,imm8 [mi: o64 c1 /1 ib,u] X64
-RDM void [ 0f 3a] P6,CYRIX,ND
-RSDC reg_sreg,mem80 [rm: 0f 79 /r] 486,CYRIX,SMM
-RSLDT mem80 [m: 0f 7b /0] 486,CYRIX,SMM
-RSM void [ 0f aa] PENT,SMM
-RSTS mem80 [m: 0f 7d /0] 486,CYRIX,SMM
-SAHF void [ 9e] 8086
-SAL rm8,unity [m-: d0 /4] 8086,ND
-SAL rm8,reg_cl [m-: d2 /4] 8086,ND
-SAL rm8,imm8 [mi: c0 /4 ib,u] 186,ND
-SAL rm16,unity [m-: o16 d1 /4] 8086,ND
-SAL rm16,reg_cl [m-: o16 d3 /4] 8086,ND
-SAL rm16,imm8 [mi: o16 c1 /4 ib,u] 186,ND
-SAL rm32,unity [m-: o32 d1 /4] 386,ND
-SAL rm32,reg_cl [m-: o32 d3 /4] 386,ND
-SAL rm32,imm8 [mi: o32 c1 /4 ib,u] 386,ND
-SAL rm64,unity [m-: o64 d1 /4] X64,ND
-SAL rm64,reg_cl [m-: o64 d3 /4] X64,ND
-SAL rm64,imm8 [mi: o64 c1 /4 ib,u] X64,ND
-SALC void [ d6] 8086,UNDOC
-SAR rm8,unity [m-: d0 /7] 8086
-SAR rm8,reg_cl [m-: d2 /7] 8086
-SAR rm8,imm8 [mi: c0 /7 ib,u] 186
-SAR rm16,unity [m-: o16 d1 /7] 8086
-SAR rm16,reg_cl [m-: o16 d3 /7] 8086
-SAR rm16,imm8 [mi: o16 c1 /7 ib,u] 186
-SAR rm32,unity [m-: o32 d1 /7] 386
-SAR rm32,reg_cl [m-: o32 d3 /7] 386
-SAR rm32,imm8 [mi: o32 c1 /7 ib,u] 386
-SAR rm64,unity [m-: o64 d1 /7] X64
-SAR rm64,reg_cl [m-: o64 d3 /7] X64
-SAR rm64,imm8 [mi: o64 c1 /7 ib,u] X64
-SBB mem,reg8 [mr: hle 18 /r] 8086,SM,LOCK
-SBB reg8,reg8 [mr: 18 /r] 8086
-SBB mem,reg16 [mr: hle o16 19 /r] 8086,SM,LOCK
-SBB reg16,reg16 [mr: o16 19 /r] 8086
-SBB mem,reg32 [mr: hle o32 19 /r] 386,SM,LOCK
-SBB reg32,reg32 [mr: o32 19 /r] 386
-SBB mem,reg64 [mr: hle o64 19 /r] X64,SM,LOCK
-SBB reg64,reg64 [mr: o64 19 /r] X64
-SBB reg8,mem [rm: 1a /r] 8086,SM
-SBB reg8,reg8 [rm: 1a /r] 8086
-SBB reg16,mem [rm: o16 1b /r] 8086,SM
-SBB reg16,reg16 [rm: o16 1b /r] 8086
-SBB reg32,mem [rm: o32 1b /r] 386,SM
-SBB reg32,reg32 [rm: o32 1b /r] 386
-SBB reg64,mem [rm: o64 1b /r] X64,SM
-SBB reg64,reg64 [rm: o64 1b /r] X64
-SBB rm16,imm8 [mi: hle o16 83 /3 ib,s] 8086,LOCK
-SBB rm32,imm8 [mi: hle o32 83 /3 ib,s] 386,LOCK
-SBB rm64,imm8 [mi: hle o64 83 /3 ib,s] X64,LOCK
-SBB reg_al,imm [-i: 1c ib] 8086,SM
-SBB reg_ax,sbyteword [mi: o16 83 /3 ib,s] 8086,SM,ND
-SBB reg_ax,imm [-i: o16 1d iw] 8086,SM
-SBB reg_eax,sbytedword [mi: o32 83 /3 ib,s] 386,SM,ND
-SBB reg_eax,imm [-i: o32 1d id] 386,SM
-SBB reg_rax,sbytedword [mi: o64 83 /3 ib,s] X64,SM,ND
-SBB reg_rax,imm [-i: o64 1d id,s] X64,SM
-SBB rm8,imm [mi: hle 80 /3 ib] 8086,SM,LOCK
-SBB rm16,sbyteword [mi: hle o16 83 /3 ib,s] 8086,SM,LOCK,ND
-SBB rm16,imm [mi: hle o16 81 /3 iw] 8086,SM,LOCK
-SBB rm32,sbytedword [mi: hle o32 83 /3 ib,s] 386,SM,LOCK,ND
-SBB rm32,imm [mi: hle o32 81 /3 id] 386,SM,LOCK
-SBB rm64,sbytedword [mi: hle o64 83 /3 ib,s] X64,SM,LOCK,ND
-SBB rm64,imm [mi: hle o64 81 /3 id,s] X64,SM,LOCK
-SBB mem,imm8 [mi: hle 80 /3 ib] 8086,SM,LOCK
-SBB mem,sbyteword16 [mi: hle o16 83 /3 ib,s] 8086,SM,LOCK,ND
-SBB mem,imm16 [mi: hle o16 81 /3 iw] 8086,SM,LOCK
-SBB mem,sbytedword32 [mi: hle o32 83 /3 ib,s] 386,SM,LOCK,ND
-SBB mem,imm32 [mi: hle o32 81 /3 id] 386,SM,LOCK
-SBB rm8,imm [mi: hle 82 /3 ib] 8086,SM,LOCK,ND,NOLONG
-SCASB void [ repe ae] 8086
-SCASD void [ repe o32 af] 386
-SCASQ void [ repe o64 af] X64
-SCASW void [ repe o16 af] 8086
-SFENCE void [ np 0f ae f8] X64,AMD
-SGDT mem [m: 0f 01 /0] 286
-SHL rm8,unity [m-: d0 /4] 8086
-SHL rm8,reg_cl [m-: d2 /4] 8086
-SHL rm8,imm8 [mi: c0 /4 ib,u] 186
-SHL rm16,unity [m-: o16 d1 /4] 8086
-SHL rm16,reg_cl [m-: o16 d3 /4] 8086
-SHL rm16,imm8 [mi: o16 c1 /4 ib,u] 186
-SHL rm32,unity [m-: o32 d1 /4] 386
-SHL rm32,reg_cl [m-: o32 d3 /4] 386
-SHL rm32,imm8 [mi: o32 c1 /4 ib,u] 386
-SHL rm64,unity [m-: o64 d1 /4] X64
-SHL rm64,reg_cl [m-: o64 d3 /4] X64
-SHL rm64,imm8 [mi: o64 c1 /4 ib,u] X64
-SHLD mem,reg16,imm [mri: o16 0f a4 /r ib,u] 386,SM2,SB,AR2
-SHLD reg16,reg16,imm [mri: o16 0f a4 /r ib,u] 386,SM2,SB,AR2
-SHLD mem,reg32,imm [mri: o32 0f a4 /r ib,u] 386,SM2,SB,AR2
-SHLD reg32,reg32,imm [mri: o32 0f a4 /r ib,u] 386,SM2,SB,AR2
-SHLD mem,reg64,imm [mri: o64 0f a4 /r ib,u] X64,SM2,SB,AR2
-SHLD reg64,reg64,imm [mri: o64 0f a4 /r ib,u] X64,SM2,SB,AR2
-SHLD mem,reg16,reg_cl [mr-: o16 0f a5 /r] 386,SM
-SHLD reg16,reg16,reg_cl [mr-: o16 0f a5 /r] 386
-SHLD mem,reg32,reg_cl [mr-: o32 0f a5 /r] 386,SM
-SHLD reg32,reg32,reg_cl [mr-: o32 0f a5 /r] 386
-SHLD mem,reg64,reg_cl [mr-: o64 0f a5 /r] X64,SM
-SHLD reg64,reg64,reg_cl [mr-: o64 0f a5 /r] X64
-SHR rm8,unity [m-: d0 /5] 8086
-SHR rm8,reg_cl [m-: d2 /5] 8086
-SHR rm8,imm8 [mi: c0 /5 ib,u] 186
-SHR rm16,unity [m-: o16 d1 /5] 8086
-SHR rm16,reg_cl [m-: o16 d3 /5] 8086
-SHR rm16,imm8 [mi: o16 c1 /5 ib,u] 186
-SHR rm32,unity [m-: o32 d1 /5] 386
-SHR rm32,reg_cl [m-: o32 d3 /5] 386
-SHR rm32,imm8 [mi: o32 c1 /5 ib,u] 386
-SHR rm64,unity [m-: o64 d1 /5] X64
-SHR rm64,reg_cl [m-: o64 d3 /5] X64
-SHR rm64,imm8 [mi: o64 c1 /5 ib,u] X64
-SHRD mem,reg16,imm [mri: o16 0f ac /r ib,u] 386,SM2,SB,AR2
-SHRD reg16,reg16,imm [mri: o16 0f ac /r ib,u] 386,SM2,SB,AR2
-SHRD mem,reg32,imm [mri: o32 0f ac /r ib,u] 386,SM2,SB,AR2
-SHRD reg32,reg32,imm [mri: o32 0f ac /r ib,u] 386,SM2,SB,AR2
-SHRD mem,reg64,imm [mri: o64 0f ac /r ib,u] X64,SM2,SB,AR2
-SHRD reg64,reg64,imm [mri: o64 0f ac /r ib,u] X64,SM2,SB,AR2
-SHRD mem,reg16,reg_cl [mr-: o16 0f ad /r] 386,SM
-SHRD reg16,reg16,reg_cl [mr-: o16 0f ad /r] 386
-SHRD mem,reg32,reg_cl [mr-: o32 0f ad /r] 386,SM
-SHRD reg32,reg32,reg_cl [mr-: o32 0f ad /r] 386
-SHRD mem,reg64,reg_cl [mr-: o64 0f ad /r] X64,SM
-SHRD reg64,reg64,reg_cl [mr-: o64 0f ad /r] X64
-SIDT mem [m: 0f 01 /1] 286
-SLDT mem [m: 0f 00 /0] 286
-SLDT mem16 [m: 0f 00 /0] 286
-SLDT reg16 [m: o16 0f 00 /0] 286
-SLDT reg32 [m: o32 0f 00 /0] 386
-SLDT reg64 [m: o64nw 0f 00 /0] X64,ND
-SLDT reg64 [m: o64 0f 00 /0] X64
-SKINIT void [ 0f 01 de] X64
-SMI void [ f1] 386,UNDOC
-SMINT void [ 0f 38] P6,CYRIX,ND
-; Older Cyrix chips had this; they had to move due to conflict with MMX
-SMINTOLD void [ 0f 7e] 486,CYRIX,ND,OBSOLETE
-SMSW mem [m: 0f 01 /4] 286
-SMSW mem16 [m: 0f 01 /4] 286
-SMSW reg16 [m: o16 0f 01 /4] 286
-SMSW reg32 [m: o32 0f 01 /4] 386
-SMSW reg64 [m: o64 0f 01 /4] X64
-STC void [ f9] 8086
-STD void [ fd] 8086
-STI void [ fb] 8086
-STOSB void [ aa] 8086
-STOSD void [ o32 ab] 386
-STOSQ void [ o64 ab] X64
-STOSW void [ o16 ab] 8086
-STR mem [m: 0f 00 /1] 286,PROT
-STR mem16 [m: 0f 00 /1] 286,PROT
-STR reg16 [m: o16 0f 00 /1] 286,PROT
-STR reg32 [m: o32 0f 00 /1] 386,PROT
-STR reg64 [m: o64 0f 00 /1] X64
-SUB mem,reg8 [mr: hle 28 /r] 8086,SM,LOCK
-SUB reg8,reg8 [mr: 28 /r] 8086
-SUB mem,reg16 [mr: hle o16 29 /r] 8086,SM,LOCK
-SUB reg16,reg16 [mr: o16 29 /r] 8086
-SUB mem,reg32 [mr: hle o32 29 /r] 386,SM,LOCK
-SUB reg32,reg32 [mr: o32 29 /r] 386
-SUB mem,reg64 [mr: hle o64 29 /r] X64,SM,LOCK
-SUB reg64,reg64 [mr: o64 29 /r] X64
-SUB reg8,mem [rm: 2a /r] 8086,SM
-SUB reg8,reg8 [rm: 2a /r] 8086
-SUB reg16,mem [rm: o16 2b /r] 8086,SM
-SUB reg16,reg16 [rm: o16 2b /r] 8086
-SUB reg32,mem [rm: o32 2b /r] 386,SM
-SUB reg32,reg32 [rm: o32 2b /r] 386
-SUB reg64,mem [rm: o64 2b /r] X64,SM
-SUB reg64,reg64 [rm: o64 2b /r] X64
-SUB rm16,imm8 [mi: hle o16 83 /5 ib,s] 8086,LOCK
-SUB rm32,imm8 [mi: hle o32 83 /5 ib,s] 386,LOCK
-SUB rm64,imm8 [mi: hle o64 83 /5 ib,s] X64,LOCK
-SUB reg_al,imm [-i: 2c ib] 8086,SM
-SUB reg_ax,sbyteword [mi: o16 83 /5 ib,s] 8086,SM,ND
-SUB reg_ax,imm [-i: o16 2d iw] 8086,SM
-SUB reg_eax,sbytedword [mi: o32 83 /5 ib,s] 386,SM,ND
-SUB reg_eax,imm [-i: o32 2d id] 386,SM
-SUB reg_rax,sbytedword [mi: o64 83 /5 ib,s] X64,SM,ND
-SUB reg_rax,imm [-i: o64 2d id,s] X64,SM
-SUB rm8,imm [mi: hle 80 /5 ib] 8086,SM,LOCK
-SUB rm16,sbyteword [mi: hle o16 83 /5 ib,s] 8086,SM,LOCK,ND
-SUB rm16,imm [mi: hle o16 81 /5 iw] 8086,SM,LOCK
-SUB rm32,sbytedword [mi: hle o32 83 /5 ib,s] 386,SM,LOCK,ND
-SUB rm32,imm [mi: hle o32 81 /5 id] 386,SM,LOCK
-SUB rm64,sbytedword [mi: hle o64 83 /5 ib,s] X64,SM,LOCK,ND
-SUB rm64,imm [mi: hle o64 81 /5 id,s] X64,SM,LOCK
-SUB mem,imm8 [mi: hle 80 /5 ib] 8086,SM,LOCK
-SUB mem,sbyteword16 [mi: hle o16 83 /5 ib,s] 8086,SM,LOCK,ND
-SUB mem,imm16 [mi: hle o16 81 /5 iw] 8086,SM,LOCK
-SUB mem,sbytedword32 [mi: hle o32 83 /5 ib,s] 386,SM,LOCK,ND
-SUB mem,imm32 [mi: hle o32 81 /5 id] 386,SM,LOCK
-SUB rm8,imm [mi: hle 82 /5 ib] 8086,SM,LOCK,ND,NOLONG
-SVDC mem80,reg_sreg [mr: 0f 78 /r] 486,CYRIX,SMM
-SVLDT mem80 [m: 0f 7a /0] 486,CYRIX,SMM,ND
-SVTS mem80 [m: 0f 7c /0] 486,CYRIX,SMM
-SWAPGS void [ 0f 01 f8] X64
-SYSCALL void [ 0f 05] P6,AMD
-SYSENTER void [ 0f 34] P6
-SYSEXIT void [ 0f 35] P6,PRIV
-SYSRET void [ 0f 07] P6,PRIV,AMD
-TEST mem,reg8 [mr: 84 /r] 8086,SM
-TEST reg8,reg8 [mr: 84 /r] 8086
-TEST mem,reg16 [mr: o16 85 /r] 8086,SM
-TEST reg16,reg16 [mr: o16 85 /r] 8086
-TEST mem,reg32 [mr: o32 85 /r] 386,SM
-TEST reg32,reg32 [mr: o32 85 /r] 386
-TEST mem,reg64 [mr: o64 85 /r] X64,SM
-TEST reg64,reg64 [mr: o64 85 /r] X64
-TEST reg8,mem [rm: 84 /r] 8086,SM
-TEST reg16,mem [rm: o16 85 /r] 8086,SM
-TEST reg32,mem [rm: o32 85 /r] 386,SM
-TEST reg64,mem [rm: o64 85 /r] X64,SM
-TEST reg_al,imm [-i: a8 ib] 8086,SM
-TEST reg_ax,imm [-i: o16 a9 iw] 8086,SM
-TEST reg_eax,imm [-i: o32 a9 id] 386,SM
-TEST reg_rax,imm [-i: o64 a9 id,s] X64,SM
-TEST rm8,imm [mi: f6 /0 ib] 8086,SM
-TEST rm16,imm [mi: o16 f7 /0 iw] 8086,SM
-TEST rm32,imm [mi: o32 f7 /0 id] 386,SM
-TEST rm64,imm [mi: o64 f7 /0 id,s] X64,SM
-TEST mem,imm8 [mi: f6 /0 ib] 8086,SM
-TEST mem,imm16 [mi: o16 f7 /0 iw] 8086,SM
-TEST mem,imm32 [mi: o32 f7 /0 id] 386,SM
-UD0 void [ 0f ff] 186
-UD1 reg,rm16 [rm: o16 0f b9 /r] 186
-UD1 reg,rm32 [rm: o32 0f b9 /r] 186
-UD1 reg,rm64 [rm: o64 0f b9 /r] 186
-UD1 void [ 0f b9] 186,ND
-UD2B void [ 0f b9] 186,ND
-UD2B reg,rm16 [rm: o16 0f b9 /r] 186,ND
-UD2B reg,rm32 [rm: o32 0f b9 /r] 186,ND
-UD2B reg,rm64 [rm: o64 0f b9 /r] 186,ND
-UD2 void [ 0f 0b] 186
-UD2A void [ 0f 0b] 186,ND
-UMOV mem,reg8 [mr: np 0f 10 /r] 386,UNDOC,SM,ND
-UMOV reg8,reg8 [mr: np 0f 10 /r] 386,UNDOC,ND
-UMOV mem,reg16 [mr: np o16 0f 11 /r] 386,UNDOC,SM,ND
-UMOV reg16,reg16 [mr: np o16 0f 11 /r] 386,UNDOC,ND
-UMOV mem,reg32 [mr: np o32 0f 11 /r] 386,UNDOC,SM,ND
-UMOV reg32,reg32 [mr: np o32 0f 11 /r] 386,UNDOC,ND
-UMOV reg8,mem [rm: np 0f 12 /r] 386,UNDOC,SM,ND
-UMOV reg8,reg8 [rm: np 0f 12 /r] 386,UNDOC,ND
-UMOV reg16,mem [rm: np o16 0f 13 /r] 386,UNDOC,SM,ND
-UMOV reg16,reg16 [rm: np o16 0f 13 /r] 386,UNDOC,ND
-UMOV reg32,mem [rm: np o32 0f 13 /r] 386,UNDOC,SM,ND
-UMOV reg32,reg32 [rm: np o32 0f 13 /r] 386,UNDOC,ND
-VERR mem [m: 0f 00 /4] 286,PROT
-VERR mem16 [m: 0f 00 /4] 286,PROT
-VERR reg16 [m: 0f 00 /4] 286,PROT
-VERW mem [m: 0f 00 /5] 286,PROT
-VERW mem16 [m: 0f 00 /5] 286,PROT
-VERW reg16 [m: 0f 00 /5] 286,PROT
-FWAIT void [ wait] 8086
-WBINVD void [ 0f 09] 486,PRIV
-WRSHR rm32 [m: o32 0f 37 /0] P6,CYRIX,SMM
-WRMSR void [ 0f 30] PENT,PRIV
-XADD mem,reg8 [mr: hle 0f c0 /r] 486,SM,LOCK
-XADD reg8,reg8 [mr: 0f c0 /r] 486
-XADD mem,reg16 [mr: hle o16 0f c1 /r] 486,SM,LOCK
-XADD reg16,reg16 [mr: o16 0f c1 /r] 486
-XADD mem,reg32 [mr: hle o32 0f c1 /r] 486,SM,LOCK
-XADD reg32,reg32 [mr: o32 0f c1 /r] 486
-XADD mem,reg64 [mr: hle o64 0f c1 /r] X64,SM,LOCK
-XADD reg64,reg64 [mr: o64 0f c1 /r] X64
-XBTS reg16,mem [rm: o16 0f a6 /r] 386,SW,UNDOC,ND
-XBTS reg16,reg16 [rm: o16 0f a6 /r] 386,UNDOC,ND
-XBTS reg32,mem [rm: o32 0f a6 /r] 386,SD,UNDOC,ND
-XBTS reg32,reg32 [rm: o32 0f a6 /r] 386,UNDOC,ND
-XCHG reg_ax,reg16 [-r: o16 90+r] 8086
-XCHG reg_eax,reg32na [-r: o32 90+r] 386
-XCHG reg_rax,reg64 [-r: o64 90+r] X64
-XCHG reg16,reg_ax [r-: o16 90+r] 8086
-XCHG reg32na,reg_eax [r-: o32 90+r] 386
-XCHG reg64,reg_rax [r-: o64 90+r] X64
-; This must be NOLONG since opcode 90 is NOP, and in 64-bit mode
-; "xchg eax,eax" is *not* a NOP.
-XCHG reg_eax,reg_eax [--: o32 90] 386,NOLONG
-XCHG reg8,mem [rm: hlenl 86 /r] 8086,SM,LOCK
-XCHG reg8,reg8 [rm: 86 /r] 8086
-XCHG reg16,mem [rm: hlenl o16 87 /r] 8086,SM,LOCK
-XCHG reg16,reg16 [rm: o16 87 /r] 8086
-XCHG reg32,mem [rm: hlenl o32 87 /r] 386,SM,LOCK
-XCHG reg32,reg32 [rm: o32 87 /r] 386
-XCHG reg64,mem [rm: hlenl o64 87 /r] X64,SM,LOCK
-XCHG reg64,reg64 [rm: o64 87 /r] X64
-XCHG mem,reg8 [mr: hlenl 86 /r] 8086,SM,LOCK
-XCHG reg8,reg8 [mr: 86 /r] 8086
-XCHG mem,reg16 [mr: hlenl o16 87 /r] 8086,SM,LOCK
-XCHG reg16,reg16 [mr: o16 87 /r] 8086
-XCHG mem,reg32 [mr: hlenl o32 87 /r] 386,SM,LOCK
-XCHG reg32,reg32 [mr: o32 87 /r] 386
-XCHG mem,reg64 [mr: hlenl o64 87 /r] X64,SM,LOCK
-XCHG reg64,reg64 [mr: o64 87 /r] X64
-XLATB void [ d7] 8086
-XLAT void [ d7] 8086
-XOR mem,reg8 [mr: hle 30 /r] 8086,SM,LOCK
-XOR reg8,reg8 [mr: 30 /r] 8086
-XOR mem,reg16 [mr: hle o16 31 /r] 8086,SM,LOCK
-XOR reg16,reg16 [mr: o16 31 /r] 8086
-XOR mem,reg32 [mr: hle o32 31 /r] 386,SM,LOCK
-XOR reg32,reg32 [mr: o32 31 /r] 386
-XOR mem,reg64 [mr: hle o64 31 /r] X64,SM,LOCK
-XOR reg64,reg64 [mr: o64 31 /r] X64
-XOR reg8,mem [rm: 32 /r] 8086,SM
-XOR reg8,reg8 [rm: 32 /r] 8086
-XOR reg16,mem [rm: o16 33 /r] 8086,SM
-XOR reg16,reg16 [rm: o16 33 /r] 8086
-XOR reg32,mem [rm: o32 33 /r] 386,SM
-XOR reg32,reg32 [rm: o32 33 /r] 386
-XOR reg64,mem [rm: o64 33 /r] X64,SM
-XOR reg64,reg64 [rm: o64 33 /r] X64
-XOR rm16,imm8 [mi: hle o16 83 /6 ib,s] 8086,LOCK
-XOR rm32,imm8 [mi: hle o32 83 /6 ib,s] 386,LOCK
-XOR rm64,imm8 [mi: hle o64 83 /6 ib,s] X64,LOCK
-XOR reg_al,imm [-i: 34 ib] 8086,SM
-XOR reg_ax,sbyteword [mi: o16 83 /6 ib,s] 8086,SM,ND
-XOR reg_ax,imm [-i: o16 35 iw] 8086,SM
-XOR reg_eax,sbytedword [mi: o32 83 /6 ib,s] 386,SM,ND
-XOR reg_eax,imm [-i: o32 35 id] 386,SM
-XOR reg_rax,sbytedword [mi: o64 83 /6 ib,s] X64,SM,ND
-XOR reg_rax,imm [-i: o64 35 id,s] X64,SM
-XOR rm8,imm [mi: hle 80 /6 ib] 8086,SM,LOCK
-XOR rm16,sbyteword [mi: hle o16 83 /6 ib,s] 8086,SM,LOCK,ND
-XOR rm16,imm [mi: hle o16 81 /6 iw] 8086,SM,LOCK
-XOR rm32,sbytedword [mi: hle o32 83 /6 ib,s] 386,SM,LOCK,ND
-XOR rm32,imm [mi: hle o32 81 /6 id] 386,SM,LOCK
-XOR rm64,sbytedword [mi: hle o64 83 /6 ib,s] X64,SM,LOCK,ND
-XOR rm64,imm [mi: hle o64 81 /6 id,s] X64,SM,LOCK
-XOR mem,imm8 [mi: hle 80 /6 ib] 8086,SM,LOCK
-XOR mem,sbyteword16 [mi: hle o16 83 /6 ib,s] 8086,SM,LOCK,ND
-XOR mem,imm16 [mi: hle o16 81 /6 iw] 8086,SM,LOCK
-XOR mem,sbytedword32 [mi: hle o32 83 /6 ib,s] 386,SM,LOCK,ND
-XOR mem,imm32 [mi: hle o32 81 /6 id] 386,SM,LOCK
-XOR rm8,imm [mi: hle 82 /6 ib] 8086,SM,LOCK,ND,NOLONG
-CMOVcc reg16,mem [rm: o16 0f 40+c /r] P6,SM
-CMOVcc reg16,reg16 [rm: o16 0f 40+c /r] P6
-CMOVcc reg32,mem [rm: o32 0f 40+c /r] P6,SM
-CMOVcc reg32,reg32 [rm: o32 0f 40+c /r] P6
-CMOVcc reg64,mem [rm: o64 0f 40+c /r] X64,SM
-CMOVcc reg64,reg64 [rm: o64 0f 40+c /r] X64
-Jcc imm|near [i: odf 0f 80+c rel] 386,BND
-Jcc imm16|near [i: o16 0f 80+c rel] 386,NOLONG,BND
-Jcc imm32|near [i: o32 0f 80+c rel] 386,NOLONG,BND
-Jcc imm64|near [i: o64nw 0f 80+c rel] X64,BND
-Jcc imm|short [i: 70+c rel8] 8086,ND,BND
-Jcc imm [i: jcc8 70+c rel8] 8086,ND,BND
-Jcc imm [i: 0f 80+c rel] 386,ND,BND
-Jcc imm [i: 71+c jlen e9 rel] 8086,ND,BND
-Jcc imm [i: 70+c rel8] 8086,BND
-
-SETcc mem [m: 0f 90+c /0] 386,SB
-SETcc reg8 [m: 0f 90+c /0] 386
-
-;# Katmai Streaming SIMD instructions (SSE -- a.k.a. KNI, XMM, MMX2)
-ADDPS xmmreg,xmmrm128 [rm: np 0f 58 /r] KATMAI,SSE
-ADDSS xmmreg,xmmrm32 [rm: f3 0f 58 /r] KATMAI,SSE
-ANDNPS xmmreg,xmmrm128 [rm: np 0f 55 /r] KATMAI,SSE
-ANDPS xmmreg,xmmrm128 [rm: np 0f 54 /r] KATMAI,SSE
-CMPEQPS xmmreg,xmmrm128 [rm: np 0f c2 /r 00] KATMAI,SSE
-CMPEQSS xmmreg,xmmrm32 [rm: f3 0f c2 /r 00] KATMAI,SSE
-CMPLEPS xmmreg,xmmrm128 [rm: np 0f c2 /r 02] KATMAI,SSE
-CMPLESS xmmreg,xmmrm32 [rm: f3 0f c2 /r 02] KATMAI,SSE
-CMPLTPS xmmreg,xmmrm128 [rm: np 0f c2 /r 01] KATMAI,SSE
-CMPLTSS xmmreg,xmmrm32 [rm: f3 0f c2 /r 01] KATMAI,SSE
-CMPNEQPS xmmreg,xmmrm128 [rm: np 0f c2 /r 04] KATMAI,SSE
-CMPNEQSS xmmreg,xmmrm32 [rm: f3 0f c2 /r 04] KATMAI,SSE
-CMPNLEPS xmmreg,xmmrm128 [rm: np 0f c2 /r 06] KATMAI,SSE
-CMPNLESS xmmreg,xmmrm32 [rm: f3 0f c2 /r 06] KATMAI,SSE
-CMPNLTPS xmmreg,xmmrm128 [rm: np 0f c2 /r 05] KATMAI,SSE
-CMPNLTSS xmmreg,xmmrm32 [rm: f3 0f c2 /r 05] KATMAI,SSE
-CMPORDPS xmmreg,xmmrm128 [rm: np 0f c2 /r 07] KATMAI,SSE
-CMPORDSS xmmreg,xmmrm32 [rm: f3 0f c2 /r 07] KATMAI,SSE
-CMPUNORDPS xmmreg,xmmrm128 [rm: np 0f c2 /r 03] KATMAI,SSE
-CMPUNORDSS xmmreg,xmmrm32 [rm: f3 0f c2 /r 03] KATMAI,SSE
-; CMPPS/CMPSS must come after the specific ops; that way the disassembler will find the
-; specific ops first and only disassemble illegal ones as cmpps/cmpss.
-CMPPS xmmreg,mem,imm [rmi: np 0f c2 /r ib,u] KATMAI,SSE,SB,AR2
-CMPPS xmmreg,xmmreg,imm [rmi: np 0f c2 /r ib,u] KATMAI,SSE,SB,AR2
-CMPSS xmmreg,mem,imm [rmi: f3 0f c2 /r ib,u] KATMAI,SSE,SB,AR2
-CMPSS xmmreg,xmmreg,imm [rmi: f3 0f c2 /r ib,u] KATMAI,SSE,SB,AR2
-COMISS xmmreg,xmmrm32 [rm: np 0f 2f /r] KATMAI,SSE
-CVTPI2PS xmmreg,mmxrm64 [rm: np 0f 2a /r] KATMAI,SSE,MMX
-CVTPS2PI mmxreg,xmmrm64 [rm: np 0f 2d /r] KATMAI,SSE,MMX
-CVTSI2SS xmmreg,mem [rm: f3 0f 2a /r] KATMAI,SSE,SD,AR1,ND
-CVTSI2SS xmmreg,rm32 [rm: f3 0f 2a /r] KATMAI,SSE,SD,AR1
-CVTSI2SS xmmreg,rm64 [rm: o64 f3 0f 2a /r] X64,SSE,SQ,AR1
-CVTSS2SI reg32,xmmreg [rm: f3 0f 2d /r] KATMAI,SSE,SD,AR1
-CVTSS2SI reg32,mem [rm: f3 0f 2d /r] KATMAI,SSE,SD,AR1
-CVTSS2SI reg64,xmmreg [rm: o64 f3 0f 2d /r] X64,SSE,SD,AR1
-CVTSS2SI reg64,mem [rm: o64 f3 0f 2d /r] X64,SSE,SD,AR1
-CVTTPS2PI mmxreg,xmmrm [rm: np 0f 2c /r] KATMAI,SSE,MMX,SQ
-CVTTSS2SI reg32,xmmrm [rm: f3 0f 2c /r] KATMAI,SSE,SD,AR1
-CVTTSS2SI reg64,xmmrm [rm: o64 f3 0f 2c /r] X64,SSE,SD,AR1
-DIVPS xmmreg,xmmrm128 [rm: np 0f 5e /r] KATMAI,SSE
-DIVSS xmmreg,xmmrm32 [rm: f3 0f 5e /r] KATMAI,SSE
-LDMXCSR mem32 [m: np 0f ae /2] KATMAI,SSE
-MAXPS xmmreg,xmmrm128 [rm: np 0f 5f /r] KATMAI,SSE
-MAXSS xmmreg,xmmrm32 [rm: f3 0f 5f /r] KATMAI,SSE
-MINPS xmmreg,xmmrm128 [rm: np 0f 5d /r] KATMAI,SSE
-MINSS xmmreg,xmmrm32 [rm: f3 0f 5d /r] KATMAI,SSE
-MOVAPS xmmreg,xmmrm128 [rm: np 0f 28 /r] KATMAI,SSE
-MOVAPS xmmrm128,xmmreg [mr: np 0f 29 /r] KATMAI,SSE
-MOVHPS xmmreg,mem64 [rm: np 0f 16 /r] KATMAI,SSE
-MOVHPS mem64,xmmreg [mr: np 0f 17 /r] KATMAI,SSE
-MOVLHPS xmmreg,xmmreg [rm: np 0f 16 /r] KATMAI,SSE
-MOVLPS xmmreg,mem64 [rm: np 0f 12 /r] KATMAI,SSE
-MOVLPS mem64,xmmreg [mr: np 0f 13 /r] KATMAI,SSE
-MOVHLPS xmmreg,xmmreg [rm: np 0f 12 /r] KATMAI,SSE
-MOVMSKPS reg32,xmmreg [rm: np 0f 50 /r] KATMAI,SSE
-MOVMSKPS reg64,xmmreg [rm: np o64 0f 50 /r] X64,SSE
-MOVNTPS mem128,xmmreg [mr: np 0f 2b /r] KATMAI,SSE
-MOVSS xmmreg,xmmrm32 [rm: f3 0f 10 /r] KATMAI,SSE
-MOVSS mem32,xmmreg [mr: f3 0f 11 /r] KATMAI,SSE
-MOVSS xmmreg,xmmreg [rm: f3 0f 10 /r] KATMAI,SSE
-MOVUPS xmmreg,xmmrm128 [rm: np 0f 10 /r] KATMAI,SSE
-MOVUPS xmmrm128,xmmreg [mr: np 0f 11 /r] KATMAI,SSE
-MULPS xmmreg,xmmrm128 [rm: np 0f 59 /r] KATMAI,SSE
-MULSS xmmreg,xmmrm32 [rm: f3 0f 59 /r] KATMAI,SSE
-ORPS xmmreg,xmmrm128 [rm: np 0f 56 /r] KATMAI,SSE
-RCPPS xmmreg,xmmrm128 [rm: np 0f 53 /r] KATMAI,SSE
-RCPSS xmmreg,xmmrm32 [rm: f3 0f 53 /r] KATMAI,SSE
-RSQRTPS xmmreg,xmmrm128 [rm: np 0f 52 /r] KATMAI,SSE
-RSQRTSS xmmreg,xmmrm32 [rm: f3 0f 52 /r] KATMAI,SSE
-SHUFPS xmmreg,xmmrm128,imm8 [rmi: np 0f c6 /r ib,u] KATMAI,SSE
-SQRTPS xmmreg,xmmrm128 [rm: np 0f 51 /r] KATMAI,SSE
-SQRTSS xmmreg,xmmrm32 [rm: f3 0f 51 /r] KATMAI,SSE
-STMXCSR mem32 [m: np 0f ae /3] KATMAI,SSE
-SUBPS xmmreg,xmmrm128 [rm: np 0f 5c /r] KATMAI,SSE
-SUBSS xmmreg,xmmrm32 [rm: f3 0f 5c /r] KATMAI,SSE
-UCOMISS xmmreg,xmmrm32 [rm: np 0f 2e /r] KATMAI,SSE
-UNPCKHPS xmmreg,xmmrm128 [rm: np 0f 15 /r] KATMAI,SSE
-UNPCKLPS xmmreg,xmmrm128 [rm: np 0f 14 /r] KATMAI,SSE
-XORPS xmmreg,xmmrm128 [rm: np 0f 57 /r] KATMAI,SSE
-
-;# Introduced in Deschutes but necessary for SSE support
-FXRSTOR mem [m: np 0f ae /1] P6,SSE,FPU
-FXRSTOR64 mem [m: o64 np 0f ae /1] X64,SSE,FPU
-FXSAVE mem [m: np 0f ae /0] P6,SSE,FPU
-FXSAVE64 mem [m: o64 np 0f ae /0] X64,SSE,FPU
-
-;# XSAVE group (AVX and extended state)
-; Introduced in late Penryn ... we really need to clean up the handling
-; of CPU feature bits.
-XGETBV void [ 0f 01 d0] NEHALEM
-XSETBV void [ 0f 01 d1] NEHALEM,PRIV
-XSAVE mem [m: np 0f ae /4] NEHALEM
-XSAVE64 mem [m: o64 np 0f ae /4] LONG,NEHALEM
-XSAVEC mem [m: np 0f c7 /4] FUTURE
-XSAVEC64 mem [m: o64 np 0f c7 /4] LONG,FUTURE
-XSAVEOPT mem [m: np 0f ae /6] FUTURE
-XSAVEOPT64 mem [m: o64 np 0f ae /6] LONG,FUTURE
-XSAVES mem [m: np 0f c7 /5] FUTURE
-XSAVES64 mem [m: o64 np 0f c7 /5] LONG,FUTURE
-XRSTOR mem [m: np 0f ae /5] NEHALEM
-XRSTOR64 mem [m: o64 np 0f ae /5] LONG,NEHALEM
-XRSTORS mem [m: np 0f c7 /3] FUTURE
-XRSTORS64 mem [m: o64 np 0f c7 /3] LONG,FUTURE
-
-; These instructions are not SSE-specific; they are
-;# Generic memory operations
-; and work even if CR4.OSFXFR == 0
-PREFETCHNTA mem8 [m: 0f 18 /0] KATMAI
-PREFETCHT0 mem8 [m: 0f 18 /1] KATMAI
-PREFETCHT1 mem8 [m: 0f 18 /2] KATMAI
-PREFETCHT2 mem8 [m: 0f 18 /3] KATMAI
-SFENCE void [ np 0f ae f8] KATMAI
-
-;# New MMX instructions introduced in Katmai
-MASKMOVQ mmxreg,mmxreg [rm: np 0f f7 /r] KATMAI,MMX
-MOVNTQ mem,mmxreg [mr: np 0f e7 /r] KATMAI,MMX,SQ
-PAVGB mmxreg,mmxrm [rm: np o64nw 0f e0 /r] KATMAI,MMX,SQ
-PAVGW mmxreg,mmxrm [rm: np o64nw 0f e3 /r] KATMAI,MMX,SQ
-PEXTRW reg32,mmxreg,imm [rmi: np 0f c5 /r ib,u] KATMAI,MMX,SB,AR2
-; PINSRW is documented as using a reg32, but it's really using only 16 bit
-; -- accept either, but be truthful in disassembly
-PINSRW mmxreg,mem,imm [rmi: np 0f c4 /r ib,u] KATMAI,MMX,SB,AR2
-PINSRW mmxreg,rm16,imm [rmi: np 0f c4 /r ib,u] KATMAI,MMX,SB,AR2
-PINSRW mmxreg,reg32,imm [rmi: np 0f c4 /r ib,u] KATMAI,MMX,SB,AR2
-PMAXSW mmxreg,mmxrm [rm: np o64nw 0f ee /r] KATMAI,MMX,SQ
-PMAXUB mmxreg,mmxrm [rm: np o64nw 0f de /r] KATMAI,MMX,SQ
-PMINSW mmxreg,mmxrm [rm: np o64nw 0f ea /r] KATMAI,MMX,SQ
-PMINUB mmxreg,mmxrm [rm: np o64nw 0f da /r] KATMAI,MMX,SQ
-PMOVMSKB reg32,mmxreg [rm: np 0f d7 /r] KATMAI,MMX
-PMULHUW mmxreg,mmxrm [rm: np o64nw 0f e4 /r] KATMAI,MMX,SQ
-PSADBW mmxreg,mmxrm [rm: np o64nw 0f f6 /r] KATMAI,MMX,SQ
-PSHUFW mmxreg,mmxrm,imm [rmi: np o64nw 0f 70 /r ib] KATMAI,MMX,SM2,SB,AR2
-
-;# AMD Enhanced 3DNow! (Athlon) instructions
-PF2IW mmxreg,mmxrm [rm: o64nw 0f 0f /r 1c] PENT,3DNOW,SQ
-PFNACC mmxreg,mmxrm [rm: o64nw 0f 0f /r 8a] PENT,3DNOW,SQ
-PFPNACC mmxreg,mmxrm [rm: o64nw 0f 0f /r 8e] PENT,3DNOW,SQ
-PI2FW mmxreg,mmxrm [rm: o64nw 0f 0f /r 0c] PENT,3DNOW,SQ
-PSWAPD mmxreg,mmxrm [rm: o64nw 0f 0f /r bb] PENT,3DNOW,SQ
-
-;# Willamette SSE2 Cacheability Instructions
-MASKMOVDQU xmmreg,xmmreg [rm: 66 0f f7 /r] WILLAMETTE,SSE2
-; CLFLUSH needs its own feature flag implemented one day
-CLFLUSH mem [m: np 0f ae /7] WILLAMETTE,SSE2
-MOVNTDQ mem,xmmreg [mr: 66 0f e7 /r] WILLAMETTE,SSE2,SO
-MOVNTI mem,reg32 [mr: np 0f c3 /r] WILLAMETTE,SD
-MOVNTI mem,reg64 [mr: o64 np 0f c3 /r] X64,SQ
-MOVNTPD mem,xmmreg [mr: 66 0f 2b /r] WILLAMETTE,SSE2,SO
-LFENCE void [ np 0f ae e8] WILLAMETTE,SSE2
-MFENCE void [ np 0f ae f0] WILLAMETTE,SSE2
-
-;# Willamette MMX instructions (SSE2 SIMD Integer Instructions)
-MOVD mem,xmmreg [mr: 66 norexw 0f 7e /r] WILLAMETTE,SSE2,SD
-MOVD xmmreg,mem [rm: 66 norexw 0f 6e /r] WILLAMETTE,SSE2,SD
-MOVD xmmreg,rm32 [rm: 66 norexw 0f 6e /r] WILLAMETTE,SSE2
-MOVD rm32,xmmreg [mr: 66 norexw 0f 7e /r] WILLAMETTE,SSE2
-MOVDQA xmmreg,xmmreg [rm: 66 0f 6f /r] WILLAMETTE,SSE2
-MOVDQA mem,xmmreg [mr: 66 0f 7f /r] WILLAMETTE,SSE2,SO
-MOVDQA xmmreg,mem [rm: 66 0f 6f /r] WILLAMETTE,SSE2,SO
-MOVDQA xmmreg,xmmreg [mr: 66 0f 7f /r] WILLAMETTE,SSE2
-MOVDQU xmmreg,xmmreg [rm: f3 0f 6f /r] WILLAMETTE,SSE2
-MOVDQU mem,xmmreg [mr: f3 0f 7f /r] WILLAMETTE,SSE2,SO
-MOVDQU xmmreg,mem [rm: f3 0f 6f /r] WILLAMETTE,SSE2,SO
-MOVDQU xmmreg,xmmreg [mr: f3 0f 7f /r] WILLAMETTE,SSE2
-MOVDQ2Q mmxreg,xmmreg [rm: f2 0f d6 /r] WILLAMETTE,SSE2
-MOVQ xmmreg,xmmreg [rm: f3 0f 7e /r] WILLAMETTE,SSE2
-MOVQ xmmreg,xmmreg [mr: 66 0f d6 /r] WILLAMETTE,SSE2
-MOVQ mem,xmmreg [mr: 66 0f d6 /r] WILLAMETTE,SSE2,SQ
-MOVQ xmmreg,mem [rm: f3 0f 7e /r] WILLAMETTE,SSE2,SQ
-MOVQ xmmreg,rm64 [rm: 66 o64 0f 6e /r] X64,SSE2
-MOVQ rm64,xmmreg [mr: 66 o64 0f 7e /r] X64,SSE2
-MOVQ2DQ xmmreg,mmxreg [rm: f3 0f d6 /r] WILLAMETTE,SSE2
-PACKSSWB xmmreg,xmmrm [rm: 66 0f 63 /r] WILLAMETTE,SSE2,SO
-PACKSSDW xmmreg,xmmrm [rm: 66 0f 6b /r] WILLAMETTE,SSE2,SO
-PACKUSWB xmmreg,xmmrm [rm: 66 0f 67 /r] WILLAMETTE,SSE2,SO
-PADDB xmmreg,xmmrm [rm: 66 0f fc /r] WILLAMETTE,SSE2,SO
-PADDW xmmreg,xmmrm [rm: 66 0f fd /r] WILLAMETTE,SSE2,SO
-PADDD xmmreg,xmmrm [rm: 66 0f fe /r] WILLAMETTE,SSE2,SO
-PADDQ mmxreg,mmxrm [rm: np 0f d4 /r] WILLAMETTE,MMX,SQ
-PADDQ xmmreg,xmmrm [rm: 66 0f d4 /r] WILLAMETTE,SSE2,SO
-PADDSB xmmreg,xmmrm [rm: 66 0f ec /r] WILLAMETTE,SSE2,SO
-PADDSW xmmreg,xmmrm [rm: 66 0f ed /r] WILLAMETTE,SSE2,SO
-PADDUSB xmmreg,xmmrm [rm: 66 0f dc /r] WILLAMETTE,SSE2,SO
-PADDUSW xmmreg,xmmrm [rm: 66 0f dd /r] WILLAMETTE,SSE2,SO
-PAND xmmreg,xmmrm [rm: 66 0f db /r] WILLAMETTE,SSE2,SO
-PANDN xmmreg,xmmrm [rm: 66 0f df /r] WILLAMETTE,SSE2,SO
-PAVGB xmmreg,xmmrm [rm: 66 0f e0 /r] WILLAMETTE,SSE2,SO
-PAVGW xmmreg,xmmrm [rm: 66 0f e3 /r] WILLAMETTE,SSE2,SO
-PCMPEQB xmmreg,xmmrm [rm: 66 0f 74 /r] WILLAMETTE,SSE2,SO
-PCMPEQW xmmreg,xmmrm [rm: 66 0f 75 /r] WILLAMETTE,SSE2,SO
-PCMPEQD xmmreg,xmmrm [rm: 66 0f 76 /r] WILLAMETTE,SSE2,SO
-PCMPGTB xmmreg,xmmrm [rm: 66 0f 64 /r] WILLAMETTE,SSE2,SO
-PCMPGTW xmmreg,xmmrm [rm: 66 0f 65 /r] WILLAMETTE,SSE2,SO
-PCMPGTD xmmreg,xmmrm [rm: 66 0f 66 /r] WILLAMETTE,SSE2,SO
-PEXTRW reg32,xmmreg,imm [rmi: 66 0f c5 /r ib,u] WILLAMETTE,SSE2,SB,AR2
-PINSRW xmmreg,reg16,imm [rmi: 66 0f c4 /r ib,u] WILLAMETTE,SSE2,SB,AR2
-PINSRW xmmreg,reg32,imm [rmi: 66 0f c4 /r ib,u] WILLAMETTE,SSE2,SB,AR2,ND
-PINSRW xmmreg,mem,imm [rmi: 66 0f c4 /r ib,u] WILLAMETTE,SSE2,SB,AR2
-PINSRW xmmreg,mem16,imm [rmi: 66 0f c4 /r ib,u] WILLAMETTE,SSE2,SB,AR2
-PMADDWD xmmreg,xmmrm [rm: 66 0f f5 /r] WILLAMETTE,SSE2,SO
-PMAXSW xmmreg,xmmrm [rm: 66 0f ee /r] WILLAMETTE,SSE2,SO
-PMAXUB xmmreg,xmmrm [rm: 66 0f de /r] WILLAMETTE,SSE2,SO
-PMINSW xmmreg,xmmrm [rm: 66 0f ea /r] WILLAMETTE,SSE2,SO
-PMINUB xmmreg,xmmrm [rm: 66 0f da /r] WILLAMETTE,SSE2,SO
-PMOVMSKB reg32,xmmreg [rm: 66 0f d7 /r] WILLAMETTE,SSE2
-PMULHUW xmmreg,xmmrm [rm: 66 0f e4 /r] WILLAMETTE,SSE2,SO
-PMULHW xmmreg,xmmrm [rm: 66 0f e5 /r] WILLAMETTE,SSE2,SO
-PMULLW xmmreg,xmmrm [rm: 66 0f d5 /r] WILLAMETTE,SSE2,SO
-PMULUDQ mmxreg,mmxrm [rm: np o64nw 0f f4 /r] WILLAMETTE,SSE2,SO
-PMULUDQ xmmreg,xmmrm [rm: 66 0f f4 /r] WILLAMETTE,SSE2,SO
-POR xmmreg,xmmrm [rm: 66 0f eb /r] WILLAMETTE,SSE2,SO
-PSADBW xmmreg,xmmrm [rm: 66 0f f6 /r] WILLAMETTE,SSE2,SO
-PSHUFD xmmreg,xmmreg,imm [rmi: 66 0f 70 /r ib] WILLAMETTE,SSE2,SB,AR2
-PSHUFD xmmreg,mem,imm [rmi: 66 0f 70 /r ib] WILLAMETTE,SSE2,SM2,SB,AR2
-PSHUFHW xmmreg,xmmreg,imm [rmi: f3 0f 70 /r ib] WILLAMETTE,SSE2,SB,AR2
-PSHUFHW xmmreg,mem,imm [rmi: f3 0f 70 /r ib] WILLAMETTE,SSE2,SM2,SB,AR2
-PSHUFLW xmmreg,xmmreg,imm [rmi: f2 0f 70 /r ib] WILLAMETTE,SSE2,SB,AR2
-PSHUFLW xmmreg,mem,imm [rmi: f2 0f 70 /r ib] WILLAMETTE,SSE2,SM2,SB,AR2
-PSLLDQ xmmreg,imm [mi: 66 0f 73 /7 ib,u] WILLAMETTE,SSE2,SB,AR1
-PSLLW xmmreg,xmmrm [rm: 66 0f f1 /r] WILLAMETTE,SSE2,SO
-PSLLW xmmreg,imm [mi: 66 0f 71 /6 ib,u] WILLAMETTE,SSE2,SB,AR1
-PSLLD xmmreg,xmmrm [rm: 66 0f f2 /r] WILLAMETTE,SSE2,SO
-PSLLD xmmreg,imm [mi: 66 0f 72 /6 ib,u] WILLAMETTE,SSE2,SB,AR1
-PSLLQ xmmreg,xmmrm [rm: 66 0f f3 /r] WILLAMETTE,SSE2,SO
-PSLLQ xmmreg,imm [mi: 66 0f 73 /6 ib,u] WILLAMETTE,SSE2,SB,AR1
-PSRAW xmmreg,xmmrm [rm: 66 0f e1 /r] WILLAMETTE,SSE2,SO
-PSRAW xmmreg,imm [mi: 66 0f 71 /4 ib,u] WILLAMETTE,SSE2,SB,AR1
-PSRAD xmmreg,xmmrm [rm: 66 0f e2 /r] WILLAMETTE,SSE2,SO
-PSRAD xmmreg,imm [mi: 66 0f 72 /4 ib,u] WILLAMETTE,SSE2,SB,AR1
-PSRLDQ xmmreg,imm [mi: 66 0f 73 /3 ib,u] WILLAMETTE,SSE2,SB,AR1
-PSRLW xmmreg,xmmrm [rm: 66 0f d1 /r] WILLAMETTE,SSE2,SO
-PSRLW xmmreg,imm [mi: 66 0f 71 /2 ib,u] WILLAMETTE,SSE2,SB,AR1
-PSRLD xmmreg,xmmrm [rm: 66 0f d2 /r] WILLAMETTE,SSE2,SO
-PSRLD xmmreg,imm [mi: 66 0f 72 /2 ib,u] WILLAMETTE,SSE2,SB,AR1
-PSRLQ xmmreg,xmmrm [rm: 66 0f d3 /r] WILLAMETTE,SSE2,SO
-PSRLQ xmmreg,imm [mi: 66 0f 73 /2 ib,u] WILLAMETTE,SSE2,SB,AR1
-PSUBB xmmreg,xmmrm [rm: 66 0f f8 /r] WILLAMETTE,SSE2,SO
-PSUBW xmmreg,xmmrm [rm: 66 0f f9 /r] WILLAMETTE,SSE2,SO
-PSUBD xmmreg,xmmrm [rm: 66 0f fa /r] WILLAMETTE,SSE2,SO
-PSUBQ mmxreg,mmxrm [rm: np o64nw 0f fb /r] WILLAMETTE,SSE2,SO
-PSUBQ xmmreg,xmmrm [rm: 66 0f fb /r] WILLAMETTE,SSE2,SO
-PSUBSB xmmreg,xmmrm [rm: 66 0f e8 /r] WILLAMETTE,SSE2,SO
-PSUBSW xmmreg,xmmrm [rm: 66 0f e9 /r] WILLAMETTE,SSE2,SO
-PSUBUSB xmmreg,xmmrm [rm: 66 0f d8 /r] WILLAMETTE,SSE2,SO
-PSUBUSW xmmreg,xmmrm [rm: 66 0f d9 /r] WILLAMETTE,SSE2,SO
-PUNPCKHBW xmmreg,xmmrm [rm: 66 0f 68 /r] WILLAMETTE,SSE2,SO
-PUNPCKHWD xmmreg,xmmrm [rm: 66 0f 69 /r] WILLAMETTE,SSE2,SO
-PUNPCKHDQ xmmreg,xmmrm [rm: 66 0f 6a /r] WILLAMETTE,SSE2,SO
-PUNPCKHQDQ xmmreg,xmmrm [rm: 66 0f 6d /r] WILLAMETTE,SSE2,SO
-PUNPCKLBW xmmreg,xmmrm [rm: 66 0f 60 /r] WILLAMETTE,SSE2,SO
-PUNPCKLWD xmmreg,xmmrm [rm: 66 0f 61 /r] WILLAMETTE,SSE2,SO
-PUNPCKLDQ xmmreg,xmmrm [rm: 66 0f 62 /r] WILLAMETTE,SSE2,SO
-PUNPCKLQDQ xmmreg,xmmrm [rm: 66 0f 6c /r] WILLAMETTE,SSE2,SO
-PXOR xmmreg,xmmrm [rm: 66 0f ef /r] WILLAMETTE,SSE2,SO
-
-;# Willamette Streaming SIMD instructions (SSE2)
-ADDPD xmmreg,xmmrm [rm: 66 0f 58 /r] WILLAMETTE,SSE2,SO
-ADDSD xmmreg,xmmrm [rm: f2 0f 58 /r] WILLAMETTE,SSE2,SQ
-ANDNPD xmmreg,xmmrm [rm: 66 0f 55 /r] WILLAMETTE,SSE2,SO
-ANDPD xmmreg,xmmrm [rm: 66 0f 54 /r] WILLAMETTE,SSE2,SO
-CMPEQPD xmmreg,xmmrm [rm: 66 0f c2 /r 00] WILLAMETTE,SSE2,SO
-CMPEQSD xmmreg,xmmrm [rm: f2 0f c2 /r 00] WILLAMETTE,SSE2
-CMPLEPD xmmreg,xmmrm [rm: 66 0f c2 /r 02] WILLAMETTE,SSE2,SO
-CMPLESD xmmreg,xmmrm [rm: f2 0f c2 /r 02] WILLAMETTE,SSE2
-CMPLTPD xmmreg,xmmrm [rm: 66 0f c2 /r 01] WILLAMETTE,SSE2,SO
-CMPLTSD xmmreg,xmmrm [rm: f2 0f c2 /r 01] WILLAMETTE,SSE2
-CMPNEQPD xmmreg,xmmrm [rm: 66 0f c2 /r 04] WILLAMETTE,SSE2,SO
-CMPNEQSD xmmreg,xmmrm [rm: f2 0f c2 /r 04] WILLAMETTE,SSE2
-CMPNLEPD xmmreg,xmmrm [rm: 66 0f c2 /r 06] WILLAMETTE,SSE2,SO
-CMPNLESD xmmreg,xmmrm [rm: f2 0f c2 /r 06] WILLAMETTE,SSE2
-CMPNLTPD xmmreg,xmmrm [rm: 66 0f c2 /r 05] WILLAMETTE,SSE2,SO
-CMPNLTSD xmmreg,xmmrm [rm: f2 0f c2 /r 05] WILLAMETTE,SSE2
-CMPORDPD xmmreg,xmmrm [rm: 66 0f c2 /r 07] WILLAMETTE,SSE2,SO
-CMPORDSD xmmreg,xmmrm [rm: f2 0f c2 /r 07] WILLAMETTE,SSE2
-CMPUNORDPD xmmreg,xmmrm [rm: 66 0f c2 /r 03] WILLAMETTE,SSE2,SO
-CMPUNORDSD xmmreg,xmmrm [rm: f2 0f c2 /r 03] WILLAMETTE,SSE2
-; CMPPD/CMPSD must come after the specific ops; that way the disassembler will find the
-; specific ops first and only disassemble illegal ones as cmppd/cmpsd.
-CMPPD xmmreg,xmmrm128,imm8 [rmi: 66 0f c2 /r ib,u] WILLAMETTE,SSE2
-CMPSD xmmreg,xmmrm128,imm8 [rmi: f2 0f c2 /r ib,u] WILLAMETTE,SSE2
-COMISD xmmreg,xmmrm [rm: 66 0f 2f /r] WILLAMETTE,SSE2
-CVTDQ2PD xmmreg,xmmrm [rm: f3 0f e6 /r] WILLAMETTE,SSE2,SQ
-CVTDQ2PS xmmreg,xmmrm [rm: np 0f 5b /r] WILLAMETTE,SSE2,SO
-CVTPD2DQ xmmreg,xmmrm [rm: f2 0f e6 /r] WILLAMETTE,SSE2,SO
-CVTPD2PI mmxreg,xmmrm [rm: 66 0f 2d /r] WILLAMETTE,SSE2,SO
-CVTPD2PS xmmreg,xmmrm [rm: 66 0f 5a /r] WILLAMETTE,SSE2,SO
-CVTPI2PD xmmreg,mmxrm [rm: 66 0f 2a /r] WILLAMETTE,SSE2,SQ
-CVTPS2DQ xmmreg,xmmrm [rm: 66 0f 5b /r] WILLAMETTE,SSE2,SO
-CVTPS2PD xmmreg,xmmrm [rm: np 0f 5a /r] WILLAMETTE,SSE2,SQ
-CVTSD2SI reg32,xmmreg [rm: norexw f2 0f 2d /r] WILLAMETTE,SSE2,SQ,AR1
-CVTSD2SI reg32,mem [rm: norexw f2 0f 2d /r] WILLAMETTE,SSE2,SQ,AR1
-CVTSD2SI reg64,xmmreg [rm: o64 f2 0f 2d /r] X64,SSE2,SQ,AR1
-CVTSD2SI reg64,mem [rm: o64 f2 0f 2d /r] X64,SSE2,SQ,AR1
-CVTSD2SS xmmreg,xmmrm [rm: f2 0f 5a /r] WILLAMETTE,SSE2,SQ
-CVTSI2SD xmmreg,mem [rm: f2 0f 2a /r] WILLAMETTE,SSE2,SD,AR1,ND
-CVTSI2SD xmmreg,rm32 [rm: norexw f2 0f 2a /r] WILLAMETTE,SSE2,SD,AR1
-CVTSI2SD xmmreg,rm64 [rm: o64 f2 0f 2a /r] X64,SSE2,SQ,AR1
-CVTSS2SD xmmreg,xmmrm [rm: f3 0f 5a /r] WILLAMETTE,SSE2,SD
-CVTTPD2PI mmxreg,xmmrm [rm: 66 0f 2c /r] WILLAMETTE,SSE2,SO
-CVTTPD2DQ xmmreg,xmmrm [rm: 66 0f e6 /r] WILLAMETTE,SSE2,SO
-CVTTPS2DQ xmmreg,xmmrm [rm: f3 0f 5b /r] WILLAMETTE,SSE2,SO
-CVTTSD2SI reg32,xmmreg [rm: norexw f2 0f 2c /r] WILLAMETTE,SSE2,SQ,AR1
-CVTTSD2SI reg32,mem [rm: norexw f2 0f 2c /r] WILLAMETTE,SSE2,SQ,AR1
-CVTTSD2SI reg64,xmmreg [rm: o64 f2 0f 2c /r] X64,SSE2,SQ,AR1
-CVTTSD2SI reg64,mem [rm: o64 f2 0f 2c /r] X64,SSE2,SQ,AR1
-DIVPD xmmreg,xmmrm [rm: 66 0f 5e /r] WILLAMETTE,SSE2,SO
-DIVSD xmmreg,xmmrm [rm: f2 0f 5e /r] WILLAMETTE,SSE2
-MAXPD xmmreg,xmmrm [rm: 66 0f 5f /r] WILLAMETTE,SSE2,SO
-MAXSD xmmreg,xmmrm [rm: f2 0f 5f /r] WILLAMETTE,SSE2
-MINPD xmmreg,xmmrm [rm: 66 0f 5d /r] WILLAMETTE,SSE2,SO
-MINSD xmmreg,xmmrm [rm: f2 0f 5d /r] WILLAMETTE,SSE2
-MOVAPD xmmreg,xmmreg [rm: 66 0f 28 /r] WILLAMETTE,SSE2
-MOVAPD xmmreg,xmmreg [mr: 66 0f 29 /r] WILLAMETTE,SSE2
-MOVAPD mem,xmmreg [mr: 66 0f 29 /r] WILLAMETTE,SSE2,SO
-MOVAPD xmmreg,mem [rm: 66 0f 28 /r] WILLAMETTE,SSE2,SO
-MOVHPD mem,xmmreg [mr: 66 0f 17 /r] WILLAMETTE,SSE2
-MOVHPD xmmreg,mem [rm: 66 0f 16 /r] WILLAMETTE,SSE2
-MOVLPD mem64,xmmreg [mr: 66 0f 13 /r] WILLAMETTE,SSE2
-MOVLPD xmmreg,mem64 [rm: 66 0f 12 /r] WILLAMETTE,SSE2
-MOVMSKPD reg32,xmmreg [rm: 66 0f 50 /r] WILLAMETTE,SSE2
-MOVMSKPD reg64,xmmreg [rm: 66 o64 0f 50 /r] X64,SSE2
-MOVSD xmmreg,xmmreg [rm: f2 0f 10 /r] WILLAMETTE,SSE2
-MOVSD xmmreg,xmmreg [mr: f2 0f 11 /r] WILLAMETTE,SSE2
-MOVSD mem64,xmmreg [mr: f2 0f 11 /r] WILLAMETTE,SSE2
-MOVSD xmmreg,mem64 [rm: f2 0f 10 /r] WILLAMETTE,SSE2
-MOVUPD xmmreg,xmmreg [rm: 66 0f 10 /r] WILLAMETTE,SSE2
-MOVUPD xmmreg,xmmreg [mr: 66 0f 11 /r] WILLAMETTE,SSE2
-MOVUPD mem,xmmreg [mr: 66 0f 11 /r] WILLAMETTE,SSE2,SO
-MOVUPD xmmreg,mem [rm: 66 0f 10 /r] WILLAMETTE,SSE2,SO
-MULPD xmmreg,xmmrm [rm: 66 0f 59 /r] WILLAMETTE,SSE2,SO
-MULSD xmmreg,xmmrm [rm: f2 0f 59 /r] WILLAMETTE,SSE2
-ORPD xmmreg,xmmrm [rm: 66 0f 56 /r] WILLAMETTE,SSE2,SO
-SHUFPD xmmreg,xmmreg,imm [rmi: 66 0f c6 /r ib,u] WILLAMETTE,SSE2,SB,AR2
-SHUFPD xmmreg,mem,imm [rmi: 66 0f c6 /r ib,u] WILLAMETTE,SSE2,SM,SB,AR2
-SQRTPD xmmreg,xmmrm [rm: 66 0f 51 /r] WILLAMETTE,SSE2,SO
-SQRTSD xmmreg,xmmrm [rm: f2 0f 51 /r] WILLAMETTE,SSE2
-SUBPD xmmreg,xmmrm [rm: 66 0f 5c /r] WILLAMETTE,SSE2,SO
-SUBSD xmmreg,xmmrm [rm: f2 0f 5c /r] WILLAMETTE,SSE2
-UCOMISD xmmreg,xmmrm [rm: 66 0f 2e /r] WILLAMETTE,SSE2
-UNPCKHPD xmmreg,xmmrm128 [rm: 66 0f 15 /r] WILLAMETTE,SSE2
-UNPCKLPD xmmreg,xmmrm128 [rm: 66 0f 14 /r] WILLAMETTE,SSE2
-XORPD xmmreg,xmmrm128 [rm: 66 0f 57 /r] WILLAMETTE,SSE2
-
-;# Prescott New Instructions (SSE3)
-ADDSUBPD xmmreg,xmmrm [rm: 66 0f d0 /r] PRESCOTT,SSE3,SO
-ADDSUBPS xmmreg,xmmrm [rm: f2 0f d0 /r] PRESCOTT,SSE3,SO
-HADDPD xmmreg,xmmrm [rm: 66 0f 7c /r] PRESCOTT,SSE3,SO
-HADDPS xmmreg,xmmrm [rm: f2 0f 7c /r] PRESCOTT,SSE3,SO
-HSUBPD xmmreg,xmmrm [rm: 66 0f 7d /r] PRESCOTT,SSE3,SO
-HSUBPS xmmreg,xmmrm [rm: f2 0f 7d /r] PRESCOTT,SSE3,SO
-LDDQU xmmreg,mem [rm: f2 0f f0 /r] PRESCOTT,SSE3,SO
-MOVDDUP xmmreg,xmmrm [rm: f2 0f 12 /r] PRESCOTT,SSE3
-MOVSHDUP xmmreg,xmmrm [rm: f3 0f 16 /r] PRESCOTT,SSE3
-MOVSLDUP xmmreg,xmmrm [rm: f3 0f 12 /r] PRESCOTT,SSE3
-
-;# VMX/SVM Instructions
-CLGI void [ 0f 01 dd] VMX,AMD
-STGI void [ 0f 01 dc] VMX,AMD
-VMCALL void [ 0f 01 c1] VMX
-VMCLEAR mem [m: 66 0f c7 /6] VMX
-VMFUNC void [ 0f 01 d4] VMX
-VMLAUNCH void [ 0f 01 c2] VMX
-VMLOAD void [ 0f 01 da] VMX,AMD
-VMMCALL void [ 0f 01 d9] VMX,AMD
-VMPTRLD mem [m: np 0f c7 /6] VMX
-VMPTRST mem [m: np 0f c7 /7] VMX
-VMREAD rm32,reg32 [mr: np 0f 78 /r] VMX,NOLONG,SD
-VMREAD rm64,reg64 [mr: o64nw np 0f 78 /r] X64,VMX,SQ
-VMRESUME void [ 0f 01 c3] VMX
-VMRUN void [ 0f 01 d8] VMX,AMD
-VMSAVE void [ 0f 01 db] VMX,AMD
-VMWRITE reg32,rm32 [rm: np 0f 79 /r] VMX,NOLONG,SD
-VMWRITE reg64,rm64 [rm: o64nw np 0f 79 /r] X64,VMX,SQ
-VMXOFF void [ 0f 01 c4] VMX
-VMXON mem [m: f3 0f c7 /6] VMX
-;# Extended Page Tables VMX instructions
-INVEPT reg32,mem [rm: 66 0f 38 80 /r] VMX,SO,NOLONG
-INVEPT reg64,mem [rm: o64nw 66 0f 38 80 /r] VMX,SO,LONG
-INVVPID reg32,mem [rm: 66 0f 38 81 /r] VMX,SO,NOLONG
-INVVPID reg64,mem [rm: o64nw 66 0f 38 81 /r] VMX,SO,LONG
-
-;# Tejas New Instructions (SSSE3)
-PABSB mmxreg,mmxrm [rm: np 0f 38 1c /r] SSSE3,MMX,SQ
-PABSB xmmreg,xmmrm [rm: 66 0f 38 1c /r] SSSE3
-PABSW mmxreg,mmxrm [rm: np 0f 38 1d /r] SSSE3,MMX,SQ
-PABSW xmmreg,xmmrm [rm: 66 0f 38 1d /r] SSSE3
-PABSD mmxreg,mmxrm [rm: np 0f 38 1e /r] SSSE3,MMX,SQ
-PABSD xmmreg,xmmrm [rm: 66 0f 38 1e /r] SSSE3
-PALIGNR mmxreg,mmxrm,imm [rmi: np 0f 3a 0f /r ib,u] SSSE3,MMX,SQ
-PALIGNR xmmreg,xmmrm,imm [rmi: 66 0f 3a 0f /r ib,u] SSSE3
-PHADDW mmxreg,mmxrm [rm: np 0f 38 01 /r] SSSE3,MMX,SQ
-PHADDW xmmreg,xmmrm [rm: 66 0f 38 01 /r] SSSE3
-PHADDD mmxreg,mmxrm [rm: np 0f 38 02 /r] SSSE3,MMX,SQ
-PHADDD xmmreg,xmmrm [rm: 66 0f 38 02 /r] SSSE3
-PHADDSW mmxreg,mmxrm [rm: np 0f 38 03 /r] SSSE3,MMX,SQ
-PHADDSW xmmreg,xmmrm [rm: 66 0f 38 03 /r] SSSE3
-PHSUBW mmxreg,mmxrm [rm: np 0f 38 05 /r] SSSE3,MMX,SQ
-PHSUBW xmmreg,xmmrm [rm: 66 0f 38 05 /r] SSSE3
-PHSUBD mmxreg,mmxrm [rm: np 0f 38 06 /r] SSSE3,MMX,SQ
-PHSUBD xmmreg,xmmrm [rm: 66 0f 38 06 /r] SSSE3
-PHSUBSW mmxreg,mmxrm [rm: np 0f 38 07 /r] SSSE3,MMX,SQ
-PHSUBSW xmmreg,xmmrm [rm: 66 0f 38 07 /r] SSSE3
-PMADDUBSW mmxreg,mmxrm [rm: np 0f 38 04 /r] SSSE3,MMX,SQ
-PMADDUBSW xmmreg,xmmrm [rm: 66 0f 38 04 /r] SSSE3
-PMULHRSW mmxreg,mmxrm [rm: np 0f 38 0b /r] SSSE3,MMX,SQ
-PMULHRSW xmmreg,xmmrm [rm: 66 0f 38 0b /r] SSSE3
-PSHUFB mmxreg,mmxrm [rm: np 0f 38 00 /r] SSSE3,MMX,SQ
-PSHUFB xmmreg,xmmrm [rm: 66 0f 38 00 /r] SSSE3
-PSIGNB mmxreg,mmxrm [rm: np 0f 38 08 /r] SSSE3,MMX,SQ
-PSIGNB xmmreg,xmmrm [rm: 66 0f 38 08 /r] SSSE3
-PSIGNW mmxreg,mmxrm [rm: np 0f 38 09 /r] SSSE3,MMX,SQ
-PSIGNW xmmreg,xmmrm [rm: 66 0f 38 09 /r] SSSE3
-PSIGND mmxreg,mmxrm [rm: np 0f 38 0a /r] SSSE3,MMX,SQ
-PSIGND xmmreg,xmmrm [rm: 66 0f 38 0a /r] SSSE3
-
-;# AMD SSE4A
-EXTRQ xmmreg,imm,imm [mij: 66 0f 78 /0 ib,u ib,u] SSE4A,AMD
-EXTRQ xmmreg,xmmreg [rm: 66 0f 79 /r] SSE4A,AMD
-INSERTQ xmmreg,xmmreg,imm,imm [rmij: f2 0f 78 /r ib,u ib,u] SSE4A,AMD
-INSERTQ xmmreg,xmmreg [rm: f2 0f 79 /r] SSE4A,AMD
-MOVNTSD mem,xmmreg [mr: f2 0f 2b /r] SSE4A,AMD,SQ
-MOVNTSS mem,xmmreg [mr: f3 0f 2b /r] SSE4A,AMD,SD
-
-;# New instructions in Barcelona
-LZCNT reg16,rm16 [rm: o16 f3i 0f bd /r] P6,AMD
-LZCNT reg32,rm32 [rm: o32 f3i 0f bd /r] P6,AMD
-LZCNT reg64,rm64 [rm: o64 f3i 0f bd /r] X64,AMD
-
-;# Penryn New Instructions (SSE4.1)
-BLENDPD xmmreg,xmmrm,imm [rmi: 66 0f 3a 0d /r ib,u] SSE41
-BLENDPS xmmreg,xmmrm,imm [rmi: 66 0f 3a 0c /r ib,u] SSE41
-BLENDVPD xmmreg,xmmrm,xmm0 [rm-: 66 0f 38 15 /r] SSE41
-BLENDVPD xmmreg,xmmrm [rm: 66 0f 38 15 /r] SSE41
-BLENDVPS xmmreg,xmmrm,xmm0 [rm-: 66 0f 38 14 /r] SSE41
-BLENDVPS xmmreg,xmmrm [rm: 66 0f 38 14 /r] SSE41
-DPPD xmmreg,xmmrm,imm [rmi: 66 0f 3a 41 /r ib,u] SSE41
-DPPS xmmreg,xmmrm,imm [rmi: 66 0f 3a 40 /r ib,u] SSE41
-EXTRACTPS rm32,xmmreg,imm [mri: 66 0f 3a 17 /r ib,u] SSE41
-EXTRACTPS reg64,xmmreg,imm [mri: o64 66 0f 3a 17 /r ib,u] SSE41,X64
-INSERTPS xmmreg,xmmrm,imm [rmi: 66 0f 3a 21 /r ib,u] SSE41,SD
-MOVNTDQA xmmreg,mem128 [rm: 66 0f 38 2a /r] SSE41
-MPSADBW xmmreg,xmmrm,imm [rmi: 66 0f 3a 42 /r ib,u] SSE41
-PACKUSDW xmmreg,xmmrm [rm: 66 0f 38 2b /r] SSE41
-PBLENDVB xmmreg,xmmrm,xmm0 [rm-: 66 0f 38 10 /r] SSE41
-PBLENDVB xmmreg,xmmrm [rm: 66 0f 38 10 /r] SSE41
-PBLENDW xmmreg,xmmrm,imm [rmi: 66 0f 3a 0e /r ib,u] SSE41
-PCMPEQQ xmmreg,xmmrm [rm: 66 0f 38 29 /r] SSE41
-PEXTRB reg32,xmmreg,imm [mri: 66 0f 3a 14 /r ib,u] SSE41
-PEXTRB mem8,xmmreg,imm [mri: 66 0f 3a 14 /r ib,u] SSE41
-PEXTRB reg64,xmmreg,imm [mri: o64 66 0f 3a 14 /r ib,u] SSE41,X64
-PEXTRD rm32,xmmreg,imm [mri: norexw 66 0f 3a 16 /r ib,u] SSE41
-PEXTRQ rm64,xmmreg,imm [mri: o64 66 0f 3a 16 /r ib,u] SSE41,X64
-PEXTRW reg32,xmmreg,imm [mri: 66 0f 3a 15 /r ib,u] SSE41
-PEXTRW mem16,xmmreg,imm [mri: 66 0f 3a 15 /r ib,u] SSE41
-PEXTRW reg64,xmmreg,imm [mri: o64 66 0f 3a 15 /r ib,u] SSE41,X64
-PHMINPOSUW xmmreg,xmmrm [rm: 66 0f 38 41 /r] SSE41
-PINSRB xmmreg,mem,imm [rmi: 66 0f 3a 20 /r ib,u] SSE41,SB,AR2
-PINSRB xmmreg,rm8,imm [rmi: nohi 66 0f 3a 20 /r ib,u] SSE41,SB,AR2
-PINSRB xmmreg,reg32,imm [rmi: 66 0f 3a 20 /r ib,u] SSE41,SB,AR2
-PINSRD xmmreg,mem,imm [rmi: norexw 66 0f 3a 22 /r ib,u] SSE41,SB,AR2
-PINSRD xmmreg,rm32,imm [rmi: norexw 66 0f 3a 22 /r ib,u] SSE41,SB,AR2
-PINSRQ xmmreg,mem,imm [rmi: o64 66 0f 3a 22 /r ib,u] SSE41,X64,SB,AR2
-PINSRQ xmmreg,rm64,imm [rmi: o64 66 0f 3a 22 /r ib,u] SSE41,X64,SB,AR2
-PMAXSB xmmreg,xmmrm [rm: 66 0f 38 3c /r] SSE41
-PMAXSD xmmreg,xmmrm [rm: 66 0f 38 3d /r] SSE41
-PMAXUD xmmreg,xmmrm [rm: 66 0f 38 3f /r] SSE41
-PMAXUW xmmreg,xmmrm [rm: 66 0f 38 3e /r] SSE41
-PMINSB xmmreg,xmmrm [rm: 66 0f 38 38 /r] SSE41
-PMINSD xmmreg,xmmrm [rm: 66 0f 38 39 /r] SSE41
-PMINUD xmmreg,xmmrm [rm: 66 0f 38 3b /r] SSE41
-PMINUW xmmreg,xmmrm [rm: 66 0f 38 3a /r] SSE41
-PMOVSXBW xmmreg,xmmrm [rm: 66 0f 38 20 /r] SSE41,SQ
-PMOVSXBD xmmreg,xmmrm [rm: 66 0f 38 21 /r] SSE41,SD
-PMOVSXBQ xmmreg,xmmrm [rm: 66 0f 38 22 /r] SSE41,SW
-PMOVSXWD xmmreg,xmmrm [rm: 66 0f 38 23 /r] SSE41,SQ
-PMOVSXWQ xmmreg,xmmrm [rm: 66 0f 38 24 /r] SSE41,SD
-PMOVSXDQ xmmreg,xmmrm [rm: 66 0f 38 25 /r] SSE41,SQ
-PMOVZXBW xmmreg,xmmrm [rm: 66 0f 38 30 /r] SSE41,SQ
-PMOVZXBD xmmreg,xmmrm [rm: 66 0f 38 31 /r] SSE41,SD
-PMOVZXBQ xmmreg,xmmrm [rm: 66 0f 38 32 /r] SSE41,SW
-PMOVZXWD xmmreg,xmmrm [rm: 66 0f 38 33 /r] SSE41,SQ
-PMOVZXWQ xmmreg,xmmrm [rm: 66 0f 38 34 /r] SSE41,SD
-PMOVZXDQ xmmreg,xmmrm [rm: 66 0f 38 35 /r] SSE41,SQ
-PMULDQ xmmreg,xmmrm [rm: 66 0f 38 28 /r] SSE41
-PMULLD xmmreg,xmmrm [rm: 66 0f 38 40 /r] SSE41
-PTEST xmmreg,xmmrm [rm: 66 0f 38 17 /r] SSE41
-ROUNDPD xmmreg,xmmrm,imm [rmi: 66 0f 3a 09 /r ib,u] SSE41
-ROUNDPS xmmreg,xmmrm,imm [rmi: 66 0f 3a 08 /r ib,u] SSE41
-ROUNDSD xmmreg,xmmrm,imm [rmi: 66 0f 3a 0b /r ib,u] SSE41
-ROUNDSS xmmreg,xmmrm,imm [rmi: 66 0f 3a 0a /r ib,u] SSE41
-
-;# Nehalem New Instructions (SSE4.2)
-CRC32 reg32,rm8 [rm: f2i 0f 38 f0 /r] SSE42
-CRC32 reg32,rm16 [rm: o16 f2i 0f 38 f1 /r] SSE42
-CRC32 reg32,rm32 [rm: o32 f2i 0f 38 f1 /r] SSE42
-CRC32 reg64,rm8 [rm: o64 f2i 0f 38 f0 /r] SSE42,X64
-CRC32 reg64,rm64 [rm: o64 f2i 0f 38 f1 /r] SSE42,X64
-PCMPESTRI xmmreg,xmmrm,imm [rmi: 66 0f 3a 61 /r ib,u] SSE42
-PCMPESTRM xmmreg,xmmrm,imm [rmi: 66 0f 3a 60 /r ib,u] SSE42
-PCMPISTRI xmmreg,xmmrm,imm [rmi: 66 0f 3a 63 /r ib,u] SSE42
-PCMPISTRM xmmreg,xmmrm,imm [rmi: 66 0f 3a 62 /r ib,u] SSE42
-PCMPGTQ xmmreg,xmmrm [rm: 66 0f 38 37 /r] SSE42
-POPCNT reg16,rm16 [rm: o16 f3i 0f b8 /r] NEHALEM,SW
-POPCNT reg32,rm32 [rm: o32 f3i 0f b8 /r] NEHALEM,SD
-POPCNT reg64,rm64 [rm: o64 f3i 0f b8 /r] NEHALEM,SQ,X64
-
-;# Intel SMX
-GETSEC void [ 0f 37] KATMAI
-
-;# Geode (Cyrix) 3DNow! additions
-PFRCPV mmxreg,mmxrm [rm: o64nw 0f 0f /r 86] PENT,3DNOW,SQ,CYRIX
-PFRSQRTV mmxreg,mmxrm [rm: o64nw 0f 0f /r 87] PENT,3DNOW,SQ,CYRIX
-
-;# Intel new instructions in ???
-; Is NEHALEM right here?
-MOVBE reg16,mem16 [rm: o16 norep 0f 38 f0 /r] NEHALEM,SM
-MOVBE reg32,mem32 [rm: o32 norep 0f 38 f0 /r] NEHALEM,SM
-MOVBE reg64,mem64 [rm: o64 norep 0f 38 f0 /r] NEHALEM,SM
-MOVBE mem16,reg16 [mr: o16 norep 0f 38 f1 /r] NEHALEM,SM
-MOVBE mem32,reg32 [mr: o32 norep 0f 38 f1 /r] NEHALEM,SM
-MOVBE mem64,reg64 [mr: o64 norep 0f 38 f1 /r] NEHALEM,SM
-
-;# Intel AES instructions
-AESENC xmmreg,xmmrm128 [rm: 66 0f 38 dc /r] SSE,WESTMERE
-AESENCLAST xmmreg,xmmrm128 [rm: 66 0f 38 dd /r] SSE,WESTMERE
-AESDEC xmmreg,xmmrm128 [rm: 66 0f 38 de /r] SSE,WESTMERE
-AESDECLAST xmmreg,xmmrm128 [rm: 66 0f 38 df /r] SSE,WESTMERE
-AESIMC xmmreg,xmmrm128 [rm: 66 0f 38 db /r] SSE,WESTMERE
-AESKEYGENASSIST xmmreg,xmmrm128,imm8 [rmi: 66 0f 3a df /r ib] SSE,WESTMERE
-
-;# Intel AVX AES instructions
-VAESENC xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 dc /r] AVX,SANDYBRIDGE
-VAESENCLAST xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 dd /r] AVX,SANDYBRIDGE
-VAESDEC xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 de /r] AVX,SANDYBRIDGE
-VAESDECLAST xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 df /r] AVX,SANDYBRIDGE
-VAESIMC xmmreg,xmmrm128 [rm: vex.128.66.0f38 db /r] AVX,SANDYBRIDGE
-VAESKEYGENASSIST xmmreg,xmmrm128,imm8 [rmi: vex.128.66.0f3a df /r ib] AVX,SANDYBRIDGE
-
-;# Intel AVX instructions
-VADDPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 58 /r] AVX,SANDYBRIDGE
-VADDPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 58 /r] AVX,SANDYBRIDGE
-VADDPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f 58 /r] AVX,SANDYBRIDGE
-VADDPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f 58 /r] AVX,SANDYBRIDGE
-VADDSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f 58 /r] AVX,SANDYBRIDGE
-VADDSS xmmreg,xmmreg*,xmmrm32 [rvm: vex.nds.lig.f3.0f 58 /r] AVX,SANDYBRIDGE
-VADDSUBPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f d0 /r] AVX,SANDYBRIDGE
-VADDSUBPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f d0 /r] AVX,SANDYBRIDGE
-VADDSUBPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.f2.0f d0 /r] AVX,SANDYBRIDGE
-VADDSUBPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.f2.0f d0 /r] AVX,SANDYBRIDGE
-VANDPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 54 /r] AVX,SANDYBRIDGE
-VANDPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 54 /r] AVX,SANDYBRIDGE
-VANDPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f 54 /r] AVX,SANDYBRIDGE
-VANDPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f 54 /r] AVX,SANDYBRIDGE
-VANDNPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 55 /r] AVX,SANDYBRIDGE
-VANDNPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 55 /r] AVX,SANDYBRIDGE
-VANDNPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f 55 /r] AVX,SANDYBRIDGE
-VANDNPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f 55 /r] AVX,SANDYBRIDGE
-VBLENDPD xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: vex.nds.128.66.0f3a 0d /r ib] AVX,SANDYBRIDGE
-VBLENDPD ymmreg,ymmreg*,ymmrm256,imm8 [rvmi: vex.nds.256.66.0f3a 0d /r ib] AVX,SANDYBRIDGE
-VBLENDPS xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: vex.nds.128.66.0f3a 0c /r ib] AVX,SANDYBRIDGE
-VBLENDPS ymmreg,ymmreg*,ymmrm256,imm8 [rvmi: vex.nds.256.66.0f3a 0c /r ib] AVX,SANDYBRIDGE
-VBLENDVPD xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.nds.128.66.0f3a.w0 4b /r /is4] AVX,SANDYBRIDGE
-VBLENDVPD ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.nds.256.66.0f3a.w0 4b /r /is4] AVX,SANDYBRIDGE
-VBLENDVPS xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.nds.128.66.0f3a.w0 4a /r /is4] AVX,SANDYBRIDGE
-VBLENDVPS ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.nds.256.66.0f3a.w0 4a /r /is4] AVX,SANDYBRIDGE
-VBROADCASTSS xmmreg,mem32 [rm: vex.128.66.0f38.w0 18 /r] AVX,SANDYBRIDGE
-VBROADCASTSS ymmreg,mem32 [rm: vex.256.66.0f38.w0 18 /r] AVX,SANDYBRIDGE
-VBROADCASTSD ymmreg,mem64 [rm: vex.256.66.0f38.w0 19 /r] AVX,SANDYBRIDGE
-VBROADCASTF128 ymmreg,mem128 [rm: vex.256.66.0f38.w0 1a /r] AVX,SANDYBRIDGE
-; Specific aliases first, then the generic version, to keep the disassembler happy...
-VCMPEQ_OSPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 10] AVX,SANDYBRIDGE
-VCMPEQ_OSPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 10] AVX,SANDYBRIDGE
-VCMPEQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 00] AVX,SANDYBRIDGE
-VCMPEQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 00] AVX,SANDYBRIDGE
-VCMPLT_OSPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 01] AVX,SANDYBRIDGE
-VCMPLT_OSPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 01] AVX,SANDYBRIDGE
-VCMPLTPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 01] AVX,SANDYBRIDGE
-VCMPLTPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 01] AVX,SANDYBRIDGE
-VCMPLE_OSPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 02] AVX,SANDYBRIDGE
-VCMPLE_OSPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 02] AVX,SANDYBRIDGE
-VCMPLEPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 02] AVX,SANDYBRIDGE
-VCMPLEPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 02] AVX,SANDYBRIDGE
-VCMPUNORD_QPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 03] AVX,SANDYBRIDGE
-VCMPUNORD_QPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 03] AVX,SANDYBRIDGE
-VCMPUNORDPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 03] AVX,SANDYBRIDGE
-VCMPUNORDPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 03] AVX,SANDYBRIDGE
-VCMPNEQ_UQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 04] AVX,SANDYBRIDGE
-VCMPNEQ_UQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 04] AVX,SANDYBRIDGE
-VCMPNEQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 04] AVX,SANDYBRIDGE
-VCMPNEQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 04] AVX,SANDYBRIDGE
-VCMPNLT_USPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 05] AVX,SANDYBRIDGE
-VCMPNLT_USPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 05] AVX,SANDYBRIDGE
-VCMPNLTPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 05] AVX,SANDYBRIDGE
-VCMPNLTPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 05] AVX,SANDYBRIDGE
-VCMPNLE_USPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 06] AVX,SANDYBRIDGE
-VCMPNLE_USPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 06] AVX,SANDYBRIDGE
-VCMPNLEPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 06] AVX,SANDYBRIDGE
-VCMPNLEPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 06] AVX,SANDYBRIDGE
-VCMPORD_QPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 07] AVX,SANDYBRIDGE
-VCMPORD_QPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 07] AVX,SANDYBRIDGE
-VCMPORDPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 07] AVX,SANDYBRIDGE
-VCMPORDPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 07] AVX,SANDYBRIDGE
-VCMPEQ_UQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 08] AVX,SANDYBRIDGE
-VCMPEQ_UQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 08] AVX,SANDYBRIDGE
-VCMPNGE_USPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 09] AVX,SANDYBRIDGE
-VCMPNGE_USPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 09] AVX,SANDYBRIDGE
-VCMPNGEPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 09] AVX,SANDYBRIDGE
-VCMPNGEPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 09] AVX,SANDYBRIDGE
-VCMPNGT_USPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 0a] AVX,SANDYBRIDGE
-VCMPNGT_USPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 0a] AVX,SANDYBRIDGE
-VCMPNGTPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 0a] AVX,SANDYBRIDGE
-VCMPNGTPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 0a] AVX,SANDYBRIDGE
-VCMPFALSE_OQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 0b] AVX,SANDYBRIDGE
-VCMPFALSE_OQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 0b] AVX,SANDYBRIDGE
-VCMPFALSEPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 0b] AVX,SANDYBRIDGE
-VCMPFALSEPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 0b] AVX,SANDYBRIDGE
-VCMPNEQ_OQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 0c] AVX,SANDYBRIDGE
-VCMPNEQ_OQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 0c] AVX,SANDYBRIDGE
-VCMPGE_OSPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 0d] AVX,SANDYBRIDGE
-VCMPGE_OSPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 0d] AVX,SANDYBRIDGE
-VCMPGEPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 0d] AVX,SANDYBRIDGE
-VCMPGEPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 0d] AVX,SANDYBRIDGE
-VCMPGT_OSPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 0e] AVX,SANDYBRIDGE
-VCMPGT_OSPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 0e] AVX,SANDYBRIDGE
-VCMPGTPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 0e] AVX,SANDYBRIDGE
-VCMPGTPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 0e] AVX,SANDYBRIDGE
-VCMPTRUE_UQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 0f] AVX,SANDYBRIDGE
-VCMPTRUE_UQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 0f] AVX,SANDYBRIDGE
-VCMPTRUEPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 0f] AVX,SANDYBRIDGE
-VCMPTRUEPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 0f] AVX,SANDYBRIDGE
-VCMPEQ_OSPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 10] AVX,SANDYBRIDGE
-VCMPEQ_OSPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 10] AVX,SANDYBRIDGE
-VCMPLT_OQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 11] AVX,SANDYBRIDGE
-VCMPLT_OQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 11] AVX,SANDYBRIDGE
-VCMPLE_OQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 12] AVX,SANDYBRIDGE
-VCMPLE_OQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 12] AVX,SANDYBRIDGE
-VCMPUNORD_SPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 13] AVX,SANDYBRIDGE
-VCMPUNORD_SPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 13] AVX,SANDYBRIDGE
-VCMPNEQ_USPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 14] AVX,SANDYBRIDGE
-VCMPNEQ_USPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 14] AVX,SANDYBRIDGE
-VCMPNLT_UQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 15] AVX,SANDYBRIDGE
-VCMPNLT_UQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 15] AVX,SANDYBRIDGE
-VCMPNLE_UQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 16] AVX,SANDYBRIDGE
-VCMPNLE_UQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 16] AVX,SANDYBRIDGE
-VCMPORD_SPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 17] AVX,SANDYBRIDGE
-VCMPORD_SPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 17] AVX,SANDYBRIDGE
-VCMPEQ_USPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 18] AVX,SANDYBRIDGE
-VCMPEQ_USPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 18] AVX,SANDYBRIDGE
-VCMPNGE_UQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 19] AVX,SANDYBRIDGE
-VCMPNGE_UQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 19] AVX,SANDYBRIDGE
-VCMPNGT_UQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 1a] AVX,SANDYBRIDGE
-VCMPNGT_UQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 1a] AVX,SANDYBRIDGE
-VCMPFALSE_OSPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 1b] AVX,SANDYBRIDGE
-VCMPFALSE_OSPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 1b] AVX,SANDYBRIDGE
-VCMPNEQ_OSPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 1c] AVX,SANDYBRIDGE
-VCMPNEQ_OSPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 1c] AVX,SANDYBRIDGE
-VCMPGE_OQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 1d] AVX,SANDYBRIDGE
-VCMPGE_OQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 1d] AVX,SANDYBRIDGE
-VCMPGT_OQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 1e] AVX,SANDYBRIDGE
-VCMPGT_OQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 1e] AVX,SANDYBRIDGE
-VCMPTRUE_USPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 1f] AVX,SANDYBRIDGE
-VCMPTRUE_USPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 1f] AVX,SANDYBRIDGE
-VCMPPD xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: vex.nds.128.66.0f c2 /r ib] AVX,SANDYBRIDGE
-VCMPPD ymmreg,ymmreg*,ymmrm256,imm8 [rvmi: vex.nds.256.66.0f c2 /r ib] AVX,SANDYBRIDGE
-; Specific aliases first, then the generic version, to keep the disassembler happy...
-VCMPEQ_OSPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 10] AVX,SANDYBRIDGE
-VCMPEQ_OSPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 10] AVX,SANDYBRIDGE
-VCMPEQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 00] AVX,SANDYBRIDGE
-VCMPEQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 00] AVX,SANDYBRIDGE
-VCMPLT_OSPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 01] AVX,SANDYBRIDGE
-VCMPLT_OSPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 01] AVX,SANDYBRIDGE
-VCMPLTPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 01] AVX,SANDYBRIDGE
-VCMPLTPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 01] AVX,SANDYBRIDGE
-VCMPLE_OSPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 02] AVX,SANDYBRIDGE
-VCMPLE_OSPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 02] AVX,SANDYBRIDGE
-VCMPLEPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 02] AVX,SANDYBRIDGE
-VCMPLEPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 02] AVX,SANDYBRIDGE
-VCMPUNORD_QPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 03] AVX,SANDYBRIDGE
-VCMPUNORD_QPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 03] AVX,SANDYBRIDGE
-VCMPUNORDPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 03] AVX,SANDYBRIDGE
-VCMPUNORDPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 03] AVX,SANDYBRIDGE
-VCMPNEQ_UQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 04] AVX,SANDYBRIDGE
-VCMPNEQ_UQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 04] AVX,SANDYBRIDGE
-VCMPNEQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 04] AVX,SANDYBRIDGE
-VCMPNEQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 04] AVX,SANDYBRIDGE
-VCMPNLT_USPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 05] AVX,SANDYBRIDGE
-VCMPNLT_USPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 05] AVX,SANDYBRIDGE
-VCMPNLTPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 05] AVX,SANDYBRIDGE
-VCMPNLTPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 05] AVX,SANDYBRIDGE
-VCMPNLE_USPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 06] AVX,SANDYBRIDGE
-VCMPNLE_USPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 06] AVX,SANDYBRIDGE
-VCMPNLEPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 06] AVX,SANDYBRIDGE
-VCMPNLEPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 06] AVX,SANDYBRIDGE
-VCMPORD_QPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 07] AVX,SANDYBRIDGE
-VCMPORD_QPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 07] AVX,SANDYBRIDGE
-VCMPORDPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 07] AVX,SANDYBRIDGE
-VCMPORDPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 07] AVX,SANDYBRIDGE
-VCMPEQ_UQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 08] AVX,SANDYBRIDGE
-VCMPEQ_UQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 08] AVX,SANDYBRIDGE
-VCMPNGE_USPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 09] AVX,SANDYBRIDGE
-VCMPNGE_USPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 09] AVX,SANDYBRIDGE
-VCMPNGEPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 09] AVX,SANDYBRIDGE
-VCMPNGEPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 09] AVX,SANDYBRIDGE
-VCMPNGT_USPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 0a] AVX,SANDYBRIDGE
-VCMPNGT_USPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 0a] AVX,SANDYBRIDGE
-VCMPNGTPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 0a] AVX,SANDYBRIDGE
-VCMPNGTPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 0a] AVX,SANDYBRIDGE
-VCMPFALSE_OQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 0b] AVX,SANDYBRIDGE
-VCMPFALSE_OQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 0b] AVX,SANDYBRIDGE
-VCMPFALSEPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 0b] AVX,SANDYBRIDGE
-VCMPFALSEPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 0b] AVX,SANDYBRIDGE
-VCMPNEQ_OQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 0c] AVX,SANDYBRIDGE
-VCMPNEQ_OQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 0c] AVX,SANDYBRIDGE
-VCMPGE_OSPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 0d] AVX,SANDYBRIDGE
-VCMPGE_OSPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 0d] AVX,SANDYBRIDGE
-VCMPGEPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 0d] AVX,SANDYBRIDGE
-VCMPGEPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 0d] AVX,SANDYBRIDGE
-VCMPGT_OSPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 0e] AVX,SANDYBRIDGE
-VCMPGT_OSPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 0e] AVX,SANDYBRIDGE
-VCMPGTPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 0e] AVX,SANDYBRIDGE
-VCMPGTPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 0e] AVX,SANDYBRIDGE
-VCMPTRUE_UQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 0f] AVX,SANDYBRIDGE
-VCMPTRUE_UQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 0f] AVX,SANDYBRIDGE
-VCMPTRUEPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 0f] AVX,SANDYBRIDGE
-VCMPTRUEPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 0f] AVX,SANDYBRIDGE
-VCMPEQ_OSPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 10] AVX,SANDYBRIDGE
-VCMPEQ_OSPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 10] AVX,SANDYBRIDGE
-VCMPLT_OQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 11] AVX,SANDYBRIDGE
-VCMPLT_OQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 11] AVX,SANDYBRIDGE
-VCMPLE_OQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 12] AVX,SANDYBRIDGE
-VCMPLE_OQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 12] AVX,SANDYBRIDGE
-VCMPUNORD_SPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 13] AVX,SANDYBRIDGE
-VCMPUNORD_SPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 13] AVX,SANDYBRIDGE
-VCMPNEQ_USPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 14] AVX,SANDYBRIDGE
-VCMPNEQ_USPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 14] AVX,SANDYBRIDGE
-VCMPNLT_UQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 15] AVX,SANDYBRIDGE
-VCMPNLT_UQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 15] AVX,SANDYBRIDGE
-VCMPNLE_UQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 16] AVX,SANDYBRIDGE
-VCMPNLE_UQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 16] AVX,SANDYBRIDGE
-VCMPORD_SPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 17] AVX,SANDYBRIDGE
-VCMPORD_SPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 17] AVX,SANDYBRIDGE
-VCMPEQ_USPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 18] AVX,SANDYBRIDGE
-VCMPEQ_USPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 18] AVX,SANDYBRIDGE
-VCMPNGE_UQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 19] AVX,SANDYBRIDGE
-VCMPNGE_UQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 19] AVX,SANDYBRIDGE
-VCMPNGT_UQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 1a] AVX,SANDYBRIDGE
-VCMPNGT_UQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 1a] AVX,SANDYBRIDGE
-VCMPFALSE_OSPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 1b] AVX,SANDYBRIDGE
-VCMPFALSE_OSPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 1b] AVX,SANDYBRIDGE
-VCMPNEQ_OSPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 1c] AVX,SANDYBRIDGE
-VCMPNEQ_OSPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 1c] AVX,SANDYBRIDGE
-VCMPGE_OQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 1d] AVX,SANDYBRIDGE
-VCMPGE_OQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 1d] AVX,SANDYBRIDGE
-VCMPGT_OQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 1e] AVX,SANDYBRIDGE
-VCMPGT_OQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 1e] AVX,SANDYBRIDGE
-VCMPTRUE_USPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 1f] AVX,SANDYBRIDGE
-VCMPTRUE_USPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 1f] AVX,SANDYBRIDGE
-VCMPPS xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: vex.nds.128.0f c2 /r ib] AVX,SANDYBRIDGE
-VCMPPS ymmreg,ymmreg*,ymmrm256,imm8 [rvmi: vex.nds.256.0f c2 /r ib] AVX,SANDYBRIDGE
-; Specific aliases first, then the generic version, to keep the disassembler happy...
-VCMPEQ_OSSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 10] AVX,SANDYBRIDGE
-VCMPEQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 00] AVX,SANDYBRIDGE
-VCMPLT_OSSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 01] AVX,SANDYBRIDGE
-VCMPLTSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 01] AVX,SANDYBRIDGE
-VCMPLE_OSSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 02] AVX,SANDYBRIDGE
-VCMPLESD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 02] AVX,SANDYBRIDGE
-VCMPUNORD_QSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 03] AVX,SANDYBRIDGE
-VCMPUNORDSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 03] AVX,SANDYBRIDGE
-VCMPNEQ_UQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 04] AVX,SANDYBRIDGE
-VCMPNEQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 04] AVX,SANDYBRIDGE
-VCMPNLT_USSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 05] AVX,SANDYBRIDGE
-VCMPNLTSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 05] AVX,SANDYBRIDGE
-VCMPNLE_USSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 06] AVX,SANDYBRIDGE
-VCMPNLESD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 06] AVX,SANDYBRIDGE
-VCMPORD_QSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 07] AVX,SANDYBRIDGE
-VCMPORDSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 07] AVX,SANDYBRIDGE
-VCMPEQ_UQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 08] AVX,SANDYBRIDGE
-VCMPNGE_USSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 09] AVX,SANDYBRIDGE
-VCMPNGESD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 09] AVX,SANDYBRIDGE
-VCMPNGT_USSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 0a] AVX,SANDYBRIDGE
-VCMPNGTSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 0a] AVX,SANDYBRIDGE
-VCMPFALSE_OQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 0b] AVX,SANDYBRIDGE
-VCMPFALSESD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 0b] AVX,SANDYBRIDGE
-VCMPNEQ_OQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 0c] AVX,SANDYBRIDGE
-VCMPGE_OSSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 0d] AVX,SANDYBRIDGE
-VCMPGESD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 0d] AVX,SANDYBRIDGE
-VCMPGT_OSSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 0e] AVX,SANDYBRIDGE
-VCMPGTSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 0e] AVX,SANDYBRIDGE
-VCMPTRUE_UQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 0f] AVX,SANDYBRIDGE
-VCMPTRUESD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 0f] AVX,SANDYBRIDGE
-VCMPEQ_OSSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 10] AVX,SANDYBRIDGE
-VCMPLT_OQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 11] AVX,SANDYBRIDGE
-VCMPLE_OQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 12] AVX,SANDYBRIDGE
-VCMPUNORD_SSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 13] AVX,SANDYBRIDGE
-VCMPNEQ_USSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 14] AVX,SANDYBRIDGE
-VCMPNLT_UQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 15] AVX,SANDYBRIDGE
-VCMPNLE_UQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 16] AVX,SANDYBRIDGE
-VCMPORD_SSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 17] AVX,SANDYBRIDGE
-VCMPEQ_USSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 18] AVX,SANDYBRIDGE
-VCMPNGE_UQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 19] AVX,SANDYBRIDGE
-VCMPNGT_UQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 1a] AVX,SANDYBRIDGE
-VCMPFALSE_OSSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 1b] AVX,SANDYBRIDGE
-VCMPNEQ_OSSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 1c] AVX,SANDYBRIDGE
-VCMPGE_OQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 1d] AVX,SANDYBRIDGE
-VCMPGT_OQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 1e] AVX,SANDYBRIDGE
-VCMPTRUE_USSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 1f] AVX,SANDYBRIDGE
-VCMPSD xmmreg,xmmreg*,xmmrm64,imm8 [rvmi: vex.nds.lig.f2.0f c2 /r ib] AVX,SANDYBRIDGE
-; Specific aliases first, then the generic version, to keep the disassembler happy...
-VCMPEQ_OSSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 10] AVX,SANDYBRIDGE
-VCMPEQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 00] AVX,SANDYBRIDGE
-VCMPLT_OSSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 01] AVX,SANDYBRIDGE
-VCMPLTSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 01] AVX,SANDYBRIDGE
-VCMPLE_OSSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 02] AVX,SANDYBRIDGE
-VCMPLESS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 02] AVX,SANDYBRIDGE
-VCMPUNORD_QSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 03] AVX,SANDYBRIDGE
-VCMPUNORDSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 03] AVX,SANDYBRIDGE
-VCMPNEQ_UQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 04] AVX,SANDYBRIDGE
-VCMPNEQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 04] AVX,SANDYBRIDGE
-VCMPNLT_USSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 05] AVX,SANDYBRIDGE
-VCMPNLTSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 05] AVX,SANDYBRIDGE
-VCMPNLE_USSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 06] AVX,SANDYBRIDGE
-VCMPNLESS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 06] AVX,SANDYBRIDGE
-VCMPORD_QSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 07] AVX,SANDYBRIDGE
-VCMPORDSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 07] AVX,SANDYBRIDGE
-VCMPEQ_UQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 08] AVX,SANDYBRIDGE
-VCMPNGE_USSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 09] AVX,SANDYBRIDGE
-VCMPNGESS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 09] AVX,SANDYBRIDGE
-VCMPNGT_USSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 0a] AVX,SANDYBRIDGE
-VCMPNGTSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 0a] AVX,SANDYBRIDGE
-VCMPFALSE_OQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 0b] AVX,SANDYBRIDGE
-VCMPFALSESS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 0b] AVX,SANDYBRIDGE
-VCMPNEQ_OQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 0c] AVX,SANDYBRIDGE
-VCMPGE_OSSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 0d] AVX,SANDYBRIDGE
-VCMPGESS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 0d] AVX,SANDYBRIDGE
-VCMPGT_OSSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 0e] AVX,SANDYBRIDGE
-VCMPGTSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 0e] AVX,SANDYBRIDGE
-VCMPTRUE_UQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 0f] AVX,SANDYBRIDGE
-VCMPTRUESS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 0f] AVX,SANDYBRIDGE
-VCMPEQ_OSSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 10] AVX,SANDYBRIDGE
-VCMPLT_OQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 11] AVX,SANDYBRIDGE
-VCMPLE_OQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 12] AVX,SANDYBRIDGE
-VCMPUNORD_SSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 13] AVX,SANDYBRIDGE
-VCMPNEQ_USSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 14] AVX,SANDYBRIDGE
-VCMPNLT_UQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 15] AVX,SANDYBRIDGE
-VCMPNLE_UQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 16] AVX,SANDYBRIDGE
-VCMPORD_SSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 17] AVX,SANDYBRIDGE
-VCMPEQ_USSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 18] AVX,SANDYBRIDGE
-VCMPNGE_UQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 19] AVX,SANDYBRIDGE
-VCMPNGT_UQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 1a] AVX,SANDYBRIDGE
-VCMPFALSE_OSSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 1b] AVX,SANDYBRIDGE
-VCMPNEQ_OSSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 1c] AVX,SANDYBRIDGE
-VCMPGE_OQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 1d] AVX,SANDYBRIDGE
-VCMPGT_OQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 1e] AVX,SANDYBRIDGE
-VCMPTRUE_USSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 1f] AVX,SANDYBRIDGE
-VCMPSS xmmreg,xmmreg*,xmmrm64,imm8 [rvmi: vex.nds.lig.f3.0f c2 /r ib] AVX,SANDYBRIDGE
-VCOMISD xmmreg,xmmrm64 [rm: vex.lig.66.0f 2f /r] AVX,SANDYBRIDGE
-VCOMISS xmmreg,xmmrm32 [rm: vex.lig.0f 2f /r] AVX,SANDYBRIDGE
-VCVTDQ2PD xmmreg,xmmrm64 [rm: vex.128.f3.0f e6 /r] AVX,SANDYBRIDGE
-VCVTDQ2PD ymmreg,xmmrm128 [rm: vex.256.f3.0f e6 /r] AVX,SANDYBRIDGE
-VCVTDQ2PS xmmreg,xmmrm128 [rm: vex.128.0f 5b /r] AVX,SANDYBRIDGE
-VCVTDQ2PS ymmreg,ymmrm256 [rm: vex.256.0f 5b /r] AVX,SANDYBRIDGE
-VCVTPD2DQ xmmreg,xmmreg [rm: vex.128.f2.0f e6 /r] AVX,SANDYBRIDGE
-VCVTPD2DQ xmmreg,mem128 [rm: vex.128.f2.0f e6 /r] AVX,SANDYBRIDGE,SO
-VCVTPD2DQ xmmreg,ymmreg [rm: vex.256.f2.0f e6 /r] AVX,SANDYBRIDGE
-VCVTPD2DQ xmmreg,mem256 [rm: vex.256.f2.0f e6 /r] AVX,SANDYBRIDGE,SY
-VCVTPD2PS xmmreg,xmmreg [rm: vex.128.66.0f 5a /r] AVX,SANDYBRIDGE
-VCVTPD2PS xmmreg,mem128 [rm: vex.128.66.0f 5a /r] AVX,SANDYBRIDGE,SO
-VCVTPD2PS xmmreg,ymmreg [rm: vex.256.66.0f 5a /r] AVX,SANDYBRIDGE
-VCVTPD2PS xmmreg,mem256 [rm: vex.256.66.0f 5a /r] AVX,SANDYBRIDGE,SY
-VCVTPS2DQ xmmreg,xmmrm128 [rm: vex.128.66.0f 5b /r] AVX,SANDYBRIDGE
-VCVTPS2DQ ymmreg,ymmrm256 [rm: vex.256.66.0f 5b /r] AVX,SANDYBRIDGE
-VCVTPS2PD xmmreg,xmmrm64 [rm: vex.128.0f 5a /r] AVX,SANDYBRIDGE
-VCVTPS2PD ymmreg,xmmrm128 [rm: vex.256.0f 5a /r] AVX,SANDYBRIDGE
-VCVTSD2SI reg32,xmmrm64 [rm: vex.lig.f2.0f.w0 2d /r] AVX,SANDYBRIDGE
-VCVTSD2SI reg64,xmmrm64 [rm: vex.lig.f2.0f.w1 2d /r] AVX,SANDYBRIDGE,LONG
-VCVTSD2SS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f 5a /r] AVX,SANDYBRIDGE
-VCVTSI2SD xmmreg,xmmreg*,rm32 [rvm: vex.nds.lig.f2.0f.w0 2a /r] AVX,SANDYBRIDGE,SD
-VCVTSI2SD xmmreg,xmmreg*,mem32 [rvm: vex.nds.lig.f2.0f.w0 2a /r] AVX,SANDYBRIDGE,ND,SD
-VCVTSI2SD xmmreg,xmmreg*,rm64 [rvm: vex.nds.lig.f2.0f.w1 2a /r] AVX,SANDYBRIDGE,LONG,SQ
-VCVTSI2SS xmmreg,xmmreg*,rm32 [rvm: vex.nds.lig.f3.0f.w0 2a /r] AVX,SANDYBRIDGE,SD
-VCVTSI2SS xmmreg,xmmreg*,mem32 [rvm: vex.nds.lig.f3.0f.w0 2a /r] AVX,SANDYBRIDGE,ND,SD
-VCVTSI2SS xmmreg,xmmreg*,rm64 [rvm: vex.nds.lig.f3.0f.w1 2a /r] AVX,SANDYBRIDGE,LONG,SQ
-VCVTSS2SD xmmreg,xmmreg*,xmmrm32 [rvm: vex.nds.lig.f3.0f 5a /r] AVX,SANDYBRIDGE
-VCVTSS2SI reg32,xmmrm32 [rm: vex.lig.f3.0f.w0 2d /r] AVX,SANDYBRIDGE
-VCVTSS2SI reg64,xmmrm32 [rm: vex.lig.f3.0f.w1 2d /r] AVX,SANDYBRIDGE,LONG
-VCVTTPD2DQ xmmreg,xmmreg [rm: vex.128.66.0f e6 /r] AVX,SANDYBRIDGE
-VCVTTPD2DQ xmmreg,mem128 [rm: vex.128.66.0f e6 /r] AVX,SANDYBRIDGE,SO
-VCVTTPD2DQ xmmreg,ymmreg [rm: vex.256.66.0f e6 /r] AVX,SANDYBRIDGE
-VCVTTPD2DQ xmmreg,mem256 [rm: vex.256.66.0f e6 /r] AVX,SANDYBRIDGE,SY
-VCVTTPS2DQ xmmreg,xmmrm128 [rm: vex.128.f3.0f 5b /r] AVX,SANDYBRIDGE
-VCVTTPS2DQ ymmreg,ymmrm256 [rm: vex.256.f3.0f 5b /r] AVX,SANDYBRIDGE
-VCVTTSD2SI reg32,xmmrm64 [rm: vex.lig.f2.0f.w0 2c /r] AVX,SANDYBRIDGE
-VCVTTSD2SI reg64,xmmrm64 [rm: vex.lig.f2.0f.w1 2c /r] AVX,SANDYBRIDGE,LONG
-VCVTTSS2SI reg32,xmmrm32 [rm: vex.lig.f3.0f.w0 2c /r] AVX,SANDYBRIDGE
-VCVTTSS2SI reg64,xmmrm32 [rm: vex.lig.f3.0f.w1 2c /r] AVX,SANDYBRIDGE,LONG
-VDIVPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 5e /r] AVX,SANDYBRIDGE
-VDIVPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 5e /r] AVX,SANDYBRIDGE
-VDIVPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f 5e /r] AVX,SANDYBRIDGE
-VDIVPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f 5e /r] AVX,SANDYBRIDGE
-VDIVSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f 5e /r] AVX,SANDYBRIDGE
-VDIVSS xmmreg,xmmreg*,xmmrm32 [rvm: vex.nds.lig.f3.0f 5e /r] AVX,SANDYBRIDGE
-VDPPD xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: vex.nds.128.66.0f3a 41 /r ib] AVX,SANDYBRIDGE
-VDPPS xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: vex.nds.128.66.0f3a 40 /r ib] AVX,SANDYBRIDGE
-VDPPS ymmreg,ymmreg*,ymmrm256,imm8 [rvmi: vex.nds.256.66.0f3a 40 /r ib] AVX,SANDYBRIDGE
-VEXTRACTF128 xmmrm128,ymmreg,imm8 [mri: vex.256.66.0f3a.w0 19 /r ib] AVX,SANDYBRIDGE
-VEXTRACTPS rm32,xmmreg,imm8 [mri: vex.128.66.0f3a 17 /r ib] AVX,SANDYBRIDGE
-VHADDPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 7c /r] AVX,SANDYBRIDGE
-VHADDPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 7c /r] AVX,SANDYBRIDGE
-VHADDPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.f2.0f 7c /r] AVX,SANDYBRIDGE
-VHADDPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.f2.0f 7c /r] AVX,SANDYBRIDGE
-VHSUBPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 7d /r] AVX,SANDYBRIDGE
-VHSUBPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 7d /r] AVX,SANDYBRIDGE
-VHSUBPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.f2.0f 7d /r] AVX,SANDYBRIDGE
-VHSUBPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.f2.0f 7d /r] AVX,SANDYBRIDGE
-VINSERTF128 ymmreg,ymmreg*,xmmrm128,imm8 [rvmi: vex.nds.256.66.0f3a.w0 18 /r ib] AVX,SANDYBRIDGE
-VINSERTPS xmmreg,xmmreg*,xmmrm32,imm8 [rvmi: vex.nds.128.66.0f3a 21 /r ib] AVX,SANDYBRIDGE
-VLDDQU xmmreg,mem128 [rm: vex.128.f2.0f f0 /r] AVX,SANDYBRIDGE
-VLDQQU ymmreg,mem256 [rm: vex.256.f2.0f f0 /r] AVX,SANDYBRIDGE
-VLDDQU ymmreg,mem256 [rm: vex.256.f2.0f f0 /r] AVX,SANDYBRIDGE
-VLDMXCSR mem32 [m: vex.lz.0f ae /2] AVX,SANDYBRIDGE
-VMASKMOVDQU xmmreg,xmmreg [rm: vex.128.66.0f f7 /r] AVX,SANDYBRIDGE
-VMASKMOVPS xmmreg,xmmreg,mem128 [rvm: vex.nds.128.66.0f38.w0 2c /r] AVX,SANDYBRIDGE
-VMASKMOVPS ymmreg,ymmreg,mem256 [rvm: vex.nds.256.66.0f38.w0 2c /r] AVX,SANDYBRIDGE
-VMASKMOVPS mem128,xmmreg,xmmreg [mvr: vex.nds.128.66.0f38.w0 2e /r] AVX,SANDYBRIDGE,SO
-VMASKMOVPS mem256,ymmreg,ymmreg [mvr: vex.nds.256.66.0f38.w0 2e /r] AVX,SANDYBRIDGE,SY
-VMASKMOVPD xmmreg,xmmreg,mem128 [rvm: vex.nds.128.66.0f38.w0 2d /r] AVX,SANDYBRIDGE
-VMASKMOVPD ymmreg,ymmreg,mem256 [rvm: vex.nds.256.66.0f38.w0 2d /r] AVX,SANDYBRIDGE
-VMASKMOVPD mem128,xmmreg,xmmreg [mvr: vex.nds.128.66.0f38.w0 2f /r] AVX,SANDYBRIDGE
-VMASKMOVPD mem256,ymmreg,ymmreg [mvr: vex.nds.256.66.0f38.w0 2f /r] AVX,SANDYBRIDGE
-VMAXPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 5f /r] AVX,SANDYBRIDGE
-VMAXPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 5f /r] AVX,SANDYBRIDGE
-VMAXPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f 5f /r] AVX,SANDYBRIDGE
-VMAXPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f 5f /r] AVX,SANDYBRIDGE
-VMAXSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f 5f /r] AVX,SANDYBRIDGE
-VMAXSS xmmreg,xmmreg*,xmmrm32 [rvm: vex.nds.lig.f3.0f 5f /r] AVX,SANDYBRIDGE
-VMINPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 5d /r] AVX,SANDYBRIDGE
-VMINPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 5d /r] AVX,SANDYBRIDGE
-VMINPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f 5d /r] AVX,SANDYBRIDGE
-VMINPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f 5d /r] AVX,SANDYBRIDGE
-VMINSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f 5d /r] AVX,SANDYBRIDGE
-VMINSS xmmreg,xmmreg*,xmmrm32 [rvm: vex.nds.lig.f3.0f 5d /r] AVX,SANDYBRIDGE
-VMOVAPD xmmreg,xmmrm128 [rm: vex.128.66.0f 28 /r] AVX,SANDYBRIDGE
-VMOVAPD xmmrm128,xmmreg [mr: vex.128.66.0f 29 /r] AVX,SANDYBRIDGE
-VMOVAPD ymmreg,ymmrm256 [rm: vex.256.66.0f 28 /r] AVX,SANDYBRIDGE
-VMOVAPD ymmrm256,ymmreg [mr: vex.256.66.0f 29 /r] AVX,SANDYBRIDGE
-VMOVAPS xmmreg,xmmrm128 [rm: vex.128.0f 28 /r] AVX,SANDYBRIDGE
-VMOVAPS xmmrm128,xmmreg [mr: vex.128.0f 29 /r] AVX,SANDYBRIDGE
-VMOVAPS ymmreg,ymmrm256 [rm: vex.256.0f 28 /r] AVX,SANDYBRIDGE
-VMOVAPS ymmrm256,ymmreg [mr: vex.256.0f 29 /r] AVX,SANDYBRIDGE
-VMOVD xmmreg,rm32 [rm: vex.128.66.0f.w0 6e /r] AVX,SANDYBRIDGE
-VMOVD rm32,xmmreg [mr: vex.128.66.0f.w0 7e /r] AVX,SANDYBRIDGE
-VMOVQ xmmreg,xmmrm64 [rm: vex.128.f3.0f 7e /r] AVX,SANDYBRIDGE,SQ
-VMOVQ xmmrm64,xmmreg [mr: vex.128.66.0f d6 /r] AVX,SANDYBRIDGE,SQ
-VMOVQ xmmreg,rm64 [rm: vex.128.66.0f.w1 6e /r] AVX,SANDYBRIDGE,LONG,SQ
-VMOVQ rm64,xmmreg [mr: vex.128.66.0f.w1 7e /r] AVX,SANDYBRIDGE,LONG,SQ
-VMOVDDUP xmmreg,xmmrm64 [rm: vex.128.f2.0f 12 /r] AVX,SANDYBRIDGE
-VMOVDDUP ymmreg,ymmrm256 [rm: vex.256.f2.0f 12 /r] AVX,SANDYBRIDGE
-VMOVDQA xmmreg,xmmrm128 [rm: vex.128.66.0f 6f /r] AVX,SANDYBRIDGE
-VMOVDQA xmmrm128,xmmreg [mr: vex.128.66.0f 7f /r] AVX,SANDYBRIDGE
-; These are officially documented as VMOVDQA, but VMOVQQA seems more logical to me...
-VMOVQQA ymmreg,ymmrm256 [rm: vex.256.66.0f 6f /r] AVX,SANDYBRIDGE
-VMOVQQA ymmrm256,ymmreg [mr: vex.256.66.0f 7f /r] AVX,SANDYBRIDGE
-VMOVDQA ymmreg,ymmrm256 [rm: vex.256.66.0f 6f /r] AVX,SANDYBRIDGE
-VMOVDQA ymmrm256,ymmreg [mr: vex.256.66.0f 7f /r] AVX,SANDYBRIDGE
-VMOVDQU xmmreg,xmmrm128 [rm: vex.128.f3.0f 6f /r] AVX,SANDYBRIDGE
-VMOVDQU xmmrm128,xmmreg [mr: vex.128.f3.0f 7f /r] AVX,SANDYBRIDGE
-; These are officially documented as VMOVDQU, but VMOVQQU seems more logical to me...
-VMOVQQU ymmreg,ymmrm256 [rm: vex.256.f3.0f 6f /r] AVX,SANDYBRIDGE
-VMOVQQU ymmrm256,ymmreg [mr: vex.256.f3.0f 7f /r] AVX,SANDYBRIDGE
-VMOVDQU ymmreg,ymmrm256 [rm: vex.256.f3.0f 6f /r] AVX,SANDYBRIDGE
-VMOVDQU ymmrm256,ymmreg [mr: vex.256.f3.0f 7f /r] AVX,SANDYBRIDGE
-VMOVHLPS xmmreg,xmmreg*,xmmreg [rvm: vex.nds.128.0f 12 /r] AVX,SANDYBRIDGE
-VMOVHPD xmmreg,xmmreg*,mem64 [rvm: vex.nds.128.66.0f 16 /r] AVX,SANDYBRIDGE
-VMOVHPD mem64,xmmreg [mr: vex.128.66.0f 17 /r] AVX,SANDYBRIDGE
-VMOVHPS xmmreg,xmmreg*,mem64 [rvm: vex.nds.128.0f 16 /r] AVX,SANDYBRIDGE
-VMOVHPS mem64,xmmreg [mr: vex.128.0f 17 /r] AVX,SANDYBRIDGE
-VMOVLHPS xmmreg,xmmreg*,xmmreg [rvm: vex.nds.128.0f 16 /r] AVX,SANDYBRIDGE
-VMOVLPD xmmreg,xmmreg*,mem64 [rvm: vex.nds.128.66.0f 12 /r] AVX,SANDYBRIDGE
-VMOVLPD mem64,xmmreg [mr: vex.128.66.0f 13 /r] AVX,SANDYBRIDGE
-VMOVLPS xmmreg,xmmreg*,mem64 [rvm: vex.nds.128.0f 12 /r] AVX,SANDYBRIDGE
-VMOVLPS mem64,xmmreg [mr: vex.128.0f 13 /r] AVX,SANDYBRIDGE
-VMOVMSKPD reg64,xmmreg [rm: vex.128.66.0f 50 /r] AVX,SANDYBRIDGE,LONG
-VMOVMSKPD reg32,xmmreg [rm: vex.128.66.0f 50 /r] AVX,SANDYBRIDGE
-VMOVMSKPD reg64,ymmreg [rm: vex.256.66.0f 50 /r] AVX,SANDYBRIDGE,LONG
-VMOVMSKPD reg32,ymmreg [rm: vex.256.66.0f 50 /r] AVX,SANDYBRIDGE
-VMOVMSKPS reg64,xmmreg [rm: vex.128.0f 50 /r] AVX,SANDYBRIDGE,LONG
-VMOVMSKPS reg32,xmmreg [rm: vex.128.0f 50 /r] AVX,SANDYBRIDGE
-VMOVMSKPS reg64,ymmreg [rm: vex.256.0f 50 /r] AVX,SANDYBRIDGE,LONG
-VMOVMSKPS reg32,ymmreg [rm: vex.256.0f 50 /r] AVX,SANDYBRIDGE
-VMOVNTDQ mem128,xmmreg [mr: vex.128.66.0f e7 /r] AVX,SANDYBRIDGE
-; Officially VMOVNTDQ, but VMOVNTQQ seems more logical to me...
-VMOVNTQQ mem256,ymmreg [mr: vex.256.66.0f e7 /r] AVX,SANDYBRIDGE
-VMOVNTDQ mem256,ymmreg [mr: vex.256.66.0f e7 /r] AVX,SANDYBRIDGE
-VMOVNTDQA xmmreg,mem128 [rm: vex.128.66.0f38 2a /r] AVX,SANDYBRIDGE
-VMOVNTPD mem128,xmmreg [mr: vex.128.66.0f 2b /r] AVX,SANDYBRIDGE
-VMOVNTPD mem256,ymmreg [mr: vex.256.66.0f 2b /r] AVX,SANDYBRIDGE
-VMOVNTPS mem128,xmmreg [mr: vex.128.0f 2b /r] AVX,SANDYBRIDGE
-VMOVNTPS mem256,ymmreg [mr: vex.256.0f 2b /r] AVX,SANDYBRIDGE
-VMOVSD xmmreg,xmmreg*,xmmreg [rvm: vex.nds.lig.f2.0f 10 /r] AVX,SANDYBRIDGE
-VMOVSD xmmreg,mem64 [rm: vex.lig.f2.0f 10 /r] AVX,SANDYBRIDGE
-VMOVSD xmmreg,xmmreg*,xmmreg [mvr: vex.nds.lig.f2.0f 11 /r] AVX,SANDYBRIDGE
-VMOVSD mem64,xmmreg [mr: vex.lig.f2.0f 11 /r] AVX,SANDYBRIDGE
-VMOVSHDUP xmmreg,xmmrm128 [rm: vex.128.f3.0f 16 /r] AVX,SANDYBRIDGE
-VMOVSHDUP ymmreg,ymmrm256 [rm: vex.256.f3.0f 16 /r] AVX,SANDYBRIDGE
-VMOVSLDUP xmmreg,xmmrm128 [rm: vex.128.f3.0f 12 /r] AVX,SANDYBRIDGE
-VMOVSLDUP ymmreg,ymmrm256 [rm: vex.256.f3.0f 12 /r] AVX,SANDYBRIDGE
-VMOVSS xmmreg,xmmreg*,xmmreg [rvm: vex.nds.lig.f3.0f 10 /r] AVX,SANDYBRIDGE
-VMOVSS xmmreg,mem32 [rm: vex.lig.f3.0f 10 /r] AVX,SANDYBRIDGE
-VMOVSS xmmreg,xmmreg*,xmmreg [mvr: vex.nds.lig.f3.0f 11 /r] AVX,SANDYBRIDGE
-VMOVSS mem32,xmmreg [mr: vex.lig.f3.0f 11 /r] AVX,SANDYBRIDGE
-VMOVUPD xmmreg,xmmrm128 [rm: vex.128.66.0f 10 /r] AVX,SANDYBRIDGE
-VMOVUPD xmmrm128,xmmreg [mr: vex.128.66.0f 11 /r] AVX,SANDYBRIDGE
-VMOVUPD ymmreg,ymmrm256 [rm: vex.256.66.0f 10 /r] AVX,SANDYBRIDGE
-VMOVUPD ymmrm256,ymmreg [mr: vex.256.66.0f 11 /r] AVX,SANDYBRIDGE
-VMOVUPS xmmreg,xmmrm128 [rm: vex.128.0f 10 /r] AVX,SANDYBRIDGE
-VMOVUPS xmmrm128,xmmreg [mr: vex.128.0f 11 /r] AVX,SANDYBRIDGE
-VMOVUPS ymmreg,ymmrm256 [rm: vex.256.0f 10 /r] AVX,SANDYBRIDGE
-VMOVUPS ymmrm256,ymmreg [mr: vex.256.0f 11 /r] AVX,SANDYBRIDGE
-VMPSADBW xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: vex.nds.128.66.0f3a 42 /r ib] AVX,SANDYBRIDGE
-VMULPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 59 /r] AVX,SANDYBRIDGE
-VMULPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 59 /r] AVX,SANDYBRIDGE
-VMULPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f 59 /r] AVX,SANDYBRIDGE
-VMULPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f 59 /r] AVX,SANDYBRIDGE
-VMULSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f 59 /r] AVX,SANDYBRIDGE
-VMULSS xmmreg,xmmreg*,xmmrm32 [rvm: vex.nds.lig.f3.0f 59 /r] AVX,SANDYBRIDGE
-VORPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 56 /r] AVX,SANDYBRIDGE
-VORPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 56 /r] AVX,SANDYBRIDGE
-VORPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f 56 /r] AVX,SANDYBRIDGE
-VORPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f 56 /r] AVX,SANDYBRIDGE
-VPABSB xmmreg,xmmrm128 [rm: vex.128.66.0f38 1c /r] AVX,SANDYBRIDGE
-VPABSW xmmreg,xmmrm128 [rm: vex.128.66.0f38 1d /r] AVX,SANDYBRIDGE
-VPABSD xmmreg,xmmrm128 [rm: vex.128.66.0f38 1e /r] AVX,SANDYBRIDGE
-VPACKSSWB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 63 /r] AVX,SANDYBRIDGE
-VPACKSSDW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 6b /r] AVX,SANDYBRIDGE
-VPACKUSWB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 67 /r] AVX,SANDYBRIDGE
-VPACKUSDW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 2b /r] AVX,SANDYBRIDGE
-VPADDB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f fc /r] AVX,SANDYBRIDGE
-VPADDW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f fd /r] AVX,SANDYBRIDGE
-VPADDD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f fe /r] AVX,SANDYBRIDGE
-VPADDQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f d4 /r] AVX,SANDYBRIDGE
-VPADDSB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f ec /r] AVX,SANDYBRIDGE
-VPADDSW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f ed /r] AVX,SANDYBRIDGE
-VPADDUSB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f dc /r] AVX,SANDYBRIDGE
-VPADDUSW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f dd /r] AVX,SANDYBRIDGE
-VPALIGNR xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: vex.nds.128.66.0f3a 0f /r ib] AVX,SANDYBRIDGE
-VPAND xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f db /r] AVX,SANDYBRIDGE
-VPANDN xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f df /r] AVX,SANDYBRIDGE
-VPAVGB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f e0 /r] AVX,SANDYBRIDGE
-VPAVGW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f e3 /r] AVX,SANDYBRIDGE
-VPBLENDVB xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.nds.128.66.0f3a.w0 4c /r /is4] AVX,SANDYBRIDGE
-VPBLENDW xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: vex.nds.128.66.0f3a 0e /r ib] AVX,SANDYBRIDGE
-VPCMPESTRI xmmreg,xmmrm128,imm8 [rmi: vex.128.66.0f3a 61 /r ib] AVX,SANDYBRIDGE
-VPCMPESTRM xmmreg,xmmrm128,imm8 [rmi: vex.128.66.0f3a 60 /r ib] AVX,SANDYBRIDGE
-VPCMPISTRI xmmreg,xmmrm128,imm8 [rmi: vex.128.66.0f3a 63 /r ib] AVX,SANDYBRIDGE
-VPCMPISTRM xmmreg,xmmrm128,imm8 [rmi: vex.128.66.0f3a 62 /r ib] AVX,SANDYBRIDGE
-VPCMPEQB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 74 /r] AVX,SANDYBRIDGE
-VPCMPEQW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 75 /r] AVX,SANDYBRIDGE
-VPCMPEQD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 76 /r] AVX,SANDYBRIDGE
-VPCMPEQQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 29 /r] AVX,SANDYBRIDGE
-VPCMPGTB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 64 /r] AVX,SANDYBRIDGE
-VPCMPGTW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 65 /r] AVX,SANDYBRIDGE
-VPCMPGTD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 66 /r] AVX,SANDYBRIDGE
-VPCMPGTQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 37 /r] AVX,SANDYBRIDGE
-VPERMILPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38.w0 0d /r] AVX,SANDYBRIDGE
-VPERMILPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38.w0 0d /r] AVX,SANDYBRIDGE
-VPERMILPD xmmreg,xmmrm128,imm8 [rmi: vex.128.66.0f3a.w0 05 /r ib] AVX,SANDYBRIDGE
-VPERMILPD ymmreg,ymmrm256,imm8 [rmi: vex.256.66.0f3a.w0 05 /r ib] AVX,SANDYBRIDGE
-VPERMILPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38.w0 0c /r] AVX,SANDYBRIDGE
-VPERMILPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38.w0 0c /r] AVX,SANDYBRIDGE
-VPERMILPS xmmreg,xmmrm128,imm8 [rmi: vex.128.66.0f3a.w0 04 /r ib] AVX,SANDYBRIDGE
-VPERMILPS ymmreg,ymmrm256,imm8 [rmi: vex.256.66.0f3a.w0 04 /r ib] AVX,SANDYBRIDGE
-VPERM2F128 ymmreg,ymmreg*,ymmrm256,imm8 [rvmi: vex.nds.256.66.0f3a.w0 06 /r ib] AVX,SANDYBRIDGE
-VPEXTRB reg64,xmmreg,imm8 [mri: vex.128.66.0f3a.w0 14 /r ib] AVX,SANDYBRIDGE,LONG
-VPEXTRB reg32,xmmreg,imm8 [mri: vex.128.66.0f3a.w0 14 /r ib] AVX,SANDYBRIDGE
-VPEXTRB mem8,xmmreg,imm8 [mri: vex.128.66.0f3a.w0 14 /r ib] AVX,SANDYBRIDGE
-VPEXTRW reg64,xmmreg,imm8 [rmi: vex.128.66.0f.w0 c5 /r ib] AVX,SANDYBRIDGE,LONG
-VPEXTRW reg32,xmmreg,imm8 [rmi: vex.128.66.0f.w0 c5 /r ib] AVX,SANDYBRIDGE
-VPEXTRW reg64,xmmreg,imm8 [mri: vex.128.66.0f3a.w0 15 /r ib] AVX,SANDYBRIDGE,LONG
-VPEXTRW reg32,xmmreg,imm8 [mri: vex.128.66.0f3a.w0 15 /r ib] AVX,SANDYBRIDGE
-VPEXTRW mem16,xmmreg,imm8 [mri: vex.128.66.0f3a.w0 15 /r ib] AVX,SANDYBRIDGE
-VPEXTRD reg64,xmmreg,imm8 [mri: vex.128.66.0f3a.w0 16 /r ib] AVX,SANDYBRIDGE,LONG
-VPEXTRD rm32,xmmreg,imm8 [mri: vex.128.66.0f3a.w0 16 /r ib] AVX,SANDYBRIDGE
-VPEXTRQ rm64,xmmreg,imm8 [mri: vex.128.66.0f3a.w1 16 /r ib] AVX,SANDYBRIDGE,LONG
-VPHADDW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 01 /r] AVX,SANDYBRIDGE
-VPHADDD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 02 /r] AVX,SANDYBRIDGE
-VPHADDSW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 03 /r] AVX,SANDYBRIDGE
-VPHMINPOSUW xmmreg,xmmrm128 [rm: vex.128.66.0f38 41 /r] AVX,SANDYBRIDGE
-VPHSUBW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 05 /r] AVX,SANDYBRIDGE
-VPHSUBD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 06 /r] AVX,SANDYBRIDGE
-VPHSUBSW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 07 /r] AVX,SANDYBRIDGE
-VPINSRB xmmreg,xmmreg*,mem8,imm8 [rvmi: vex.nds.128.66.0f3a 20 /r ib] AVX,SANDYBRIDGE
-VPINSRB xmmreg,xmmreg*,rm8,imm8 [rvmi: vex.nds.128.66.0f3a 20 /r ib] AVX,SANDYBRIDGE
-VPINSRB xmmreg,xmmreg*,reg32,imm8 [rvmi: vex.nds.128.66.0f3a 20 /r ib] AVX,SANDYBRIDGE
-VPINSRW xmmreg,xmmreg*,mem16,imm8 [rvmi: vex.nds.128.66.0f c4 /r ib] AVX,SANDYBRIDGE
-VPINSRW xmmreg,xmmreg*,rm16,imm8 [rvmi: vex.nds.128.66.0f c4 /r ib] AVX,SANDYBRIDGE
-VPINSRW xmmreg,xmmreg*,reg32,imm8 [rvmi: vex.nds.128.66.0f c4 /r ib] AVX,SANDYBRIDGE
-VPINSRD xmmreg,xmmreg*,mem32,imm8 [rvmi: vex.nds.128.66.0f3a.w0 22 /r ib] AVX,SANDYBRIDGE
-VPINSRD xmmreg,xmmreg*,rm32,imm8 [rvmi: vex.nds.128.66.0f3a.w0 22 /r ib] AVX,SANDYBRIDGE
-VPINSRQ xmmreg,xmmreg*,mem64,imm8 [rvmi: vex.nds.128.66.0f3a.w1 22 /r ib] AVX,SANDYBRIDGE,LONG
-VPINSRQ xmmreg,xmmreg*,rm64,imm8 [rvmi: vex.nds.128.66.0f3a.w1 22 /r ib] AVX,SANDYBRIDGE,LONG
-VPMADDWD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f f5 /r] AVX,SANDYBRIDGE
-VPMADDUBSW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 04 /r] AVX,SANDYBRIDGE
-VPMAXSB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 3c /r] AVX,SANDYBRIDGE
-VPMAXSW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f ee /r] AVX,SANDYBRIDGE
-VPMAXSD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 3d /r] AVX,SANDYBRIDGE
-VPMAXUB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f de /r] AVX,SANDYBRIDGE
-VPMAXUW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 3e /r] AVX,SANDYBRIDGE
-VPMAXUD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 3f /r] AVX,SANDYBRIDGE
-VPMINSB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 38 /r] AVX,SANDYBRIDGE
-VPMINSW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f ea /r] AVX,SANDYBRIDGE
-VPMINSD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 39 /r] AVX,SANDYBRIDGE
-VPMINUB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f da /r] AVX,SANDYBRIDGE
-VPMINUW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 3a /r] AVX,SANDYBRIDGE
-VPMINUD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 3b /r] AVX,SANDYBRIDGE
-VPMOVMSKB reg64,xmmreg [rm: vex.128.66.0f d7 /r] AVX,SANDYBRIDGE,LONG
-VPMOVMSKB reg32,xmmreg [rm: vex.128.66.0f d7 /r] AVX,SANDYBRIDGE
-VPMOVSXBW xmmreg,xmmrm64 [rm: vex.128.66.0f38 20 /r] AVX,SANDYBRIDGE
-VPMOVSXBD xmmreg,xmmrm32 [rm: vex.128.66.0f38 21 /r] AVX,SANDYBRIDGE
-VPMOVSXBQ xmmreg,xmmrm16 [rm: vex.128.66.0f38 22 /r] AVX,SANDYBRIDGE
-VPMOVSXWD xmmreg,xmmrm64 [rm: vex.128.66.0f38 23 /r] AVX,SANDYBRIDGE
-VPMOVSXWQ xmmreg,xmmrm32 [rm: vex.128.66.0f38 24 /r] AVX,SANDYBRIDGE
-VPMOVSXDQ xmmreg,xmmrm64 [rm: vex.128.66.0f38 25 /r] AVX,SANDYBRIDGE
-VPMOVZXBW xmmreg,xmmrm64 [rm: vex.128.66.0f38 30 /r] AVX,SANDYBRIDGE
-VPMOVZXBD xmmreg,xmmrm32 [rm: vex.128.66.0f38 31 /r] AVX,SANDYBRIDGE
-VPMOVZXBQ xmmreg,xmmrm16 [rm: vex.128.66.0f38 32 /r] AVX,SANDYBRIDGE
-VPMOVZXWD xmmreg,xmmrm64 [rm: vex.128.66.0f38 33 /r] AVX,SANDYBRIDGE
-VPMOVZXWQ xmmreg,xmmrm32 [rm: vex.128.66.0f38 34 /r] AVX,SANDYBRIDGE
-VPMOVZXDQ xmmreg,xmmrm64 [rm: vex.128.66.0f38 35 /r] AVX,SANDYBRIDGE
-VPMULHUW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f e4 /r] AVX,SANDYBRIDGE
-VPMULHRSW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 0b /r] AVX,SANDYBRIDGE
-VPMULHW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f e5 /r] AVX,SANDYBRIDGE
-VPMULLW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f d5 /r] AVX,SANDYBRIDGE
-VPMULLD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 40 /r] AVX,SANDYBRIDGE
-VPMULUDQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f f4 /r] AVX,SANDYBRIDGE
-VPMULDQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 28 /r] AVX,SANDYBRIDGE
-VPOR xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f eb /r] AVX,SANDYBRIDGE
-VPSADBW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f f6 /r] AVX,SANDYBRIDGE
-VPSHUFB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 00 /r] AVX,SANDYBRIDGE
-VPSHUFD xmmreg,xmmrm128,imm8 [rmi: vex.128.66.0f 70 /r ib] AVX,SANDYBRIDGE
-VPSHUFHW xmmreg,xmmrm128,imm8 [rmi: vex.128.f3.0f 70 /r ib] AVX,SANDYBRIDGE
-VPSHUFLW xmmreg,xmmrm128,imm8 [rmi: vex.128.f2.0f 70 /r ib] AVX,SANDYBRIDGE
-VPSIGNB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 08 /r] AVX,SANDYBRIDGE
-VPSIGNW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 09 /r] AVX,SANDYBRIDGE
-VPSIGND xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 0a /r] AVX,SANDYBRIDGE
-VPSLLDQ xmmreg,xmmreg*,imm8 [vmi: vex.ndd.128.66.0f 73 /7 ib] AVX,SANDYBRIDGE
-VPSRLDQ xmmreg,xmmreg*,imm8 [vmi: vex.ndd.128.66.0f 73 /3 ib] AVX,SANDYBRIDGE
-VPSLLW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f f1 /r] AVX,SANDYBRIDGE
-VPSLLW xmmreg,xmmreg*,imm8 [vmi: vex.ndd.128.66.0f 71 /6 ib] AVX,SANDYBRIDGE
-VPSLLD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f f2 /r] AVX,SANDYBRIDGE
-VPSLLD xmmreg,xmmreg*,imm8 [vmi: vex.ndd.128.66.0f 72 /6 ib] AVX,SANDYBRIDGE
-VPSLLQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f f3 /r] AVX,SANDYBRIDGE
-VPSLLQ xmmreg,xmmreg*,imm8 [vmi: vex.ndd.128.66.0f 73 /6 ib] AVX,SANDYBRIDGE
-VPSRAW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f e1 /r] AVX,SANDYBRIDGE
-VPSRAW xmmreg,xmmreg*,imm8 [vmi: vex.ndd.128.66.0f 71 /4 ib] AVX,SANDYBRIDGE
-VPSRAD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f e2 /r] AVX,SANDYBRIDGE
-VPSRAD xmmreg,xmmreg*,imm8 [vmi: vex.ndd.128.66.0f 72 /4 ib] AVX,SANDYBRIDGE
-VPSRLW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f d1 /r] AVX,SANDYBRIDGE
-VPSRLW xmmreg,xmmreg*,imm8 [vmi: vex.ndd.128.66.0f 71 /2 ib] AVX,SANDYBRIDGE
-VPSRLD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f d2 /r] AVX,SANDYBRIDGE
-VPSRLD xmmreg,xmmreg*,imm8 [vmi: vex.ndd.128.66.0f 72 /2 ib] AVX,SANDYBRIDGE
-VPSRLQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f d3 /r] AVX,SANDYBRIDGE
-VPSRLQ xmmreg,xmmreg*,imm8 [vmi: vex.ndd.128.66.0f 73 /2 ib] AVX,SANDYBRIDGE
-VPTEST xmmreg,xmmrm128 [rm: vex.128.66.0f38 17 /r] AVX,SANDYBRIDGE
-VPTEST ymmreg,ymmrm256 [rm: vex.256.66.0f38 17 /r] AVX,SANDYBRIDGE
-VPSUBB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f f8 /r] AVX,SANDYBRIDGE
-VPSUBW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f f9 /r] AVX,SANDYBRIDGE
-VPSUBD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f fa /r] AVX,SANDYBRIDGE
-VPSUBQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f fb /r] AVX,SANDYBRIDGE
-VPSUBSB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f e8 /r] AVX,SANDYBRIDGE
-VPSUBSW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f e9 /r] AVX,SANDYBRIDGE
-VPSUBUSB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f d8 /r] AVX,SANDYBRIDGE
-VPSUBUSW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f d9 /r] AVX,SANDYBRIDGE
-VPUNPCKHBW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 68 /r] AVX,SANDYBRIDGE
-VPUNPCKHWD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 69 /r] AVX,SANDYBRIDGE
-VPUNPCKHDQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 6a /r] AVX,SANDYBRIDGE
-VPUNPCKHQDQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 6d /r] AVX,SANDYBRIDGE
-VPUNPCKLBW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 60 /r] AVX,SANDYBRIDGE
-VPUNPCKLWD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 61 /r] AVX,SANDYBRIDGE
-VPUNPCKLDQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 62 /r] AVX,SANDYBRIDGE
-VPUNPCKLQDQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 6c /r] AVX,SANDYBRIDGE
-VPXOR xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f ef /r] AVX,SANDYBRIDGE
-VRCPPS xmmreg,xmmrm128 [rm: vex.128.0f 53 /r] AVX,SANDYBRIDGE
-VRCPPS ymmreg,ymmrm256 [rm: vex.256.0f 53 /r] AVX,SANDYBRIDGE
-VRCPSS xmmreg,xmmreg*,xmmrm32 [rvm: vex.nds.lig.f3.0f 53 /r] AVX,SANDYBRIDGE
-VRSQRTPS xmmreg,xmmrm128 [rm: vex.128.0f 52 /r] AVX,SANDYBRIDGE
-VRSQRTPS ymmreg,ymmrm256 [rm: vex.256.0f 52 /r] AVX,SANDYBRIDGE
-VRSQRTSS xmmreg,xmmreg*,xmmrm32 [rvm: vex.nds.lig.f3.0f 52 /r] AVX,SANDYBRIDGE
-VROUNDPD xmmreg,xmmrm128,imm8 [rmi: vex.128.66.0f3a 09 /r ib] AVX,SANDYBRIDGE
-VROUNDPD ymmreg,ymmrm256,imm8 [rmi: vex.256.66.0f3a 09 /r ib] AVX,SANDYBRIDGE
-VROUNDPS xmmreg,xmmrm128,imm8 [rmi: vex.128.66.0f3a 08 /r ib] AVX,SANDYBRIDGE
-VROUNDPS ymmreg,ymmrm256,imm8 [rmi: vex.256.66.0f3a 08 /r ib] AVX,SANDYBRIDGE
-VROUNDSD xmmreg,xmmreg*,xmmrm64,imm8 [rvmi: vex.nds.128.66.0f3a 0b /r ib] AVX,SANDYBRIDGE
-VROUNDSS xmmreg,xmmreg*,xmmrm32,imm8 [rvmi: vex.nds.128.66.0f3a 0a /r ib] AVX,SANDYBRIDGE
-VSHUFPD xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: vex.nds.128.66.0f c6 /r ib] AVX,SANDYBRIDGE
-VSHUFPD ymmreg,ymmreg*,ymmrm256,imm8 [rvmi: vex.nds.256.66.0f c6 /r ib] AVX,SANDYBRIDGE
-VSHUFPS xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: vex.nds.128.0f c6 /r ib] AVX,SANDYBRIDGE
-VSHUFPS ymmreg,ymmreg*,ymmrm256,imm8 [rvmi: vex.nds.256.0f c6 /r ib] AVX,SANDYBRIDGE
-VSQRTPD xmmreg,xmmrm128 [rm: vex.128.66.0f 51 /r] AVX,SANDYBRIDGE
-VSQRTPD ymmreg,ymmrm256 [rm: vex.256.66.0f 51 /r] AVX,SANDYBRIDGE
-VSQRTPS xmmreg,xmmrm128 [rm: vex.128.0f 51 /r] AVX,SANDYBRIDGE
-VSQRTPS ymmreg,ymmrm256 [rm: vex.256.0f 51 /r] AVX,SANDYBRIDGE
-VSQRTSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f 51 /r] AVX,SANDYBRIDGE
-VSQRTSS xmmreg,xmmreg*,xmmrm32 [rvm: vex.nds.lig.f3.0f 51 /r] AVX,SANDYBRIDGE
-VSTMXCSR mem32 [m: vex.128.0f ae /3] AVX,SANDYBRIDGE
-VSUBPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 5c /r] AVX,SANDYBRIDGE
-VSUBPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 5c /r] AVX,SANDYBRIDGE
-VSUBPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f 5c /r] AVX,SANDYBRIDGE
-VSUBPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f 5c /r] AVX,SANDYBRIDGE
-VSUBSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f 5c /r] AVX,SANDYBRIDGE
-VSUBSS xmmreg,xmmreg*,xmmrm32 [rvm: vex.nds.lig.f3.0f 5c /r] AVX,SANDYBRIDGE
-VTESTPS xmmreg,xmmrm128 [rm: vex.128.66.0f38.w0 0e /r] AVX,SANDYBRIDGE
-VTESTPS ymmreg,ymmrm256 [rm: vex.256.66.0f38.w0 0e /r] AVX,SANDYBRIDGE
-VTESTPD xmmreg,xmmrm128 [rm: vex.128.66.0f38.w0 0f /r] AVX,SANDYBRIDGE
-VTESTPD ymmreg,ymmrm256 [rm: vex.256.66.0f38.w0 0f /r] AVX,SANDYBRIDGE
-VUCOMISD xmmreg,xmmrm64 [rm: vex.lig.66.0f 2e /r] AVX,SANDYBRIDGE
-VUCOMISS xmmreg,xmmrm32 [rm: vex.lig.0f 2e /r] AVX,SANDYBRIDGE
-VUNPCKHPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 15 /r] AVX,SANDYBRIDGE
-VUNPCKHPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 15 /r] AVX,SANDYBRIDGE
-VUNPCKHPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f 15 /r] AVX,SANDYBRIDGE
-VUNPCKHPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f 15 /r] AVX,SANDYBRIDGE
-VUNPCKLPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 14 /r] AVX,SANDYBRIDGE
-VUNPCKLPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 14 /r] AVX,SANDYBRIDGE
-VUNPCKLPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f 14 /r] AVX,SANDYBRIDGE
-VUNPCKLPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f 14 /r] AVX,SANDYBRIDGE
-VXORPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 57 /r] AVX,SANDYBRIDGE
-VXORPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 57 /r] AVX,SANDYBRIDGE
-VXORPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f 57 /r] AVX,SANDYBRIDGE
-VXORPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f 57 /r] AVX,SANDYBRIDGE
-VZEROALL void [ vex.256.0f.w0 77] AVX,SANDYBRIDGE
-VZEROUPPER void [ vex.128.0f.w0 77] AVX,SANDYBRIDGE
-
-;# Intel Carry-Less Multiplication instructions (CLMUL)
-PCLMULLQLQDQ xmmreg,xmmrm128 [rm: 66 0f 3a 44 /r 00] SSE,WESTMERE
-PCLMULHQLQDQ xmmreg,xmmrm128 [rm: 66 0f 3a 44 /r 01] SSE,WESTMERE
-PCLMULLQHQDQ xmmreg,xmmrm128 [rm: 66 0f 3a 44 /r 10] SSE,WESTMERE
-PCLMULHQHQDQ xmmreg,xmmrm128 [rm: 66 0f 3a 44 /r 11] SSE,WESTMERE
-PCLMULQDQ xmmreg,xmmrm128,imm8 [rmi: 66 0f 3a 44 /r ib] SSE,WESTMERE
-
-;# Intel AVX Carry-Less Multiplication instructions (CLMUL)
-VPCLMULLQLQDQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f3a 44 /r 00] AVX,SANDYBRIDGE
-VPCLMULHQLQDQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f3a 44 /r 01] AVX,SANDYBRIDGE
-VPCLMULLQHQDQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f3a 44 /r 10] AVX,SANDYBRIDGE
-VPCLMULHQHQDQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f3a 44 /r 11] AVX,SANDYBRIDGE
-VPCLMULQDQ xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: vex.nds.128.66.0f3a 44 /r ib] AVX,SANDYBRIDGE
-
-;# Intel Fused Multiply-Add instructions (FMA)
-VFMADD132PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 98 /r] FMA,FUTURE
-VFMADD132PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 98 /r] FMA,FUTURE
-VFMADD132PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 98 /r] FMA,FUTURE
-VFMADD132PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 98 /r] FMA,FUTURE
-VFMADD312PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 98 /r] FMA,FUTURE
-VFMADD312PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 98 /r] FMA,FUTURE
-VFMADD312PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 98 /r] FMA,FUTURE
-VFMADD312PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 98 /r] FMA,FUTURE
-VFMADD213PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 a8 /r] FMA,FUTURE
-VFMADD213PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 a8 /r] FMA,FUTURE
-VFMADD213PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 a8 /r] FMA,FUTURE
-VFMADD213PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 a8 /r] FMA,FUTURE
-VFMADD123PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 a8 /r] FMA,FUTURE
-VFMADD123PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 a8 /r] FMA,FUTURE
-VFMADD123PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 a8 /r] FMA,FUTURE
-VFMADD123PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 a8 /r] FMA,FUTURE
-VFMADD231PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 b8 /r] FMA,FUTURE
-VFMADD231PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 b8 /r] FMA,FUTURE
-VFMADD231PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 b8 /r] FMA,FUTURE
-VFMADD231PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 b8 /r] FMA,FUTURE
-VFMADD321PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 b8 /r] FMA,FUTURE
-VFMADD321PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 b8 /r] FMA,FUTURE
-VFMADD321PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 b8 /r] FMA,FUTURE
-VFMADD321PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 b8 /r] FMA,FUTURE
-VFMADDSUB132PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 96 /r] FMA,FUTURE
-VFMADDSUB132PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 96 /r] FMA,FUTURE
-VFMADDSUB132PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 96 /r] FMA,FUTURE
-VFMADDSUB132PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 96 /r] FMA,FUTURE
-VFMADDSUB312PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 96 /r] FMA,FUTURE
-VFMADDSUB312PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 96 /r] FMA,FUTURE
-VFMADDSUB312PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 96 /r] FMA,FUTURE
-VFMADDSUB312PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 96 /r] FMA,FUTURE
-VFMADDSUB213PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 a6 /r] FMA,FUTURE
-VFMADDSUB213PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 a6 /r] FMA,FUTURE
-VFMADDSUB213PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 a6 /r] FMA,FUTURE
-VFMADDSUB213PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 a6 /r] FMA,FUTURE
-VFMADDSUB123PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 a6 /r] FMA,FUTURE
-VFMADDSUB123PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 a6 /r] FMA,FUTURE
-VFMADDSUB123PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 a6 /r] FMA,FUTURE
-VFMADDSUB123PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 a6 /r] FMA,FUTURE
-VFMADDSUB231PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 b6 /r] FMA,FUTURE
-VFMADDSUB231PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 b6 /r] FMA,FUTURE
-VFMADDSUB231PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 b6 /r] FMA,FUTURE
-VFMADDSUB231PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 b6 /r] FMA,FUTURE
-VFMADDSUB321PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 b6 /r] FMA,FUTURE
-VFMADDSUB321PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 b6 /r] FMA,FUTURE
-VFMADDSUB321PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 b6 /r] FMA,FUTURE
-VFMADDSUB321PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 b6 /r] FMA,FUTURE
-VFMSUB132PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 9a /r] FMA,FUTURE
-VFMSUB132PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 9a /r] FMA,FUTURE
-VFMSUB132PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 9a /r] FMA,FUTURE
-VFMSUB132PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 9a /r] FMA,FUTURE
-VFMSUB312PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 9a /r] FMA,FUTURE
-VFMSUB312PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 9a /r] FMA,FUTURE
-VFMSUB312PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 9a /r] FMA,FUTURE
-VFMSUB312PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 9a /r] FMA,FUTURE
-VFMSUB213PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 aa /r] FMA,FUTURE
-VFMSUB213PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 aa /r] FMA,FUTURE
-VFMSUB213PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 aa /r] FMA,FUTURE
-VFMSUB213PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 aa /r] FMA,FUTURE
-VFMSUB123PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 aa /r] FMA,FUTURE
-VFMSUB123PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 aa /r] FMA,FUTURE
-VFMSUB123PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 aa /r] FMA,FUTURE
-VFMSUB123PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 aa /r] FMA,FUTURE
-VFMSUB231PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 ba /r] FMA,FUTURE
-VFMSUB231PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 ba /r] FMA,FUTURE
-VFMSUB231PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 ba /r] FMA,FUTURE
-VFMSUB231PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 ba /r] FMA,FUTURE
-VFMSUB321PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 ba /r] FMA,FUTURE
-VFMSUB321PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 ba /r] FMA,FUTURE
-VFMSUB321PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 ba /r] FMA,FUTURE
-VFMSUB321PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 ba /r] FMA,FUTURE
-VFMSUBADD132PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 97 /r] FMA,FUTURE
-VFMSUBADD132PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 97 /r] FMA,FUTURE
-VFMSUBADD132PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 97 /r] FMA,FUTURE
-VFMSUBADD132PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 97 /r] FMA,FUTURE
-VFMSUBADD312PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 97 /r] FMA,FUTURE
-VFMSUBADD312PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 97 /r] FMA,FUTURE
-VFMSUBADD312PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 97 /r] FMA,FUTURE
-VFMSUBADD312PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 97 /r] FMA,FUTURE
-VFMSUBADD213PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 a7 /r] FMA,FUTURE
-VFMSUBADD213PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 a7 /r] FMA,FUTURE
-VFMSUBADD213PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 a7 /r] FMA,FUTURE
-VFMSUBADD213PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 a7 /r] FMA,FUTURE
-VFMSUBADD123PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 a7 /r] FMA,FUTURE
-VFMSUBADD123PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 a7 /r] FMA,FUTURE
-VFMSUBADD123PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 a7 /r] FMA,FUTURE
-VFMSUBADD123PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 a7 /r] FMA,FUTURE
-VFMSUBADD231PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 b7 /r] FMA,FUTURE
-VFMSUBADD231PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 b7 /r] FMA,FUTURE
-VFMSUBADD231PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 b7 /r] FMA,FUTURE
-VFMSUBADD231PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 b7 /r] FMA,FUTURE
-VFMSUBADD321PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 b7 /r] FMA,FUTURE
-VFMSUBADD321PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 b7 /r] FMA,FUTURE
-VFMSUBADD321PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 b7 /r] FMA,FUTURE
-VFMSUBADD321PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 b7 /r] FMA,FUTURE
-VFNMADD132PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 9c /r] FMA,FUTURE
-VFNMADD132PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 9c /r] FMA,FUTURE
-VFNMADD132PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 9c /r] FMA,FUTURE
-VFNMADD132PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 9c /r] FMA,FUTURE
-VFNMADD312PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 9c /r] FMA,FUTURE
-VFNMADD312PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 9c /r] FMA,FUTURE
-VFNMADD312PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 9c /r] FMA,FUTURE
-VFNMADD312PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 9c /r] FMA,FUTURE
-VFNMADD213PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 ac /r] FMA,FUTURE
-VFNMADD213PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 ac /r] FMA,FUTURE
-VFNMADD213PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 ac /r] FMA,FUTURE
-VFNMADD213PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 ac /r] FMA,FUTURE
-VFNMADD123PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 ac /r] FMA,FUTURE
-VFNMADD123PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 ac /r] FMA,FUTURE
-VFNMADD123PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 ac /r] FMA,FUTURE
-VFNMADD123PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 ac /r] FMA,FUTURE
-VFNMADD231PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 bc /r] FMA,FUTURE
-VFNMADD231PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 bc /r] FMA,FUTURE
-VFNMADD231PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 bc /r] FMA,FUTURE
-VFNMADD231PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 bc /r] FMA,FUTURE
-VFNMADD321PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 bc /r] FMA,FUTURE
-VFNMADD321PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 bc /r] FMA,FUTURE
-VFNMADD321PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 bc /r] FMA,FUTURE
-VFNMADD321PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 bc /r] FMA,FUTURE
-VFNMSUB132PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 9e /r] FMA,FUTURE
-VFNMSUB132PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 9e /r] FMA,FUTURE
-VFNMSUB132PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 9e /r] FMA,FUTURE
-VFNMSUB132PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 9e /r] FMA,FUTURE
-VFNMSUB312PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 9e /r] FMA,FUTURE
-VFNMSUB312PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 9e /r] FMA,FUTURE
-VFNMSUB312PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 9e /r] FMA,FUTURE
-VFNMSUB312PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 9e /r] FMA,FUTURE
-VFNMSUB213PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 ae /r] FMA,FUTURE
-VFNMSUB213PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 ae /r] FMA,FUTURE
-VFNMSUB213PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 ae /r] FMA,FUTURE
-VFNMSUB213PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 ae /r] FMA,FUTURE
-VFNMSUB123PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 ae /r] FMA,FUTURE
-VFNMSUB123PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 ae /r] FMA,FUTURE
-VFNMSUB123PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 ae /r] FMA,FUTURE
-VFNMSUB123PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 ae /r] FMA,FUTURE
-VFNMSUB231PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 be /r] FMA,FUTURE
-VFNMSUB231PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 be /r] FMA,FUTURE
-VFNMSUB231PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 be /r] FMA,FUTURE
-VFNMSUB231PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 be /r] FMA,FUTURE
-VFNMSUB321PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 be /r] FMA,FUTURE
-VFNMSUB321PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 be /r] FMA,FUTURE
-VFNMSUB321PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 be /r] FMA,FUTURE
-VFNMSUB321PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 be /r] FMA,FUTURE
-VFMADD132SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 99 /r] FMA,FUTURE
-VFMADD132SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 99 /r] FMA,FUTURE
-VFMADD312SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 99 /r] FMA,FUTURE
-VFMADD312SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 99 /r] FMA,FUTURE
-VFMADD213SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 a9 /r] FMA,FUTURE
-VFMADD213SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 a9 /r] FMA,FUTURE
-VFMADD123SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 a9 /r] FMA,FUTURE
-VFMADD123SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 a9 /r] FMA,FUTURE
-VFMADD231SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 b9 /r] FMA,FUTURE
-VFMADD231SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 b9 /r] FMA,FUTURE
-VFMADD321SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 b9 /r] FMA,FUTURE
-VFMADD321SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 b9 /r] FMA,FUTURE
-VFMSUB132SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 9b /r] FMA,FUTURE
-VFMSUB132SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 9b /r] FMA,FUTURE
-VFMSUB312SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 9b /r] FMA,FUTURE
-VFMSUB312SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 9b /r] FMA,FUTURE
-VFMSUB213SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 ab /r] FMA,FUTURE
-VFMSUB213SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 ab /r] FMA,FUTURE
-VFMSUB123SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 ab /r] FMA,FUTURE
-VFMSUB123SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 ab /r] FMA,FUTURE
-VFMSUB231SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 bb /r] FMA,FUTURE
-VFMSUB231SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 bb /r] FMA,FUTURE
-VFMSUB321SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 bb /r] FMA,FUTURE
-VFMSUB321SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 bb /r] FMA,FUTURE
-VFNMADD132SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 9d /r] FMA,FUTURE
-VFNMADD132SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 9d /r] FMA,FUTURE
-VFNMADD312SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 9d /r] FMA,FUTURE
-VFNMADD312SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 9d /r] FMA,FUTURE
-VFNMADD213SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 ad /r] FMA,FUTURE
-VFNMADD213SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 ad /r] FMA,FUTURE
-VFNMADD123SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 ad /r] FMA,FUTURE
-VFNMADD123SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 ad /r] FMA,FUTURE
-VFNMADD231SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 bd /r] FMA,FUTURE
-VFNMADD231SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 bd /r] FMA,FUTURE
-VFNMADD321SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 bd /r] FMA,FUTURE
-VFNMADD321SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 bd /r] FMA,FUTURE
-VFNMSUB132SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 9f /r] FMA,FUTURE
-VFNMSUB132SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 9f /r] FMA,FUTURE
-VFNMSUB312SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 9f /r] FMA,FUTURE
-VFNMSUB312SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 9f /r] FMA,FUTURE
-VFNMSUB213SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 af /r] FMA,FUTURE
-VFNMSUB213SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 af /r] FMA,FUTURE
-VFNMSUB123SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 af /r] FMA,FUTURE
-VFNMSUB123SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 af /r] FMA,FUTURE
-VFNMSUB231SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 bf /r] FMA,FUTURE
-VFNMSUB231SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 bf /r] FMA,FUTURE
-VFNMSUB321SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 bf /r] FMA,FUTURE
-VFNMSUB321SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 bf /r] FMA,FUTURE
-
-;# Intel post-32 nm processor instructions
-;
-; Per AVX spec revision 7, document 319433-007
-RDFSBASE reg32 [m: norexw f3 0f ae /0] LONG,FUTURE
-RDFSBASE reg64 [m: o64 f3 0f ae /0] LONG,FUTURE
-RDGSBASE reg32 [m: norexw f3 0f ae /1] LONG,FUTURE
-RDGSBASE reg64 [m: o64 f3 0f ae /1] LONG,FUTURE
-RDRAND reg16 [m: o16 0f c7 /6] FUTURE
-RDRAND reg32 [m: o32 0f c7 /6] FUTURE
-RDRAND reg64 [m: o64 0f c7 /6] LONG,FUTURE
-WRFSBASE reg32 [m: norexw f3 0f ae /2] LONG,FUTURE
-WRFSBASE reg64 [m: o64 f3 0f ae /2] LONG,FUTURE
-WRGSBASE reg32 [m: norexw f3 0f ae /3] LONG,FUTURE
-WRGSBASE reg64 [m: o64 f3 0f ae /3] LONG,FUTURE
-VCVTPH2PS ymmreg,xmmrm128 [rm: vex.256.66.0f38.w0 13 /r] AVX,FUTURE
-VCVTPH2PS xmmreg,xmmrm64 [rm: vex.128.66.0f38.w0 13 /r] AVX,FUTURE
-VCVTPS2PH xmmrm128,ymmreg,imm8 [mri: vex.256.66.0f3a.w0 1d /r ib] AVX,FUTURE
-VCVTPS2PH xmmrm64,xmmreg,imm8 [mri: vex.128.66.0f3a.w0 1d /r ib] AVX,FUTURE
-
-; Per AVX spec revision 13, document 319433-013
-ADCX reg32,rm32 [rm: norexw 66 0f 38 f6 /r] FUTURE
-ADCX reg64,rm64 [rm: o64 66 0f 38 f6 /r] LONG,FUTURE
-ADOX reg32,rm32 [rm: norexw f3 0f 38 f6 /r] FUTURE
-ADOX reg64,rm64 [rm: o64 f3 0f 38 f6 /r] LONG,FUTURE
-RDSEED reg16 [m: o16 0f c7 /7] FUTURE
-RDSEED reg32 [m: o32 0f c7 /7] FUTURE
-RDSEED reg64 [m: o64 0f c7 /7] LONG,FUTURE
-
-; Per AVX spec revision 14, document 319433-014
-CLAC void [ 0f 01 ca] PRIV,FUTURE
-STAC void [ 0f 01 cb] PRIV,FUTURE
-
-;# VIA (Centaur) security instructions
-XSTORE void [ 0f a7 c0] PENT,CYRIX
-XCRYPTECB void [ mustrep 0f a7 c8] PENT,CYRIX
-XCRYPTCBC void [ mustrep 0f a7 d0] PENT,CYRIX
-XCRYPTCTR void [ mustrep 0f a7 d8] PENT,CYRIX
-XCRYPTCFB void [ mustrep 0f a7 e0] PENT,CYRIX
-XCRYPTOFB void [ mustrep 0f a7 e8] PENT,CYRIX
-MONTMUL void [ mustrep 0f a6 c0] PENT,CYRIX
-XSHA1 void [ mustrep 0f a6 c8] PENT,CYRIX
-XSHA256 void [ mustrep 0f a6 d0] PENT,CYRIX
-
-;# AMD Lightweight Profiling (LWP) instructions
-;
-; based on pub number 43724 revision 3.04 date August 2009
-;
-; updated to match draft from AMD developer (patch has been
-; sent to binutils
-; 2010-03-22 Quentin Neill <[email protected]>
-; Sebastian Pop <[email protected]>
-;
-LLWPCB reg32 [m: xop.m9.w0.l0.p0 12 /0] AMD,386
-LLWPCB reg64 [m: xop.m9.w1.l0.p0 12 /0] AMD,X64
-
-SLWPCB reg32 [m: xop.m9.w0.l0.p0 12 /1] AMD,386
-SLWPCB reg64 [m: xop.m9.w1.l0.p0 12 /1] AMD,X64
-
-LWPVAL reg32,rm32,imm32 [vmi: xop.m10.w0.ndd.l0.p0 12 /1 id] AMD,386
-LWPVAL reg64,rm32,imm32 [vmi: xop.m10.w1.ndd.l0.p0 12 /1 id] AMD,X64
-
-LWPINS reg32,rm32,imm32 [vmi: xop.m10.w0.ndd.l0.p0 12 /0 id] AMD,386
-LWPINS reg64,rm32,imm32 [vmi: xop.m10.w1.ndd.l0.p0 12 /0 id] AMD,X64
-
-;# AMD XOP and FMA4 instructions (SSE5)
-;
-; based on pub number 43479 revision 3.04 dated November 2009
-;
-VFMADDPD xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.m3.w0.nds.l0.p1 69 /r /is4] AMD,SSE5
-VFMADDPD ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.m3.w0.nds.l1.p1 69 /r /is4] AMD,SSE5
-VFMADDPD xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: vex.m3.w1.nds.l0.p1 69 /r /is4] AMD,SSE5
-VFMADDPD ymmreg,ymmreg*,ymmreg,ymmrm256 [rvsm: vex.m3.w1.nds.l1.p1 69 /r /is4] AMD,SSE5
-
-VFMADDPS xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.m3.w0.nds.l0.p1 68 /r /is4] AMD,SSE5
-VFMADDPS ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.m3.w0.nds.l1.p1 68 /r /is4] AMD,SSE5
-VFMADDPS xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: vex.m3.w1.nds.l0.p1 68 /r /is4] AMD,SSE5
-VFMADDPS ymmreg,ymmreg*,ymmreg,ymmrm256 [rvsm: vex.m3.w1.nds.l1.p1 68 /r /is4] AMD,SSE5
-
-VFMADDSD xmmreg,xmmreg*,xmmrm64,xmmreg [rvms: vex.m3.w0.nds.l0.p1 6b /r /is4] AMD,SSE5
-VFMADDSD xmmreg,xmmreg*,xmmreg,xmmrm64 [rvsm: vex.m3.w1.nds.l0.p1 6b /r /is4] AMD,SSE5
-
-VFMADDSS xmmreg,xmmreg*,xmmrm32,xmmreg [rvms: vex.m3.w0.nds.l0.p1 6a /r /is4] AMD,SSE5
-VFMADDSS xmmreg,xmmreg*,xmmreg,xmmrm32 [rvsm: vex.m3.w1.nds.l0.p1 6a /r /is4] AMD,SSE5
-
-VFMADDSUBPD xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.m3.w0.nds.l0.p1 5d /r /is4] AMD,SSE5
-VFMADDSUBPD ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.m3.w0.nds.l1.p1 5d /r /is4] AMD,SSE5
-VFMADDSUBPD xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: vex.m3.w1.nds.l0.p1 5d /r /is4] AMD,SSE5
-VFMADDSUBPD ymmreg,ymmreg*,ymmreg,ymmrm256 [rvsm: vex.m3.w1.nds.l1.p1 5d /r /is4] AMD,SSE5
-
-VFMADDSUBPS xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.m3.w0.nds.l0.p1 5c /r /is4] AMD,SSE5
-VFMADDSUBPS ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.m3.w0.nds.l1.p1 5c /r /is4] AMD,SSE5
-VFMADDSUBPS xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: vex.m3.w1.nds.l0.p1 5c /r /is4] AMD,SSE5
-VFMADDSUBPS ymmreg,ymmreg*,ymmreg,ymmrm256 [rvsm: vex.m3.w1.nds.l1.p1 5c /r /is4] AMD,SSE5
-
-VFMSUBADDPD xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.m3.w0.nds.l0.p1 5f /r /is4] AMD,SSE5
-VFMSUBADDPD ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.m3.w0.nds.l1.p1 5f /r /is4] AMD,SSE5
-VFMSUBADDPD xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: vex.m3.w1.nds.l0.p1 5f /r /is4] AMD,SSE5
-VFMSUBADDPD ymmreg,ymmreg*,ymmreg,ymmrm256 [rvsm: vex.m3.w1.nds.l1.p1 5f /r /is4] AMD,SSE5
-
-VFMSUBADDPS xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.m3.w0.nds.l0.p1 5e /r /is4] AMD,SSE5
-VFMSUBADDPS ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.m3.w0.nds.l1.p1 5e /r /is4] AMD,SSE5
-VFMSUBADDPS xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: vex.m3.w1.nds.l0.p1 5e /r /is4] AMD,SSE5
-VFMSUBADDPS ymmreg,ymmreg*,ymmreg,ymmrm256 [rvsm: vex.m3.w1.nds.l1.p1 5e /r /is4] AMD,SSE5
-
-VFMSUBPD xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.m3.w0.nds.l0.p1 6d /r /is4] AMD,SSE5
-VFMSUBPD ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.m3.w0.nds.l1.p1 6d /r /is4] AMD,SSE5
-VFMSUBPD xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: vex.m3.w1.nds.l0.p1 6d /r /is4] AMD,SSE5
-VFMSUBPD ymmreg,ymmreg*,ymmreg,ymmrm256 [rvsm: vex.m3.w1.nds.l1.p1 6d /r /is4] AMD,SSE5
-
-VFMSUBPS xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.m3.w0.nds.l0.p1 6c /r /is4] AMD,SSE5
-VFMSUBPS ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.m3.w0.nds.l1.p1 6c /r /is4] AMD,SSE5
-VFMSUBPS xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: vex.m3.w1.nds.l0.p1 6c /r /is4] AMD,SSE5
-VFMSUBPS ymmreg,ymmreg*,ymmreg,ymmrm256 [rvsm: vex.m3.w1.nds.l1.p1 6c /r /is4] AMD,SSE5
-
-VFMSUBSD xmmreg,xmmreg*,xmmrm64,xmmreg [rvms: vex.m3.w0.nds.l0.p1 6f /r /is4] AMD,SSE5
-VFMSUBSD xmmreg,xmmreg*,xmmreg,xmmrm64 [rvsm: vex.m3.w1.nds.l0.p1 6f /r /is4] AMD,SSE5
-
-VFMSUBSS xmmreg,xmmreg*,xmmrm32,xmmreg [rvms: vex.m3.w0.nds.l0.p1 6e /r /is4] AMD,SSE5
-VFMSUBSS xmmreg,xmmreg*,xmmreg,xmmrm32 [rvsm: vex.m3.w1.nds.l0.p1 6e /r /is4] AMD,SSE5
-
-VFNMADDPD xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.m3.w0.nds.l0.p1 79 /r /is4] AMD,SSE5
-VFNMADDPD ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.m3.w0.nds.l1.p1 79 /r /is4] AMD,SSE5
-VFNMADDPD xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: vex.m3.w1.nds.l0.p1 79 /r /is4] AMD,SSE5
-VFNMADDPD ymmreg,ymmreg*,ymmreg,ymmrm256 [rvsm: vex.m3.w1.nds.l1.p1 79 /r /is4] AMD,SSE5
-
-VFNMADDPS xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.m3.w0.nds.l0.p1 78 /r /is4] AMD,SSE5
-VFNMADDPS ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.m3.w0.nds.l1.p1 78 /r /is4] AMD,SSE5
-VFNMADDPS xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: vex.m3.w1.nds.l0.p1 78 /r /is4] AMD,SSE5
-VFNMADDPS ymmreg,ymmreg*,ymmreg,ymmrm256 [rvsm: vex.m3.w1.nds.l1.p1 78 /r /is4] AMD,SSE5
-
-VFNMADDSD xmmreg,xmmreg*,xmmrm64,xmmreg [rvms: vex.m3.w0.nds.l0.p1 7b /r /is4] AMD,SSE5
-VFNMADDSD xmmreg,xmmreg*,xmmreg,xmmrm64 [rvsm: vex.m3.w1.nds.l0.p1 7b /r /is4] AMD,SSE5
-
-VFNMADDSS xmmreg,xmmreg*,xmmrm32,xmmreg [rvms: vex.m3.w0.nds.l0.p1 7a /r /is4] AMD,SSE5
-VFNMADDSS xmmreg,xmmreg*,xmmreg,xmmrm32 [rvsm: vex.m3.w1.nds.l0.p1 7a /r /is4] AMD,SSE5
-
-VFNMSUBPD xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.m3.w0.nds.l0.p1 7d /r /is4] AMD,SSE5
-VFNMSUBPD ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.m3.w0.nds.l1.p1 7d /r /is4] AMD,SSE5
-VFNMSUBPD xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: vex.m3.w1.nds.l0.p1 7d /r /is4] AMD,SSE5
-VFNMSUBPD ymmreg,ymmreg*,ymmreg,ymmrm256 [rvsm: vex.m3.w1.nds.l1.p1 7d /r /is4] AMD,SSE5
-
-VFNMSUBPS xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.m3.w0.nds.l0.p1 7c /r /is4] AMD,SSE5
-VFNMSUBPS ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.m3.w0.nds.l1.p1 7c /r /is4] AMD,SSE5
-VFNMSUBPS xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: vex.m3.w1.nds.l0.p1 7c /r /is4] AMD,SSE5
-VFNMSUBPS ymmreg,ymmreg*,ymmreg,ymmrm256 [rvsm: vex.m3.w1.nds.l1.p1 7c /r /is4] AMD,SSE5
-
-VFNMSUBSD xmmreg,xmmreg*,xmmrm64,xmmreg [rvms: vex.m3.w0.nds.l0.p1 7f /r /is4] AMD,SSE5
-VFNMSUBSD xmmreg,xmmreg*,xmmreg,xmmrm64 [rvsm: vex.m3.w1.nds.l0.p1 7f /r /is4] AMD,SSE5
-
-VFNMSUBSS xmmreg,xmmreg*,xmmrm32,xmmreg [rvms: vex.m3.w0.nds.l0.p1 7e /r /is4] AMD,SSE5
-VFNMSUBSS xmmreg,xmmreg*,xmmreg,xmmrm32 [rvsm: vex.m3.w1.nds.l0.p1 7e /r /is4] AMD,SSE5
-
-VFRCZPD xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 81 /r] AMD,SSE5
-VFRCZPD ymmreg,ymmrm256* [rm: xop.m9.w0.l1.p0 81 /r] AMD,SSE5
-
-VFRCZPS xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 80 /r] AMD,SSE5
-VFRCZPS ymmreg,ymmrm256* [rm: xop.m9.w0.l1.p0 80 /r] AMD,SSE5
-
-VFRCZSD xmmreg,xmmrm64* [rm: xop.m9.w0.l0.p0 83 /r] AMD,SSE5
-
-VFRCZSS xmmreg,xmmrm32* [rm: xop.m9.w0.l0.p0 82 /r] AMD,SSE5
-;
-; fixed: spec mention imm[7:4] though it should be /is4 even in spec
-VPCMOV xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 a2 /r /is4] AMD,SSE5
-VPCMOV ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: xop.m8.w0.nds.l1.p0 a2 /r /is4] AMD,SSE5
-VPCMOV xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: xop.m8.w1.nds.l0.p0 a2 /r /is4] AMD,SSE5
-VPCMOV ymmreg,ymmreg*,ymmreg,ymmrm256 [rvsm: xop.m8.w1.nds.l1.p0 a2 /r /is4] AMD,SSE5
-
-VPCOMB xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: xop.m8.w0.nds.l0.p0 cc /r ib] AMD,SSE5
-VPCOMD xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: xop.m8.w0.nds.l0.p0 ce /r ib] AMD,SSE5
-VPCOMQ xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: xop.m8.w0.nds.l0.p0 cf /r ib] AMD,SSE5
-;
-; fixed: spec mention only 3 operands in mnemonics
-VPCOMUB xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: xop.m8.w0.nds.l0.p0 ec /r ib] AMD,SSE5
-VPCOMUD xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: xop.m8.w0.nds.l0.p0 ee /r ib] AMD,SSE5
-VPCOMUQ xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: xop.m8.w0.nds.l0.p0 ef /r ib] AMD,SSE5
-;
-; fixed: spec point wrong VPCOMB in mnemonic
-VPCOMUW xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: xop.m8.w0.nds.l0.p0 ed /r ib] AMD,SSE5
-VPCOMW xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: xop.m8.w0.nds.l0.p0 cd /r ib] AMD,SSE5
-
-VPHADDBD xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 c2 /r] AMD,SSE5
-VPHADDBQ xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 c3 /r] AMD,SSE5
-VPHADDBW xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 c1 /r] AMD,SSE5
-VPHADDDQ xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 cb /r] AMD,SSE5
-;
-; fixed: spec has ymmreg for l0
-VPHADDUBD xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 d2 /r] AMD,SSE5
-VPHADDUBQ xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 d3 /r] AMD,SSE5
-;
-; fixed: spec has VPHADDUBWD
-VPHADDUBW xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 d1 /r] AMD,SSE5
-;
-; fixed: opcode db
-VPHADDUDQ xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 db /r] AMD,SSE5
-VPHADDUWD xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 d6 /r] AMD,SSE5
-VPHADDUWQ xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 d7 /r] AMD,SSE5
-;
-; fixed: spec has ymmreg for l0
-VPHADDWD xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 c6 /r] AMD,SSE5
-;
-; fixed: spec has d7 opcode
-VPHADDWQ xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 c7 /r] AMD,SSE5
-
-VPHSUBBW xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 e1 /r] AMD,SSE5
-VPHSUBDQ xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 e3 /r] AMD,SSE5
-VPHSUBWD xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 e2 /r] AMD,SSE5
-
-VPMACSDD xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 9e /r /is4] AMD,SSE5
-;
-; fixed: spec has 97,9f opcodes here
-VPMACSDQH xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 9f /r /is4] AMD,SSE5
-VPMACSDQL xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 97 /r /is4] AMD,SSE5
-VPMACSSDD xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 8e /r /is4] AMD,SSE5
-VPMACSSDQH xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 8f /r /is4] AMD,SSE5
-VPMACSSDQL xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 87 /r /is4] AMD,SSE5
-VPMACSSWD xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 86 /r /is4] AMD,SSE5
-VPMACSSWW xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 85 /r /is4] AMD,SSE5
-VPMACSWD xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 96 /r /is4] AMD,SSE5
-VPMACSWW xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 95 /r /is4] AMD,SSE5
-VPMADCSSWD xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 a6 /r /is4] AMD,SSE5
-VPMADCSWD xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 b6 /r /is4] AMD,SSE5
-
-VPPERM xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: xop.m8.w1.nds.l0.p0 a3 /r /is4] AMD,SSE5
-VPPERM xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 a3 /r /is4] AMD,SSE5
-
-VPROTB xmmreg,xmmrm128*,xmmreg [rmv: xop.m9.w0.nds.l0.p0 90 /r] AMD,SSE5
-VPROTB xmmreg,xmmreg*,xmmrm128 [rvm: xop.m9.w1.nds.l0.p0 90 /r] AMD,SSE5
-;
-; fixed: spec point xmmreg instead of reg/mem
-VPROTB xmmreg,xmmrm128*,imm8 [rmi: xop.m8.w0.l0.p0 c0 /r ib] AMD,SSE5
-
-VPROTD xmmreg,xmmrm128*,xmmreg [rmv: xop.m9.w0.nds.l0.p0 92 /r] AMD,SSE5
-VPROTD xmmreg,xmmreg*,xmmrm128 [rvm: xop.m9.w1.nds.l0.p0 92 /r] AMD,SSE5
-;
-; fixed: spec error /r is needed
-VPROTD xmmreg,xmmrm128*,imm8 [rmi: xop.m8.w0.l0.p0 c2 /r ib] AMD,SSE5
-VPROTQ xmmreg,xmmrm128*,xmmreg [rmv: xop.m9.w0.nds.l0.p0 93 /r] AMD,SSE5
-VPROTQ xmmreg,xmmreg*,xmmrm128 [rvm: xop.m9.w1.nds.l0.p0 93 /r] AMD,SSE5
-;
-; fixed: spec error /r is needed
-VPROTQ xmmreg,xmmrm128*,imm8 [rmi: xop.m8.w0.l0.p0 c3 /r ib] AMD,SSE5
-VPROTW xmmreg,xmmrm128*,xmmreg [rmv: xop.m9.w0.nds.l0.p0 91 /r] AMD,SSE5
-VPROTW xmmreg,xmmreg*,xmmrm128 [rvm: xop.m9.w1.nds.l0.p0 91 /r] AMD,SSE5
-VPROTW xmmreg,xmmrm128*,imm8 [rmi: xop.m8.w0.l0.p0 c1 /r ib] AMD,SSE5
-
-VPSHAB xmmreg,xmmrm128*,xmmreg [rmv: xop.m9.w0.nds.l0.p0 98 /r] AMD,SSE5
-VPSHAB xmmreg,xmmreg*,xmmrm128 [rvm: xop.m9.w1.nds.l0.p0 98 /r] AMD,SSE5
-
-VPSHAD xmmreg,xmmrm128*,xmmreg [rmv: xop.m9.w0.nds.l0.p0 9a /r] AMD,SSE5
-VPSHAD xmmreg,xmmreg*,xmmrm128 [rvm: xop.m9.w1.nds.l0.p0 9a /r] AMD,SSE5
-
-VPSHAQ xmmreg,xmmrm128*,xmmreg [rmv: xop.m9.w0.nds.l0.p0 9b /r] AMD,SSE5
-VPSHAQ xmmreg,xmmreg*,xmmrm128 [rvm: xop.m9.w1.nds.l0.p0 9b /r] AMD,SSE5
-
-VPSHAW xmmreg,xmmrm128*,xmmreg [rmv: xop.m9.w0.nds.l0.p0 99 /r] AMD,SSE5
-VPSHAW xmmreg,xmmreg*,xmmrm128 [rvm: xop.m9.w1.nds.l0.p0 99 /r] AMD,SSE5
-
-VPSHLB xmmreg,xmmrm128*,xmmreg [rmv: xop.m9.w0.nds.l0.p0 94 /r] AMD,SSE5
-VPSHLB xmmreg,xmmreg*,xmmrm128 [rvm: xop.m9.w1.nds.l0.p0 94 /r] AMD,SSE5
-
-;
-; fixed: spec has ymmreg for l0
-VPSHLD xmmreg,xmmrm128*,xmmreg [rmv: xop.m9.w0.nds.l0.p0 96 /r] AMD,SSE5
-VPSHLD xmmreg,xmmreg*,xmmrm128 [rvm: xop.m9.w1.nds.l0.p0 96 /r] AMD,SSE5
-
-VPSHLQ xmmreg,xmmrm128*,xmmreg [rmv: xop.m9.w0.nds.l0.p0 97 /r] AMD,SSE5
-VPSHLQ xmmreg,xmmreg*,xmmrm128 [rvm: xop.m9.w1.nds.l0.p0 97 /r] AMD,SSE5
-
-VPSHLW xmmreg,xmmrm128*,xmmreg [rmv: xop.m9.w0.nds.l0.p0 95 /r] AMD,SSE5
-VPSHLW xmmreg,xmmreg*,xmmrm128 [rvm: xop.m9.w1.nds.l0.p0 95 /r] AMD,SSE5
-
-;# Intel AVX2 instructions
-;
-; based on pub number 319433-011 dated July 2011
-;
-VMPSADBW ymmreg,ymmreg*,ymmrm256,imm8 [rvmi: vex.nds.256.66.0f3a 42 /r ib] FUTURE,AVX2
-VPABSB ymmreg,ymmrm256 [rm: vex.256.66.0f38 1c /r] FUTURE,AVX2
-VPABSW ymmreg,ymmrm256 [rm: vex.256.66.0f38 1d /r] FUTURE,AVX2
-VPABSD ymmreg,ymmrm256 [rm: vex.256.66.0f38 1e /r] FUTURE,AVX2
-VPACKSSWB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 63 /r] FUTURE,AVX2
-VPACKSSDW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 6b /r] FUTURE,AVX2
-VPACKUSDW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 2b /r] FUTURE,AVX2
-VPACKUSWB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 67 /r] FUTURE,AVX2
-VPADDB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f fc /r] FUTURE,AVX2
-VPADDW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f fd /r] FUTURE,AVX2
-VPADDD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f fe /r] FUTURE,AVX2
-VPADDQ ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f d4 /r] FUTURE,AVX2
-VPADDSB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f ec /r] FUTURE,AVX2
-VPADDSW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f ed /r] FUTURE,AVX2
-VPADDUSB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f dc /r] FUTURE,AVX2
-VPADDUSW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f dd /r] FUTURE,AVX2
-VPALIGNR ymmreg,ymmreg*,ymmrm256,imm8 [rvmi: vex.nds.256.66.0f3a 0f /r ib] FUTURE,AVX2
-VPAND ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f db /r] FUTURE,AVX2
-VPANDN ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f df /r] FUTURE,AVX2
-VPAVGB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f e0 /r] FUTURE,AVX2
-VPAVGW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f e3 /r] FUTURE,AVX2
-VPBLENDVB ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.nds.256.66.0f3a 4c /r /is4] FUTURE,AVX2
-VPBLENDW ymmreg,ymmreg*,ymmrm256,imm8 [rvmi: vex.nds.256.66.0f3a 0e /r ib] FUTURE,AVX2
-VPCMPEQB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 74 /r] FUTURE,AVX2
-VPCMPEQW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 75 /r] FUTURE,AVX2
-VPCMPEQD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 76 /r] FUTURE,AVX2
-VPCMPEQQ ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 29 /r] FUTURE,AVX2
-VPCMPGTB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 64 /r] FUTURE,AVX2
-VPCMPGTW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 65 /r] FUTURE,AVX2
-VPCMPGTD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 66 /r] FUTURE,AVX2
-VPCMPGTQ ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 37 /r] FUTURE,AVX2
-VPHADDW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 01 /r] FUTURE,AVX2
-VPHADDD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 02 /r] FUTURE,AVX2
-VPHADDSW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 03 /r] FUTURE,AVX2
-VPHSUBW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 05 /r] FUTURE,AVX2
-VPHSUBD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 06 /r] FUTURE,AVX2
-VPHSUBSW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 07 /r] FUTURE,AVX2
-VPMADDUBSW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 04 /r] FUTURE,AVX2
-VPMADDWD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f f5 /r] FUTURE,AVX2
-VPMAXSB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 3c /r] FUTURE,AVX2
-VPMAXSW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f ee /r] FUTURE,AVX2
-VPMAXSD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 3d /r] FUTURE,AVX2
-VPMAXUB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f de /r] FUTURE,AVX2
-VPMAXUW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 3e /r] FUTURE,AVX2
-VPMAXUD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 3f /r] FUTURE,AVX2
-VPMINSB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 38 /r] FUTURE,AVX2
-VPMINSW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f ea /r] FUTURE,AVX2
-VPMINSD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 39 /r] FUTURE,AVX2
-VPMINUB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f da /r] FUTURE,AVX2
-VPMINUW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 3a /r] FUTURE,AVX2
-VPMINUD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 3b /r] FUTURE,AVX2
-VPMOVMSKB reg32,ymmreg [rm: vex.256.66.0f d7 /r] FUTURE,AVX2
-VPMOVMSKB reg64,ymmreg [rm: vex.256.66.0f d7 /r] FUTURE,AVX2
-VPMOVSXBW ymmreg,xmmrm128 [rm: vex.256.66.0f38 20 /r] FUTURE,AVX2
-VPMOVSXBD ymmreg,mem64 [rm: vex.256.66.0f38 21 /r] FUTURE,AVX2
-VPMOVSXBD ymmreg,xmmreg [rm: vex.256.66.0f38 21 /r] FUTURE,AVX2
-VPMOVSXBQ ymmreg,mem32 [rm: vex.256.66.0f38 22 /r] FUTURE,AVX2
-VPMOVSXBQ ymmreg,xmmreg [rm: vex.256.66.0f38 22 /r] FUTURE,AVX2
-VPMOVSXWD ymmreg,xmmrm128 [rm: vex.256.66.0f38 23 /r] FUTURE,AVX2
-VPMOVSXWQ ymmreg,mem64 [rm: vex.256.66.0f38 24 /r] FUTURE,AVX2
-VPMOVSXWQ ymmreg,xmmreg [rm: vex.256.66.0f38 24 /r] FUTURE,AVX2
-VPMOVSXDQ ymmreg,xmmrm128 [rm: vex.256.66.0f38 25 /r] FUTURE,AVX2
-VPMOVZXBW ymmreg,xmmrm128 [rm: vex.256.66.0f38 30 /r] FUTURE,AVX2
-VPMOVZXBD ymmreg,mem64 [rm: vex.256.66.0f38 31 /r] FUTURE,AVX2
-VPMOVZXBD ymmreg,xmmreg [rm: vex.256.66.0f38 31 /r] FUTURE,AVX2
-VPMOVZXBQ ymmreg,mem32 [rm: vex.256.66.0f38 32 /r] FUTURE,AVX2
-VPMOVZXBQ ymmreg,xmmreg [rm: vex.256.66.0f38 32 /r] FUTURE,AVX2
-VPMOVZXWD ymmreg,xmmrm128 [rm: vex.256.66.0f38 33 /r] FUTURE,AVX2
-VPMOVZXWQ ymmreg,mem64 [rm: vex.256.66.0f38 34 /r] FUTURE,AVX2
-VPMOVZXWQ ymmreg,xmmreg [rm: vex.256.66.0f38 34 /r] FUTURE,AVX2
-VPMOVZXDQ ymmreg,xmmrm128 [rm: vex.256.66.0f38 35 /r] FUTURE,AVX2
-VPMULDQ ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 28 /r] FUTURE,AVX2
-VPMULHRSW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 0b /r] FUTURE,AVX2
-VPMULHUW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f e4 /r] FUTURE,AVX2
-VPMULHW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f e5 /r] FUTURE,AVX2
-VPMULLW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f d5 /r] FUTURE,AVX2
-VPMULLD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 40 /r] FUTURE,AVX2
-VPMULUDQ ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f f4 /r] FUTURE,AVX2
-VPOR ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f eb /r] FUTURE,AVX2
-VPSADBW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f f6 /r] FUTURE,AVX2
-VPSHUFB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 00 /r] FUTURE,AVX2
-VPSHUFD ymmreg,ymmrm256,imm8 [rmi: vex.256.66.0f 70 /r ib] FUTURE,AVX2
-VPSHUFHW ymmreg,ymmrm256,imm8 [rmi: vex.256.f3.0f 70 /r ib] FUTURE,AVX2
-VPSHUFLW ymmreg,ymmrm256,imm8 [rmi: vex.256.f2.0f 70 /r ib] FUTURE,AVX2
-VPSIGNB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 08 /r] FUTURE,AVX2
-VPSIGNW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 09 /r] FUTURE,AVX2
-VPSIGND ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 0a /r] FUTURE,AVX2
-VPSLLDQ ymmreg,ymmreg*,imm8 [vmi: vex.ndd.256.66.0f 73 /7 ib] FUTURE,AVX2
-VPSLLW ymmreg,ymmreg*,xmmrm128 [rvm: vex.nds.256.66.0f f1 /r] FUTURE,AVX2
-VPSLLW ymmreg,ymmreg*,imm8 [vmi: vex.ndd.256.66.0f 71 /6 ib] FUTURE,AVX2
-VPSLLD ymmreg,ymmreg*,xmmrm128 [rvm: vex.nds.256.66.0f f2 /r] FUTURE,AVX2
-VPSLLD ymmreg,ymmreg*,imm8 [vmi: vex.ndd.256.66.0f 72 /6 ib] FUTURE,AVX2
-VPSLLQ ymmreg,ymmreg*,xmmrm128 [rvm: vex.nds.256.66.0f f3 /r] FUTURE,AVX2
-VPSLLQ ymmreg,ymmreg*,imm8 [vmi: vex.ndd.256.66.0f 73 /6 ib] FUTURE,AVX2
-VPSRAW ymmreg,ymmreg*,xmmrm128 [rvm: vex.nds.256.66.0f e1 /r] FUTURE,AVX2
-VPSRAW ymmreg,ymmreg*,imm8 [vmi: vex.ndd.256.66.0f 71 /4 ib] FUTURE,AVX2
-VPSRAD ymmreg,ymmreg*,xmmrm128 [rvm: vex.nds.256.66.0f e2 /r] FUTURE,AVX2
-VPSRAD ymmreg,ymmreg*,imm8 [vmi: vex.ndd.256.66.0f 72 /4 ib] FUTURE,AVX2
-VPSRLDQ ymmreg,ymmreg*,imm8 [vmi: vex.ndd.256.66.0f 73 /3 ib] FUTURE,AVX2
-VPSRLW ymmreg,ymmreg*,xmmrm128 [rvm: vex.nds.256.66.0f d1 /r] FUTURE,AVX2
-VPSRLW ymmreg,ymmreg*,imm8 [vmi: vex.ndd.256.66.0f 71 /2 ib] FUTURE,AVX2
-VPSRLD ymmreg,ymmreg*,xmmrm128 [rvm: vex.nds.256.66.0f d2 /r] FUTURE,AVX2
-VPSRLD ymmreg,ymmreg*,imm8 [vmi: vex.ndd.256.66.0f 72 /2 ib] FUTURE,AVX2
-VPSRLQ ymmreg,ymmreg*,xmmrm128 [rvm: vex.nds.256.66.0f d3 /r] FUTURE,AVX2
-VPSRLQ ymmreg,ymmreg*,imm8 [vmi: vex.ndd.256.66.0f.wig 73 /2 ib] FUTURE,AVX2
-VPSUBB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f f8 /r] FUTURE,AVX2
-VPSUBW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f f9 /r] FUTURE,AVX2
-VPSUBD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f fa /r] FUTURE,AVX2
-VPSUBQ ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f fb /r] FUTURE,AVX2
-VPSUBSB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f e8 /r] FUTURE,AVX2
-VPSUBSW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f e9 /r] FUTURE,AVX2
-VPSUBUSB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f d8 /r] FUTURE,AVX2
-VPSUBUSW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f d9 /r] FUTURE,AVX2
-VPUNPCKHBW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 68 /r] FUTURE,AVX2
-VPUNPCKHWD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 69 /r] FUTURE,AVX2
-VPUNPCKHDQ ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 6a /r] FUTURE,AVX2
-VPUNPCKHQDQ ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 6d /r] FUTURE,AVX2
-VPUNPCKLBW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 60 /r] FUTURE,AVX2
-VPUNPCKLWD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 61 /r] FUTURE,AVX2
-VPUNPCKLDQ ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 62 /r] FUTURE,AVX2
-VPUNPCKLQDQ ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 6c /r] FUTURE,AVX2
-VPXOR ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f ef /r] FUTURE,AVX2
-VMOVNTDQA ymmreg,mem256 [rm: vex.256.66.0f38 2a /r] FUTURE,AVX2
-VBROADCASTSS xmmreg,xmmreg [rm: vex.128.66.0f38.w0 18 /r] FUTURE,AVX2
-VBROADCASTSS ymmreg,xmmreg [rm: vex.256.66.0f38.w0 18 /r] FUTURE,AVX2
-VBROADCASTSD ymmreg,xmmreg [rm: vex.256.66.0f38.w0 19 /r] FUTURE,AVX2
-VBROADCASTI128 ymmreg,mem128 [rm: vex.256.66.0f38.w0 5a /r] FUTURE,AVX2
-VPBLENDD xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: vex.nds.128.66.0f3a.w0 02 /r ib] FUTURE,AVX2
-VPBLENDD ymmreg,ymmreg*,ymmrm256,imm8 [rvmi: vex.nds.256.66.0f3a.w0 02 /r ib] FUTURE,AVX2
-VPBROADCASTB xmmreg,mem8 [rm: vex.128.66.0f38.w0 78 /r] FUTURE,AVX2
-VPBROADCASTB xmmreg,xmmreg [rm: vex.128.66.0f38.w0 78 /r] FUTURE,AVX2
-VPBROADCASTB ymmreg,mem8 [rm: vex.256.66.0f38.w0 78 /r] FUTURE,AVX2
-VPBROADCASTB ymmreg,xmmreg [rm: vex.256.66.0f38.w0 78 /r] FUTURE,AVX2
-VPBROADCASTW xmmreg,mem16 [rm: vex.128.66.0f38.w0 79 /r] FUTURE,AVX2
-VPBROADCASTW xmmreg,xmmreg [rm: vex.128.66.0f38.w0 79 /r] FUTURE,AVX2
-VPBROADCASTW ymmreg,mem16 [rm: vex.256.66.0f38.w0 79 /r] FUTURE,AVX2
-VPBROADCASTW ymmreg,xmmreg [rm: vex.256.66.0f38.w0 79 /r] FUTURE,AVX2
-VPBROADCASTD xmmreg,mem32 [rm: vex.128.66.0f38.w0 58 /r] FUTURE,AVX2
-VPBROADCASTD xmmreg,xmmreg [rm: vex.128.66.0f38.w0 58 /r] FUTURE,AVX2
-VPBROADCASTD ymmreg,mem32 [rm: vex.256.66.0f38.w0 58 /r] FUTURE,AVX2
-VPBROADCASTD ymmreg,xmmreg [rm: vex.256.66.0f38.w0 58 /r] FUTURE,AVX2
-VPBROADCASTQ xmmreg,mem64 [rm: vex.128.66.0f38.w0 59 /r] FUTURE,AVX2
-VPBROADCASTQ xmmreg,xmmreg [rm: vex.128.66.0f38.w0 59 /r] FUTURE,AVX2
-VPBROADCASTQ ymmreg,mem64 [rm: vex.256.66.0f38.w0 59 /r] FUTURE,AVX2
-VPBROADCASTQ ymmreg,xmmreg [rm: vex.256.66.0f38.w0 59 /r] FUTURE,AVX2
-
-VPERMD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38.w0 36 /r] FUTURE,AVX2
-VPERMPD ymmreg,ymmrm256,imm8 [rmi: vex.256.66.0f3a.w1 01 /r ib] FUTURE,AVX2
-VPERMPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38.w0 16 /r] FUTURE,AVX2
-VPERMQ ymmreg,ymmrm256,imm8 [rmi: vex.256.66.0f3a.w1 00 /r ib] FUTURE,AVX2
-VPERM2I128 ymmreg,ymmreg*,ymmrm256,imm8 [rvmi: vex.nds.256.66.0f3a.w0 46 /r ib] FUTURE,AVX2
-VEXTRACTI128 xmmrm128,ymmreg,imm8 [mri: vex.256.66.0f3a.w0 39 /r ib] FUTURE,AVX2
-
-VINSERTI128 ymmreg,ymmreg*,xmmrm128,imm8 [rvmi: vex.nds.256.66.0f3a.w0 38 /r ib] FUTURE,AVX2
-VPMASKMOVD xmmreg,xmmreg*,mem128 [rvm: vex.nds.128.66.0f38.w0 8c /r] FUTURE,AVX2
-VPMASKMOVD ymmreg,ymmreg*,mem256 [rvm: vex.nds.256.66.0f38.w0 8c /r] FUTURE,AVX2
-VPMASKMOVQ xmmreg,xmmreg*,mem128 [rvm: vex.nds.128.66.0f38.w1 8c /r] FUTURE,AVX2
-VPMASKMOVQ ymmreg,ymmreg*,mem256 [rvm: vex.nds.256.66.0f38.w1 8c /r] FUTURE,AVX2
-
-VPMASKMOVD mem128,xmmreg*,xmmreg [mvr: vex.nds.128.66.0f38.w0 8e /r] FUTURE,AVX2
-VPMASKMOVD mem256,ymmreg*,ymmreg [mvr: vex.nds.256.66.0f38.w0 8e /r] FUTURE,AVX2
-VPMASKMOVQ mem128,xmmreg*,xmmreg [mvr: vex.nds.128.66.0f38.w1 8e /r] FUTURE,AVX2
-VPMASKMOVQ mem256,ymmreg*,ymmreg [mvr: vex.nds.256.66.0f38.w1 8e /r] FUTURE,AVX2
-
-VPSLLVD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38.w0 47 /r] FUTURE,AVX2
-VPSLLVQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38.w1 47 /r] FUTURE,AVX2
-VPSLLVD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38.w0 47 /r] FUTURE,AVX2
-VPSLLVQ ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38.w1 47 /r] FUTURE,AVX2
-
-VPSRAVD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38.w0 46 /r] FUTURE,AVX2
-VPSRAVD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38.w0 46 /r] FUTURE,AVX2
-
-VPSRLVD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38.w0 45 /r] FUTURE,AVX2
-VPSRLVQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38.w1 45 /r] FUTURE,AVX2
-VPSRLVD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38.w0 45 /r] FUTURE,AVX2
-VPSRLVQ ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38.w1 45 /r] FUTURE,AVX2
-
-VGATHERDPD xmmreg,xmem64,xmmreg [rmv: vm32x vex.dds.128.66.0f38.w1 92 /r] FUTURE,AVX2
-VGATHERQPD xmmreg,xmem64,xmmreg [rmv: vm64x vex.dds.128.66.0f38.w1 93 /r] FUTURE,AVX2
-VGATHERDPD ymmreg,xmem64,ymmreg [rmv: vm32x vex.dds.256.66.0f38.w1 92 /r] FUTURE,AVX2
-VGATHERQPD ymmreg,ymem64,ymmreg [rmv: vm64y vex.dds.256.66.0f38.w1 93 /r] FUTURE,AVX2
-
-VGATHERDPS xmmreg,xmem32,xmmreg [rmv: vm32x vex.dds.128.66.0f38.w0 92 /r] FUTURE,AVX2
-VGATHERQPS xmmreg,xmem32,xmmreg [rmv: vm64x vex.dds.128.66.0f38.w0 93 /r] FUTURE,AVX2
-VGATHERDPS ymmreg,ymem32,ymmreg [rmv: vm32y vex.dds.256.66.0f38.w0 92 /r] FUTURE,AVX2
-VGATHERQPS xmmreg,ymem32,xmmreg [rmv: vm64y vex.dds.256.66.0f38.w0 93 /r] FUTURE,AVX2
-
-VPGATHERDD xmmreg,xmem32,xmmreg [rmv: vm32x vex.dds.128.66.0f38.w0 90 /r] FUTURE,AVX2
-VPGATHERQD xmmreg,xmem32,xmmreg [rmv: vm64x vex.dds.128.66.0f38.w0 91 /r] FUTURE,AVX2
-VPGATHERDD ymmreg,ymem32,ymmreg [rmv: vm32y vex.dds.256.66.0f38.w0 90 /r] FUTURE,AVX2
-VPGATHERQD xmmreg,ymem32,xmmreg [rmv: vm64y vex.dds.256.66.0f38.w0 91 /r] FUTURE,AVX2
-
-VPGATHERDQ xmmreg,xmem64,xmmreg [rmv: vm32x vex.dds.128.66.0f38.w1 90 /r] FUTURE,AVX2
-VPGATHERQQ xmmreg,xmem64,xmmreg [rmv: vm64x vex.dds.128.66.0f38.w1 91 /r] FUTURE,AVX2
-VPGATHERDQ ymmreg,xmem64,ymmreg [rmv: vm32x vex.dds.256.66.0f38.w1 90 /r] FUTURE,AVX2
-VPGATHERQQ ymmreg,ymem64,ymmreg [rmv: vm64y vex.dds.256.66.0f38.w1 91 /r] FUTURE,AVX2
-
-;# Intel Transactional Synchronization Extensions (TSX)
-XABORT imm [i: c6 f8 ib] FUTURE,RTM
-XABORT imm8 [i: c6 f8 ib] FUTURE,RTM
-XBEGIN imm [i: odf c7 f8 rel] FUTURE,RTM
-XBEGIN imm|near [i: odf c7 f8 rel] FUTURE,RTM,ND
-XBEGIN imm16 [i: o16 c7 f8 rel] FUTURE,RTM,NOLONG
-XBEGIN imm16|near [i: o16 c7 f8 rel] FUTURE,RTM,NOLONG,ND
-XBEGIN imm32 [i: o32 c7 f8 rel] FUTURE,RTM,NOLONG
-XBEGIN imm32|near [i: o32 c7 f8 rel] FUTURE,RTM,NOLONG,ND
-XBEGIN imm64 [i: o64nw c7 f8 rel] FUTURE,RTM,LONG
-XBEGIN imm64|near [i: o64nw c7 f8 rel] FUTURE,RTM,LONG,ND
-XEND void [ 0f 01 d5] FUTURE,RTM
-XTEST void [ 0f 01 d6] FUTURE,HLE,RTM
-
-;# Intel BMI1 and BMI2 instructions, AMD TBM instructions
-;
-; based on pub number 319433-011 dated July 2011
-;
-ANDN reg32,reg32,rm32 [rvm: vex.nds.lz.0f38.w0 f2 /r] FUTURE,BMI1
-ANDN reg64,reg64,rm64 [rvm: vex.nds.lz.0f38.w1 f2 /r] LONG,FUTURE,BMI1
-BEXTR reg32,rm32,reg32 [rmv: vex.nds.lz.0f38.w0 f7 /r] FUTURE,BMI1
-BEXTR reg64,rm64,reg64 [rmv: vex.nds.lz.0f38.w1 f7 /r] LONG,FUTURE,BMI1
-BEXTR reg32,rm32,imm32 [rmi: xop.m10.lz.w0 10 /r id] FUTURE,TBM
-BEXTR reg64,rm64,imm32 [rmi: xop.m10.lz.w1 10 /r id] LONG,FUTURE,TBM
-BLCI reg32,rm32 [vm: xop.ndd.lz.m9.w0 02 /6] FUTURE,TBM
-BLCI reg64,rm64 [vm: xop.ndd.lz.m9.w1 02 /6] LONG,FUTURE,TBM
-BLCIC reg32,rm32 [vm: xop.ndd.lz.m9.w0 01 /5] FUTURE,TBM
-BLCIC reg64,rm64 [vm: xop.ndd.lz.m9.w1 01 /5] LONG,FUTURE,TBM
-BLSI reg32,rm32 [vm: vex.ndd.lz.0f38.w0 f3 /3] FUTURE,BMI1
-BLSI reg64,rm64 [vm: vex.ndd.lz.0f38.w1 f3 /3] LONG,FUTURE,BMI1
-BLSIC reg32,rm32 [vm: xop.ndd.lz.m9.w0 01 /6] FUTURE,TBM
-BLSIC reg64,rm64 [vm: xop.ndd.lz.m9.w1 01 /6] LONG,FUTURE,TBM
-BLCFILL reg32,rm32 [vm: xop.ndd.lz.m9.w0 01 /1] FUTURE,TBM
-BLCFILL reg64,rm64 [vm: xop.ndd.lz.m9.w1 01 /1] LONG,FUTURE,TBM
-BLSFILL reg32,rm32 [vm: xop.ndd.lz.m9.w0 01 /2] FUTURE,TBM
-BLSFILL reg64,rm64 [vm: xop.ndd.lz.m9.w1 01 /2] LONG,FUTURE,TBM
-BLCMSK reg32,rm32 [vm: xop.ndd.lz.m9.w0 02 /1] FUTURE,TBM
-BLCMSK reg64,rm64 [vm: xop.ndd.lz.m9.w1 02 /1] LONG,FUTURE,TBM
-BLSMSK reg32,rm32 [vm: vex.ndd.lz.0f38.w0 f3 /2] FUTURE,BMI1
-BLSMSK reg64,rm64 [vm: vex.ndd.lz.0f38.w1 f3 /2] LONG,FUTURE,BMI1
-BLSR reg32,rm32 [vm: vex.ndd.lz.0f38.w0 f3 /1] FUTURE,BMI1
-BLSR reg64,rm64 [vm: vex.ndd.lz.0f38.w1 f3 /1] LONG,FUTURE,BMI1
-BLCS reg32,rm32 [vm: xop.ndd.lz.m9.w0 01 /3] FUTURE,TBM
-BLCS reg64,rm64 [vm: xop.ndd.lz.m9.w1 01 /3] LONG,FUTURE,TBM
-BZHI reg32,rm32,reg32 [rmv: vex.nds.lz.0f38.w0 f5 /r] FUTURE,BMI2
-BZHI reg64,rm64,reg64 [rmv: vex.nds.lz.0f38.w1 f5 /r] LONG,FUTURE,BMI2
-MULX reg32,reg32,rm32 [rvm: vex.ndd.lz.f2.0f38.w0 f6 /r] FUTURE,BMI2
-MULX reg64,reg64,rm64 [rvm: vex.ndd.lz.f2.0f38.w1 f6 /r] LONG,FUTURE,BMI2
-PDEP reg32,reg32,rm32 [rvm: vex.nds.lz.f2.0f38.w0 f5 /r] FUTURE,BMI2
-PDEP reg64,reg64,rm64 [rvm: vex.nds.lz.f2.0f38.w1 f5 /r] LONG,FUTURE,BMI2
-PEXT reg32,reg32,rm32 [rvm: vex.nds.lz.f3.0f38.w0 f5 /r] FUTURE,BMI2
-PEXT reg64,reg64,rm64 [rvm: vex.nds.lz.f3.0f38.w1 f5 /r] LONG,FUTURE,BMI2
-RORX reg32,rm32,imm8 [rmi: vex.lz.f2.0f3a.w0 f0 /r ib] FUTURE,BMI2
-RORX reg64,rm64,imm8 [rmi: vex.lz.f2.0f3a.w1 f0 /r ib] LONG,FUTURE,BMI2
-SARX reg32,rm32,reg32 [rmv: vex.nds.lz.f3.0f38.w0 f7 /r] FUTURE,BMI2
-SARX reg64,rm64,reg64 [rmv: vex.nds.lz.f3.0f38.w1 f7 /r] LONG,FUTURE,BMI2
-SHLX reg32,rm32,reg32 [rmv: vex.nds.lz.66.0f38.w0 f7 /r] FUTURE,BMI2
-SHLX reg64,rm64,reg64 [rmv: vex.nds.lz.66.0f38.w1 f7 /r] LONG,FUTURE,BMI2
-SHRX reg32,rm32,reg32 [rmv: vex.nds.lz.f2.0f38.w0 f7 /r] FUTURE,BMI2
-SHRX reg64,rm64,reg64 [rmv: vex.nds.lz.f2.0f38.w1 f7 /r] LONG,FUTURE,BMI2
-TZCNT reg16,rm16 [rm: o16 f3i 0f bc /r] FUTURE,BMI1
-TZCNT reg32,rm32 [rm: o32 f3i 0f bc /r] FUTURE,BMI1
-TZCNT reg64,rm64 [rm: o64 f3i 0f bc /r] LONG,FUTURE,BMI1
-TZMSK reg32,rm32 [vm: xop.ndd.lz.m9.w0 01 /4] FUTURE,TBM
-TZMSK reg64,rm64 [vm: xop.ndd.lz.m9.w1 01 /4] LONG,FUTURE,TBM
-T1MSKC reg32,rm32 [vm: xop.ndd.lz.m9.w0 01 /7] FUTURE,TBM
-T1MSKC reg64,rm64 [vm: xop.ndd.lz.m9.w1 01 /7] LONG,FUTURE,TBM
-
-PREFETCHWT1 mem8 [m: 0f 0d /2 ] PREFETCHWT1,FUTURE
-
-;# Intel Memory Protection Extensions (MPX)
-BNDMK bndreg,mem [rm: f3 0f 1b /r ] MPX,MIB,FUTURE
-BNDCL bndreg,mem [rm: f3 0f 1a /r ] MPX,FUTURE
-BNDCL bndreg,reg32 [rm: f3 0f 1a /r ] MPX,NOLONG,FUTURE
-BNDCL bndreg,reg64 [rm: o64nw f3 0f 1a /r ] MPX,LONG,FUTURE
-BNDCU bndreg,mem [rm: f2 0f 1a /r ] MPX,FUTURE
-BNDCU bndreg,reg32 [rm: f2 0f 1a /r ] MPX,NOLONG,FUTURE
-BNDCU bndreg,reg64 [rm: o64nw f2 0f 1a /r ] MPX,LONG,FUTURE
-BNDCN bndreg,mem [rm: f2 0f 1b /r ] MPX,FUTURE
-BNDCN bndreg,reg32 [rm: f2 0f 1b /r ] MPX,NOLONG,FUTURE
-BNDCN bndreg,reg64 [rm: o64nw f2 0f 1b /r ] MPX,LONG,FUTURE
-BNDMOV bndreg,bndreg [rm: 66 0f 1a /r ] MPX,FUTURE
-BNDMOV bndreg,mem [rm: 66 0f 1a /r ] MPX,FUTURE
-BNDMOV bndreg,bndreg [mr: 66 0f 1b /r ] MPX,FUTURE
-BNDMOV mem,bndreg [mr: 66 0f 1b /r ] MPX,FUTURE
-BNDLDX bndreg,mem [rm: 0f 1a /r ] MPX,MIB,FUTURE
-BNDLDX bndreg,mem,reg32 [rmx: 0f 1a /r ] MPX,MIB,NOLONG,FUTURE
-BNDLDX bndreg,mem,reg64 [rmx: 0f 1a /r ] MPX,MIB,LONG,FUTURE
-BNDSTX mem,bndreg [mr: 0f 1b /r ] MPX,MIB,FUTURE
-BNDSTX mem,reg32,bndreg [mxr: 0f 1b /r ] MPX,MIB,NOLONG,FUTURE
-BNDSTX mem,reg64,bndreg [mxr: 0f 1b /r ] MPX,MIB,LONG,FUTURE
-BNDSTX mem,bndreg,reg32 [mrx: 0f 1b /r ] MPX,MIB,NOLONG,FUTURE
-BNDSTX mem,bndreg,reg64 [mrx: 0f 1b /r ] MPX,MIB,LONG,FUTURE
-
-;# Intel SHA acceleration instructions
-SHA1MSG1 xmmreg,xmmrm128 [rm: 0f 38 c9 /r ] SHA,FUTURE
-SHA1MSG2 xmmreg,xmmrm128 [rm: 0f 38 ca /r ] SHA,FUTURE
-SHA1NEXTE xmmreg,xmmrm128 [rm: 0f 38 c8 /r ] SHA,FUTURE
-SHA1RNDS4 xmmreg,xmmrm128,imm8 [rmi: 0f 3a cc /r ib ] SHA,FUTURE
-SHA256MSG1 xmmreg,xmmrm128 [rm: 0f 38 cc /r ] SHA,FUTURE
-SHA256MSG2 xmmreg,xmmrm128 [rm: 0f 38 cd /r ] SHA,FUTURE
-SHA256RNDS2 xmmreg,xmmrm128,xmm0 [rm-: 0f 38 cb /r ] SHA,FUTURE
-SHA256RNDS2 xmmreg,xmmrm128 [rm: 0f 38 cb /r ] SHA,FUTURE
-
-;# AVX-512 mask register instructions
-KADDB kreg,kreg,kreg [rvm: vex.nds.l1.66.0f.w0 4a /r ] FUTURE
-KADDD kreg,kreg,kreg [rvm: vex.nds.l1.66.0f.w1 4a /r ] FUTURE
-KADDQ kreg,kreg,kreg [rvm: vex.nds.l1.0f.w1 4a /r ] FUTURE
-KADDW kreg,kreg,kreg [rvm: vex.nds.l1.0f.w0 4a /r ] FUTURE
-KANDB kreg,kreg,kreg [rvm: vex.nds.l1.66.0f.w0 41 /r ] FUTURE
-KANDD kreg,kreg,kreg [rvm: vex.nds.l1.66.0f.w1 41 /r ] FUTURE
-KANDNB kreg,kreg,kreg [rvm: vex.nds.l1.66.0f.w0 42 /r ] FUTURE
-KANDND kreg,kreg,kreg [rvm: vex.nds.l1.66.0f.w1 42 /r ] FUTURE
-KANDNQ kreg,kreg,kreg [rvm: vex.nds.l1.0f.w1 42 /r ] FUTURE
-KANDNW kreg,kreg,kreg [rvm: vex.nds.l1.0f.w0 42 /r ] FUTURE
-KANDQ kreg,kreg,kreg [rvm: vex.nds.l1.0f.w1 41 /r ] FUTURE
-KANDW kreg,kreg,kreg [rvm: vex.nds.l1.0f.w0 41 /r ] FUTURE
-KMOVB kreg,krm8 [rm: vex.l0.66.0f.w0 90 /r ] FUTURE
-KMOVB mem8,kreg [mr: vex.l0.66.0f.w0 91 /r ] FUTURE
-KMOVB kreg,reg32 [rm: vex.l0.66.0f.w0 92 /r ] FUTURE
-KMOVB reg32,kreg [rm: vex.l0.66.0f.w0 93 /r ] FUTURE
-KMOVD kreg,krm32 [rm: vex.l0.66.0f.w1 90 /r ] FUTURE
-KMOVD mem32,kreg [mr: vex.l0.66.0f.w1 91 /r ] FUTURE
-KMOVD kreg,reg32 [rm: vex.l0.f2.0f.w0 92 /r ] FUTURE
-KMOVD reg32,kreg [rm: vex.l0.f2.0f.w0 93 /r ] FUTURE
-KMOVQ kreg,krm64 [rm: vex.l0.0f.w1 90 /r ] FUTURE
-KMOVQ mem64,kreg [mr: vex.l0.0f.w1 91 /r ] FUTURE
-KMOVQ kreg,reg64 [rm: vex.l0.f2.0f.w1 92 /r ] FUTURE
-KMOVQ reg64,kreg [rm: vex.l0.f2.0f.w1 93 /r ] FUTURE
-KMOVW kreg,krm16 [rm: vex.l0.0f.w0 90 /r ] FUTURE
-KMOVW mem16,kreg [mr: vex.l0.0f.w0 91 /r ] FUTURE
-KMOVW kreg,reg32 [rm: vex.l0.0f.w0 92 /r ] FUTURE
-KMOVW reg32,kreg [rm: vex.l0.0f.w0 93 /r ] FUTURE
-KNOTB kreg,kreg [rm: vex.l0.66.0f.w0 44 /r ] FUTURE
-KNOTD kreg,kreg [rm: vex.l0.66.0f.w1 44 /r ] FUTURE
-KNOTQ kreg,kreg [rm: vex.l0.0f.w1 44 /r ] FUTURE
-KNOTW kreg,kreg [rm: vex.l0.0f.w0 44 /r ] FUTURE
-KORB kreg,kreg,kreg [rvm: vex.nds.l1.66.0f.w0 45 /r ] FUTURE
-KORD kreg,kreg,kreg [rvm: vex.nds.l1.66.0f.w1 45 /r ] FUTURE
-KORQ kreg,kreg,kreg [rvm: vex.nds.l1.0f.w1 45 /r ] FUTURE
-KORTESTB kreg,kreg [rm: vex.l0.66.0f.w0 98 /r ] FUTURE
-KORTESTD kreg,kreg [rm: vex.l0.66.0f.w1 98 /r ] FUTURE
-KORTESTQ kreg,kreg [rm: vex.l0.0f.w1 98 /r ] FUTURE
-KORTESTW kreg,kreg [rm: vex.l0.0f.w0 98 /r ] FUTURE
-KORW kreg,kreg,kreg [rvm: vex.nds.l1.0f.w0 45 /r ] FUTURE
-KSHIFTLB kreg,kreg,imm8 [rmi: vex.l0.66.0f3a.w0 32 /r ib ] FUTURE
-KSHIFTLD kreg,kreg,imm8 [rmi: vex.l0.66.0f3a.w0 33 /r ib ] FUTURE
-KSHIFTLQ kreg,kreg,imm8 [rmi: vex.l0.66.0f3a.w1 33 /r ib ] FUTURE
-KSHIFTLW kreg,kreg,imm8 [rmi: vex.l0.66.0f3a.w1 32 /r ib ] FUTURE
-KSHIFTRB kreg,kreg,imm8 [rmi: vex.l0.66.0f3a.w0 30 /r ib ] FUTURE
-KSHIFTRD kreg,kreg,imm8 [rmi: vex.l0.66.0f3a.w0 31 /r ib ] FUTURE
-KSHIFTRQ kreg,kreg,imm8 [rmi: vex.l0.66.0f3a.w1 31 /r ib ] FUTURE
-KSHIFTRW kreg,kreg,imm8 [rmi: vex.l0.66.0f3a.w1 30 /r ib ] FUTURE
-KTESTB kreg,kreg [rm: vex.l0.66.0f.w0 99 /r ] FUTURE
-KTESTD kreg,kreg [rm: vex.l0.66.0f.w1 99 /r ] FUTURE
-KTESTQ kreg,kreg [rm: vex.l0.0f.w1 99 /r ] FUTURE
-KTESTW kreg,kreg [rm: vex.l0.0f.w0 99 /r ] FUTURE
-KUNPCKBW kreg,kreg,kreg [rvm: vex.nds.l1.66.0f.w0 4b /r ] FUTURE
-KUNPCKDQ kreg,kreg,kreg [rvm: vex.nds.l1.0f.w1 4b /r ] FUTURE
-KUNPCKWD kreg,kreg,kreg [rvm: vex.nds.l1.0f.w0 4b /r ] FUTURE
-KXNORB kreg,kreg,kreg [rvm: vex.nds.l1.66.0f.w0 46 /r ] FUTURE
-KXNORD kreg,kreg,kreg [rvm: vex.nds.l1.66.0f.w1 46 /r ] FUTURE
-KXNORQ kreg,kreg,kreg [rvm: vex.nds.l1.0f.w1 46 /r ] FUTURE
-KXNORW kreg,kreg,kreg [rvm: vex.nds.l1.0f.w0 46 /r ] FUTURE
-KXORB kreg,kreg,kreg [rvm: vex.nds.l1.66.0f.w0 47 /r ] FUTURE
-KXORD kreg,kreg,kreg [rvm: vex.nds.l1.66.0f.w1 47 /r ] FUTURE
-KXORQ kreg,kreg,kreg [rvm: vex.nds.l1.0f.w1 47 /r ] FUTURE
-KXORW kreg,kreg,kreg [rvm: vex.nds.l1.0f.w0 47 /r ] FUTURE
-
-;# AVX-512 instructions
-VADDPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 58 /r ] AVX512VL,AVX512,FUTURE
-VADDPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 58 /r ] AVX512VL,AVX512,FUTURE
-VADDPD zmmreg|mask|z,zmmreg*,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f.w1 58 /r ] AVX512,FUTURE
-VADDPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.0f.w0 58 /r ] AVX512VL,AVX512,FUTURE
-VADDPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.0f.w0 58 /r ] AVX512VL,AVX512,FUTURE
-VADDPS zmmreg|mask|z,zmmreg*,zmmrm512|b32|er [rvm:fv: evex.nds.512.0f.w0 58 /r ] AVX512,FUTURE
-VADDSD xmmreg|mask|z,xmmreg*,xmmrm64|er [rvm:t1s: evex.nds.128.f2.0f.w1 58 /r ] AVX512,FUTURE
-VADDSS xmmreg|mask|z,xmmreg*,xmmrm32|er [rvm:t1s: evex.nds.128.f3.0f.w0 58 /r ] AVX512,FUTURE
-VALIGND xmmreg|mask|z,xmmreg*,xmmrm128|b32,imm8 [rvmi:fv: evex.nds.128.66.0f3a.w0 03 /r ib ] AVX512VL,AVX512,FUTURE
-VALIGND ymmreg|mask|z,ymmreg*,ymmrm256|b32,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w0 03 /r ib ] AVX512VL,AVX512,FUTURE
-VALIGND zmmreg|mask|z,zmmreg*,zmmrm512|b32,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w0 03 /r ib ] AVX512,FUTURE
-VALIGNQ xmmreg|mask|z,xmmreg*,xmmrm128|b64,imm8 [rvmi:fv: evex.nds.128.66.0f3a.w1 03 /r ib ] AVX512VL,AVX512,FUTURE
-VALIGNQ ymmreg|mask|z,ymmreg*,ymmrm256|b64,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w1 03 /r ib ] AVX512VL,AVX512,FUTURE
-VALIGNQ zmmreg|mask|z,zmmreg*,zmmrm512|b64,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w1 03 /r ib ] AVX512,FUTURE
-VANDNPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 55 /r ] AVX512VL,AVX512DQ,FUTURE
-VANDNPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 55 /r ] AVX512VL,AVX512DQ,FUTURE
-VANDNPD zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 55 /r ] AVX512DQ,FUTURE
-VANDNPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.0f.w0 55 /r ] AVX512VL,AVX512DQ,FUTURE
-VANDNPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.0f.w0 55 /r ] AVX512VL,AVX512DQ,FUTURE
-VANDNPS zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.0f.w0 55 /r ] AVX512DQ,FUTURE
-VANDPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 54 /r ] AVX512VL,AVX512DQ,FUTURE
-VANDPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 54 /r ] AVX512VL,AVX512DQ,FUTURE
-VANDPD zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 54 /r ] AVX512DQ,FUTURE
-VANDPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.0f.w0 54 /r ] AVX512VL,AVX512DQ,FUTURE
-VANDPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.0f.w0 54 /r ] AVX512VL,AVX512DQ,FUTURE
-VANDPS zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.0f.w0 54 /r ] AVX512DQ,FUTURE
-VBLENDMPD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 65 /r ] AVX512VL,AVX512,FUTURE
-VBLENDMPD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 65 /r ] AVX512VL,AVX512,FUTURE
-VBLENDMPD zmmreg|mask|z,zmmreg,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 65 /r ] AVX512,FUTURE
-VBLENDMPS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 65 /r ] AVX512VL,AVX512,FUTURE
-VBLENDMPS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 65 /r ] AVX512VL,AVX512,FUTURE
-VBLENDMPS zmmreg|mask|z,zmmreg,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 65 /r ] AVX512,FUTURE
-VBROADCASTF32X2 ymmreg|mask|z,xmmrm64 [rm:t2: evex.256.66.0f38.w0 19 /r ] AVX512VL,AVX512DQ,FUTURE
-VBROADCASTF32X2 zmmreg|mask|z,xmmrm64 [rm:t2: evex.512.66.0f38.w0 19 /r ] AVX512DQ,FUTURE
-VBROADCASTF32X4 ymmreg|mask|z,mem128 [rm:t4: evex.256.66.0f38.w0 1a /r ] AVX512VL,AVX512,FUTURE
-VBROADCASTF32X4 zmmreg|mask|z,mem128 [rm:t4: evex.512.66.0f38.w0 1a /r ] AVX512,FUTURE
-VBROADCASTF32X8 zmmreg|mask|z,mem256 [rm:t8: evex.512.66.0f38.w0 1b /r ] AVX512DQ,FUTURE
-VBROADCASTF64X2 ymmreg|mask|z,mem128 [rm:t2: evex.256.66.0f38.w1 1a /r ] AVX512VL,AVX512DQ,FUTURE
-VBROADCASTF64X2 zmmreg|mask|z,mem128 [rm:t2: evex.512.66.0f38.w1 1a /r ] AVX512DQ,FUTURE
-VBROADCASTF64X4 zmmreg|mask|z,mem256 [rm:t4: evex.512.66.0f38.w1 1b /r ] AVX512,FUTURE
-VBROADCASTI32X2 xmmreg|mask|z,xmmrm64 [rm:t2: evex.128.66.0f38.w0 59 /r ] AVX512VL,AVX512DQ,FUTURE
-VBROADCASTI32X2 ymmreg|mask|z,xmmrm64 [rm:t2: evex.256.66.0f38.w0 59 /r ] AVX512VL,AVX512DQ,FUTURE
-VBROADCASTI32X2 zmmreg|mask|z,xmmrm64 [rm:t2: evex.512.66.0f38.w0 59 /r ] AVX512DQ,FUTURE
-VBROADCASTI32X4 ymmreg|mask|z,mem128 [rm:t4: evex.256.66.0f38.w0 5a /r ] AVX512VL,AVX512,FUTURE
-VBROADCASTI32X4 zmmreg|mask|z,mem128 [rm:t4: evex.512.66.0f38.w0 5a /r ] AVX512,FUTURE
-VBROADCASTI32X8 zmmreg|mask|z,mem256 [rm:t8: evex.512.66.0f38.w0 5b /r ] AVX512DQ,FUTURE
-VBROADCASTI64X2 ymmreg|mask|z,mem128 [rm:t2: evex.256.66.0f38.w1 5a /r ] AVX512VL,AVX512DQ,FUTURE
-VBROADCASTI64X2 zmmreg|mask|z,mem128 [rm:t2: evex.512.66.0f38.w1 5a /r ] AVX512DQ,FUTURE
-VBROADCASTI64X4 zmmreg|mask|z,mem256 [rm:t4: evex.512.66.0f38.w1 5b /r ] AVX512,FUTURE
-VBROADCASTSD ymmreg|mask|z,mem64 [rm:t1s: evex.256.66.0f38.w1 19 /r ] AVX512VL,AVX512,FUTURE
-VBROADCASTSD zmmreg|mask|z,mem64 [rm:t1s: evex.512.66.0f38.w1 19 /r ] AVX512,FUTURE
-VBROADCASTSD ymmreg|mask|z,xmmreg [rm: evex.256.66.0f38.w1 19 /r ] AVX512VL,AVX512,FUTURE
-VBROADCASTSD zmmreg|mask|z,xmmreg [rm: evex.512.66.0f38.w1 19 /r ] AVX512,FUTURE
-VBROADCASTSS xmmreg|mask|z,mem32 [rm:t1s: evex.128.66.0f38.w0 18 /r ] AVX512VL,AVX512,FUTURE
-VBROADCASTSS ymmreg|mask|z,mem32 [rm:t1s: evex.256.66.0f38.w0 18 /r ] AVX512VL,AVX512,FUTURE
-VBROADCASTSS zmmreg|mask|z,mem32 [rm:t1s: evex.512.66.0f38.w0 18 /r ] AVX512,FUTURE
-VBROADCASTSS xmmreg|mask|z,xmmreg [rm: evex.128.66.0f38.w0 18 /r ] AVX512VL,AVX512,FUTURE
-VBROADCASTSS ymmreg|mask|z,xmmreg [rm: evex.256.66.0f38.w0 18 /r ] AVX512VL,AVX512,FUTURE
-VBROADCASTSS zmmreg|mask|z,xmmreg [rm: evex.512.66.0f38.w0 18 /r ] AVX512,FUTURE
-VCMPPD kreg|mask,xmmreg,xmmrm128|b64,imm8 [rvmi:fv: evex.nds.128.66.0f.w1 c2 /r ib ] AVX512VL,AVX512,FUTURE
-VCMPPD kreg|mask,ymmreg,ymmrm256|b64,imm8 [rvmi:fv: evex.nds.256.66.0f.w1 c2 /r ib ] AVX512VL,AVX512,FUTURE
-VCMPPD kreg|mask,zmmreg,zmmrm512|b64|sae,imm8 [rvmi:fv: evex.nds.512.66.0f.w1 c2 /r ib ] AVX512,FUTURE
-VCMPPS kreg|mask,xmmreg,xmmrm128|b32,imm8 [rvmi:fv: evex.nds.128.0f.w0 c2 /r ib ] AVX512VL,AVX512,FUTURE
-VCMPPS kreg|mask,ymmreg,ymmrm256|b32,imm8 [rvmi:fv: evex.nds.256.0f.w0 c2 /r ib ] AVX512VL,AVX512,FUTURE
-VCMPPS kreg|mask,zmmreg,zmmrm512|b32|sae,imm8 [rvmi:fv: evex.nds.512.0f.w0 c2 /r ib ] AVX512,FUTURE
-VCMPSD kreg|mask,xmmreg,xmmrm64|sae,imm8 [rvmi:t1s: evex.nds.128.f2.0f.w1 c2 /r ib ] AVX512,FUTURE
-VCMPSS kreg|mask,xmmreg,xmmrm32|sae,imm8 [rvmi:t1s: evex.nds.128.f3.0f.w0 c2 /r ib ] AVX512,FUTURE
-VCOMISD xmmreg,xmmrm64|sae [rm:t1s: evex.128.66.0f.w1 2f /r ] AVX512,FUTURE
-VCOMISS xmmreg,xmmrm32|sae [rm:t1s: evex.128.0f.w0 2f /r ] AVX512,FUTURE
-VCOMPRESSPD mem128|mask,xmmreg [mr:t1s: evex.128.66.0f38.w1 8a /r ] AVX512VL,AVX512,FUTURE
-VCOMPRESSPD mem256|mask,ymmreg [mr:t1s: evex.256.66.0f38.w1 8a /r ] AVX512VL,AVX512,FUTURE
-VCOMPRESSPD mem512|mask,zmmreg [mr:t1s: evex.512.66.0f38.w1 8a /r ] AVX512,FUTURE
-VCOMPRESSPD xmmreg|mask|z,xmmreg [mr: evex.128.66.0f38.w1 8a /r ] AVX512VL,AVX512,FUTURE
-VCOMPRESSPD ymmreg|mask|z,ymmreg [mr: evex.256.66.0f38.w1 8a /r ] AVX512VL,AVX512,FUTURE
-VCOMPRESSPD zmmreg|mask|z,zmmreg [mr: evex.512.66.0f38.w1 8a /r ] AVX512,FUTURE
-VCOMPRESSPS mem128|mask,xmmreg [mr:t1s: evex.128.66.0f38.w0 8a /r ] AVX512VL,AVX512,FUTURE
-VCOMPRESSPS mem256|mask,ymmreg [mr:t1s: evex.256.66.0f38.w0 8a /r ] AVX512VL,AVX512,FUTURE
-VCOMPRESSPS mem512|mask,zmmreg [mr:t1s: evex.512.66.0f38.w0 8a /r ] AVX512,FUTURE
-VCOMPRESSPS xmmreg|mask|z,xmmreg [mr: evex.128.66.0f38.w0 8a /r ] AVX512VL,AVX512,FUTURE
-VCOMPRESSPS ymmreg|mask|z,ymmreg [mr: evex.256.66.0f38.w0 8a /r ] AVX512VL,AVX512,FUTURE
-VCOMPRESSPS zmmreg|mask|z,zmmreg [mr: evex.512.66.0f38.w0 8a /r ] AVX512,FUTURE
-VCVTDQ2PD xmmreg|mask|z,xmmrm64|b32 [rm:hv: evex.128.f3.0f.w0 e6 /r ] AVX512VL,AVX512,FUTURE
-VCVTDQ2PD ymmreg|mask|z,xmmrm128|b32 [rm:hv: evex.256.f3.0f.w0 e6 /r ] AVX512VL,AVX512,FUTURE
-VCVTDQ2PD zmmreg|mask|z,ymmrm256|b32|er [rm:hv: evex.512.f3.0f.w0 e6 /r ] AVX512,FUTURE
-VCVTDQ2PS xmmreg|mask|z,xmmrm128|b32 [rm:fv: evex.128.0f.w0 5b /r ] AVX512VL,AVX512,FUTURE
-VCVTDQ2PS ymmreg|mask|z,ymmrm256|b32 [rm:fv: evex.256.0f.w0 5b /r ] AVX512VL,AVX512,FUTURE
-VCVTDQ2PS zmmreg|mask|z,zmmrm512|b32|er [rm:fv: evex.512.0f.w0 5b /r ] AVX512,FUTURE
-VCVTPD2DQ xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.f2.0f.w1 e6 /r ] AVX512VL,AVX512,FUTURE
-VCVTPD2DQ xmmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.f2.0f.w1 e6 /r ] AVX512VL,AVX512,FUTURE
-VCVTPD2DQ ymmreg|mask|z,zmmrm512|b64|er [rm:fv: evex.512.f2.0f.w1 e6 /r ] AVX512,FUTURE
-VCVTPD2PS xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.66.0f.w1 5a /r ] AVX512VL,AVX512,FUTURE
-VCVTPD2PS xmmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.66.0f.w1 5a /r ] AVX512VL,AVX512,FUTURE
-VCVTPD2PS ymmreg|mask|z,zmmrm512|b64|er [rm:fv: evex.512.66.0f.w1 5a /r ] AVX512,FUTURE
-VCVTPD2QQ xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.66.0f.w1 7b /r ] AVX512VL,AVX512DQ,FUTURE
-VCVTPD2QQ ymmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.66.0f.w1 7b /r ] AVX512VL,AVX512DQ,FUTURE
-VCVTPD2QQ zmmreg|mask|z,zmmrm512|b64|er [rm:fv: evex.512.66.0f.w1 7b /r ] AVX512DQ,FUTURE
-VCVTPD2UDQ xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.0f.w1 79 /r ] AVX512VL,AVX512,FUTURE
-VCVTPD2UDQ xmmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.0f.w1 79 /r ] AVX512VL,AVX512,FUTURE
-VCVTPD2UDQ ymmreg|mask|z,zmmrm512|b64|er [rm:fv: evex.512.0f.w1 79 /r ] AVX512,FUTURE
-VCVTPD2UQQ xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.66.0f.w1 79 /r ] AVX512VL,AVX512DQ,FUTURE
-VCVTPD2UQQ ymmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.66.0f.w1 79 /r ] AVX512VL,AVX512DQ,FUTURE
-VCVTPD2UQQ zmmreg|mask|z,zmmrm512|b64|er [rm:fv: evex.512.66.0f.w1 79 /r ] AVX512DQ,FUTURE
-VCVTPH2PS xmmreg|mask|z,xmmrm64 [rm:hvm: evex.128.66.0f38.w0 13 /r ] AVX512VL,AVX512,FUTURE
-VCVTPH2PS ymmreg|mask|z,xmmrm128 [rm:hvm: evex.256.66.0f38.w0 13 /r ] AVX512VL,AVX512,FUTURE
-VCVTPH2PS zmmreg|mask|z,ymmrm256|sae [rm:hvm: evex.512.66.0f38.w0 13 /r ] AVX512,FUTURE
-VCVTPS2DQ xmmreg|mask|z,xmmrm128|b32 [rm:fv: evex.128.66.0f.w0 5b /r ] AVX512VL,AVX512,FUTURE
-VCVTPS2DQ ymmreg|mask|z,ymmrm256|b32 [rm:fv: evex.256.66.0f.w0 5b /r ] AVX512VL,AVX512,FUTURE
-VCVTPS2DQ zmmreg|mask|z,zmmrm512|b32|er [rm:fv: evex.512.66.0f.w0 5b /r ] AVX512,FUTURE
-VCVTPS2PD xmmreg|mask|z,xmmrm64|b32 [rm:hv: evex.128.0f.w0 5a /r ] AVX512VL,AVX512,FUTURE
-VCVTPS2PD ymmreg|mask|z,xmmrm128|b32 [rm:hv: evex.256.0f.w0 5a /r ] AVX512VL,AVX512,FUTURE
-VCVTPS2PD zmmreg|mask|z,ymmrm256|b32|sae [rm:hv: evex.512.0f.w0 5a /r ] AVX512,FUTURE
-VCVTPS2PH xmmreg|mask|z,xmmreg,imm8 [mri:hvm: evex.128.66.0f3a.w0 1d /r ib ] AVX512VL,AVX512,FUTURE
-VCVTPS2PH xmmreg|mask|z,ymmreg,imm8 [mri:hvm: evex.256.66.0f3a.w0 1d /r ib ] AVX512VL,AVX512,FUTURE
-VCVTPS2PH ymmreg|mask|z,zmmreg|sae,imm8 [mri:hvm: evex.512.66.0f3a.w0 1d /r ib ] AVX512,FUTURE
-VCVTPS2PH mem64|mask,xmmreg,imm8 [mri:hvm: evex.128.66.0f3a.w0 1d /r ib ] AVX512VL,AVX512,FUTURE
-VCVTPS2PH mem128|mask,ymmreg,imm8 [mri:hvm: evex.256.66.0f3a.w0 1d /r ib ] AVX512VL,AVX512,FUTURE
-VCVTPS2PH mem256|mask,zmmreg|sae,imm8 [mri:hvm: evex.512.66.0f3a.w0 1d /r ib ] AVX512,FUTURE
-VCVTPS2QQ xmmreg|mask|z,xmmrm64|b32 [rm:hv: evex.128.66.0f.w0 7b /r ] AVX512VL,AVX512DQ,FUTURE
-VCVTPS2QQ ymmreg|mask|z,xmmrm128|b32 [rm:hv: evex.256.66.0f.w0 7b /r ] AVX512VL,AVX512DQ,FUTURE
-VCVTPS2QQ zmmreg|mask|z,ymmrm256|b32|er [rm:hv: evex.512.66.0f.w0 7b /r ] AVX512DQ,FUTURE
-VCVTPS2UDQ xmmreg|mask|z,xmmrm128|b32 [rm:fv: evex.128.0f.w0 79 /r ] AVX512VL,AVX512,FUTURE
-VCVTPS2UDQ ymmreg|mask|z,ymmrm256|b32 [rm:fv: evex.256.0f.w0 79 /r ] AVX512VL,AVX512,FUTURE
-VCVTPS2UDQ zmmreg|mask|z,zmmrm512|b32|er [rm:fv: evex.512.0f.w0 79 /r ] AVX512,FUTURE
-VCVTPS2UQQ xmmreg|mask|z,xmmrm64|b32 [rm:hv: evex.128.66.0f.w0 79 /r ] AVX512VL,AVX512DQ,FUTURE
-VCVTPS2UQQ ymmreg|mask|z,xmmrm128|b32 [rm:hv: evex.256.66.0f.w0 79 /r ] AVX512VL,AVX512DQ,FUTURE
-VCVTPS2UQQ zmmreg|mask|z,ymmrm256|b32|er [rm:hv: evex.512.66.0f.w0 79 /r ] AVX512DQ,FUTURE
-VCVTQQ2PD xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.f3.0f.w1 e6 /r ] AVX512VL,AVX512DQ,FUTURE
-VCVTQQ2PD ymmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.f3.0f.w1 e6 /r ] AVX512VL,AVX512DQ,FUTURE
-VCVTQQ2PD zmmreg|mask|z,zmmrm512|b64|er [rm:fv: evex.512.f3.0f.w1 e6 /r ] AVX512DQ,FUTURE
-VCVTQQ2PS xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.0f.w1 5b /r ] AVX512VL,AVX512DQ,FUTURE
-VCVTQQ2PS xmmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.0f.w1 5b /r ] AVX512VL,AVX512DQ,FUTURE
-VCVTQQ2PS ymmreg|mask|z,zmmrm512|b64|er [rm:fv: evex.512.0f.w1 5b /r ] AVX512DQ,FUTURE
-VCVTSD2SI reg32,xmmrm64|er [rm:t1f64: evex.128.f2.0f.w0 2d /r ] AVX512,FUTURE
-VCVTSD2SI reg64,xmmrm64|er [rm:t1f64: evex.128.f2.0f.w1 2d /r ] AVX512,FUTURE
-VCVTSD2SS xmmreg|mask|z,xmmreg,xmmrm64|er [rvm:t1s: evex.nds.128.f2.0f.w1 5a /r ] AVX512,FUTURE
-VCVTSD2USI reg32,xmmrm64|er [rm:t1f64: evex.128.f2.0f.w0 79 /r ] AVX512,FUTURE
-VCVTSD2USI reg64,xmmrm64|er [rm:t1f64: evex.128.f2.0f.w1 79 /r ] AVX512,FUTURE
-VCVTSI2SD xmmreg,xmmreg|er,rm32 [rvm:t1s: evex.nds.128.f2.0f.w0 2a /r ] AVX512,FUTURE
-VCVTSI2SD xmmreg,xmmreg|er,rm64 [rvm:t1s: evex.nds.128.f2.0f.w1 2a /r ] AVX512,FUTURE
-VCVTSI2SS xmmreg,xmmreg|er,rm32 [rvm:t1s: evex.nds.128.f3.0f.w0 2a /r ] AVX512,FUTURE
-VCVTSI2SS xmmreg,xmmreg|er,rm64 [rvm:t1s: evex.nds.128.f3.0f.w1 2a /r ] AVX512,FUTURE
-VCVTSS2SD xmmreg|mask|z,xmmreg,xmmrm32|sae [rvm:t1s: evex.nds.128.f3.0f.w0 5a /r ] AVX512,FUTURE
-VCVTSS2SI reg32,xmmrm32|er [rm:t1f32: evex.128.f3.0f.w0 2d /r ] AVX512,FUTURE
-VCVTSS2SI reg64,xmmrm32|er [rm:t1f32: evex.128.f3.0f.w1 2d /r ] AVX512,FUTURE
-VCVTSS2USI reg32,xmmrm32|er [rm:t1f32: evex.128.f3.0f.w0 79 /r ] AVX512,FUTURE
-VCVTSS2USI reg64,xmmrm32|er [rm:t1f32: evex.128.f3.0f.w1 79 /r ] AVX512,FUTURE
-VCVTTPD2DQ xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.66.0f.w1 e6 /r ] AVX512VL,AVX512,FUTURE
-VCVTTPD2DQ xmmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.66.0f.w1 e6 /r ] AVX512VL,AVX512,FUTURE
-VCVTTPD2DQ ymmreg|mask|z,zmmrm512|b64|sae [rm:fv: evex.512.66.0f.w1 e6 /r ] AVX512,FUTURE
-VCVTTPD2QQ xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.66.0f.w1 7a /r ] AVX512VL,AVX512DQ,FUTURE
-VCVTTPD2QQ ymmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.66.0f.w1 7a /r ] AVX512VL,AVX512DQ,FUTURE
-VCVTTPD2QQ zmmreg|mask|z,zmmrm512|b64|sae [rm:fv: evex.512.66.0f.w1 7a /r ] AVX512DQ,FUTURE
-VCVTTPD2UDQ xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.0f.w1 78 /r ] AVX512VL,AVX512,FUTURE
-VCVTTPD2UDQ xmmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.0f.w1 78 /r ] AVX512VL,AVX512,FUTURE
-VCVTTPD2UDQ ymmreg|mask|z,zmmrm512|b64|sae [rm:fv: evex.512.0f.w1 78 /r ] AVX512,FUTURE
-VCVTTPD2UQQ xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.66.0f.w1 78 /r ] AVX512VL,AVX512DQ,FUTURE
-VCVTTPD2UQQ ymmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.66.0f.w1 78 /r ] AVX512VL,AVX512DQ,FUTURE
-VCVTTPD2UQQ zmmreg|mask|z,zmmrm512|b64|sae [rm:fv: evex.512.66.0f.w1 78 /r ] AVX512DQ,FUTURE
-VCVTTPS2DQ xmmreg|mask|z,xmmrm128|b32 [rm:fv: evex.128.f3.0f.w0 5b /r ] AVX512VL,AVX512,FUTURE
-VCVTTPS2DQ ymmreg|mask|z,ymmrm256|b32 [rm:fv: evex.256.f3.0f.w0 5b /r ] AVX512VL,AVX512,FUTURE
-VCVTTPS2DQ zmmreg|mask|z,zmmrm512|b32|sae [rm:fv: evex.512.f3.0f.w0 5b /r ] AVX512,FUTURE
-VCVTTPS2QQ xmmreg|mask|z,xmmrm64|b32 [rm:hv: evex.128.66.0f.w0 7a /r ] AVX512VL,AVX512DQ,FUTURE
-VCVTTPS2QQ ymmreg|mask|z,xmmrm128|b32 [rm:hv: evex.256.66.0f.w0 7a /r ] AVX512VL,AVX512DQ,FUTURE
-VCVTTPS2QQ zmmreg|mask|z,ymmrm256|b32|sae [rm:hv: evex.512.66.0f.w0 7a /r ] AVX512DQ,FUTURE
-VCVTTPS2UDQ xmmreg|mask|z,xmmrm128|b32 [rm:fv: evex.128.0f.w0 78 /r ] AVX512VL,AVX512,FUTURE
-VCVTTPS2UDQ ymmreg|mask|z,ymmrm256|b32 [rm:fv: evex.256.0f.w0 78 /r ] AVX512VL,AVX512,FUTURE
-VCVTTPS2UDQ zmmreg|mask|z,zmmrm512|b32|sae [rm:fv: evex.512.0f.w0 78 /r ] AVX512,FUTURE
-VCVTTPS2UQQ xmmreg|mask|z,xmmrm64|b32 [rm:hv: evex.128.66.0f.w0 78 /r ] AVX512VL,AVX512DQ,FUTURE
-VCVTTPS2UQQ ymmreg|mask|z,xmmrm128|b32 [rm:hv: evex.256.66.0f.w0 78 /r ] AVX512VL,AVX512DQ,FUTURE
-VCVTTPS2UQQ zmmreg|mask|z,ymmrm256|b32|sae [rm:hv: evex.512.66.0f.w0 78 /r ] AVX512DQ,FUTURE
-VCVTTSD2SI reg32,xmmrm64|sae [rm:t1f64: evex.128.f2.0f.w0 2c /r ] AVX512,FUTURE
-VCVTTSD2SI reg64,xmmrm64|sae [rm:t1f64: evex.128.f2.0f.w1 2c /r ] AVX512,FUTURE
-VCVTTSD2USI reg32,xmmrm64|sae [rm:t1f64: evex.128.f2.0f.w0 78 /r ] AVX512,FUTURE
-VCVTTSD2USI reg64,xmmrm64|sae [rm:t1f64: evex.128.f2.0f.w1 78 /r ] AVX512,FUTURE
-VCVTTSS2SI reg32,xmmrm32|sae [rm:t1f32: evex.128.f3.0f.w0 2c /r ] AVX512,FUTURE
-VCVTTSS2SI reg64,xmmrm32|sae [rm:t1f32: evex.128.f3.0f.w1 2c /r ] AVX512,FUTURE
-VCVTTSS2USI reg32,xmmrm32|sae [rm:t1f32: evex.128.f3.0f.w0 78 /r ] AVX512,FUTURE
-VCVTTSS2USI reg64,xmmrm32|sae [rm:t1f32: evex.128.f3.0f.w1 78 /r ] AVX512,FUTURE
-VCVTUDQ2PD xmmreg|mask|z,xmmrm64|b32 [rm:hv: evex.128.f3.0f.w0 7a /r ] AVX512VL,AVX512,FUTURE
-VCVTUDQ2PD ymmreg|mask|z,xmmrm128|b32 [rm:hv: evex.256.f3.0f.w0 7a /r ] AVX512VL,AVX512,FUTURE
-VCVTUDQ2PD zmmreg|mask|z,ymmrm256|b32|er [rm:hv: evex.512.f3.0f.w0 7a /r ] AVX512,FUTURE
-VCVTUDQ2PS xmmreg|mask|z,xmmrm128|b32 [rm:fv: evex.128.f2.0f.w0 7a /r ] AVX512VL,AVX512,FUTURE
-VCVTUDQ2PS ymmreg|mask|z,ymmrm256|b32 [rm:fv: evex.256.f2.0f.w0 7a /r ] AVX512VL,AVX512,FUTURE
-VCVTUDQ2PS zmmreg|mask|z,zmmrm512|b32|er [rm:fv: evex.512.f2.0f.w0 7a /r ] AVX512,FUTURE
-VCVTUQQ2PD xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.f3.0f.w1 7a /r ] AVX512VL,AVX512DQ,FUTURE
-VCVTUQQ2PD ymmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.f3.0f.w1 7a /r ] AVX512VL,AVX512DQ,FUTURE
-VCVTUQQ2PD zmmreg|mask|z,zmmrm512|b64|er [rm:fv: evex.512.f3.0f.w1 7a /r ] AVX512DQ,FUTURE
-VCVTUQQ2PS xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.f2.0f.w1 7a /r ] AVX512VL,AVX512DQ,FUTURE
-VCVTUQQ2PS xmmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.f2.0f.w1 7a /r ] AVX512VL,AVX512DQ,FUTURE
-VCVTUQQ2PS ymmreg|mask|z,zmmrm512|b64|er [rm:fv: evex.512.f2.0f.w1 7a /r ] AVX512DQ,FUTURE
-VCVTUSI2SD xmmreg,xmmreg|er,rm32 [rvm:t1s: evex.nds.128.f2.0f.w0 7b /r ] AVX512,FUTURE
-VCVTUSI2SD xmmreg,xmmreg|er,rm64 [rvm:t1s: evex.nds.128.f2.0f.w1 7b /r ] AVX512,FUTURE
-VCVTUSI2SS xmmreg,xmmreg|er,rm32 [rvm:t1s: evex.nds.128.f3.0f.w0 7b /r ] AVX512,FUTURE
-VCVTUSI2SS xmmreg,xmmreg|er,rm64 [rvm:t1s: evex.nds.128.f3.0f.w1 7b /r ] AVX512,FUTURE
-VDBPSADBW xmmreg|mask|z,xmmreg*,xmmrm128,imm8 [rvmi:fvm: evex.nds.128.66.0f3a.w0 42 /r ib ] AVX512VL,AVX512BW,FUTURE
-VDBPSADBW ymmreg|mask|z,ymmreg*,ymmrm256,imm8 [rvmi:fvm: evex.nds.256.66.0f3a.w0 42 /r ib ] AVX512VL,AVX512BW,FUTURE
-VDBPSADBW zmmreg|mask|z,zmmreg*,zmmrm512,imm8 [rvmi:fvm: evex.nds.512.66.0f3a.w0 42 /r ib ] AVX512BW,FUTURE
-VDIVPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 5e /r ] AVX512VL,AVX512,FUTURE
-VDIVPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 5e /r ] AVX512VL,AVX512,FUTURE
-VDIVPD zmmreg|mask|z,zmmreg*,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f.w1 5e /r ] AVX512,FUTURE
-VDIVPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.0f.w0 5e /r ] AVX512VL,AVX512,FUTURE
-VDIVPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.0f.w0 5e /r ] AVX512VL,AVX512,FUTURE
-VDIVPS zmmreg|mask|z,zmmreg*,zmmrm512|b32|er [rvm:fv: evex.nds.512.0f.w0 5e /r ] AVX512,FUTURE
-VDIVSD xmmreg|mask|z,xmmreg*,xmmrm64|er [rvm:t1s: evex.nds.128.f2.0f.w1 5e /r ] AVX512,FUTURE
-VDIVSS xmmreg|mask|z,xmmreg*,xmmrm32|er [rvm:t1s: evex.nds.128.f3.0f.w0 5e /r ] AVX512,FUTURE
-VEXP2PD zmmreg|mask|z,zmmrm512|b64|sae [rm:fv: evex.512.66.0f38.w1 c8 /r ] AVX512ER,FUTURE
-VEXP2PS zmmreg|mask|z,zmmrm512|b32|sae [rm:fv: evex.512.66.0f38.w0 c8 /r ] AVX512ER,FUTURE
-VEXPANDPD xmmreg|mask|z,mem128 [rm:t1s: evex.128.66.0f38.w1 88 /r ] AVX512VL,AVX512,FUTURE
-VEXPANDPD ymmreg|mask|z,mem256 [rm:t1s: evex.256.66.0f38.w1 88 /r ] AVX512VL,AVX512,FUTURE
-VEXPANDPD zmmreg|mask|z,mem512 [rm:t1s: evex.512.66.0f38.w1 88 /r ] AVX512,FUTURE
-VEXPANDPD xmmreg|mask|z,xmmreg [rm:t1s: evex.128.66.0f38.w1 88 /r ] AVX512VL,AVX512,FUTURE
-VEXPANDPD ymmreg|mask|z,ymmreg [rm:t1s: evex.256.66.0f38.w1 88 /r ] AVX512VL,AVX512,FUTURE
-VEXPANDPD zmmreg|mask|z,zmmreg [rm:t1s: evex.512.66.0f38.w1 88 /r ] AVX512,FUTURE
-VEXPANDPS xmmreg|mask|z,mem128 [rm:t1s: evex.128.66.0f38.w0 88 /r ] AVX512VL,AVX512,FUTURE
-VEXPANDPS ymmreg|mask|z,mem256 [rm:t1s: evex.256.66.0f38.w0 88 /r ] AVX512VL,AVX512,FUTURE
-VEXPANDPS zmmreg|mask|z,mem512 [rm:t1s: evex.512.66.0f38.w0 88 /r ] AVX512,FUTURE
-VEXPANDPS xmmreg|mask|z,xmmreg [rm:t1s: evex.128.66.0f38.w0 88 /r ] AVX512VL,AVX512,FUTURE
-VEXPANDPS ymmreg|mask|z,ymmreg [rm:t1s: evex.256.66.0f38.w0 88 /r ] AVX512VL,AVX512,FUTURE
-VEXPANDPS zmmreg|mask|z,zmmreg [rm:t1s: evex.512.66.0f38.w0 88 /r ] AVX512,FUTURE
-VEXTRACTF32X4 xmmreg|mask|z,ymmreg,imm8 [mri: evex.256.66.0f3a.w0 19 /r ib ] AVX512VL,AVX512,FUTURE
-VEXTRACTF32X4 xmmreg|mask|z,zmmreg,imm8 [mri: evex.512.66.0f3a.w0 19 /r ib ] AVX512,FUTURE
-VEXTRACTF32X4 mem128|mask,ymmreg,imm8 [mri:t4: evex.256.66.0f3a.w0 19 /r ib ] AVX512VL,AVX512,FUTURE
-VEXTRACTF32X4 mem128|mask,zmmreg,imm8 [mri:t4: evex.512.66.0f3a.w0 19 /r ib ] AVX512,FUTURE
-VEXTRACTF32X8 ymmreg|mask|z,zmmreg,imm8 [mri: evex.512.66.0f3a.w0 1b /r ib ] AVX512DQ,FUTURE
-VEXTRACTF32X8 mem256|mask,zmmreg,imm8 [mri:t8: evex.512.66.0f3a.w0 1b /r ib ] AVX512DQ,FUTURE
-VEXTRACTF64X2 xmmreg|mask|z,ymmreg,imm8 [mri: evex.256.66.0f3a.w1 19 /r ib ] AVX512VL,AVX512DQ,FUTURE
-VEXTRACTF64X2 xmmreg|mask|z,zmmreg,imm8 [mri: evex.512.66.0f3a.w1 19 /r ib ] AVX512DQ,FUTURE
-VEXTRACTF64X2 mem128|mask,ymmreg,imm8 [mri:t2: evex.256.66.0f3a.w1 19 /r ib ] AVX512VL,AVX512DQ,FUTURE
-VEXTRACTF64X2 mem128|mask,zmmreg,imm8 [mri:t2: evex.512.66.0f3a.w1 19 /r ib ] AVX512DQ,FUTURE
-VEXTRACTF64X4 ymmreg|mask|z,zmmreg,imm8 [mri: evex.512.66.0f3a.w1 1b /r ib ] AVX512,FUTURE
-VEXTRACTF64X4 mem256|mask,zmmreg,imm8 [mri:t4: evex.512.66.0f3a.w1 1b /r ib ] AVX512,FUTURE
-VEXTRACTI32X4 xmmreg|mask|z,ymmreg,imm8 [mri: evex.256.66.0f3a.w0 39 /r ib ] AVX512VL,AVX512,FUTURE
-VEXTRACTI32X4 xmmreg|mask|z,zmmreg,imm8 [mri: evex.512.66.0f3a.w0 39 /r ib ] AVX512,FUTURE
-VEXTRACTI32X4 mem128|mask,ymmreg,imm8 [mri:t4: evex.256.66.0f3a.w0 39 /r ib ] AVX512VL,AVX512,FUTURE
-VEXTRACTI32X4 mem128|mask,zmmreg,imm8 [mri:t4: evex.512.66.0f3a.w0 39 /r ib ] AVX512,FUTURE
-VEXTRACTI32X8 ymmreg|mask|z,zmmreg,imm8 [mri: evex.512.66.0f3a.w0 3b /r ib ] AVX512DQ,FUTURE
-VEXTRACTI32X8 mem256|mask,zmmreg,imm8 [mri:t8: evex.512.66.0f3a.w0 3b /r ib ] AVX512DQ,FUTURE
-VEXTRACTI64X2 xmmreg|mask|z,ymmreg,imm8 [mri: evex.256.66.0f3a.w1 39 /r ib ] AVX512VL,AVX512DQ,FUTURE
-VEXTRACTI64X2 xmmreg|mask|z,zmmreg,imm8 [mri: evex.512.66.0f3a.w1 39 /r ib ] AVX512DQ,FUTURE
-VEXTRACTI64X2 mem128|mask,ymmreg,imm8 [mri:t2: evex.256.66.0f3a.w1 39 /r ib ] AVX512VL,AVX512DQ,FUTURE
-VEXTRACTI64X2 mem128|mask,zmmreg,imm8 [mri:t2: evex.512.66.0f3a.w1 39 /r ib ] AVX512DQ,FUTURE
-VEXTRACTI64X4 ymmreg|mask|z,zmmreg,imm8 [mri: evex.512.66.0f3a.w1 3b /r ib ] AVX512,FUTURE
-VEXTRACTI64X4 mem256|mask,zmmreg,imm8 [mri:t4: evex.512.66.0f3a.w1 3b /r ib ] AVX512,FUTURE
-VEXTRACTPS reg32,xmmreg,imm8 [mri:t1s: evex.128.66.0f3a.wig 17 /r ib ] AVX512,FUTURE
-VEXTRACTPS reg64,xmmreg,imm8 [mri:t1s: evex.128.66.0f3a.wig 17 /r ib ] AVX512,FUTURE
-VEXTRACTPS mem32,xmmreg,imm8 [mri:t1s: evex.128.66.0f3a.wig 17 /r ib ] AVX512,FUTURE
-VFIXUPIMMPD xmmreg|mask|z,xmmreg*,xmmrm128|b64,imm8 [rvmi:fv: evex.nds.128.66.0f3a.w1 54 /r ib ] AVX512VL,AVX512,FUTURE
-VFIXUPIMMPD ymmreg|mask|z,ymmreg*,ymmrm256|b64,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w1 54 /r ib ] AVX512VL,AVX512,FUTURE
-VFIXUPIMMPD zmmreg|mask|z,zmmreg*,zmmrm512|b64|sae,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w1 54 /r ib ] AVX512,FUTURE
-VFIXUPIMMPS xmmreg|mask|z,xmmreg*,xmmrm128|b32,imm8 [rvmi:fv: evex.nds.128.66.0f3a.w0 54 /r ib ] AVX512VL,AVX512,FUTURE
-VFIXUPIMMPS ymmreg|mask|z,ymmreg*,ymmrm256|b32,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w0 54 /r ib ] AVX512VL,AVX512,FUTURE
-VFIXUPIMMPS zmmreg|mask|z,zmmreg*,zmmrm512|b32|sae,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w0 54 /r ib ] AVX512,FUTURE
-VFIXUPIMMSD xmmreg|mask|z,xmmreg*,xmmrm64|sae,imm8 [rvmi:t1s: evex.nds.128.66.0f3a.w1 55 /r ib ] AVX512,FUTURE
-VFIXUPIMMSS xmmreg|mask|z,xmmreg*,xmmrm32|sae,imm8 [rvmi:t1s: evex.nds.128.66.0f3a.w0 55 /r ib ] AVX512,FUTURE
-VFMADD132PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 98 /r ] AVX512VL,AVX512,FUTURE
-VFMADD132PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 98 /r ] AVX512VL,AVX512,FUTURE
-VFMADD132PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 98 /r ] AVX512,FUTURE
-VFMADD132PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 98 /r ] AVX512VL,AVX512,FUTURE
-VFMADD132PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 98 /r ] AVX512VL,AVX512,FUTURE
-VFMADD132PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 98 /r ] AVX512,FUTURE
-VFMADD132SD xmmreg|mask|z,xmmreg,xmmrm64|er [rvm:t1s: evex.nds.128.66.0f38.w1 99 /r ] AVX512,FUTURE
-VFMADD132SS xmmreg|mask|z,xmmreg,xmmrm32|er [rvm:t1s: evex.nds.128.66.0f38.w0 99 /r ] AVX512,FUTURE
-VFMADD213PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 a8 /r ] AVX512VL,AVX512,FUTURE
-VFMADD213PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 a8 /r ] AVX512VL,AVX512,FUTURE
-VFMADD213PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 a8 /r ] AVX512,FUTURE
-VFMADD213PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 a8 /r ] AVX512VL,AVX512,FUTURE
-VFMADD213PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 a8 /r ] AVX512VL,AVX512,FUTURE
-VFMADD213PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 a8 /r ] AVX512,FUTURE
-VFMADD213SD xmmreg|mask|z,xmmreg,xmmrm64|er [rvm:t1s: evex.nds.128.66.0f38.w1 a9 /r ] AVX512,FUTURE
-VFMADD213SS xmmreg|mask|z,xmmreg,xmmrm32|er [rvm:t1s: evex.nds.128.66.0f38.w0 a9 /r ] AVX512,FUTURE
-VFMADD231PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 b8 /r ] AVX512VL,AVX512,FUTURE
-VFMADD231PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 b8 /r ] AVX512VL,AVX512,FUTURE
-VFMADD231PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 b8 /r ] AVX512,FUTURE
-VFMADD231PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 b8 /r ] AVX512VL,AVX512,FUTURE
-VFMADD231PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 b8 /r ] AVX512VL,AVX512,FUTURE
-VFMADD231PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 b8 /r ] AVX512,FUTURE
-VFMADD231SD xmmreg|mask|z,xmmreg,xmmrm64|er [rvm:t1s: evex.nds.128.66.0f38.w1 b9 /r ] AVX512,FUTURE
-VFMADD231SS xmmreg|mask|z,xmmreg,xmmrm32|er [rvm:t1s: evex.nds.128.66.0f38.w0 b9 /r ] AVX512,FUTURE
-VFMADDSUB132PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 96 /r ] AVX512VL,AVX512,FUTURE
-VFMADDSUB132PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 96 /r ] AVX512VL,AVX512,FUTURE
-VFMADDSUB132PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 96 /r ] AVX512,FUTURE
-VFMADDSUB132PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 96 /r ] AVX512VL,AVX512,FUTURE
-VFMADDSUB132PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 96 /r ] AVX512VL,AVX512,FUTURE
-VFMADDSUB132PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 96 /r ] AVX512,FUTURE
-VFMADDSUB213PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 a6 /r ] AVX512VL,AVX512,FUTURE
-VFMADDSUB213PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 a6 /r ] AVX512VL,AVX512,FUTURE
-VFMADDSUB213PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 a6 /r ] AVX512,FUTURE
-VFMADDSUB213PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 a6 /r ] AVX512VL,AVX512,FUTURE
-VFMADDSUB213PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 a6 /r ] AVX512VL,AVX512,FUTURE
-VFMADDSUB213PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 a6 /r ] AVX512,FUTURE
-VFMADDSUB231PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 b6 /r ] AVX512VL,AVX512,FUTURE
-VFMADDSUB231PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 b6 /r ] AVX512VL,AVX512,FUTURE
-VFMADDSUB231PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 b6 /r ] AVX512,FUTURE
-VFMADDSUB231PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 b6 /r ] AVX512VL,AVX512,FUTURE
-VFMADDSUB231PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 b6 /r ] AVX512VL,AVX512,FUTURE
-VFMADDSUB231PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 b6 /r ] AVX512,FUTURE
-VFMSUB132PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 9a /r ] AVX512VL,AVX512,FUTURE
-VFMSUB132PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 9a /r ] AVX512VL,AVX512,FUTURE
-VFMSUB132PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 9a /r ] AVX512,FUTURE
-VFMSUB132PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 9a /r ] AVX512VL,AVX512,FUTURE
-VFMSUB132PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 9a /r ] AVX512VL,AVX512,FUTURE
-VFMSUB132PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 9a /r ] AVX512,FUTURE
-VFMSUB132SD xmmreg|mask|z,xmmreg,xmmrm64|er [rvm:t1s: evex.nds.128.66.0f38.w1 9b /r ] AVX512,FUTURE
-VFMSUB132SS xmmreg|mask|z,xmmreg,xmmrm32|er [rvm:t1s: evex.nds.128.66.0f38.w0 9b /r ] AVX512,FUTURE
-VFMSUB213PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 aa /r ] AVX512VL,AVX512,FUTURE
-VFMSUB213PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 aa /r ] AVX512VL,AVX512,FUTURE
-VFMSUB213PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 aa /r ] AVX512,FUTURE
-VFMSUB213PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 aa /r ] AVX512VL,AVX512,FUTURE
-VFMSUB213PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 aa /r ] AVX512VL,AVX512,FUTURE
-VFMSUB213PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 aa /r ] AVX512,FUTURE
-VFMSUB213SD xmmreg|mask|z,xmmreg,xmmrm64|er [rvm:t1s: evex.nds.128.66.0f38.w1 ab /r ] AVX512,FUTURE
-VFMSUB213SS xmmreg|mask|z,xmmreg,xmmrm32|er [rvm:t1s: evex.nds.128.66.0f38.w0 ab /r ] AVX512,FUTURE
-VFMSUB231PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 ba /r ] AVX512VL,AVX512,FUTURE
-VFMSUB231PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 ba /r ] AVX512VL,AVX512,FUTURE
-VFMSUB231PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 ba /r ] AVX512,FUTURE
-VFMSUB231PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 ba /r ] AVX512VL,AVX512,FUTURE
-VFMSUB231PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 ba /r ] AVX512VL,AVX512,FUTURE
-VFMSUB231PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 ba /r ] AVX512,FUTURE
-VFMSUB231SD xmmreg|mask|z,xmmreg,xmmrm64|er [rvm:t1s: evex.nds.128.66.0f38.w1 bb /r ] AVX512,FUTURE
-VFMSUB231SS xmmreg|mask|z,xmmreg,xmmrm32|er [rvm:t1s: evex.nds.128.66.0f38.w0 bb /r ] AVX512,FUTURE
-VFMSUBADD132PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 97 /r ] AVX512VL,AVX512,FUTURE
-VFMSUBADD132PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 97 /r ] AVX512VL,AVX512,FUTURE
-VFMSUBADD132PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 97 /r ] AVX512,FUTURE
-VFMSUBADD132PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 97 /r ] AVX512VL,AVX512,FUTURE
-VFMSUBADD132PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 97 /r ] AVX512VL,AVX512,FUTURE
-VFMSUBADD132PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 97 /r ] AVX512,FUTURE
-VFMSUBADD213PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 a7 /r ] AVX512VL,AVX512,FUTURE
-VFMSUBADD213PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 a7 /r ] AVX512VL,AVX512,FUTURE
-VFMSUBADD213PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 a7 /r ] AVX512,FUTURE
-VFMSUBADD213PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 a7 /r ] AVX512VL,AVX512,FUTURE
-VFMSUBADD213PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 a7 /r ] AVX512VL,AVX512,FUTURE
-VFMSUBADD213PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 a7 /r ] AVX512,FUTURE
-VFMSUBADD231PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 b7 /r ] AVX512VL,AVX512,FUTURE
-VFMSUBADD231PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 b7 /r ] AVX512VL,AVX512,FUTURE
-VFMSUBADD231PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 b7 /r ] AVX512,FUTURE
-VFMSUBADD231PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 b7 /r ] AVX512VL,AVX512,FUTURE
-VFMSUBADD231PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 b7 /r ] AVX512VL,AVX512,FUTURE
-VFMSUBADD231PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 b7 /r ] AVX512,FUTURE
-VFNMADD132PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 9c /r ] AVX512VL,AVX512,FUTURE
-VFNMADD132PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 9c /r ] AVX512VL,AVX512,FUTURE
-VFNMADD132PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 9c /r ] AVX512,FUTURE
-VFNMADD132PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 9c /r ] AVX512VL,AVX512,FUTURE
-VFNMADD132PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 9c /r ] AVX512VL,AVX512,FUTURE
-VFNMADD132PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 9c /r ] AVX512,FUTURE
-VFNMADD132SD xmmreg|mask|z,xmmreg,xmmrm64|er [rvm:t1s: evex.nds.128.66.0f38.w1 9d /r ] AVX512,FUTURE
-VFNMADD132SS xmmreg|mask|z,xmmreg,xmmrm32|er [rvm:t1s: evex.nds.128.66.0f38.w0 9d /r ] AVX512,FUTURE
-VFNMADD213PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 ac /r ] AVX512VL,AVX512,FUTURE
-VFNMADD213PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 ac /r ] AVX512VL,AVX512,FUTURE
-VFNMADD213PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 ac /r ] AVX512,FUTURE
-VFNMADD213PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 ac /r ] AVX512VL,AVX512,FUTURE
-VFNMADD213PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 ac /r ] AVX512VL,AVX512,FUTURE
-VFNMADD213PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 ac /r ] AVX512,FUTURE
-VFNMADD213SD xmmreg|mask|z,xmmreg,xmmrm64|er [rvm:t1s: evex.nds.128.66.0f38.w1 ad /r ] AVX512,FUTURE
-VFNMADD213SS xmmreg|mask|z,xmmreg,xmmrm32|er [rvm:t1s: evex.nds.128.66.0f38.w0 ad /r ] AVX512,FUTURE
-VFNMADD231PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 bc /r ] AVX512VL,AVX512,FUTURE
-VFNMADD231PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 bc /r ] AVX512VL,AVX512,FUTURE
-VFNMADD231PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 bc /r ] AVX512,FUTURE
-VFNMADD231PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 bc /r ] AVX512VL,AVX512,FUTURE
-VFNMADD231PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 bc /r ] AVX512VL,AVX512,FUTURE
-VFNMADD231PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 bc /r ] AVX512,FUTURE
-VFNMADD231SD xmmreg|mask|z,xmmreg,xmmrm64|er [rvm:t1s: evex.nds.128.66.0f38.w1 bd /r ] AVX512,FUTURE
-VFNMADD231SS xmmreg|mask|z,xmmreg,xmmrm32|er [rvm:t1s: evex.nds.128.66.0f38.w0 bd /r ] AVX512,FUTURE
-VFNMSUB132PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 9e /r ] AVX512VL,AVX512,FUTURE
-VFNMSUB132PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 9e /r ] AVX512VL,AVX512,FUTURE
-VFNMSUB132PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 9e /r ] AVX512,FUTURE
-VFNMSUB132PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 9e /r ] AVX512VL,AVX512,FUTURE
-VFNMSUB132PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 9e /r ] AVX512VL,AVX512,FUTURE
-VFNMSUB132PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 9e /r ] AVX512,FUTURE
-VFNMSUB132SD xmmreg|mask|z,xmmreg,xmmrm64|er [rvm:t1s: evex.nds.128.66.0f38.w1 9f /r ] AVX512,FUTURE
-VFNMSUB132SS xmmreg|mask|z,xmmreg,xmmrm32|er [rvm:t1s: evex.nds.128.66.0f38.w0 9f /r ] AVX512,FUTURE
-VFNMSUB213PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 ae /r ] AVX512VL,AVX512,FUTURE
-VFNMSUB213PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 ae /r ] AVX512VL,AVX512,FUTURE
-VFNMSUB213PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 ae /r ] AVX512,FUTURE
-VFNMSUB213PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 ae /r ] AVX512VL,AVX512,FUTURE
-VFNMSUB213PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 ae /r ] AVX512VL,AVX512,FUTURE
-VFNMSUB213PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 ae /r ] AVX512,FUTURE
-VFNMSUB213SD xmmreg|mask|z,xmmreg,xmmrm64|er [rvm:t1s: evex.nds.128.66.0f38.w1 af /r ] AVX512,FUTURE
-VFNMSUB213SS xmmreg|mask|z,xmmreg,xmmrm32|er [rvm:t1s: evex.nds.128.66.0f38.w0 af /r ] AVX512,FUTURE
-VFNMSUB231PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 be /r ] AVX512VL,AVX512,FUTURE
-VFNMSUB231PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 be /r ] AVX512VL,AVX512,FUTURE
-VFNMSUB231PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 be /r ] AVX512,FUTURE
-VFNMSUB231PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 be /r ] AVX512VL,AVX512,FUTURE
-VFNMSUB231PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 be /r ] AVX512VL,AVX512,FUTURE
-VFNMSUB231PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 be /r ] AVX512,FUTURE
-VFNMSUB231SD xmmreg|mask|z,xmmreg,xmmrm64|er [rvm:t1s: evex.nds.128.66.0f38.w1 bf /r ] AVX512,FUTURE
-VFNMSUB231SS xmmreg|mask|z,xmmreg,xmmrm32|er [rvm:t1s: evex.nds.128.66.0f38.w0 bf /r ] AVX512,FUTURE
-VFPCLASSPD kreg|mask,xmmrm128|b64,imm8 [rmi:fv: evex.128.66.0f3a.w1 66 /r ib ] AVX512VL,AVX512DQ,FUTURE
-VFPCLASSPD kreg|mask,ymmrm256|b64,imm8 [rmi:fv: evex.256.66.0f3a.w1 66 /r ib ] AVX512VL,AVX512DQ,FUTURE
-VFPCLASSPD kreg|mask,zmmrm512|b64,imm8 [rmi:fv: evex.512.66.0f3a.w1 66 /r ib ] AVX512DQ,FUTURE
-VFPCLASSPS kreg|mask,xmmrm128|b32,imm8 [rmi:fv: evex.128.66.0f3a.w0 66 /r ib ] AVX512VL,AVX512DQ,FUTURE
-VFPCLASSPS kreg|mask,ymmrm256|b32,imm8 [rmi:fv: evex.256.66.0f3a.w0 66 /r ib ] AVX512VL,AVX512DQ,FUTURE
-VFPCLASSPS kreg|mask,zmmrm512|b32,imm8 [rmi:fv: evex.512.66.0f3a.w0 66 /r ib ] AVX512DQ,FUTURE
-VFPCLASSSD kreg|mask,xmmrm64,imm8 [rmi:t1s: evex.128.66.0f3a.w1 67 /r ib ] AVX512DQ,FUTURE
-VFPCLASSSS kreg|mask,xmmrm32,imm8 [rmi:t1s: evex.128.66.0f3a.w0 67 /r ib ] AVX512DQ,FUTURE
-VGATHERDPD xmmreg|mask,xmem64 [rm:t1s: vsibx evex.128.66.0f38.w1 92 /r ] AVX512VL,AVX512,FUTURE
-VGATHERDPD ymmreg|mask,xmem64 [rm:t1s: vsibx evex.256.66.0f38.w1 92 /r ] AVX512VL,AVX512,FUTURE
-VGATHERDPD zmmreg|mask,ymem64 [rm:t1s: vsiby evex.512.66.0f38.w1 92 /r ] AVX512,FUTURE
-VGATHERDPS xmmreg|mask,xmem32 [rm:t1s: vsibx evex.128.66.0f38.w0 92 /r ] AVX512VL,AVX512,FUTURE
-VGATHERDPS ymmreg|mask,ymem32 [rm:t1s: vsiby evex.256.66.0f38.w0 92 /r ] AVX512VL,AVX512,FUTURE
-VGATHERDPS zmmreg|mask,zmem32 [rm:t1s: vsibz evex.512.66.0f38.w0 92 /r ] AVX512,FUTURE
-VGATHERPF0DPD ymem64|mask [m:t1s: vsiby evex.512.66.0f38.w1 c6 /1 ] AVX512PF,FUTURE
-VGATHERPF0DPS zmem32|mask [m:t1s: vsibz evex.512.66.0f38.w0 c6 /1 ] AVX512PF,FUTURE
-VGATHERPF0QPD zmem64|mask [m:t1s: vsibz evex.512.66.0f38.w1 c7 /1 ] AVX512PF,FUTURE
-VGATHERPF0QPS zmem32|mask [m:t1s: vsibz evex.512.66.0f38.w0 c7 /1 ] AVX512PF,FUTURE
-VGATHERPF1DPD ymem64|mask [m:t1s: vsiby evex.512.66.0f38.w1 c6 /2 ] AVX512PF,FUTURE
-VGATHERPF1DPS zmem32|mask [m:t1s: vsibz evex.512.66.0f38.w0 c6 /2 ] AVX512PF,FUTURE
-VGATHERPF1QPD zmem64|mask [m:t1s: vsibz evex.512.66.0f38.w1 c7 /2 ] AVX512PF,FUTURE
-VGATHERPF1QPS zmem32|mask [m:t1s: vsibz evex.512.66.0f38.w0 c7 /2 ] AVX512PF,FUTURE
-VGATHERQPD xmmreg|mask,xmem64 [rm:t1s: vsibx evex.128.66.0f38.w1 93 /r ] AVX512VL,AVX512,FUTURE
-VGATHERQPD ymmreg|mask,ymem64 [rm:t1s: vsiby evex.256.66.0f38.w1 93 /r ] AVX512VL,AVX512,FUTURE
-VGATHERQPD zmmreg|mask,zmem64 [rm:t1s: vsibz evex.512.66.0f38.w1 93 /r ] AVX512,FUTURE
-VGATHERQPS xmmreg|mask,xmem32 [rm:t1s: vsibx evex.128.66.0f38.w0 93 /r ] AVX512VL,AVX512,FUTURE
-VGATHERQPS xmmreg|mask,ymem32 [rm:t1s: vsiby evex.256.66.0f38.w0 93 /r ] AVX512VL,AVX512,FUTURE
-VGATHERQPS ymmreg|mask,zmem32 [rm:t1s: vsibz evex.512.66.0f38.w0 93 /r ] AVX512,FUTURE
-VGETEXPPD xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.66.0f38.w1 42 /r ] AVX512VL,AVX512,FUTURE
-VGETEXPPD ymmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.66.0f38.w1 42 /r ] AVX512VL,AVX512,FUTURE
-VGETEXPPD zmmreg|mask|z,zmmrm512|b64|sae [rm:fv: evex.512.66.0f38.w1 42 /r ] AVX512,FUTURE
-VGETEXPPS xmmreg|mask|z,xmmrm128|b32 [rm:fv: evex.128.66.0f38.w0 42 /r ] AVX512VL,AVX512,FUTURE
-VGETEXPPS ymmreg|mask|z,ymmrm256|b32 [rm:fv: evex.256.66.0f38.w0 42 /r ] AVX512VL,AVX512,FUTURE
-VGETEXPPS zmmreg|mask|z,zmmrm512|b32|sae [rm:fv: evex.512.66.0f38.w0 42 /r ] AVX512,FUTURE
-VGETEXPSD xmmreg|mask|z,xmmreg,xmmrm64|sae [rvm:t1s: evex.nds.128.66.0f38.w1 43 /r ] AVX512,FUTURE
-VGETEXPSS xmmreg|mask|z,xmmreg,xmmrm32|sae [rvm:t1s: evex.nds.128.66.0f38.w0 43 /r ] AVX512,FUTURE
-VGETMANTPD xmmreg|mask|z,xmmrm128|b64,imm8 [rmi:fv: evex.128.66.0f3a.w1 26 /r ib ] AVX512VL,AVX512,FUTURE
-VGETMANTPD ymmreg|mask|z,ymmrm256|b64,imm8 [rmi:fv: evex.256.66.0f3a.w1 26 /r ib ] AVX512VL,AVX512,FUTURE
-VGETMANTPD zmmreg|mask|z,zmmrm512|b64|sae,imm8 [rmi:fv: evex.512.66.0f3a.w1 26 /r ib ] AVX512,FUTURE
-VGETMANTPS xmmreg|mask|z,xmmrm128|b32,imm8 [rmi:fv: evex.128.66.0f3a.w0 26 /r ib ] AVX512VL,AVX512,FUTURE
-VGETMANTPS ymmreg|mask|z,ymmrm256|b32,imm8 [rmi:fv: evex.256.66.0f3a.w0 26 /r ib ] AVX512VL,AVX512,FUTURE
-VGETMANTPS zmmreg|mask|z,zmmrm512|b32|sae,imm8 [rmi:fv: evex.512.66.0f3a.w0 26 /r ib ] AVX512,FUTURE
-VGETMANTSD xmmreg|mask|z,xmmreg,xmmrm64|sae,imm8 [rvmi:t1s: evex.nds.128.66.0f3a.w1 27 /r ib ] AVX512,FUTURE
-VGETMANTSS xmmreg|mask|z,xmmreg,xmmrm32|sae,imm8 [rvmi:t1s: evex.nds.128.66.0f3a.w0 27 /r ib ] AVX512,FUTURE
-VINSERTF32X4 ymmreg|mask|z,ymmreg*,xmmrm128,imm8 [rvmi:t4: evex.nds.256.66.0f3a.w0 18 /r ib ] AVX512VL,AVX512,FUTURE
-VINSERTF32X4 zmmreg|mask|z,zmmreg*,xmmrm128,imm8 [rvmi:t4: evex.nds.512.66.0f3a.w0 18 /r ib ] AVX512,FUTURE
-VINSERTF32X8 zmmreg|mask|z,zmmreg*,ymmrm256,imm8 [rvmi:t8: evex.nds.512.66.0f3a.w0 1a /r ib ] AVX512DQ,FUTURE
-VINSERTF64X2 ymmreg|mask|z,ymmreg*,xmmrm128,imm8 [rvmi:t2: evex.nds.256.66.0f3a.w1 18 /r ib ] AVX512VL,AVX512DQ,FUTURE
-VINSERTF64X2 zmmreg|mask|z,zmmreg*,xmmrm128,imm8 [rvmi:t2: evex.nds.512.66.0f3a.w1 18 /r ib ] AVX512DQ,FUTURE
-VINSERTF64X4 zmmreg|mask|z,zmmreg*,ymmrm256,imm8 [rvmi:t4: evex.nds.512.66.0f3a.w1 1a /r ib ] AVX512,FUTURE
-VINSERTI32X4 ymmreg|mask|z,ymmreg*,xmmrm128,imm8 [rvmi:t4: evex.nds.256.66.0f3a.w0 38 /r ib ] AVX512VL,AVX512,FUTURE
-VINSERTI32X4 zmmreg|mask|z,zmmreg*,xmmrm128,imm8 [rvmi:t4: evex.nds.512.66.0f3a.w0 38 /r ib ] AVX512,FUTURE
-VINSERTI32X8 zmmreg|mask|z,zmmreg*,ymmrm256,imm8 [rvmi:t8: evex.nds.512.66.0f3a.w0 3a /r ib ] AVX512DQ,FUTURE
-VINSERTI64X2 ymmreg|mask|z,ymmreg*,xmmrm128,imm8 [rvmi:t2: evex.nds.256.66.0f3a.w1 38 /r ib ] AVX512VL,AVX512DQ,FUTURE
-VINSERTI64X2 zmmreg|mask|z,zmmreg*,xmmrm128,imm8 [rvmi:t2: evex.nds.512.66.0f3a.w1 38 /r ib ] AVX512DQ,FUTURE
-VINSERTI64X4 zmmreg|mask|z,zmmreg*,ymmrm256,imm8 [rvmi:t4: evex.nds.512.66.0f3a.w1 3a /r ib ] AVX512,FUTURE
-VINSERTPS xmmreg,xmmreg*,xmmrm32,imm8 [rvmi:t1s: evex.nds.128.66.0f3a.w0 21 /r ib ] AVX512,FUTURE
-VMAXPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 5f /r ] AVX512VL,AVX512,FUTURE
-VMAXPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 5f /r ] AVX512VL,AVX512,FUTURE
-VMAXPD zmmreg|mask|z,zmmreg*,zmmrm512|b64|sae [rvm:fv: evex.nds.512.66.0f.w1 5f /r ] AVX512,FUTURE
-VMAXPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.0f.w0 5f /r ] AVX512VL,AVX512,FUTURE
-VMAXPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.0f.w0 5f /r ] AVX512VL,AVX512,FUTURE
-VMAXPS zmmreg|mask|z,zmmreg*,zmmrm512|b32|sae [rvm:fv: evex.nds.512.0f.w0 5f /r ] AVX512,FUTURE
-VMAXSD xmmreg|mask|z,xmmreg*,xmmrm64|sae [rvm:t1s: evex.nds.128.f2.0f.w1 5f /r ] AVX512,FUTURE
-VMAXSS xmmreg|mask|z,xmmreg*,xmmrm32|sae [rvm:t1s: evex.nds.128.f3.0f.w0 5f /r ] AVX512,FUTURE
-VMINPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 5d /r ] AVX512VL,AVX512,FUTURE
-VMINPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 5d /r ] AVX512VL,AVX512,FUTURE
-VMINPD zmmreg|mask|z,zmmreg*,zmmrm512|b64|sae [rvm:fv: evex.nds.512.66.0f.w1 5d /r ] AVX512,FUTURE
-VMINPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.0f.w0 5d /r ] AVX512VL,AVX512,FUTURE
-VMINPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.0f.w0 5d /r ] AVX512VL,AVX512,FUTURE
-VMINPS zmmreg|mask|z,zmmreg*,zmmrm512|b32|sae [rvm:fv: evex.nds.512.0f.w0 5d /r ] AVX512,FUTURE
-VMINSD xmmreg|mask|z,xmmreg*,xmmrm64|sae [rvm:t1s: evex.nds.128.f2.0f.w1 5d /r ] AVX512,FUTURE
-VMINSS xmmreg|mask|z,xmmreg*,xmmrm32|sae [rvm:t1s: evex.nds.128.f3.0f.w0 5d /r ] AVX512,FUTURE
-VMOVAPD xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.66.0f.w1 28 /r ] AVX512VL,AVX512,FUTURE
-VMOVAPD ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.66.0f.w1 28 /r ] AVX512VL,AVX512,FUTURE
-VMOVAPD zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.66.0f.w1 28 /r ] AVX512,FUTURE
-VMOVAPD xmmreg|mask|z,xmmreg [mr: evex.128.66.0f.w1 29 /r ] AVX512VL,AVX512,FUTURE
-VMOVAPD ymmreg|mask|z,ymmreg [mr: evex.256.66.0f.w1 29 /r ] AVX512VL,AVX512,FUTURE
-VMOVAPD zmmreg|mask|z,zmmreg [mr: evex.512.66.0f.w1 29 /r ] AVX512,FUTURE
-VMOVAPD mem128|mask,xmmreg [mr:fvm: evex.128.66.0f.w1 29 /r ] AVX512VL,AVX512,FUTURE
-VMOVAPD mem256|mask,ymmreg [mr:fvm: evex.256.66.0f.w1 29 /r ] AVX512VL,AVX512,FUTURE
-VMOVAPD mem512|mask,zmmreg [mr:fvm: evex.512.66.0f.w1 29 /r ] AVX512,FUTURE
-VMOVAPS xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.0f.w0 28 /r ] AVX512VL,AVX512,FUTURE
-VMOVAPS ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.0f.w0 28 /r ] AVX512VL,AVX512,FUTURE
-VMOVAPS zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.0f.w0 28 /r ] AVX512,FUTURE
-VMOVAPS xmmreg|mask|z,xmmreg [mr: evex.128.0f.w0 29 /r ] AVX512VL,AVX512,FUTURE
-VMOVAPS ymmreg|mask|z,ymmreg [mr: evex.256.0f.w0 29 /r ] AVX512VL,AVX512,FUTURE
-VMOVAPS zmmreg|mask|z,zmmreg [mr: evex.512.0f.w0 29 /r ] AVX512,FUTURE
-VMOVAPS mem128|mask,xmmreg [mr:fvm: evex.128.0f.w0 29 /r ] AVX512VL,AVX512,FUTURE
-VMOVAPS mem256|mask,ymmreg [mr:fvm: evex.256.0f.w0 29 /r ] AVX512VL,AVX512,FUTURE
-VMOVAPS mem512|mask,zmmreg [mr:fvm: evex.512.0f.w0 29 /r ] AVX512,FUTURE
-VMOVD xmmreg,rm32 [rm:t1s: evex.128.66.0f.w0 6e /r ] AVX512,FUTURE
-VMOVD rm32,xmmreg [mr:t1s: evex.128.66.0f.w0 7e /r ] AVX512,FUTURE
-VMOVDDUP xmmreg|mask|z,xmmrm64 [rm:dup: evex.128.f2.0f.w1 12 /r ] AVX512VL,AVX512,FUTURE
-VMOVDDUP ymmreg|mask|z,ymmrm256 [rm:dup: evex.256.f2.0f.w1 12 /r ] AVX512VL,AVX512,FUTURE
-VMOVDDUP zmmreg|mask|z,zmmrm512 [rm:dup: evex.512.f2.0f.w1 12 /r ] AVX512,FUTURE
-VMOVDQA32 xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.66.0f.w0 6f /r ] AVX512VL,AVX512,FUTURE
-VMOVDQA32 ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.66.0f.w0 6f /r ] AVX512VL,AVX512,FUTURE
-VMOVDQA32 zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.66.0f.w0 6f /r ] AVX512,FUTURE
-VMOVDQA32 xmmrm128|mask|z,xmmreg [mr:fvm: evex.128.66.0f.w0 7f /r ] AVX512VL,AVX512,FUTURE
-VMOVDQA32 ymmrm256|mask|z,ymmreg [mr:fvm: evex.256.66.0f.w0 7f /r ] AVX512VL,AVX512,FUTURE
-VMOVDQA32 zmmrm512|mask|z,zmmreg [mr:fvm: evex.512.66.0f.w0 7f /r ] AVX512,FUTURE
-VMOVDQA64 xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.66.0f.w1 6f /r ] AVX512VL,AVX512,FUTURE
-VMOVDQA64 ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.66.0f.w1 6f /r ] AVX512VL,AVX512,FUTURE
-VMOVDQA64 zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.66.0f.w1 6f /r ] AVX512,FUTURE
-VMOVDQA64 xmmrm128|mask|z,xmmreg [mr:fvm: evex.128.66.0f.w1 7f /r ] AVX512VL,AVX512,FUTURE
-VMOVDQA64 ymmrm256|mask|z,ymmreg [mr:fvm: evex.256.66.0f.w1 7f /r ] AVX512VL,AVX512,FUTURE
-VMOVDQA64 zmmrm512|mask|z,zmmreg [mr:fvm: evex.512.66.0f.w1 7f /r ] AVX512,FUTURE
-VMOVDQU16 xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.f2.0f.w1 6f /r ] AVX512VL,AVX512BW,FUTURE
-VMOVDQU16 ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.f2.0f.w1 6f /r ] AVX512VL,AVX512BW,FUTURE
-VMOVDQU16 zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.f2.0f.w1 6f /r ] AVX512BW,FUTURE
-VMOVDQU16 xmmrm128|mask|z,xmmreg [mr:fvm: evex.128.f2.0f.w1 7f /r ] AVX512VL,AVX512BW,FUTURE
-VMOVDQU16 ymmrm256|mask|z,ymmreg [mr:fvm: evex.256.f2.0f.w1 7f /r ] AVX512VL,AVX512BW,FUTURE
-VMOVDQU16 zmmrm512|mask|z,zmmreg [mr:fvm: evex.512.f2.0f.w1 7f /r ] AVX512BW,FUTURE
-VMOVDQU32 xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.f3.0f.w0 6f /r ] AVX512VL,AVX512,FUTURE
-VMOVDQU32 ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.f3.0f.w0 6f /r ] AVX512VL,AVX512,FUTURE
-VMOVDQU32 zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.f3.0f.w0 6f /r ] AVX512,FUTURE
-VMOVDQU32 xmmrm128|mask|z,xmmreg [mr:fvm: evex.128.f3.0f.w0 7f /r ] AVX512VL,AVX512,FUTURE
-VMOVDQU32 ymmrm256|mask|z,ymmreg [mr:fvm: evex.256.f3.0f.w0 7f /r ] AVX512VL,AVX512,FUTURE
-VMOVDQU32 zmmrm512|mask|z,zmmreg [mr:fvm: evex.512.f3.0f.w0 7f /r ] AVX512,FUTURE
-VMOVDQU64 xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.f3.0f.w1 6f /r ] AVX512VL,AVX512,FUTURE
-VMOVDQU64 ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.f3.0f.w1 6f /r ] AVX512VL,AVX512,FUTURE
-VMOVDQU64 zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.f3.0f.w1 6f /r ] AVX512,FUTURE
-VMOVDQU64 xmmrm128|mask|z,xmmreg [mr:fvm: evex.128.f3.0f.w1 7f /r ] AVX512VL,AVX512,FUTURE
-VMOVDQU64 ymmrm256|mask|z,ymmreg [mr:fvm: evex.256.f3.0f.w1 7f /r ] AVX512VL,AVX512,FUTURE
-VMOVDQU64 zmmrm512|mask|z,zmmreg [mr:fvm: evex.512.f3.0f.w1 7f /r ] AVX512,FUTURE
-VMOVDQU8 xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.f2.0f.w0 6f /r ] AVX512VL,AVX512BW,FUTURE
-VMOVDQU8 ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.f2.0f.w0 6f /r ] AVX512VL,AVX512BW,FUTURE
-VMOVDQU8 zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.f2.0f.w0 6f /r ] AVX512BW,FUTURE
-VMOVDQU8 xmmrm128|mask|z,xmmreg [mr:fvm: evex.128.f2.0f.w0 7f /r ] AVX512VL,AVX512BW,FUTURE
-VMOVDQU8 ymmrm256|mask|z,ymmreg [mr:fvm: evex.256.f2.0f.w0 7f /r ] AVX512VL,AVX512BW,FUTURE
-VMOVDQU8 zmmrm512|mask|z,zmmreg [mr:fvm: evex.512.f2.0f.w0 7f /r ] AVX512BW,FUTURE
-VMOVHLPS xmmreg,xmmreg*,xmmreg [rvm: evex.nds.128.0f.w0 12 /r ] AVX512,FUTURE
-VMOVHPD xmmreg,xmmreg*,mem64 [rvm:t1s: evex.nds.128.66.0f.w1 16 /r ] AVX512,FUTURE
-VMOVHPD mem64,xmmreg [mr:t1s: evex.128.66.0f.w1 17 /r ] AVX512,FUTURE
-VMOVHPS xmmreg,xmmreg*,mem64 [rvm:t2: evex.nds.128.0f.w0 16 /r ] AVX512,FUTURE
-VMOVHPS mem64,xmmreg [mr:t2: evex.128.0f.w0 17 /r ] AVX512,FUTURE
-VMOVLHPS xmmreg,xmmreg*,xmmreg [rvm: evex.nds.128.0f.w0 16 /r ] AVX512,FUTURE
-VMOVLPD xmmreg,xmmreg*,mem64 [rvm:t1s: evex.nds.128.66.0f.w1 12 /r ] AVX512,FUTURE
-VMOVLPD mem64,xmmreg [mr:t1s: evex.128.66.0f.w1 13 /r ] AVX512,FUTURE
-VMOVLPS xmmreg,xmmreg*,mem64 [rvm:t2: evex.nds.128.0f.w0 12 /r ] AVX512,FUTURE
-VMOVLPS mem64,xmmreg [mr:t2: evex.128.0f.w0 13 /r ] AVX512,FUTURE
-VMOVNTDQ mem128,xmmreg [mr:fvm: evex.128.66.0f.w0 e7 /r ] AVX512VL,AVX512,FUTURE
-VMOVNTDQ mem256,ymmreg [mr:fvm: evex.256.66.0f.w0 e7 /r ] AVX512VL,AVX512,FUTURE
-VMOVNTDQ mem512,zmmreg [mr:fvm: evex.512.66.0f.w0 e7 /r ] AVX512,FUTURE
-VMOVNTDQA xmmreg,mem128 [rm:fvm: evex.128.66.0f38.w0 2a /r ] AVX512VL,AVX512,FUTURE
-VMOVNTDQA ymmreg,mem256 [rm:fvm: evex.256.66.0f38.w0 2a /r ] AVX512VL,AVX512,FUTURE
-VMOVNTDQA zmmreg,mem512 [rm:fvm: evex.512.66.0f38.w0 2a /r ] AVX512,FUTURE
-VMOVNTPD mem128,xmmreg [mr:fvm: evex.128.66.0f.w1 2b /r ] AVX512VL,AVX512,FUTURE
-VMOVNTPD mem256,ymmreg [mr:fvm: evex.256.66.0f.w1 2b /r ] AVX512VL,AVX512,FUTURE
-VMOVNTPD mem512,zmmreg [mr:fvm: evex.512.66.0f.w1 2b /r ] AVX512,FUTURE
-VMOVNTPS mem128,xmmreg [mr:fvm: evex.128.0f.w0 2b /r ] AVX512VL,AVX512,FUTURE
-VMOVNTPS mem256,ymmreg [mr:fvm: evex.256.0f.w0 2b /r ] AVX512VL,AVX512,FUTURE
-VMOVNTPS mem512,zmmreg [mr:fvm: evex.512.0f.w0 2b /r ] AVX512,FUTURE
-VMOVQ xmmreg,rm64 [rm:t1s: evex.128.66.0f.w1 6e /r ] AVX512,FUTURE
-VMOVQ rm64,xmmreg [mr:t1s: evex.128.66.0f.w1 7e /r ] AVX512,FUTURE
-VMOVQ xmmreg,xmmrm64 [rm:t1s: evex.128.f3.0f.w1 7e /r ] AVX512,FUTURE
-VMOVQ xmmrm64,xmmreg [mr:t1s: evex.128.66.0f.w1 d6 /r ] AVX512,FUTURE
-VMOVSD xmmreg|mask|z,mem64 [rm:t1s: evex.128.f2.0f.w1 10 /r ] AVX512,FUTURE
-VMOVSD mem64|mask,xmmreg [mr:t1s: evex.128.f2.0f.w1 11 /r ] AVX512,FUTURE
-VMOVSD xmmreg|mask|z,xmmreg*,xmmreg [rvm: evex.nds.128.f2.0f.w1 10 /r ] AVX512,FUTURE
-VMOVSD xmmreg|mask|z,xmmreg*,xmmreg [mvr: evex.nds.128.f2.0f.w1 11 /r ] AVX512,FUTURE
-VMOVSHDUP xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.f3.0f.w0 16 /r ] AVX512VL,AVX512,FUTURE
-VMOVSHDUP ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.f3.0f.w0 16 /r ] AVX512VL,AVX512,FUTURE
-VMOVSHDUP zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.f3.0f.w0 16 /r ] AVX512,FUTURE
-VMOVSLDUP xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.f3.0f.w0 12 /r ] AVX512VL,AVX512,FUTURE
-VMOVSLDUP ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.f3.0f.w0 12 /r ] AVX512VL,AVX512,FUTURE
-VMOVSLDUP zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.f3.0f.w0 12 /r ] AVX512,FUTURE
-VMOVSS xmmreg|mask|z,mem32 [rm:t1s: evex.128.f3.0f.w0 10 /r ] AVX512,FUTURE
-VMOVSS mem32|mask,xmmreg [mr:t1s: evex.128.f3.0f.w0 11 /r ] AVX512,FUTURE
-VMOVSS xmmreg|mask|z,xmmreg*,xmmreg [rvm: evex.nds.128.f3.0f.w0 10 /r ] AVX512,FUTURE
-VMOVSS xmmreg|mask|z,xmmreg*,xmmreg [mvr: evex.nds.128.f3.0f.w0 11 /r ] AVX512,FUTURE
-VMOVUPD xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.66.0f.w1 10 /r ] AVX512VL,AVX512,FUTURE
-VMOVUPD ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.66.0f.w1 10 /r ] AVX512VL,AVX512,FUTURE
-VMOVUPD zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.66.0f.w1 10 /r ] AVX512,FUTURE
-VMOVUPD xmmreg|mask|z,xmmreg [mr: evex.128.66.0f.w1 11 /r ] AVX512VL,AVX512,FUTURE
-VMOVUPD ymmreg|mask|z,ymmreg [mr: evex.256.66.0f.w1 11 /r ] AVX512VL,AVX512,FUTURE
-VMOVUPD zmmreg|mask|z,zmmreg [mr: evex.512.66.0f.w1 11 /r ] AVX512,FUTURE
-VMOVUPD mem128|mask,xmmreg [mr:fvm: evex.128.66.0f.w1 11 /r ] AVX512VL,AVX512,FUTURE
-VMOVUPD mem256|mask,ymmreg [mr:fvm: evex.256.66.0f.w1 11 /r ] AVX512VL,AVX512,FUTURE
-VMOVUPD mem512|mask,zmmreg [mr:fvm: evex.512.66.0f.w1 11 /r ] AVX512,FUTURE
-VMOVUPS xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.0f.w0 10 /r ] AVX512VL,AVX512,FUTURE
-VMOVUPS ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.0f.w0 10 /r ] AVX512VL,AVX512,FUTURE
-VMOVUPS zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.0f.w0 10 /r ] AVX512,FUTURE
-VMOVUPS xmmreg|mask|z,xmmreg [mr: evex.128.0f.w0 11 /r ] AVX512VL,AVX512,FUTURE
-VMOVUPS ymmreg|mask|z,ymmreg [mr: evex.256.0f.w0 11 /r ] AVX512VL,AVX512,FUTURE
-VMOVUPS zmmreg|mask|z,zmmreg [mr: evex.512.0f.w0 11 /r ] AVX512,FUTURE
-VMOVUPS mem128|mask,xmmreg [mr:fvm: evex.128.0f.w0 11 /r ] AVX512VL,AVX512,FUTURE
-VMOVUPS mem256|mask,ymmreg [mr:fvm: evex.256.0f.w0 11 /r ] AVX512VL,AVX512,FUTURE
-VMOVUPS mem512|mask,zmmreg [mr:fvm: evex.512.0f.w0 11 /r ] AVX512,FUTURE
-VMULPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 59 /r ] AVX512VL,AVX512,FUTURE
-VMULPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 59 /r ] AVX512VL,AVX512,FUTURE
-VMULPD zmmreg|mask|z,zmmreg*,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f.w1 59 /r ] AVX512,FUTURE
-VMULPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.0f.w0 59 /r ] AVX512VL,AVX512,FUTURE
-VMULPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.0f.w0 59 /r ] AVX512VL,AVX512,FUTURE
-VMULPS zmmreg|mask|z,zmmreg*,zmmrm512|b32|er [rvm:fv: evex.nds.512.0f.w0 59 /r ] AVX512,FUTURE
-VMULSD xmmreg|mask|z,xmmreg*,xmmrm64|er [rvm:t1s: evex.nds.128.f2.0f.w1 59 /r ] AVX512,FUTURE
-VMULSS xmmreg|mask|z,xmmreg*,xmmrm32|er [rvm:t1s: evex.nds.128.f3.0f.w0 59 /r ] AVX512,FUTURE
-VORPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 56 /r ] AVX512VL,AVX512DQ,FUTURE
-VORPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 56 /r ] AVX512VL,AVX512DQ,FUTURE
-VORPD zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 56 /r ] AVX512DQ,FUTURE
-VORPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.0f.w0 56 /r ] AVX512VL,AVX512DQ,FUTURE
-VORPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.0f.w0 56 /r ] AVX512VL,AVX512DQ,FUTURE
-VORPS zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.0f.w0 56 /r ] AVX512DQ,FUTURE
-VPABSB xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.66.0f38.wig 1c /r ] AVX512VL,AVX512BW,FUTURE
-VPABSB ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.66.0f38.wig 1c /r ] AVX512VL,AVX512BW,FUTURE
-VPABSB zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.66.0f38.wig 1c /r ] AVX512BW,FUTURE
-VPABSD xmmreg|mask|z,xmmrm128|b32 [rm:fv: evex.128.66.0f38.w0 1e /r ] AVX512VL,AVX512,FUTURE
-VPABSD ymmreg|mask|z,ymmrm256|b32 [rm:fv: evex.256.66.0f38.w0 1e /r ] AVX512VL,AVX512,FUTURE
-VPABSD zmmreg|mask|z,zmmrm512|b32 [rm:fv: evex.512.66.0f38.w0 1e /r ] AVX512,FUTURE
-VPABSQ xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.66.0f38.w1 1f /r ] AVX512VL,AVX512,FUTURE
-VPABSQ ymmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.66.0f38.w1 1f /r ] AVX512VL,AVX512,FUTURE
-VPABSQ zmmreg|mask|z,zmmrm512|b64 [rm:fv: evex.512.66.0f38.w1 1f /r ] AVX512,FUTURE
-VPABSW xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.66.0f38.wig 1d /r ] AVX512VL,AVX512BW,FUTURE
-VPABSW ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.66.0f38.wig 1d /r ] AVX512VL,AVX512BW,FUTURE
-VPABSW zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.66.0f38.wig 1d /r ] AVX512BW,FUTURE
-VPACKSSDW xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f.w0 6b /r ] AVX512VL,AVX512BW,FUTURE
-VPACKSSDW ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f.w0 6b /r ] AVX512VL,AVX512BW,FUTURE
-VPACKSSDW zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f.w0 6b /r ] AVX512BW,FUTURE
-VPACKSSWB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig 63 /r ] AVX512VL,AVX512BW,FUTURE
-VPACKSSWB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig 63 /r ] AVX512VL,AVX512BW,FUTURE
-VPACKSSWB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig 63 /r ] AVX512BW,FUTURE
-VPACKUSDW xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 2b /r ] AVX512VL,AVX512BW,FUTURE
-VPACKUSDW ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 2b /r ] AVX512VL,AVX512BW,FUTURE
-VPACKUSDW zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 2b /r ] AVX512BW,FUTURE
-VPACKUSWB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig 67 /r ] AVX512VL,AVX512BW,FUTURE
-VPACKUSWB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig 67 /r ] AVX512VL,AVX512BW,FUTURE
-VPACKUSWB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig 67 /r ] AVX512BW,FUTURE
-VPADDB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig fc /r ] AVX512VL,AVX512BW,FUTURE
-VPADDB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig fc /r ] AVX512VL,AVX512BW,FUTURE
-VPADDB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig fc /r ] AVX512BW,FUTURE
-VPADDD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f.w0 fe /r ] AVX512VL,AVX512,FUTURE
-VPADDD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f.w0 fe /r ] AVX512VL,AVX512,FUTURE
-VPADDD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f.w0 fe /r ] AVX512,FUTURE
-VPADDQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 d4 /r ] AVX512VL,AVX512,FUTURE
-VPADDQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 d4 /r ] AVX512VL,AVX512,FUTURE
-VPADDQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 d4 /r ] AVX512,FUTURE
-VPADDSB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig ec /r ] AVX512VL,AVX512BW,FUTURE
-VPADDSB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig ec /r ] AVX512VL,AVX512BW,FUTURE
-VPADDSB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig ec /r ] AVX512BW,FUTURE
-VPADDSW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig ed /r ] AVX512VL,AVX512BW,FUTURE
-VPADDSW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig ed /r ] AVX512VL,AVX512BW,FUTURE
-VPADDSW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig ed /r ] AVX512BW,FUTURE
-VPADDUSB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig dc /r ] AVX512VL,AVX512BW,FUTURE
-VPADDUSB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig dc /r ] AVX512VL,AVX512BW,FUTURE
-VPADDUSB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig dc /r ] AVX512BW,FUTURE
-VPADDUSW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig dd /r ] AVX512VL,AVX512BW,FUTURE
-VPADDUSW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig dd /r ] AVX512VL,AVX512BW,FUTURE
-VPADDUSW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig dd /r ] AVX512BW,FUTURE
-VPADDW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig fd /r ] AVX512VL,AVX512BW,FUTURE
-VPADDW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig fd /r ] AVX512VL,AVX512BW,FUTURE
-VPADDW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig fd /r ] AVX512BW,FUTURE
-VPALIGNR xmmreg|mask|z,xmmreg*,xmmrm128,imm8 [rvmi:fvm: evex.nds.128.66.0f3a.wig 0f /r ib ] AVX512VL,AVX512BW,FUTURE
-VPALIGNR ymmreg|mask|z,ymmreg*,ymmrm256,imm8 [rvmi:fvm: evex.nds.256.66.0f3a.wig 0f /r ib ] AVX512VL,AVX512BW,FUTURE
-VPALIGNR zmmreg|mask|z,zmmreg*,zmmrm512,imm8 [rvmi:fvm: evex.nds.512.66.0f3a.wig 0f /r ib ] AVX512BW,FUTURE
-VPANDD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f.w0 db /r ] AVX512VL,AVX512,FUTURE
-VPANDD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f.w0 db /r ] AVX512VL,AVX512,FUTURE
-VPANDD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f.w0 db /r ] AVX512,FUTURE
-VPANDND xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f.w0 df /r ] AVX512VL,AVX512,FUTURE
-VPANDND ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f.w0 df /r ] AVX512VL,AVX512,FUTURE
-VPANDND zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f.w0 df /r ] AVX512,FUTURE
-VPANDNQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 df /r ] AVX512VL,AVX512,FUTURE
-VPANDNQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 df /r ] AVX512VL,AVX512,FUTURE
-VPANDNQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 df /r ] AVX512,FUTURE
-VPANDQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 db /r ] AVX512VL,AVX512,FUTURE
-VPANDQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 db /r ] AVX512VL,AVX512,FUTURE
-VPANDQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 db /r ] AVX512,FUTURE
-VPAVGB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig e0 /r ] AVX512VL,AVX512BW,FUTURE
-VPAVGB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig e0 /r ] AVX512VL,AVX512BW,FUTURE
-VPAVGB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig e0 /r ] AVX512BW,FUTURE
-VPAVGW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig e3 /r ] AVX512VL,AVX512BW,FUTURE
-VPAVGW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig e3 /r ] AVX512VL,AVX512BW,FUTURE
-VPAVGW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig e3 /r ] AVX512BW,FUTURE
-VPBLENDMB xmmreg|mask|z,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.w0 66 /r ] AVX512VL,AVX512BW,FUTURE
-VPBLENDMB ymmreg|mask|z,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.w0 66 /r ] AVX512VL,AVX512BW,FUTURE
-VPBLENDMB zmmreg|mask|z,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.w0 66 /r ] AVX512BW,FUTURE
-VPBLENDMD xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 64 /r ] AVX512VL,AVX512,FUTURE
-VPBLENDMD ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 64 /r ] AVX512VL,AVX512,FUTURE
-VPBLENDMD zmmreg|mask|z,zmmreg,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 64 /r ] AVX512,FUTURE
-VPBLENDMQ xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 64 /r ] AVX512VL,AVX512,FUTURE
-VPBLENDMQ ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 64 /r ] AVX512VL,AVX512,FUTURE
-VPBLENDMQ zmmreg|mask|z,zmmreg,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 64 /r ] AVX512,FUTURE
-VPBLENDMW xmmreg|mask|z,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.w1 66 /r ] AVX512VL,AVX512BW,FUTURE
-VPBLENDMW ymmreg|mask|z,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.w1 66 /r ] AVX512VL,AVX512BW,FUTURE
-VPBLENDMW zmmreg|mask|z,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.w1 66 /r ] AVX512BW,FUTURE
-VPBROADCASTB xmmreg|mask|z,xmmrm8 [rm:t1s8: evex.128.66.0f38.w0 78 /r ] AVX512VL,AVX512BW,FUTURE
-VPBROADCASTB ymmreg|mask|z,xmmrm8 [rm:t1s8: evex.256.66.0f38.w0 78 /r ] AVX512VL,AVX512BW,FUTURE
-VPBROADCASTB zmmreg|mask|z,xmmrm8 [rm:t1s8: evex.512.66.0f38.w0 78 /r ] AVX512BW,FUTURE
-VPBROADCASTB xmmreg|mask|z,reg8 [rm: evex.128.66.0f38.w0 7a /r ] AVX512VL,AVX512BW,FUTURE
-VPBROADCASTB xmmreg|mask|z,reg16 [rm: evex.128.66.0f38.w0 7a /r ] AVX512VL,AVX512BW,FUTURE
-VPBROADCASTB xmmreg|mask|z,reg32 [rm: evex.128.66.0f38.w0 7a /r ] AVX512VL,AVX512BW,FUTURE
-VPBROADCASTB xmmreg|mask|z,reg64 [rm: evex.128.66.0f38.w0 7a /r ] AVX512VL,AVX512BW,FUTURE
-VPBROADCASTB ymmreg|mask|z,reg8 [rm: evex.256.66.0f38.w0 7a /r ] AVX512VL,AVX512BW,FUTURE
-VPBROADCASTB ymmreg|mask|z,reg16 [rm: evex.256.66.0f38.w0 7a /r ] AVX512VL,AVX512BW,FUTURE
-VPBROADCASTB ymmreg|mask|z,reg32 [rm: evex.256.66.0f38.w0 7a /r ] AVX512VL,AVX512BW,FUTURE
-VPBROADCASTB ymmreg|mask|z,reg64 [rm: evex.256.66.0f38.w0 7a /r ] AVX512VL,AVX512BW,FUTURE
-VPBROADCASTB zmmreg|mask|z,reg8 [rm: evex.512.66.0f38.w0 7a /r ] AVX512BW,FUTURE
-VPBROADCASTB zmmreg|mask|z,reg16 [rm: evex.512.66.0f38.w0 7a /r ] AVX512BW,FUTURE
-VPBROADCASTB zmmreg|mask|z,reg32 [rm: evex.512.66.0f38.w0 7a /r ] AVX512BW,FUTURE
-VPBROADCASTB zmmreg|mask|z,reg64 [rm: evex.512.66.0f38.w0 7a /r ] AVX512BW,FUTURE
-VPBROADCASTD xmmreg|mask|z,mem32 [rm:t1s: evex.128.66.0f38.w0 58 /r ] AVX512VL,AVX512,FUTURE
-VPBROADCASTD ymmreg|mask|z,mem32 [rm:t1s: evex.256.66.0f38.w0 58 /r ] AVX512VL,AVX512,FUTURE
-VPBROADCASTD zmmreg|mask|z,mem32 [rm:t1s: evex.512.66.0f38.w0 58 /r ] AVX512,FUTURE
-VPBROADCASTD xmmreg|mask|z,xmmreg [rm: evex.128.66.0f38.w0 58 /r ] AVX512VL,AVX512,FUTURE
-VPBROADCASTD ymmreg|mask|z,xmmreg [rm: evex.256.66.0f38.w0 58 /r ] AVX512VL,AVX512,FUTURE
-VPBROADCASTD zmmreg|mask|z,xmmreg [rm: evex.512.66.0f38.w0 58 /r ] AVX512,FUTURE
-VPBROADCASTD xmmreg|mask|z,reg32 [rm: evex.128.66.0f38.w0 7c /r ] AVX512VL,AVX512,FUTURE
-VPBROADCASTD ymmreg|mask|z,reg32 [rm: evex.256.66.0f38.w0 7c /r ] AVX512VL,AVX512,FUTURE
-VPBROADCASTD zmmreg|mask|z,reg32 [rm: evex.512.66.0f38.w0 7c /r ] AVX512,FUTURE
-VPBROADCASTMB2Q xmmreg,kreg [rm: evex.128.f3.0f38.w1 2a /r ] AVX512VL,AVX512CD,FUTURE
-VPBROADCASTMB2Q ymmreg,kreg [rm: evex.256.f3.0f38.w1 2a /r ] AVX512VL,AVX512CD,FUTURE
-VPBROADCASTMB2Q zmmreg,kreg [rm: evex.512.f3.0f38.w1 2a /r ] AVX512CD,FUTURE
-VPBROADCASTMW2D xmmreg,kreg [rm: evex.128.f3.0f38.w0 3a /r ] AVX512VL,AVX512CD,FUTURE
-VPBROADCASTMW2D ymmreg,kreg [rm: evex.256.f3.0f38.w0 3a /r ] AVX512VL,AVX512CD,FUTURE
-VPBROADCASTMW2D zmmreg,kreg [rm: evex.512.f3.0f38.w0 3a /r ] AVX512CD,FUTURE
-VPBROADCASTQ xmmreg|mask|z,mem64 [rm:t1s: evex.128.66.0f38.w1 59 /r ] AVX512VL,AVX512,FUTURE
-VPBROADCASTQ ymmreg|mask|z,mem64 [rm:t1s: evex.256.66.0f38.w1 59 /r ] AVX512VL,AVX512,FUTURE
-VPBROADCASTQ zmmreg|mask|z,mem64 [rm:t1s: evex.512.66.0f38.w1 59 /r ] AVX512,FUTURE
-VPBROADCASTQ xmmreg|mask|z,xmmreg [rm: evex.128.66.0f38.w1 59 /r ] AVX512VL,AVX512,FUTURE
-VPBROADCASTQ ymmreg|mask|z,xmmreg [rm: evex.256.66.0f38.w1 59 /r ] AVX512VL,AVX512,FUTURE
-VPBROADCASTQ zmmreg|mask|z,xmmreg [rm: evex.512.66.0f38.w1 59 /r ] AVX512,FUTURE
-VPBROADCASTQ xmmreg|mask|z,reg64 [rm: evex.128.66.0f38.w1 7c /r ] AVX512VL,AVX512,FUTURE
-VPBROADCASTQ ymmreg|mask|z,reg64 [rm: evex.256.66.0f38.w1 7c /r ] AVX512VL,AVX512,FUTURE
-VPBROADCASTQ zmmreg|mask|z,reg64 [rm: evex.512.66.0f38.w1 7c /r ] AVX512,FUTURE
-VPBROADCASTW xmmreg|mask|z,xmmrm16 [rm:t1s16: evex.128.66.0f38.w0 79 /r ] AVX512VL,AVX512BW,FUTURE
-VPBROADCASTW ymmreg|mask|z,xmmrm16 [rm:t1s16: evex.256.66.0f38.w0 79 /r ] AVX512VL,AVX512BW,FUTURE
-VPBROADCASTW zmmreg|mask|z,xmmrm16 [rm:t1s16: evex.512.66.0f38.w0 79 /r ] AVX512BW,FUTURE
-VPBROADCASTW xmmreg|mask|z,reg16 [rm: evex.128.66.0f38.w0 7b /r ] AVX512VL,AVX512BW,FUTURE
-VPBROADCASTW xmmreg|mask|z,reg32 [rm: evex.128.66.0f38.w0 7b /r ] AVX512VL,AVX512BW,FUTURE
-VPBROADCASTW xmmreg|mask|z,reg64 [rm: evex.128.66.0f38.w0 7b /r ] AVX512VL,AVX512BW,FUTURE
-VPBROADCASTW ymmreg|mask|z,reg16 [rm: evex.256.66.0f38.w0 7b /r ] AVX512VL,AVX512BW,FUTURE
-VPBROADCASTW ymmreg|mask|z,reg32 [rm: evex.256.66.0f38.w0 7b /r ] AVX512VL,AVX512BW,FUTURE
-VPBROADCASTW ymmreg|mask|z,reg64 [rm: evex.256.66.0f38.w0 7b /r ] AVX512VL,AVX512BW,FUTURE
-VPBROADCASTW zmmreg|mask|z,reg16 [rm: evex.512.66.0f38.w0 7b /r ] AVX512BW,FUTURE
-VPBROADCASTW zmmreg|mask|z,reg32 [rm: evex.512.66.0f38.w0 7b /r ] AVX512BW,FUTURE
-VPBROADCASTW zmmreg|mask|z,reg64 [rm: evex.512.66.0f38.w0 7b /r ] AVX512BW,FUTURE
-VPCMPB kreg|mask,xmmreg,xmmrm128,imm8 [rvmi:fvm: evex.nds.128.66.0f3a.w0 3f /r ib ] AVX512VL,AVX512BW,FUTURE
-VPCMPB kreg|mask,ymmreg,ymmrm256,imm8 [rvmi:fvm: evex.nds.256.66.0f3a.w0 3f /r ib ] AVX512VL,AVX512BW,FUTURE
-VPCMPB kreg|mask,zmmreg,zmmrm512,imm8 [rvmi:fvm: evex.nds.512.66.0f3a.w0 3f /r ib ] AVX512BW,FUTURE
-VPCMPD kreg|mask,xmmreg,xmmrm128|b32,imm8 [rvmi:fv: evex.nds.128.66.0f3a.w0 1f /r ib ] AVX512VL,AVX512,FUTURE
-VPCMPD kreg|mask,ymmreg,ymmrm256|b32,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w0 1f /r ib ] AVX512VL,AVX512,FUTURE
-VPCMPD kreg|mask,zmmreg,zmmrm512|b32,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w0 1f /r ib ] AVX512,FUTURE
-VPCMPEQB kreg|mask,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig 74 /r ] AVX512VL,AVX512BW,FUTURE
-VPCMPEQB kreg|mask,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig 74 /r ] AVX512VL,AVX512BW,FUTURE
-VPCMPEQB kreg|mask,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig 74 /r ] AVX512BW,FUTURE
-VPCMPEQD kreg|mask,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f.w0 76 /r ] AVX512VL,AVX512,FUTURE
-VPCMPEQD kreg|mask,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f.w0 76 /r ] AVX512VL,AVX512,FUTURE
-VPCMPEQD kreg|mask,zmmreg,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f.w0 76 /r ] AVX512,FUTURE
-VPCMPEQQ kreg|mask,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 29 /r ] AVX512VL,AVX512,FUTURE
-VPCMPEQQ kreg|mask,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 29 /r ] AVX512VL,AVX512,FUTURE
-VPCMPEQQ kreg|mask,zmmreg,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 29 /r ] AVX512,FUTURE
-VPCMPEQW kreg|mask,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig 75 /r ] AVX512VL,AVX512BW,FUTURE
-VPCMPEQW kreg|mask,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig 75 /r ] AVX512VL,AVX512BW,FUTURE
-VPCMPEQW kreg|mask,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig 75 /r ] AVX512BW,FUTURE
-VPCMPGTB kreg|mask,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig 64 /r ] AVX512VL,AVX512BW,FUTURE
-VPCMPGTB kreg|mask,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig 64 /r ] AVX512VL,AVX512BW,FUTURE
-VPCMPGTB kreg|mask,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig 64 /r ] AVX512BW,FUTURE
-VPCMPGTD kreg|mask,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f.w0 66 /r ] AVX512VL,AVX512,FUTURE
-VPCMPGTD kreg|mask,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f.w0 66 /r ] AVX512VL,AVX512,FUTURE
-VPCMPGTD kreg|mask,zmmreg,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f.w0 66 /r ] AVX512,FUTURE
-VPCMPGTQ kreg|mask,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 37 /r ] AVX512VL,AVX512,FUTURE
-VPCMPGTQ kreg|mask,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 37 /r ] AVX512VL,AVX512,FUTURE
-VPCMPGTQ kreg|mask,zmmreg,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 37 /r ] AVX512,FUTURE
-VPCMPGTW kreg|mask,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig 65 /r ] AVX512VL,AVX512BW,FUTURE
-VPCMPGTW kreg|mask,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig 65 /r ] AVX512VL,AVX512BW,FUTURE
-VPCMPGTW kreg|mask,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig 65 /r ] AVX512BW,FUTURE
-VPCMPQ kreg|mask,xmmreg,xmmrm128|b64,imm8 [rvmi:fv: evex.nds.128.66.0f3a.w1 1f /r ib ] AVX512VL,AVX512,FUTURE
-VPCMPQ kreg|mask,ymmreg,ymmrm256|b64,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w1 1f /r ib ] AVX512VL,AVX512,FUTURE
-VPCMPQ kreg|mask,zmmreg,zmmrm512|b64,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w1 1f /r ib ] AVX512,FUTURE
-VPCMPUB kreg|mask,xmmreg,xmmrm128,imm8 [rvmi:fvm: evex.nds.128.66.0f3a.w0 3e /r ib ] AVX512VL,AVX512BW,FUTURE
-VPCMPUB kreg|mask,ymmreg,ymmrm256,imm8 [rvmi:fvm: evex.nds.256.66.0f3a.w0 3e /r ib ] AVX512VL,AVX512BW,FUTURE
-VPCMPUB kreg|mask,zmmreg,zmmrm512,imm8 [rvmi:fvm: evex.nds.512.66.0f3a.w0 3e /r ib ] AVX512BW,FUTURE
-VPCMPUD kreg|mask,xmmreg,xmmrm128|b32,imm8 [rvmi:fv: evex.nds.128.66.0f3a.w0 1e /r ib ] AVX512VL,AVX512,FUTURE
-VPCMPUD kreg|mask,ymmreg,ymmrm256|b32,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w0 1e /r ib ] AVX512VL,AVX512,FUTURE
-VPCMPUD kreg|mask,zmmreg,zmmrm512|b32,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w0 1e /r ib ] AVX512,FUTURE
-VPCMPUQ kreg|mask,xmmreg,xmmrm128|b64,imm8 [rvmi:fv: evex.nds.128.66.0f3a.w1 1e /r ib ] AVX512VL,AVX512,FUTURE
-VPCMPUQ kreg|mask,ymmreg,ymmrm256|b64,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w1 1e /r ib ] AVX512VL,AVX512,FUTURE
-VPCMPUQ kreg|mask,zmmreg,zmmrm512|b64,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w1 1e /r ib ] AVX512,FUTURE
-VPCMPUW kreg|mask,xmmreg,xmmrm128,imm8 [rvmi:fvm: evex.nds.128.66.0f3a.w1 3e /r ib ] AVX512VL,AVX512BW,FUTURE
-VPCMPUW kreg|mask,ymmreg,ymmrm256,imm8 [rvmi:fvm: evex.nds.256.66.0f3a.w1 3e /r ib ] AVX512VL,AVX512BW,FUTURE
-VPCMPUW kreg|mask,zmmreg,zmmrm512,imm8 [rvmi:fvm: evex.nds.512.66.0f3a.w1 3e /r ib ] AVX512BW,FUTURE
-VPCMPW kreg|mask,xmmreg,xmmrm128,imm8 [rvmi:fvm: evex.nds.128.66.0f3a.w1 3f /r ib ] AVX512VL,AVX512BW,FUTURE
-VPCMPW kreg|mask,ymmreg,ymmrm256,imm8 [rvmi:fvm: evex.nds.256.66.0f3a.w1 3f /r ib ] AVX512VL,AVX512BW,FUTURE
-VPCMPW kreg|mask,zmmreg,zmmrm512,imm8 [rvmi:fvm: evex.nds.512.66.0f3a.w1 3f /r ib ] AVX512BW,FUTURE
-VPCOMPRESSD mem128|mask,xmmreg [mr:t1s: evex.128.66.0f38.w0 8b /r ] AVX512VL,AVX512,FUTURE
-VPCOMPRESSD mem256|mask,ymmreg [mr:t1s: evex.256.66.0f38.w0 8b /r ] AVX512VL,AVX512,FUTURE
-VPCOMPRESSD mem512|mask,zmmreg [mr:t1s: evex.512.66.0f38.w0 8b /r ] AVX512,FUTURE
-VPCOMPRESSD xmmreg|mask|z,xmmreg [mr: evex.128.66.0f38.w0 8b /r ] AVX512VL,AVX512,FUTURE
-VPCOMPRESSD ymmreg|mask|z,ymmreg [mr: evex.256.66.0f38.w0 8b /r ] AVX512VL,AVX512,FUTURE
-VPCOMPRESSD zmmreg|mask|z,zmmreg [mr: evex.512.66.0f38.w0 8b /r ] AVX512,FUTURE
-VPCOMPRESSQ mem128|mask,xmmreg [mr:t1s: evex.128.66.0f38.w1 8b /r ] AVX512VL,AVX512,FUTURE
-VPCOMPRESSQ mem256|mask,ymmreg [mr:t1s: evex.256.66.0f38.w1 8b /r ] AVX512VL,AVX512,FUTURE
-VPCOMPRESSQ mem512|mask,zmmreg [mr:t1s: evex.512.66.0f38.w1 8b /r ] AVX512,FUTURE
-VPCOMPRESSQ xmmreg|mask|z,xmmreg [mr: evex.128.66.0f38.w1 8b /r ] AVX512VL,AVX512,FUTURE
-VPCOMPRESSQ ymmreg|mask|z,ymmreg [mr: evex.256.66.0f38.w1 8b /r ] AVX512VL,AVX512,FUTURE
-VPCOMPRESSQ zmmreg|mask|z,zmmreg [mr: evex.512.66.0f38.w1 8b /r ] AVX512,FUTURE
-VPCONFLICTD xmmreg|mask|z,xmmrm128|b32 [rm:fv: evex.128.66.0f38.w0 c4 /r ] AVX512VL,AVX512CD,FUTURE
-VPCONFLICTD ymmreg|mask|z,ymmrm256|b32 [rm:fv: evex.256.66.0f38.w0 c4 /r ] AVX512VL,AVX512CD,FUTURE
-VPCONFLICTD zmmreg|mask|z,zmmrm512|b32 [rm:fv: evex.512.66.0f38.w0 c4 /r ] AVX512CD,FUTURE
-VPCONFLICTQ xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.66.0f38.w1 c4 /r ] AVX512VL,AVX512CD,FUTURE
-VPCONFLICTQ ymmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.66.0f38.w1 c4 /r ] AVX512VL,AVX512CD,FUTURE
-VPCONFLICTQ zmmreg|mask|z,zmmrm512|b64 [rm:fv: evex.512.66.0f38.w1 c4 /r ] AVX512CD,FUTURE
-VPERMB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.w0 8d /r ] AVX512VL,AVX512VBMI,FUTURE
-VPERMB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.w0 8d /r ] AVX512VL,AVX512VBMI,FUTURE
-VPERMB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.w0 8d /r ] AVX512VBMI,FUTURE
-VPERMD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 36 /r ] AVX512VL,AVX512,FUTURE
-VPERMD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 36 /r ] AVX512,FUTURE
-VPERMI2B xmmreg|mask|z,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.w0 75 /r ] AVX512VL,AVX512VBMI,FUTURE
-VPERMI2B ymmreg|mask|z,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.w0 75 /r ] AVX512VL,AVX512VBMI,FUTURE
-VPERMI2B zmmreg|mask|z,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.w0 75 /r ] AVX512VBMI,FUTURE
-VPERMI2D xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 76 /r ] AVX512VL,AVX512,FUTURE
-VPERMI2D ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 76 /r ] AVX512VL,AVX512,FUTURE
-VPERMI2D zmmreg|mask|z,zmmreg,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 76 /r ] AVX512,FUTURE
-VPERMI2PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 77 /r ] AVX512VL,AVX512,FUTURE
-VPERMI2PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 77 /r ] AVX512VL,AVX512,FUTURE
-VPERMI2PD zmmreg|mask|z,zmmreg,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 77 /r ] AVX512,FUTURE
-VPERMI2PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 77 /r ] AVX512VL,AVX512,FUTURE
-VPERMI2PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 77 /r ] AVX512VL,AVX512,FUTURE
-VPERMI2PS zmmreg|mask|z,zmmreg,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 77 /r ] AVX512,FUTURE
-VPERMI2Q xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 76 /r ] AVX512VL,AVX512,FUTURE
-VPERMI2Q ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 76 /r ] AVX512VL,AVX512,FUTURE
-VPERMI2Q zmmreg|mask|z,zmmreg,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 76 /r ] AVX512,FUTURE
-VPERMI2W xmmreg|mask|z,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.w1 75 /r ] AVX512VL,AVX512BW,FUTURE
-VPERMI2W ymmreg|mask|z,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.w1 75 /r ] AVX512VL,AVX512BW,FUTURE
-VPERMI2W zmmreg|mask|z,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.w1 75 /r ] AVX512BW,FUTURE
-VPERMILPD xmmreg|mask|z,xmmrm128|b64,imm8 [rmi:fv: evex.128.66.0f3a.w1 05 /r ib ] AVX512VL,AVX512,FUTURE
-VPERMILPD ymmreg|mask|z,ymmrm256|b64,imm8 [rmi:fv: evex.256.66.0f3a.w1 05 /r ib ] AVX512VL,AVX512,FUTURE
-VPERMILPD zmmreg|mask|z,zmmrm512|b64,imm8 [rmi:fv: evex.512.66.0f3a.w1 05 /r ib ] AVX512,FUTURE
-VPERMILPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 0d /r ] AVX512VL,AVX512,FUTURE
-VPERMILPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 0d /r ] AVX512VL,AVX512,FUTURE
-VPERMILPD zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 0d /r ] AVX512,FUTURE
-VPERMILPS xmmreg|mask|z,xmmrm128|b32,imm8 [rmi:fv: evex.128.66.0f3a.w0 04 /r ib ] AVX512VL,AVX512,FUTURE
-VPERMILPS ymmreg|mask|z,ymmrm256|b32,imm8 [rmi:fv: evex.256.66.0f3a.w0 04 /r ib ] AVX512VL,AVX512,FUTURE
-VPERMILPS zmmreg|mask|z,zmmrm512|b32,imm8 [rmi:fv: evex.512.66.0f3a.w0 04 /r ib ] AVX512,FUTURE
-VPERMILPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 0c /r ] AVX512VL,AVX512,FUTURE
-VPERMILPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 0c /r ] AVX512VL,AVX512,FUTURE
-VPERMILPS zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 0c /r ] AVX512,FUTURE
-VPERMPD ymmreg|mask|z,ymmrm256|b64,imm8 [rmi:fv: evex.256.66.0f3a.w1 01 /r ib ] AVX512VL,AVX512,FUTURE
-VPERMPD zmmreg|mask|z,zmmrm512|b64,imm8 [rmi:fv: evex.512.66.0f3a.w1 01 /r ib ] AVX512,FUTURE
-VPERMPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 16 /r ] AVX512VL,AVX512,FUTURE
-VPERMPD zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 16 /r ] AVX512,FUTURE
-VPERMPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 16 /r ] AVX512VL,AVX512,FUTURE
-VPERMPS zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 16 /r ] AVX512,FUTURE
-VPERMQ ymmreg|mask|z,ymmrm256|b64,imm8 [rmi:fv: evex.256.66.0f3a.w1 00 /r ib ] AVX512VL,AVX512,FUTURE
-VPERMQ zmmreg|mask|z,zmmrm512|b64,imm8 [rmi:fv: evex.512.66.0f3a.w1 00 /r ib ] AVX512,FUTURE
-VPERMQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 36 /r ] AVX512VL,AVX512,FUTURE
-VPERMQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 36 /r ] AVX512,FUTURE
-VPERMT2B xmmreg|mask|z,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.w0 7d /r ] AVX512VL,AVX512VBMI,FUTURE
-VPERMT2B ymmreg|mask|z,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.w0 7d /r ] AVX512VL,AVX512VBMI,FUTURE
-VPERMT2B zmmreg|mask|z,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.w0 7d /r ] AVX512VBMI,FUTURE
-VPERMT2D xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 7e /r ] AVX512VL,AVX512,FUTURE
-VPERMT2D ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 7e /r ] AVX512VL,AVX512,FUTURE
-VPERMT2D zmmreg|mask|z,zmmreg,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 7e /r ] AVX512,FUTURE
-VPERMT2PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 7f /r ] AVX512VL,AVX512,FUTURE
-VPERMT2PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 7f /r ] AVX512VL,AVX512,FUTURE
-VPERMT2PD zmmreg|mask|z,zmmreg,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 7f /r ] AVX512,FUTURE
-VPERMT2PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 7f /r ] AVX512VL,AVX512,FUTURE
-VPERMT2PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 7f /r ] AVX512VL,AVX512,FUTURE
-VPERMT2PS zmmreg|mask|z,zmmreg,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 7f /r ] AVX512,FUTURE
-VPERMT2Q xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 7e /r ] AVX512VL,AVX512,FUTURE
-VPERMT2Q ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 7e /r ] AVX512VL,AVX512,FUTURE
-VPERMT2Q zmmreg|mask|z,zmmreg,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 7e /r ] AVX512,FUTURE
-VPERMT2W xmmreg|mask|z,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.w1 7d /r ] AVX512VL,AVX512BW,FUTURE
-VPERMT2W ymmreg|mask|z,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.w1 7d /r ] AVX512VL,AVX512BW,FUTURE
-VPERMT2W zmmreg|mask|z,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.w1 7d /r ] AVX512BW,FUTURE
-VPERMW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.w1 8d /r ] AVX512VL,AVX512BW,FUTURE
-VPERMW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.w1 8d /r ] AVX512VL,AVX512BW,FUTURE
-VPERMW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.w1 8d /r ] AVX512BW,FUTURE
-VPEXPANDD xmmreg|mask|z,mem128 [rm:t1s: evex.128.66.0f38.w0 89 /r ] AVX512VL,AVX512,FUTURE
-VPEXPANDD ymmreg|mask|z,mem256 [rm:t1s: evex.256.66.0f38.w0 89 /r ] AVX512VL,AVX512,FUTURE
-VPEXPANDD zmmreg|mask|z,mem512 [rm:t1s: evex.512.66.0f38.w0 89 /r ] AVX512,FUTURE
-VPEXPANDD xmmreg|mask|z,xmmreg [rm:t1s: evex.128.66.0f38.w0 89 /r ] AVX512VL,AVX512,FUTURE
-VPEXPANDD ymmreg|mask|z,ymmreg [rm:t1s: evex.256.66.0f38.w0 89 /r ] AVX512VL,AVX512,FUTURE
-VPEXPANDD zmmreg|mask|z,zmmreg [rm:t1s: evex.512.66.0f38.w0 89 /r ] AVX512,FUTURE
-VPEXPANDQ xmmreg|mask|z,mem128 [rm:t1s: evex.128.66.0f38.w1 89 /r ] AVX512VL,AVX512,FUTURE
-VPEXPANDQ ymmreg|mask|z,mem256 [rm:t1s: evex.256.66.0f38.w1 89 /r ] AVX512VL,AVX512,FUTURE
-VPEXPANDQ zmmreg|mask|z,mem512 [rm:t1s: evex.512.66.0f38.w1 89 /r ] AVX512,FUTURE
-VPEXPANDQ xmmreg|mask|z,xmmreg [rm:t1s: evex.128.66.0f38.w1 89 /r ] AVX512VL,AVX512,FUTURE
-VPEXPANDQ ymmreg|mask|z,ymmreg [rm:t1s: evex.256.66.0f38.w1 89 /r ] AVX512VL,AVX512,FUTURE
-VPEXPANDQ zmmreg|mask|z,zmmreg [rm:t1s: evex.512.66.0f38.w1 89 /r ] AVX512,FUTURE
-VPEXTRB reg8,xmmreg,imm8 [mri:t1s8: evex.128.66.0f3a.wig 14 /r ib ] AVX512BW,FUTURE
-VPEXTRB reg16,xmmreg,imm8 [mri:t1s8: evex.128.66.0f3a.wig 14 /r ib ] AVX512BW,FUTURE
-VPEXTRB reg32,xmmreg,imm8 [mri:t1s8: evex.128.66.0f3a.wig 14 /r ib ] AVX512BW,FUTURE
-VPEXTRB reg64,xmmreg,imm8 [mri:t1s8: evex.128.66.0f3a.wig 14 /r ib ] AVX512BW,FUTURE
-VPEXTRB mem8,xmmreg,imm8 [mri:t1s8: evex.128.66.0f3a.wig 14 /r ib ] AVX512BW,FUTURE
-VPEXTRD rm32,xmmreg,imm8 [mri:t1s: evex.128.66.0f3a.w0 16 /r ib ] AVX512DQ,FUTURE
-VPEXTRQ rm64,xmmreg,imm8 [mri:t1s: evex.128.66.0f3a.w1 16 /r ib ] AVX512DQ,FUTURE
-VPEXTRW reg16,xmmreg,imm8 [mri:t1s16: evex.128.66.0f3a.wig 15 /r ib ] AVX512BW,FUTURE
-VPEXTRW reg32,xmmreg,imm8 [mri:t1s16: evex.128.66.0f3a.wig 15 /r ib ] AVX512BW,FUTURE
-VPEXTRW reg64,xmmreg,imm8 [mri:t1s16: evex.128.66.0f3a.wig 15 /r ib ] AVX512BW,FUTURE
-VPEXTRW mem16,xmmreg,imm8 [mri:t1s16: evex.128.66.0f3a.wig 15 /r ib ] AVX512BW,FUTURE
-VPEXTRW reg16,xmmreg,imm8 [rmi: evex.128.66.0f.wig c5 /r ib ] AVX512BW,FUTURE
-VPEXTRW reg32,xmmreg,imm8 [rmi: evex.128.66.0f.wig c5 /r ib ] AVX512BW,FUTURE
-VPEXTRW reg64,xmmreg,imm8 [rmi: evex.128.66.0f.wig c5 /r ib ] AVX512BW,FUTURE
-VPGATHERDD xmmreg|mask,xmem32 [rm:t1s: vsibx evex.128.66.0f38.w0 90 /r ] AVX512VL,AVX512,FUTURE
-VPGATHERDD ymmreg|mask,ymem32 [rm:t1s: vsiby evex.256.66.0f38.w0 90 /r ] AVX512VL,AVX512,FUTURE
-VPGATHERDD zmmreg|mask,zmem32 [rm:t1s: vsibz evex.512.66.0f38.w0 90 /r ] AVX512,FUTURE
-VPGATHERDQ xmmreg|mask,xmem64 [rm:t1s: vsibx evex.128.66.0f38.w1 90 /r ] AVX512VL,AVX512,FUTURE
-VPGATHERDQ ymmreg|mask,xmem64 [rm:t1s: vsibx evex.256.66.0f38.w1 90 /r ] AVX512VL,AVX512,FUTURE
-VPGATHERDQ zmmreg|mask,ymem64 [rm:t1s: vsiby evex.512.66.0f38.w1 90 /r ] AVX512,FUTURE
-VPGATHERQD xmmreg|mask,xmem32 [rm:t1s: vsibx evex.128.66.0f38.w0 91 /r ] AVX512VL,AVX512,FUTURE
-VPGATHERQD xmmreg|mask,ymem32 [rm:t1s: vsiby evex.256.66.0f38.w0 91 /r ] AVX512VL,AVX512,FUTURE
-VPGATHERQD ymmreg|mask,zmem32 [rm:t1s: vsibz evex.512.66.0f38.w0 91 /r ] AVX512,FUTURE
-VPGATHERQQ xmmreg|mask,xmem64 [rm:t1s: vsibx evex.128.66.0f38.w1 91 /r ] AVX512VL,AVX512,FUTURE
-VPGATHERQQ ymmreg|mask,ymem64 [rm:t1s: vsiby evex.256.66.0f38.w1 91 /r ] AVX512VL,AVX512,FUTURE
-VPGATHERQQ zmmreg|mask,zmem64 [rm:t1s: vsibz evex.512.66.0f38.w1 91 /r ] AVX512,FUTURE
-VPINSRB xmmreg,xmmreg*,reg32,imm8 [rvmi:t1s8: evex.nds.128.66.0f3a.wig 20 /r ib ] AVX512BW,FUTURE
-VPINSRB xmmreg,xmmreg*,mem8,imm8 [rvmi:t1s8: evex.nds.128.66.0f3a.wig 20 /r ib ] AVX512BW,FUTURE
-VPINSRD xmmreg,xmmreg*,rm32,imm8 [rvmi:t1s: evex.nds.128.66.0f3a.w0 22 /r ib ] AVX512DQ,FUTURE
-VPINSRQ xmmreg,xmmreg*,rm64,imm8 [rvmi:t1s: evex.nds.128.66.0f3a.w1 22 /r ib ] AVX512DQ,FUTURE
-VPINSRW xmmreg,xmmreg*,reg32,imm8 [rvmi:t1s16: evex.nds.128.66.0f.wig c4 /r ib ] AVX512BW,FUTURE
-VPINSRW xmmreg,xmmreg*,mem16,imm8 [rvmi:t1s16: evex.nds.128.66.0f.wig c4 /r ib ] AVX512BW,FUTURE
-VPLZCNTD xmmreg|mask|z,xmmrm128|b32 [rm:fv: evex.128.66.0f38.w0 44 /r ] AVX512VL,AVX512CD,FUTURE
-VPLZCNTD ymmreg|mask|z,ymmrm256|b32 [rm:fv: evex.256.66.0f38.w0 44 /r ] AVX512VL,AVX512CD,FUTURE
-VPLZCNTD zmmreg|mask|z,zmmrm512|b32 [rm:fv: evex.512.66.0f38.w0 44 /r ] AVX512CD,FUTURE
-VPLZCNTQ xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.66.0f38.w1 44 /r ] AVX512VL,AVX512CD,FUTURE
-VPLZCNTQ ymmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.66.0f38.w1 44 /r ] AVX512VL,AVX512CD,FUTURE
-VPLZCNTQ zmmreg|mask|z,zmmrm512|b64 [rm:fv: evex.512.66.0f38.w1 44 /r ] AVX512CD,FUTURE
-VPMADD52HUQ xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 b5 /r ] AVX512VL,AVX512IFMA,FUTURE
-VPMADD52HUQ ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 b5 /r ] AVX512VL,AVX512IFMA,FUTURE
-VPMADD52HUQ zmmreg|mask|z,zmmreg,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 b5 /r ] AVX512IFMA,FUTURE
-VPMADD52LUQ xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 b4 /r ] AVX512VL,AVX512IFMA,FUTURE
-VPMADD52LUQ ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 b4 /r ] AVX512VL,AVX512IFMA,FUTURE
-VPMADD52LUQ zmmreg|mask|z,zmmreg,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 b4 /r ] AVX512IFMA,FUTURE
-VPMADDUBSW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.wig 04 /r ] AVX512VL,AVX512BW,FUTURE
-VPMADDUBSW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.wig 04 /r ] AVX512VL,AVX512BW,FUTURE
-VPMADDUBSW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.wig 04 /r ] AVX512BW,FUTURE
-VPMADDWD xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig f5 /r ] AVX512VL,AVX512BW,FUTURE
-VPMADDWD ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig f5 /r ] AVX512VL,AVX512BW,FUTURE
-VPMADDWD zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig f5 /r ] AVX512BW,FUTURE
-VPMAXSB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.wig 3c /r ] AVX512VL,AVX512BW,FUTURE
-VPMAXSB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.wig 3c /r ] AVX512VL,AVX512BW,FUTURE
-VPMAXSB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.wig 3c /r ] AVX512BW,FUTURE
-VPMAXSD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 3d /r ] AVX512VL,AVX512,FUTURE
-VPMAXSD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 3d /r ] AVX512VL,AVX512,FUTURE
-VPMAXSD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 3d /r ] AVX512,FUTURE
-VPMAXSQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 3d /r ] AVX512VL,AVX512,FUTURE
-VPMAXSQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 3d /r ] AVX512VL,AVX512,FUTURE
-VPMAXSQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 3d /r ] AVX512,FUTURE
-VPMAXSW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig ee /r ] AVX512VL,AVX512BW,FUTURE
-VPMAXSW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig ee /r ] AVX512VL,AVX512BW,FUTURE
-VPMAXSW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig ee /r ] AVX512BW,FUTURE
-VPMAXUB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig de /r ] AVX512VL,AVX512BW,FUTURE
-VPMAXUB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig de /r ] AVX512VL,AVX512BW,FUTURE
-VPMAXUB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig de /r ] AVX512BW,FUTURE
-VPMAXUD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 3f /r ] AVX512VL,AVX512,FUTURE
-VPMAXUD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 3f /r ] AVX512VL,AVX512,FUTURE
-VPMAXUD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 3f /r ] AVX512,FUTURE
-VPMAXUQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 3f /r ] AVX512VL,AVX512,FUTURE
-VPMAXUQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 3f /r ] AVX512VL,AVX512,FUTURE
-VPMAXUQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 3f /r ] AVX512,FUTURE
-VPMAXUW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.wig 3e /r ] AVX512VL,AVX512BW,FUTURE
-VPMAXUW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.wig 3e /r ] AVX512VL,AVX512BW,FUTURE
-VPMAXUW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.wig 3e /r ] AVX512BW,FUTURE
-VPMINSB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.wig 38 /r ] AVX512VL,AVX512BW,FUTURE
-VPMINSB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.wig 38 /r ] AVX512VL,AVX512BW,FUTURE
-VPMINSB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.wig 38 /r ] AVX512BW,FUTURE
-VPMINSD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 39 /r ] AVX512VL,AVX512,FUTURE
-VPMINSD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 39 /r ] AVX512VL,AVX512,FUTURE
-VPMINSD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 39 /r ] AVX512,FUTURE
-VPMINSQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 39 /r ] AVX512VL,AVX512,FUTURE
-VPMINSQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 39 /r ] AVX512VL,AVX512,FUTURE
-VPMINSQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 39 /r ] AVX512,FUTURE
-VPMINSW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig ea /r ] AVX512VL,AVX512BW,FUTURE
-VPMINSW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig ea /r ] AVX512VL,AVX512BW,FUTURE
-VPMINSW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig ea /r ] AVX512BW,FUTURE
-VPMINUB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig da /r ] AVX512VL,AVX512BW,FUTURE
-VPMINUB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig da /r ] AVX512VL,AVX512BW,FUTURE
-VPMINUB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig da /r ] AVX512BW,FUTURE
-VPMINUD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 3b /r ] AVX512VL,AVX512,FUTURE
-VPMINUD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 3b /r ] AVX512VL,AVX512,FUTURE
-VPMINUD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 3b /r ] AVX512,FUTURE
-VPMINUQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 3b /r ] AVX512VL,AVX512,FUTURE
-VPMINUQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 3b /r ] AVX512VL,AVX512,FUTURE
-VPMINUQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 3b /r ] AVX512,FUTURE
-VPMINUW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.wig 3a /r ] AVX512VL,AVX512BW,FUTURE
-VPMINUW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.wig 3a /r ] AVX512VL,AVX512BW,FUTURE
-VPMINUW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.wig 3a /r ] AVX512BW,FUTURE
-VPMOVB2M kreg,xmmreg [rm: evex.128.f3.0f38.w0 29 /r ] AVX512VL,AVX512BW,FUTURE
-VPMOVB2M kreg,ymmreg [rm: evex.256.f3.0f38.w0 29 /r ] AVX512VL,AVX512BW,FUTURE
-VPMOVB2M kreg,zmmreg [rm: evex.512.f3.0f38.w0 29 /r ] AVX512BW,FUTURE
-VPMOVD2M kreg,xmmreg [rm: evex.128.f3.0f38.w0 39 /r ] AVX512VL,AVX512DQ,FUTURE
-VPMOVD2M kreg,ymmreg [rm: evex.256.f3.0f38.w0 39 /r ] AVX512VL,AVX512DQ,FUTURE
-VPMOVD2M kreg,zmmreg [rm: evex.512.f3.0f38.w0 39 /r ] AVX512DQ,FUTURE
-VPMOVDB xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 31 /r ] AVX512VL,AVX512,FUTURE
-VPMOVDB xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 31 /r ] AVX512VL,AVX512,FUTURE
-VPMOVDB xmmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 31 /r ] AVX512,FUTURE
-VPMOVDB mem32|mask,xmmreg [mr:qvm: evex.128.f3.0f38.w0 31 /r ] AVX512VL,AVX512,FUTURE
-VPMOVDB mem64|mask,ymmreg [mr:qvm: evex.256.f3.0f38.w0 31 /r ] AVX512VL,AVX512,FUTURE
-VPMOVDB mem128|mask,zmmreg [mr:qvm: evex.512.f3.0f38.w0 31 /r ] AVX512,FUTURE
-VPMOVDW xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 33 /r ] AVX512VL,AVX512,FUTURE
-VPMOVDW xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 33 /r ] AVX512VL,AVX512,FUTURE
-VPMOVDW ymmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 33 /r ] AVX512,FUTURE
-VPMOVDW mem64|mask,xmmreg [mr:hvm: evex.128.f3.0f38.w0 33 /r ] AVX512VL,AVX512,FUTURE
-VPMOVDW mem128|mask,ymmreg [mr:hvm: evex.256.f3.0f38.w0 33 /r ] AVX512VL,AVX512,FUTURE
-VPMOVDW mem256|mask,zmmreg [mr:hvm: evex.512.f3.0f38.w0 33 /r ] AVX512,FUTURE
-VPMOVM2B xmmreg,kreg [rm: evex.128.f3.0f38.w0 28 /r ] AVX512VL,AVX512BW,FUTURE
-VPMOVM2B ymmreg,kreg [rm: evex.256.f3.0f38.w0 28 /r ] AVX512VL,AVX512BW,FUTURE
-VPMOVM2B zmmreg,kreg [rm: evex.512.f3.0f38.w0 28 /r ] AVX512BW,FUTURE
-VPMOVM2D xmmreg,kreg [rm: evex.128.f3.0f38.w0 38 /r ] AVX512VL,AVX512DQ,FUTURE
-VPMOVM2D ymmreg,kreg [rm: evex.256.f3.0f38.w0 38 /r ] AVX512VL,AVX512DQ,FUTURE
-VPMOVM2D zmmreg,kreg [rm: evex.512.f3.0f38.w0 38 /r ] AVX512DQ,FUTURE
-VPMOVM2Q xmmreg,kreg [rm: evex.128.f3.0f38.w1 38 /r ] AVX512VL,AVX512DQ,FUTURE
-VPMOVM2Q ymmreg,kreg [rm: evex.256.f3.0f38.w1 38 /r ] AVX512VL,AVX512DQ,FUTURE
-VPMOVM2Q zmmreg,kreg [rm: evex.512.f3.0f38.w1 38 /r ] AVX512DQ,FUTURE
-VPMOVM2W xmmreg,kreg [rm: evex.128.f3.0f38.w1 28 /r ] AVX512VL,AVX512BW,FUTURE
-VPMOVM2W ymmreg,kreg [rm: evex.256.f3.0f38.w1 28 /r ] AVX512VL,AVX512BW,FUTURE
-VPMOVM2W zmmreg,kreg [rm: evex.512.f3.0f38.w1 28 /r ] AVX512BW,FUTURE
-VPMOVQ2M kreg,xmmreg [rm: evex.128.f3.0f38.w1 39 /r ] AVX512VL,AVX512DQ,FUTURE
-VPMOVQ2M kreg,ymmreg [rm: evex.256.f3.0f38.w1 39 /r ] AVX512VL,AVX512DQ,FUTURE
-VPMOVQ2M kreg,zmmreg [rm: evex.512.f3.0f38.w1 39 /r ] AVX512DQ,FUTURE
-VPMOVQB xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 32 /r ] AVX512VL,AVX512,FUTURE
-VPMOVQB xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 32 /r ] AVX512VL,AVX512,FUTURE
-VPMOVQB xmmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 32 /r ] AVX512,FUTURE
-VPMOVQB mem16|mask,xmmreg [mr:ovm: evex.128.f3.0f38.w0 32 /r ] AVX512VL,AVX512,FUTURE
-VPMOVQB mem32|mask,ymmreg [mr:ovm: evex.256.f3.0f38.w0 32 /r ] AVX512VL,AVX512,FUTURE
-VPMOVQB mem64|mask,zmmreg [mr:ovm: evex.512.f3.0f38.w0 32 /r ] AVX512,FUTURE
-VPMOVQD xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 35 /r ] AVX512VL,AVX512,FUTURE
-VPMOVQD xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 35 /r ] AVX512VL,AVX512,FUTURE
-VPMOVQD ymmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 35 /r ] AVX512,FUTURE
-VPMOVQD mem64|mask,xmmreg [mr:hvm: evex.128.f3.0f38.w0 35 /r ] AVX512VL,AVX512,FUTURE
-VPMOVQD mem128|mask,ymmreg [mr:hvm: evex.256.f3.0f38.w0 35 /r ] AVX512VL,AVX512,FUTURE
-VPMOVQD mem256|mask,zmmreg [mr:hvm: evex.512.f3.0f38.w0 35 /r ] AVX512,FUTURE
-VPMOVQW xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 34 /r ] AVX512VL,AVX512,FUTURE
-VPMOVQW xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 34 /r ] AVX512VL,AVX512,FUTURE
-VPMOVQW xmmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 34 /r ] AVX512,FUTURE
-VPMOVQW mem32|mask,xmmreg [mr:qvm: evex.128.f3.0f38.w0 34 /r ] AVX512VL,AVX512,FUTURE
-VPMOVQW mem64|mask,ymmreg [mr:qvm: evex.256.f3.0f38.w0 34 /r ] AVX512VL,AVX512,FUTURE
-VPMOVQW mem128|mask,zmmreg [mr:qvm: evex.512.f3.0f38.w0 34 /r ] AVX512,FUTURE
-VPMOVSDB xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 21 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSDB xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 21 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSDB xmmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 21 /r ] AVX512,FUTURE
-VPMOVSDB mem32|mask,xmmreg [mr:qvm: evex.128.f3.0f38.w0 21 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSDB mem64|mask,ymmreg [mr:qvm: evex.256.f3.0f38.w0 21 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSDB mem128|mask,zmmreg [mr:qvm: evex.512.f3.0f38.w0 21 /r ] AVX512,FUTURE
-VPMOVSDW xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 23 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSDW xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 23 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSDW ymmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 23 /r ] AVX512,FUTURE
-VPMOVSDW mem64|mask,xmmreg [mr:hvm: evex.128.f3.0f38.w0 23 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSDW mem128|mask,ymmreg [mr:hvm: evex.256.f3.0f38.w0 23 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSDW mem256|mask,zmmreg [mr:hvm: evex.512.f3.0f38.w0 23 /r ] AVX512,FUTURE
-VPMOVSQB xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 22 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSQB xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 22 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSQB xmmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 22 /r ] AVX512,FUTURE
-VPMOVSQB mem16|mask,xmmreg [mr:ovm: evex.128.f3.0f38.w0 22 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSQB mem32|mask,ymmreg [mr:ovm: evex.256.f3.0f38.w0 22 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSQB mem64|mask,zmmreg [mr:ovm: evex.512.f3.0f38.w0 22 /r ] AVX512,FUTURE
-VPMOVSQD xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 25 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSQD xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 25 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSQD ymmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 25 /r ] AVX512,FUTURE
-VPMOVSQD mem64|mask,xmmreg [mr:hvm: evex.128.f3.0f38.w0 25 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSQD mem128|mask,ymmreg [mr:hvm: evex.256.f3.0f38.w0 25 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSQD mem256|mask,zmmreg [mr:hvm: evex.512.f3.0f38.w0 25 /r ] AVX512,FUTURE
-VPMOVSQW xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 24 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSQW xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 24 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSQW xmmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 24 /r ] AVX512,FUTURE
-VPMOVSQW mem32|mask,xmmreg [mr:qvm: evex.128.f3.0f38.w0 24 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSQW mem64|mask,ymmreg [mr:qvm: evex.256.f3.0f38.w0 24 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSQW mem128|mask,zmmreg [mr:qvm: evex.512.f3.0f38.w0 24 /r ] AVX512,FUTURE
-VPMOVSWB xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 20 /r ] AVX512VL,AVX512BW,FUTURE
-VPMOVSWB xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 20 /r ] AVX512VL,AVX512BW,FUTURE
-VPMOVSWB ymmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 20 /r ] AVX512BW,FUTURE
-VPMOVSWB mem64|mask,xmmreg [mr:hvm: evex.128.f3.0f38.w0 20 /r ] AVX512VL,AVX512BW,FUTURE
-VPMOVSWB mem128|mask,ymmreg [mr:hvm: evex.256.f3.0f38.w0 20 /r ] AVX512VL,AVX512BW,FUTURE
-VPMOVSWB mem256|mask,zmmreg [mr:hvm: evex.512.f3.0f38.w0 20 /r ] AVX512BW,FUTURE
-VPMOVSXBD xmmreg|mask|z,xmmrm32 [rm:qvm: evex.128.66.0f38.wig 21 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSXBD ymmreg|mask|z,xmmrm64 [rm:qvm: evex.256.66.0f38.wig 21 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSXBD zmmreg|mask|z,xmmrm128 [rm:qvm: evex.512.66.0f38.wig 21 /r ] AVX512,FUTURE
-VPMOVSXBQ xmmreg|mask|z,xmmrm16 [rm:ovm: evex.128.66.0f38.wig 22 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSXBQ ymmreg|mask|z,xmmrm32 [rm:ovm: evex.256.66.0f38.wig 22 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSXBQ zmmreg|mask|z,xmmrm64 [rm:ovm: evex.512.66.0f38.wig 22 /r ] AVX512,FUTURE
-VPMOVSXBW xmmreg|mask|z,xmmrm64 [rm:hvm: evex.128.66.0f38.wig 20 /r ] AVX512VL,AVX512BW,FUTURE
-VPMOVSXBW ymmreg|mask|z,xmmrm128 [rm:hvm: evex.256.66.0f38.wig 20 /r ] AVX512VL,AVX512BW,FUTURE
-VPMOVSXBW zmmreg|mask|z,ymmrm256 [rm:hvm: evex.512.66.0f38.wig 20 /r ] AVX512BW,FUTURE
-VPMOVSXDQ xmmreg|mask|z,xmmrm64 [rm:hvm: evex.128.66.0f38.w0 25 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSXDQ ymmreg|mask|z,xmmrm128 [rm:hvm: evex.256.66.0f38.w0 25 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSXDQ zmmreg|mask|z,ymmrm256 [rm:hvm: evex.512.66.0f38.w0 25 /r ] AVX512,FUTURE
-VPMOVSXWD xmmreg|mask|z,xmmrm64 [rm:hvm: evex.128.66.0f38.wig 23 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSXWD ymmreg|mask|z,xmmrm128 [rm:hvm: evex.256.66.0f38.wig 23 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSXWD zmmreg|mask|z,ymmrm256 [rm:hvm: evex.512.66.0f38.wig 23 /r ] AVX512,FUTURE
-VPMOVSXWQ xmmreg|mask|z,xmmrm32 [rm:qvm: evex.128.66.0f38.wig 24 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSXWQ ymmreg|mask|z,xmmrm64 [rm:qvm: evex.256.66.0f38.wig 24 /r ] AVX512VL,AVX512,FUTURE
-VPMOVSXWQ zmmreg|mask|z,xmmrm128 [rm:qvm: evex.512.66.0f38.wig 24 /r ] AVX512,FUTURE
-VPMOVUSDB xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 11 /r ] AVX512VL,AVX512,FUTURE
-VPMOVUSDB xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 11 /r ] AVX512VL,AVX512,FUTURE
-VPMOVUSDB xmmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 11 /r ] AVX512,FUTURE
-VPMOVUSDB mem32|mask,xmmreg [mr:qvm: evex.128.f3.0f38.w0 11 /r ] AVX512VL,AVX512,FUTURE
-VPMOVUSDB mem64|mask,ymmreg [mr:qvm: evex.256.f3.0f38.w0 11 /r ] AVX512VL,AVX512,FUTURE
-VPMOVUSDB mem128|mask,zmmreg [mr:qvm: evex.512.f3.0f38.w0 11 /r ] AVX512,FUTURE
-VPMOVUSDW xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 13 /r ] AVX512VL,AVX512,FUTURE
-VPMOVUSDW xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 13 /r ] AVX512VL,AVX512,FUTURE
-VPMOVUSDW ymmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 13 /r ] AVX512,FUTURE
-VPMOVUSDW mem64|mask,xmmreg [mr:hvm: evex.128.f3.0f38.w0 13 /r ] AVX512VL,AVX512,FUTURE
-VPMOVUSDW mem128|mask,ymmreg [mr:hvm: evex.256.f3.0f38.w0 13 /r ] AVX512VL,AVX512,FUTURE
-VPMOVUSDW mem256|mask,zmmreg [mr:hvm: evex.512.f3.0f38.w0 13 /r ] AVX512,FUTURE
-VPMOVUSQB xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 12 /r ] AVX512VL,AVX512,FUTURE
-VPMOVUSQB xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 12 /r ] AVX512VL,AVX512,FUTURE
-VPMOVUSQB xmmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 12 /r ] AVX512,FUTURE
-VPMOVUSQB mem16|mask,xmmreg [mr:ovm: evex.128.f3.0f38.w0 12 /r ] AVX512VL,AVX512,FUTURE
-VPMOVUSQB mem32|mask,ymmreg [mr:ovm: evex.256.f3.0f38.w0 12 /r ] AVX512VL,AVX512,FUTURE
-VPMOVUSQB mem64|mask,zmmreg [mr:ovm: evex.512.f3.0f38.w0 12 /r ] AVX512,FUTURE
-VPMOVUSQD xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 15 /r ] AVX512VL,AVX512,FUTURE
-VPMOVUSQD xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 15 /r ] AVX512VL,AVX512,FUTURE
-VPMOVUSQD ymmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 15 /r ] AVX512,FUTURE
-VPMOVUSQD mem64|mask,xmmreg [mr:hvm: evex.128.f3.0f38.w0 15 /r ] AVX512VL,AVX512,FUTURE
-VPMOVUSQD mem128|mask,ymmreg [mr:hvm: evex.256.f3.0f38.w0 15 /r ] AVX512VL,AVX512,FUTURE
-VPMOVUSQD mem256|mask,zmmreg [mr:hvm: evex.512.f3.0f38.w0 15 /r ] AVX512,FUTURE
-VPMOVUSQW xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 14 /r ] AVX512VL,AVX512,FUTURE
-VPMOVUSQW xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 14 /r ] AVX512VL,AVX512,FUTURE
-VPMOVUSQW xmmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 14 /r ] AVX512,FUTURE
-VPMOVUSQW mem32|mask,xmmreg [mr:qvm: evex.128.f3.0f38.w0 14 /r ] AVX512VL,AVX512,FUTURE
-VPMOVUSQW mem64|mask,ymmreg [mr:qvm: evex.256.f3.0f38.w0 14 /r ] AVX512VL,AVX512,FUTURE
-VPMOVUSQW mem128|mask,zmmreg [mr:qvm: evex.512.f3.0f38.w0 14 /r ] AVX512,FUTURE
-VPMOVUSWB xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 10 /r ] AVX512VL,AVX512BW,FUTURE
-VPMOVUSWB xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 10 /r ] AVX512VL,AVX512BW,FUTURE
-VPMOVUSWB ymmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 10 /r ] AVX512BW,FUTURE
-VPMOVUSWB mem64|mask,xmmreg [mr:hvm: evex.128.f3.0f38.w0 10 /r ] AVX512VL,AVX512BW,FUTURE
-VPMOVUSWB mem128|mask,ymmreg [mr:hvm: evex.256.f3.0f38.w0 10 /r ] AVX512VL,AVX512BW,FUTURE
-VPMOVUSWB mem256|mask,zmmreg [mr:hvm: evex.512.f3.0f38.w0 10 /r ] AVX512BW,FUTURE
-VPMOVW2M kreg,xmmreg [rm: evex.128.f3.0f38.w1 29 /r ] AVX512VL,AVX512BW,FUTURE
-VPMOVW2M kreg,ymmreg [rm: evex.256.f3.0f38.w1 29 /r ] AVX512VL,AVX512BW,FUTURE
-VPMOVW2M kreg,zmmreg [rm: evex.512.f3.0f38.w1 29 /r ] AVX512BW,FUTURE
-VPMOVWB xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 30 /r ] AVX512VL,AVX512BW,FUTURE
-VPMOVWB xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 30 /r ] AVX512VL,AVX512BW,FUTURE
-VPMOVWB ymmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 30 /r ] AVX512BW,FUTURE
-VPMOVWB mem64|mask,xmmreg [mr:hvm: evex.128.f3.0f38.w0 30 /r ] AVX512VL,AVX512BW,FUTURE
-VPMOVWB mem128|mask,ymmreg [mr:hvm: evex.256.f3.0f38.w0 30 /r ] AVX512VL,AVX512BW,FUTURE
-VPMOVWB mem256|mask,zmmreg [mr:hvm: evex.512.f3.0f38.w0 30 /r ] AVX512BW,FUTURE
-VPMOVZXBD xmmreg|mask|z,xmmrm32 [rm:qvm: evex.128.66.0f38.wig 31 /r ] AVX512VL,AVX512,FUTURE
-VPMOVZXBD ymmreg|mask|z,xmmrm64 [rm:qvm: evex.256.66.0f38.wig 31 /r ] AVX512VL,AVX512,FUTURE
-VPMOVZXBD zmmreg|mask|z,xmmrm128 [rm:qvm: evex.512.66.0f38.wig 31 /r ] AVX512,FUTURE
-VPMOVZXBQ xmmreg|mask|z,xmmrm16 [rm:ovm: evex.128.66.0f38.wig 32 /r ] AVX512VL,AVX512,FUTURE
-VPMOVZXBQ ymmreg|mask|z,xmmrm32 [rm:ovm: evex.256.66.0f38.wig 32 /r ] AVX512VL,AVX512,FUTURE
-VPMOVZXBQ zmmreg|mask|z,xmmrm64 [rm:ovm: evex.512.66.0f38.wig 32 /r ] AVX512,FUTURE
-VPMOVZXBW xmmreg|mask|z,xmmrm64 [rm:hvm: evex.128.66.0f38.wig 30 /r ] AVX512VL,AVX512BW,FUTURE
-VPMOVZXBW ymmreg|mask|z,xmmrm128 [rm:hvm: evex.256.66.0f38.wig 30 /r ] AVX512VL,AVX512BW,FUTURE
-VPMOVZXBW zmmreg|mask|z,ymmrm256 [rm:hvm: evex.512.66.0f38.wig 30 /r ] AVX512BW,FUTURE
-VPMOVZXDQ xmmreg|mask|z,xmmrm64 [rm:hvm: evex.128.66.0f38.w0 35 /r ] AVX512VL,AVX512,FUTURE
-VPMOVZXDQ ymmreg|mask|z,xmmrm128 [rm:hvm: evex.256.66.0f38.w0 35 /r ] AVX512VL,AVX512,FUTURE
-VPMOVZXDQ zmmreg|mask|z,ymmrm256 [rm:hvm: evex.512.66.0f38.w0 35 /r ] AVX512,FUTURE
-VPMOVZXWD xmmreg|mask|z,xmmrm64 [rm:hvm: evex.128.66.0f38.wig 33 /r ] AVX512VL,AVX512,FUTURE
-VPMOVZXWD ymmreg|mask|z,xmmrm128 [rm:hvm: evex.256.66.0f38.wig 33 /r ] AVX512VL,AVX512,FUTURE
-VPMOVZXWD zmmreg|mask|z,ymmrm256 [rm:hvm: evex.512.66.0f38.wig 33 /r ] AVX512,FUTURE
-VPMOVZXWQ xmmreg|mask|z,xmmrm32 [rm:qvm: evex.128.66.0f38.wig 34 /r ] AVX512VL,AVX512,FUTURE
-VPMOVZXWQ ymmreg|mask|z,xmmrm64 [rm:qvm: evex.256.66.0f38.wig 34 /r ] AVX512VL,AVX512,FUTURE
-VPMOVZXWQ zmmreg|mask|z,xmmrm128 [rm:qvm: evex.512.66.0f38.wig 34 /r ] AVX512,FUTURE
-VPMULDQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 28 /r ] AVX512VL,AVX512,FUTURE
-VPMULDQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 28 /r ] AVX512VL,AVX512,FUTURE
-VPMULDQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 28 /r ] AVX512,FUTURE
-VPMULHRSW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.wig 0b /r ] AVX512VL,AVX512BW,FUTURE
-VPMULHRSW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.wig 0b /r ] AVX512VL,AVX512BW,FUTURE
-VPMULHRSW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.wig 0b /r ] AVX512BW,FUTURE
-VPMULHUW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig e4 /r ] AVX512VL,AVX512BW,FUTURE
-VPMULHUW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig e4 /r ] AVX512VL,AVX512BW,FUTURE
-VPMULHUW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig e4 /r ] AVX512BW,FUTURE
-VPMULHW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig e5 /r ] AVX512VL,AVX512BW,FUTURE
-VPMULHW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig e5 /r ] AVX512VL,AVX512BW,FUTURE
-VPMULHW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig e5 /r ] AVX512BW,FUTURE
-VPMULLD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 40 /r ] AVX512VL,AVX512,FUTURE
-VPMULLD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 40 /r ] AVX512VL,AVX512,FUTURE
-VPMULLD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 40 /r ] AVX512,FUTURE
-VPMULLQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 40 /r ] AVX512VL,AVX512DQ,FUTURE
-VPMULLQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 40 /r ] AVX512VL,AVX512DQ,FUTURE
-VPMULLQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 40 /r ] AVX512DQ,FUTURE
-VPMULLW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig d5 /r ] AVX512VL,AVX512BW,FUTURE
-VPMULLW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig d5 /r ] AVX512VL,AVX512BW,FUTURE
-VPMULLW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig d5 /r ] AVX512BW,FUTURE
-VPMULTISHIFTQB xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 83 /r ] AVX512VL,AVX512VBMI,FUTURE
-VPMULTISHIFTQB ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 83 /r ] AVX512VL,AVX512VBMI,FUTURE
-VPMULTISHIFTQB zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 83 /r ] AVX512VBMI,FUTURE
-VPMULUDQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 f4 /r ] AVX512VL,AVX512,FUTURE
-VPMULUDQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 f4 /r ] AVX512VL,AVX512,FUTURE
-VPMULUDQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 f4 /r ] AVX512,FUTURE
-VPORD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f.w0 eb /r ] AVX512VL,AVX512,FUTURE
-VPORD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f.w0 eb /r ] AVX512VL,AVX512,FUTURE
-VPORD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f.w0 eb /r ] AVX512,FUTURE
-VPORQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 eb /r ] AVX512VL,AVX512,FUTURE
-VPORQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 eb /r ] AVX512VL,AVX512,FUTURE
-VPORQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 eb /r ] AVX512,FUTURE
-VPROLD xmmreg|mask|z,xmmrm128|b32*,imm8 [vmi:fv: evex.nds.128.66.0f.w0 72 /1 ib ] AVX512VL,AVX512,FUTURE
-VPROLD ymmreg|mask|z,ymmrm256|b32*,imm8 [vmi:fv: evex.nds.256.66.0f.w0 72 /1 ib ] AVX512VL,AVX512,FUTURE
-VPROLD zmmreg|mask|z,zmmrm512|b32*,imm8 [vmi:fv: evex.nds.512.66.0f.w0 72 /1 ib ] AVX512,FUTURE
-VPROLQ xmmreg|mask|z,xmmrm128|b64*,imm8 [vmi:fv: evex.nds.128.66.0f.w1 72 /1 ib ] AVX512VL,AVX512,FUTURE
-VPROLQ ymmreg|mask|z,ymmrm256|b64*,imm8 [vmi:fv: evex.nds.256.66.0f.w1 72 /1 ib ] AVX512VL,AVX512,FUTURE
-VPROLQ zmmreg|mask|z,zmmrm512|b64*,imm8 [vmi:fv: evex.nds.512.66.0f.w1 72 /1 ib ] AVX512,FUTURE
-VPROLVD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 15 /r ] AVX512VL,AVX512,FUTURE
-VPROLVD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 15 /r ] AVX512VL,AVX512,FUTURE
-VPROLVD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 15 /r ] AVX512,FUTURE
-VPROLVQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 15 /r ] AVX512VL,AVX512,FUTURE
-VPROLVQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 15 /r ] AVX512VL,AVX512,FUTURE
-VPROLVQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 15 /r ] AVX512,FUTURE
-VPRORD xmmreg|mask|z,xmmrm128|b32*,imm8 [vmi:fv: evex.nds.128.66.0f.w0 72 /0 ib ] AVX512VL,AVX512,FUTURE
-VPRORD ymmreg|mask|z,ymmrm256|b32*,imm8 [vmi:fv: evex.nds.256.66.0f.w0 72 /0 ib ] AVX512VL,AVX512,FUTURE
-VPRORD zmmreg|mask|z,zmmrm512|b32*,imm8 [vmi:fv: evex.nds.512.66.0f.w0 72 /0 ib ] AVX512,FUTURE
-VPRORQ xmmreg|mask|z,xmmrm128|b64*,imm8 [vmi:fv: evex.nds.128.66.0f.w1 72 /0 ib ] AVX512VL,AVX512,FUTURE
-VPRORQ ymmreg|mask|z,ymmrm256|b64*,imm8 [vmi:fv: evex.nds.256.66.0f.w1 72 /0 ib ] AVX512VL,AVX512,FUTURE
-VPRORQ zmmreg|mask|z,zmmrm512|b64*,imm8 [vmi:fv: evex.nds.512.66.0f.w1 72 /0 ib ] AVX512,FUTURE
-VPRORVD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 14 /r ] AVX512VL,AVX512,FUTURE
-VPRORVD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 14 /r ] AVX512VL,AVX512,FUTURE
-VPRORVD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 14 /r ] AVX512,FUTURE
-VPRORVQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 14 /r ] AVX512VL,AVX512,FUTURE
-VPRORVQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 14 /r ] AVX512VL,AVX512,FUTURE
-VPRORVQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 14 /r ] AVX512,FUTURE
-VPSADBW xmmreg,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig f6 /r ] AVX512VL,AVX512BW,FUTURE
-VPSADBW ymmreg,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig f6 /r ] AVX512VL,AVX512BW,FUTURE
-VPSADBW zmmreg,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig f6 /r ] AVX512BW,FUTURE
-VPSCATTERDD xmem32|mask,xmmreg [mr:t1s: vsibx evex.128.66.0f38.w0 a0 /r ] AVX512VL,AVX512,FUTURE
-VPSCATTERDD ymem32|mask,ymmreg [mr:t1s: vsiby evex.256.66.0f38.w0 a0 /r ] AVX512VL,AVX512,FUTURE
-VPSCATTERDD zmem32|mask,zmmreg [mr:t1s: vsibz evex.512.66.0f38.w0 a0 /r ] AVX512,FUTURE
-VPSCATTERDQ xmem64|mask,xmmreg [mr:t1s: vsibx evex.128.66.0f38.w1 a0 /r ] AVX512VL,AVX512,FUTURE
-VPSCATTERDQ xmem64|mask,ymmreg [mr:t1s: vsibx evex.256.66.0f38.w1 a0 /r ] AVX512VL,AVX512,FUTURE
-VPSCATTERDQ ymem64|mask,zmmreg [mr:t1s: vsiby evex.512.66.0f38.w1 a0 /r ] AVX512,FUTURE
-VPSCATTERQD xmem32|mask,xmmreg [mr:t1s: vsibx evex.128.66.0f38.w0 a1 /r ] AVX512VL,AVX512,FUTURE
-VPSCATTERQD ymem32|mask,xmmreg [mr:t1s: vsiby evex.256.66.0f38.w0 a1 /r ] AVX512VL,AVX512,FUTURE
-VPSCATTERQD zmem32|mask,ymmreg [mr:t1s: vsibz evex.512.66.0f38.w0 a1 /r ] AVX512,FUTURE
-VPSCATTERQQ xmem64|mask,xmmreg [mr:t1s: vsibx evex.128.66.0f38.w1 a1 /r ] AVX512VL,AVX512,FUTURE
-VPSCATTERQQ ymem64|mask,ymmreg [mr:t1s: vsiby evex.256.66.0f38.w1 a1 /r ] AVX512VL,AVX512,FUTURE
-VPSCATTERQQ zmem64|mask,zmmreg [mr:t1s: vsibz evex.512.66.0f38.w1 a1 /r ] AVX512,FUTURE
-VPSHUFB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.wig 00 /r ] AVX512VL,AVX512BW,FUTURE
-VPSHUFB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.wig 00 /r ] AVX512VL,AVX512BW,FUTURE
-VPSHUFB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.wig 00 /r ] AVX512BW,FUTURE
-VPSHUFD xmmreg|mask|z,xmmrm128|b32,imm8 [rmi:fv: evex.128.66.0f.w0 70 /r ib ] AVX512VL,AVX512,FUTURE
-VPSHUFD ymmreg|mask|z,ymmrm256|b32,imm8 [rmi:fv: evex.256.66.0f.w0 70 /r ib ] AVX512VL,AVX512,FUTURE
-VPSHUFD zmmreg|mask|z,zmmrm512|b32,imm8 [rmi:fv: evex.512.66.0f.w0 70 /r ib ] AVX512,FUTURE
-VPSHUFHW xmmreg|mask|z,xmmrm128,imm8 [rmi:fvm: evex.128.f3.0f.wig 70 /r ib ] AVX512VL,AVX512BW,FUTURE
-VPSHUFHW ymmreg|mask|z,ymmrm256,imm8 [rmi:fvm: evex.256.f3.0f.wig 70 /r ib ] AVX512VL,AVX512BW,FUTURE
-VPSHUFHW zmmreg|mask|z,zmmrm512,imm8 [rmi:fvm: evex.512.f3.0f.wig 70 /r ib ] AVX512BW,FUTURE
-VPSHUFLW xmmreg|mask|z,xmmrm128,imm8 [rmi:fvm: evex.128.f2.0f.wig 70 /r ib ] AVX512VL,AVX512BW,FUTURE
-VPSHUFLW ymmreg|mask|z,ymmrm256,imm8 [rmi:fvm: evex.256.f2.0f.wig 70 /r ib ] AVX512VL,AVX512BW,FUTURE
-VPSHUFLW zmmreg|mask|z,zmmrm512,imm8 [rmi:fvm: evex.512.f2.0f.wig 70 /r ib ] AVX512BW,FUTURE
-VPSLLD xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:m128: evex.nds.128.66.0f.w0 f2 /r ] AVX512VL,AVX512,FUTURE
-VPSLLD ymmreg|mask|z,ymmreg*,xmmrm128 [rvm:m128: evex.nds.256.66.0f.w0 f2 /r ] AVX512VL,AVX512,FUTURE
-VPSLLD zmmreg|mask|z,zmmreg*,xmmrm128 [rvm:m128: evex.nds.512.66.0f.w0 f2 /r ] AVX512,FUTURE
-VPSLLD xmmreg|mask|z,xmmrm128|b32*,imm8 [vmi:fv: evex.nds.128.66.0f.w0 72 /6 ib ] AVX512VL,AVX512,FUTURE
-VPSLLD ymmreg|mask|z,ymmrm256|b32*,imm8 [vmi:fv: evex.nds.256.66.0f.w0 72 /6 ib ] AVX512VL,AVX512,FUTURE
-VPSLLD zmmreg|mask|z,zmmrm512|b32*,imm8 [vmi:fv: evex.nds.512.66.0f.w0 72 /6 ib ] AVX512,FUTURE
-VPSLLDQ xmmreg,xmmrm128*,imm8 [vmi:fvm: evex.nds.128.66.0f.wig 73 /7 ib ] AVX512VL,AVX512BW,FUTURE
-VPSLLDQ ymmreg,ymmrm256*,imm8 [vmi:fvm: evex.nds.256.66.0f.wig 73 /7 ib ] AVX512VL,AVX512BW,FUTURE
-VPSLLDQ zmmreg,zmmrm512*,imm8 [vmi:fvm: evex.nds.512.66.0f.wig 73 /7 ib ] AVX512BW,FUTURE
-VPSLLQ xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:m128: evex.nds.128.66.0f.w1 f3 /r ] AVX512VL,AVX512,FUTURE
-VPSLLQ ymmreg|mask|z,ymmreg*,xmmrm128 [rvm:m128: evex.nds.256.66.0f.w1 f3 /r ] AVX512VL,AVX512,FUTURE
-VPSLLQ zmmreg|mask|z,zmmreg*,xmmrm128 [rvm:m128: evex.nds.512.66.0f.w1 f3 /r ] AVX512,FUTURE
-VPSLLQ xmmreg|mask|z,xmmrm128|b64*,imm8 [vmi:fv: evex.nds.128.66.0f.w1 73 /6 ib ] AVX512VL,AVX512,FUTURE
-VPSLLQ ymmreg|mask|z,ymmrm256|b64*,imm8 [vmi:fv: evex.nds.256.66.0f.w1 73 /6 ib ] AVX512VL,AVX512,FUTURE
-VPSLLQ zmmreg|mask|z,zmmrm512|b64*,imm8 [vmi:fv: evex.nds.512.66.0f.w1 73 /6 ib ] AVX512,FUTURE
-VPSLLVD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 47 /r ] AVX512VL,AVX512,FUTURE
-VPSLLVD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 47 /r ] AVX512VL,AVX512,FUTURE
-VPSLLVD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 47 /r ] AVX512,FUTURE
-VPSLLVQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 47 /r ] AVX512VL,AVX512,FUTURE
-VPSLLVQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 47 /r ] AVX512VL,AVX512,FUTURE
-VPSLLVQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 47 /r ] AVX512,FUTURE
-VPSLLVW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.w1 12 /r ] AVX512VL,AVX512BW,FUTURE
-VPSLLVW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.w1 12 /r ] AVX512VL,AVX512BW,FUTURE
-VPSLLVW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.w1 12 /r ] AVX512BW,FUTURE
-VPSLLW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:m128: evex.nds.128.66.0f.wig f1 /r ] AVX512VL,AVX512BW,FUTURE
-VPSLLW ymmreg|mask|z,ymmreg*,xmmrm128 [rvm:m128: evex.nds.256.66.0f.wig f1 /r ] AVX512VL,AVX512BW,FUTURE
-VPSLLW zmmreg|mask|z,zmmreg*,xmmrm128 [rvm:m128: evex.nds.512.66.0f.wig f1 /r ] AVX512BW,FUTURE
-VPSLLW xmmreg|mask|z,xmmrm128*,imm8 [vmi:fvm: evex.nds.128.66.0f.wig 71 /6 ib ] AVX512VL,AVX512BW,FUTURE
-VPSLLW ymmreg|mask|z,ymmrm256*,imm8 [vmi:fvm: evex.nds.256.66.0f.wig 71 /6 ib ] AVX512VL,AVX512BW,FUTURE
-VPSLLW zmmreg|mask|z,zmmrm512*,imm8 [vmi:fvm: evex.nds.512.66.0f.wig 71 /6 ib ] AVX512BW,FUTURE
-VPSRAD xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:m128: evex.nds.128.66.0f.w0 e2 /r ] AVX512VL,AVX512,FUTURE
-VPSRAD ymmreg|mask|z,ymmreg*,xmmrm128 [rvm:m128: evex.nds.256.66.0f.w0 e2 /r ] AVX512VL,AVX512,FUTURE
-VPSRAD zmmreg|mask|z,zmmreg*,xmmrm128 [rvm:m128: evex.nds.512.66.0f.w0 e2 /r ] AVX512,FUTURE
-VPSRAD xmmreg|mask|z,xmmrm128|b32*,imm8 [vmi:fv: evex.nds.128.66.0f.w0 72 /4 ib ] AVX512VL,AVX512,FUTURE
-VPSRAD ymmreg|mask|z,ymmrm256|b32*,imm8 [vmi:fv: evex.nds.256.66.0f.w0 72 /4 ib ] AVX512VL,AVX512,FUTURE
-VPSRAD zmmreg|mask|z,zmmrm512|b32*,imm8 [vmi:fv: evex.nds.512.66.0f.w0 72 /4 ib ] AVX512,FUTURE
-VPSRAQ xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:m128: evex.nds.128.66.0f.w1 e2 /r ] AVX512VL,AVX512,FUTURE
-VPSRAQ ymmreg|mask|z,ymmreg*,xmmrm128 [rvm:m128: evex.nds.256.66.0f.w1 e2 /r ] AVX512VL,AVX512,FUTURE
-VPSRAQ zmmreg|mask|z,zmmreg*,xmmrm128 [rvm:m128: evex.nds.512.66.0f.w1 e2 /r ] AVX512,FUTURE
-VPSRAQ xmmreg|mask|z,xmmrm128|b64*,imm8 [vmi:fv: evex.nds.128.66.0f.w1 72 /4 ib ] AVX512VL,AVX512,FUTURE
-VPSRAQ ymmreg|mask|z,ymmrm256|b64*,imm8 [vmi:fv: evex.nds.256.66.0f.w1 72 /4 ib ] AVX512VL,AVX512,FUTURE
-VPSRAQ zmmreg|mask|z,zmmrm512|b64*,imm8 [vmi:fv: evex.nds.512.66.0f.w1 72 /4 ib ] AVX512,FUTURE
-VPSRAVD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 46 /r ] AVX512VL,AVX512,FUTURE
-VPSRAVD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 46 /r ] AVX512VL,AVX512,FUTURE
-VPSRAVD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 46 /r ] AVX512,FUTURE
-VPSRAVQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 46 /r ] AVX512VL,AVX512,FUTURE
-VPSRAVQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 46 /r ] AVX512VL,AVX512,FUTURE
-VPSRAVQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 46 /r ] AVX512,FUTURE
-VPSRAVW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.w1 11 /r ] AVX512VL,AVX512BW,FUTURE
-VPSRAVW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.w1 11 /r ] AVX512VL,AVX512BW,FUTURE
-VPSRAVW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.w1 11 /r ] AVX512BW,FUTURE
-VPSRAW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:m128: evex.nds.128.66.0f.wig e1 /r ] AVX512VL,AVX512BW,FUTURE
-VPSRAW ymmreg|mask|z,ymmreg*,xmmrm128 [rvm:m128: evex.nds.256.66.0f.wig e1 /r ] AVX512VL,AVX512BW,FUTURE
-VPSRAW zmmreg|mask|z,zmmreg*,xmmrm128 [rvm:m128: evex.nds.512.66.0f.wig e1 /r ] AVX512BW,FUTURE
-VPSRAW xmmreg|mask|z,xmmrm128*,imm8 [vmi:fvm: evex.nds.128.66.0f.wig 71 /4 ib ] AVX512VL,AVX512BW,FUTURE
-VPSRAW ymmreg|mask|z,ymmrm256*,imm8 [vmi:fvm: evex.nds.256.66.0f.wig 71 /4 ib ] AVX512VL,AVX512BW,FUTURE
-VPSRAW zmmreg|mask|z,zmmrm512*,imm8 [vmi:fvm: evex.nds.512.66.0f.wig 71 /4 ib ] AVX512BW,FUTURE
-VPSRLD xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:m128: evex.nds.128.66.0f.w0 d2 /r ] AVX512VL,AVX512,FUTURE
-VPSRLD ymmreg|mask|z,ymmreg*,xmmrm128 [rvm:m128: evex.nds.256.66.0f.w0 d2 /r ] AVX512VL,AVX512,FUTURE
-VPSRLD zmmreg|mask|z,zmmreg*,xmmrm128 [rvm:m128: evex.nds.512.66.0f.w0 d2 /r ] AVX512,FUTURE
-VPSRLD xmmreg|mask|z,xmmrm128|b32*,imm8 [vmi:fv: evex.nds.128.66.0f.w0 72 /2 ib ] AVX512VL,AVX512,FUTURE
-VPSRLD ymmreg|mask|z,ymmrm256|b32*,imm8 [vmi:fv: evex.nds.256.66.0f.w0 72 /2 ib ] AVX512VL,AVX512,FUTURE
-VPSRLD zmmreg|mask|z,zmmrm512|b32*,imm8 [vmi:fv: evex.nds.512.66.0f.w0 72 /2 ib ] AVX512,FUTURE
-VPSRLDQ xmmreg,xmmrm128*,imm8 [vmi:fvm: evex.nds.128.66.0f.wig 73 /3 ib ] AVX512VL,AVX512BW,FUTURE
-VPSRLDQ ymmreg,ymmrm256*,imm8 [vmi:fvm: evex.nds.256.66.0f.wig 73 /3 ib ] AVX512VL,AVX512BW,FUTURE
-VPSRLDQ zmmreg,zmmrm512*,imm8 [vmi:fvm: evex.nds.512.66.0f.wig 73 /3 ib ] AVX512BW,FUTURE
-VPSRLQ xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:m128: evex.nds.128.66.0f.w1 d3 /r ] AVX512VL,AVX512,FUTURE
-VPSRLQ ymmreg|mask|z,ymmreg*,xmmrm128 [rvm:m128: evex.nds.256.66.0f.w1 d3 /r ] AVX512VL,AVX512,FUTURE
-VPSRLQ zmmreg|mask|z,zmmreg*,xmmrm128 [rvm:m128: evex.nds.512.66.0f.w1 d3 /r ] AVX512,FUTURE
-VPSRLQ xmmreg|mask|z,xmmrm128|b64*,imm8 [vmi:fv: evex.nds.128.66.0f.w1 73 /2 ib ] AVX512VL,AVX512,FUTURE
-VPSRLQ ymmreg|mask|z,ymmrm256|b64*,imm8 [vmi:fv: evex.nds.256.66.0f.w1 73 /2 ib ] AVX512VL,AVX512,FUTURE
-VPSRLQ zmmreg|mask|z,zmmrm512|b64*,imm8 [vmi:fv: evex.nds.512.66.0f.w1 73 /2 ib ] AVX512,FUTURE
-VPSRLVD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 45 /r ] AVX512VL,AVX512,FUTURE
-VPSRLVD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 45 /r ] AVX512VL,AVX512,FUTURE
-VPSRLVD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 45 /r ] AVX512,FUTURE
-VPSRLVQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 45 /r ] AVX512VL,AVX512,FUTURE
-VPSRLVQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 45 /r ] AVX512VL,AVX512,FUTURE
-VPSRLVQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 45 /r ] AVX512,FUTURE
-VPSRLVW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.w1 10 /r ] AVX512VL,AVX512BW,FUTURE
-VPSRLVW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.w1 10 /r ] AVX512VL,AVX512BW,FUTURE
-VPSRLVW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.w1 10 /r ] AVX512BW,FUTURE
-VPSRLW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:m128: evex.nds.128.66.0f.wig d1 /r ] AVX512VL,AVX512BW,FUTURE
-VPSRLW ymmreg|mask|z,ymmreg*,xmmrm128 [rvm:m128: evex.nds.256.66.0f.wig d1 /r ] AVX512VL,AVX512BW,FUTURE
-VPSRLW zmmreg|mask|z,zmmreg*,xmmrm128 [rvm:m128: evex.nds.512.66.0f.wig d1 /r ] AVX512BW,FUTURE
-VPSRLW xmmreg|mask|z,xmmrm128*,imm8 [vmi:fvm: evex.nds.128.66.0f.wig 71 /2 ib ] AVX512VL,AVX512BW,FUTURE
-VPSRLW ymmreg|mask|z,ymmrm256*,imm8 [vmi:fvm: evex.nds.256.66.0f.wig 71 /2 ib ] AVX512VL,AVX512BW,FUTURE
-VPSRLW zmmreg|mask|z,zmmrm512*,imm8 [vmi:fvm: evex.nds.512.66.0f.wig 71 /2 ib ] AVX512BW,FUTURE
-VPSUBB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig f8 /r ] AVX512VL,AVX512BW,FUTURE
-VPSUBB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig f8 /r ] AVX512VL,AVX512BW,FUTURE
-VPSUBB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig f8 /r ] AVX512BW,FUTURE
-VPSUBD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f.w0 fa /r ] AVX512VL,AVX512,FUTURE
-VPSUBD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f.w0 fa /r ] AVX512VL,AVX512,FUTURE
-VPSUBD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f.w0 fa /r ] AVX512,FUTURE
-VPSUBQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 fb /r ] AVX512VL,AVX512,FUTURE
-VPSUBQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 fb /r ] AVX512VL,AVX512,FUTURE
-VPSUBQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 fb /r ] AVX512,FUTURE
-VPSUBSB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig e8 /r ] AVX512VL,AVX512BW,FUTURE
-VPSUBSB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig e8 /r ] AVX512VL,AVX512BW,FUTURE
-VPSUBSB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig e8 /r ] AVX512BW,FUTURE
-VPSUBSW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig e9 /r ] AVX512VL,AVX512BW,FUTURE
-VPSUBSW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig e9 /r ] AVX512VL,AVX512BW,FUTURE
-VPSUBSW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig e9 /r ] AVX512BW,FUTURE
-VPSUBUSB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig d8 /r ] AVX512VL,AVX512BW,FUTURE
-VPSUBUSB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig d8 /r ] AVX512VL,AVX512BW,FUTURE
-VPSUBUSB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig d8 /r ] AVX512BW,FUTURE
-VPSUBUSW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig d9 /r ] AVX512VL,AVX512BW,FUTURE
-VPSUBUSW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig d9 /r ] AVX512VL,AVX512BW,FUTURE
-VPSUBUSW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig d9 /r ] AVX512BW,FUTURE
-VPSUBW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig f9 /r ] AVX512VL,AVX512BW,FUTURE
-VPSUBW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig f9 /r ] AVX512VL,AVX512BW,FUTURE
-VPSUBW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig f9 /r ] AVX512BW,FUTURE
-VPTERNLOGD xmmreg|mask|z,xmmreg,xmmrm128|b32,imm8 [rvmi:fv: evex.nds.128.66.0f3a.w0 25 /r ib ] AVX512VL,AVX512,FUTURE
-VPTERNLOGD ymmreg|mask|z,ymmreg,ymmrm256|b32,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w0 25 /r ib ] AVX512VL,AVX512,FUTURE
-VPTERNLOGD zmmreg|mask|z,zmmreg,zmmrm512|b32,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w0 25 /r ib ] AVX512,FUTURE
-VPTERNLOGQ xmmreg|mask|z,xmmreg,xmmrm128|b64,imm8 [rvmi:fv: evex.nds.128.66.0f3a.w1 25 /r ib ] AVX512VL,AVX512,FUTURE
-VPTERNLOGQ ymmreg|mask|z,ymmreg,ymmrm256|b64,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w1 25 /r ib ] AVX512VL,AVX512,FUTURE
-VPTERNLOGQ zmmreg|mask|z,zmmreg,zmmrm512|b64,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w1 25 /r ib ] AVX512,FUTURE
-VPTESTMB kreg|mask,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.w0 26 /r ] AVX512VL,AVX512BW,FUTURE
-VPTESTMB kreg|mask,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.w0 26 /r ] AVX512VL,AVX512BW,FUTURE
-VPTESTMB kreg|mask,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.w0 26 /r ] AVX512BW,FUTURE
-VPTESTMD kreg|mask,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 27 /r ] AVX512VL,AVX512,FUTURE
-VPTESTMD kreg|mask,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 27 /r ] AVX512VL,AVX512,FUTURE
-VPTESTMD kreg|mask,zmmreg,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 27 /r ] AVX512,FUTURE
-VPTESTMQ kreg|mask,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 27 /r ] AVX512VL,AVX512,FUTURE
-VPTESTMQ kreg|mask,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 27 /r ] AVX512VL,AVX512,FUTURE
-VPTESTMQ kreg|mask,zmmreg,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 27 /r ] AVX512,FUTURE
-VPTESTMW kreg|mask,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.w1 26 /r ] AVX512VL,AVX512BW,FUTURE
-VPTESTMW kreg|mask,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.w1 26 /r ] AVX512VL,AVX512BW,FUTURE
-VPTESTMW kreg|mask,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.w1 26 /r ] AVX512BW,FUTURE
-VPTESTNMB kreg|mask,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.f3.0f38.w0 26 /r ] AVX512VL,AVX512BW,FUTURE
-VPTESTNMB kreg|mask,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.f3.0f38.w0 26 /r ] AVX512VL,AVX512BW,FUTURE
-VPTESTNMB kreg|mask,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.f3.0f38.w0 26 /r ] AVX512BW,FUTURE
-VPTESTNMD kreg|mask,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.f3.0f38.w0 27 /r ] AVX512VL,AVX512,FUTURE
-VPTESTNMD kreg|mask,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.f3.0f38.w0 27 /r ] AVX512VL,AVX512,FUTURE
-VPTESTNMD kreg|mask,zmmreg,zmmrm512|b32 [rvm:fv: evex.nds.512.f3.0f38.w0 27 /r ] AVX512,FUTURE
-VPTESTNMQ kreg|mask,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.f3.0f38.w1 27 /r ] AVX512VL,AVX512,FUTURE
-VPTESTNMQ kreg|mask,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.f3.0f38.w1 27 /r ] AVX512VL,AVX512,FUTURE
-VPTESTNMQ kreg|mask,zmmreg,zmmrm512|b64 [rvm:fv: evex.nds.512.f3.0f38.w1 27 /r ] AVX512,FUTURE
-VPTESTNMW kreg|mask,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.f3.0f38.w1 26 /r ] AVX512VL,AVX512BW,FUTURE
-VPTESTNMW kreg|mask,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.f3.0f38.w1 26 /r ] AVX512VL,AVX512BW,FUTURE
-VPTESTNMW kreg|mask,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.f3.0f38.w1 26 /r ] AVX512BW,FUTURE
-VPUNPCKHBW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig 68 /r ] AVX512VL,AVX512BW,FUTURE
-VPUNPCKHBW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig 68 /r ] AVX512VL,AVX512BW,FUTURE
-VPUNPCKHBW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig 68 /r ] AVX512BW,FUTURE
-VPUNPCKHDQ xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f.w0 6a /r ] AVX512VL,AVX512,FUTURE
-VPUNPCKHDQ ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f.w0 6a /r ] AVX512VL,AVX512,FUTURE
-VPUNPCKHDQ zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f.w0 6a /r ] AVX512,FUTURE
-VPUNPCKHQDQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 6d /r ] AVX512VL,AVX512,FUTURE
-VPUNPCKHQDQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 6d /r ] AVX512VL,AVX512,FUTURE
-VPUNPCKHQDQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 6d /r ] AVX512,FUTURE
-VPUNPCKHWD xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig 69 /r ] AVX512VL,AVX512BW,FUTURE
-VPUNPCKHWD ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig 69 /r ] AVX512VL,AVX512BW,FUTURE
-VPUNPCKHWD zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig 69 /r ] AVX512BW,FUTURE
-VPUNPCKLBW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig 60 /r ] AVX512VL,AVX512BW,FUTURE
-VPUNPCKLBW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig 60 /r ] AVX512VL,AVX512BW,FUTURE
-VPUNPCKLBW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig 60 /r ] AVX512BW,FUTURE
-VPUNPCKLDQ xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f.w0 62 /r ] AVX512VL,AVX512,FUTURE
-VPUNPCKLDQ ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f.w0 62 /r ] AVX512VL,AVX512,FUTURE
-VPUNPCKLDQ zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f.w0 62 /r ] AVX512,FUTURE
-VPUNPCKLQDQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 6c /r ] AVX512VL,AVX512,FUTURE
-VPUNPCKLQDQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 6c /r ] AVX512VL,AVX512,FUTURE
-VPUNPCKLQDQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 6c /r ] AVX512,FUTURE
-VPUNPCKLWD xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig 61 /r ] AVX512VL,AVX512BW,FUTURE
-VPUNPCKLWD ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig 61 /r ] AVX512VL,AVX512BW,FUTURE
-VPUNPCKLWD zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig 61 /r ] AVX512BW,FUTURE
-VPXORD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f.w0 ef /r ] AVX512VL,AVX512,FUTURE
-VPXORD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f.w0 ef /r ] AVX512VL,AVX512,FUTURE
-VPXORD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f.w0 ef /r ] AVX512,FUTURE
-VPXORQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 ef /r ] AVX512VL,AVX512,FUTURE
-VPXORQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 ef /r ] AVX512VL,AVX512,FUTURE
-VPXORQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 ef /r ] AVX512,FUTURE
-VRANGEPD xmmreg|mask|z,xmmreg*,xmmrm128|b64,imm8 [rvmi:fv: evex.nds.128.66.0f3a.w1 50 /r ib ] AVX512VL,AVX512DQ,FUTURE
-VRANGEPD ymmreg|mask|z,ymmreg*,ymmrm256|b64,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w1 50 /r ib ] AVX512VL,AVX512DQ,FUTURE
-VRANGEPD zmmreg|mask|z,zmmreg*,zmmrm512|b64|sae,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w1 50 /r ib ] AVX512DQ,FUTURE
-VRANGEPS xmmreg|mask|z,xmmreg*,xmmrm128|b32,imm8 [rvmi:fv: evex.nds.128.66.0f3a.w0 50 /r ib ] AVX512VL,AVX512DQ,FUTURE
-VRANGEPS ymmreg|mask|z,ymmreg*,ymmrm256|b32,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w0 50 /r ib ] AVX512VL,AVX512DQ,FUTURE
-VRANGEPS zmmreg|mask|z,zmmreg*,zmmrm512|b32|sae,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w0 50 /r ib ] AVX512DQ,FUTURE
-VRANGESD xmmreg|mask|z,xmmreg*,xmmrm64|sae,imm8 [rvmi:t1s: evex.nds.128.66.0f3a.w1 51 /r ib ] AVX512DQ,FUTURE
-VRANGESS xmmreg|mask|z,xmmreg*,xmmrm32|sae,imm8 [rvmi:t1s: evex.nds.128.66.0f3a.w0 51 /r ib ] AVX512DQ,FUTURE
-VRCP14PD xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.66.0f38.w1 4c /r ] AVX512VL,AVX512,FUTURE
-VRCP14PD ymmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.66.0f38.w1 4c /r ] AVX512VL,AVX512,FUTURE
-VRCP14PD zmmreg|mask|z,zmmrm512|b64 [rm:fv: evex.512.66.0f38.w1 4c /r ] AVX512,FUTURE
-VRCP14PS xmmreg|mask|z,xmmrm128|b32 [rm:fv: evex.128.66.0f38.w0 4c /r ] AVX512VL,AVX512,FUTURE
-VRCP14PS ymmreg|mask|z,ymmrm256|b32 [rm:fv: evex.256.66.0f38.w0 4c /r ] AVX512VL,AVX512,FUTURE
-VRCP14PS zmmreg|mask|z,zmmrm512|b32 [rm:fv: evex.512.66.0f38.w0 4c /r ] AVX512,FUTURE
-VRCP14SD xmmreg|mask|z,xmmreg*,xmmrm64 [rvm:t1s: evex.nds.128.66.0f38.w1 4d /r ] AVX512,FUTURE
-VRCP14SS xmmreg|mask|z,xmmreg*,xmmrm32 [rvm:t1s: evex.nds.128.66.0f38.w0 4d /r ] AVX512,FUTURE
-VRCP28PD zmmreg|mask|z,zmmrm512|b64|sae [rm:fv: evex.512.66.0f38.w1 ca /r ] AVX512ER,FUTURE
-VRCP28PS zmmreg|mask|z,zmmrm512|b32|sae [rm:fv: evex.512.66.0f38.w0 ca /r ] AVX512ER,FUTURE
-VRCP28SD xmmreg|mask|z,xmmreg*,xmmrm64|sae [rvm:t1s: evex.nds.128.66.0f38.w1 cb /r ] AVX512ER,FUTURE
-VRCP28SS xmmreg|mask|z,xmmreg*,xmmrm32|sae [rvm:t1s: evex.nds.128.66.0f38.w0 cb /r ] AVX512ER,FUTURE
-VREDUCEPD xmmreg|mask|z,xmmrm128|b64,imm8 [rmi:fv: evex.128.66.0f3a.w1 56 /r ib ] AVX512VL,AVX512DQ,FUTURE
-VREDUCEPD ymmreg|mask|z,ymmrm256|b64,imm8 [rmi:fv: evex.256.66.0f3a.w1 56 /r ib ] AVX512VL,AVX512DQ,FUTURE
-VREDUCEPD zmmreg|mask|z,zmmrm512|b64|sae,imm8 [rmi:fv: evex.512.66.0f3a.w1 56 /r ib ] AVX512DQ,FUTURE
-VREDUCEPS xmmreg|mask|z,xmmrm128|b32,imm8 [rmi:fv: evex.128.66.0f3a.w0 56 /r ib ] AVX512VL,AVX512DQ,FUTURE
-VREDUCEPS ymmreg|mask|z,ymmrm256|b32,imm8 [rmi:fv: evex.256.66.0f3a.w0 56 /r ib ] AVX512VL,AVX512DQ,FUTURE
-VREDUCEPS zmmreg|mask|z,zmmrm512|b32|sae,imm8 [rmi:fv: evex.512.66.0f3a.w0 56 /r ib ] AVX512DQ,FUTURE
-VREDUCESD xmmreg|mask|z,xmmreg*,xmmrm64|sae,imm8 [rvmi:t1s: evex.nds.128.66.0f3a.w1 57 /r ib ] AVX512DQ,FUTURE
-VREDUCESS xmmreg|mask|z,xmmreg*,xmmrm32|sae,imm8 [rvmi:t1s: evex.nds.128.66.0f3a.w0 57 /r ib ] AVX512DQ,FUTURE
-VRNDSCALEPD xmmreg|mask|z,xmmrm128|b64,imm8 [rmi:fv: evex.128.66.0f3a.w1 09 /r ib ] AVX512VL,AVX512,FUTURE
-VRNDSCALEPD ymmreg|mask|z,ymmrm256|b64,imm8 [rmi:fv: evex.256.66.0f3a.w1 09 /r ib ] AVX512VL,AVX512,FUTURE
-VRNDSCALEPD zmmreg|mask|z,zmmrm512|b64|sae,imm8 [rmi:fv: evex.512.66.0f3a.w1 09 /r ib ] AVX512,FUTURE
-VRNDSCALEPS xmmreg|mask|z,xmmrm128|b32,imm8 [rmi:fv: evex.128.66.0f3a.w0 08 /r ib ] AVX512VL,AVX512,FUTURE
-VRNDSCALEPS ymmreg|mask|z,ymmrm256|b32,imm8 [rmi:fv: evex.256.66.0f3a.w0 08 /r ib ] AVX512VL,AVX512,FUTURE
-VRNDSCALEPS zmmreg|mask|z,zmmrm512|b32|sae,imm8 [rmi:fv: evex.512.66.0f3a.w0 08 /r ib ] AVX512,FUTURE
-VRNDSCALESD xmmreg|mask|z,xmmreg*,xmmrm64|sae,imm8 [rvmi:t1s: evex.nds.128.66.0f3a.w1 0b /r ib ] AVX512,FUTURE
-VRNDSCALESS xmmreg|mask|z,xmmreg*,xmmrm32|sae,imm8 [rvmi:t1s: evex.nds.128.66.0f3a.w0 0a /r ib ] AVX512,FUTURE
-VRSQRT14PD xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.66.0f38.w1 4e /r ] AVX512VL,AVX512,FUTURE
-VRSQRT14PD ymmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.66.0f38.w1 4e /r ] AVX512VL,AVX512,FUTURE
-VRSQRT14PD zmmreg|mask|z,zmmrm512|b64 [rm:fv: evex.512.66.0f38.w1 4e /r ] AVX512,FUTURE
-VRSQRT14PS xmmreg|mask|z,xmmrm128|b32 [rm:fv: evex.128.66.0f38.w0 4e /r ] AVX512VL,AVX512,FUTURE
-VRSQRT14PS ymmreg|mask|z,ymmrm256|b32 [rm:fv: evex.256.66.0f38.w0 4e /r ] AVX512VL,AVX512,FUTURE
-VRSQRT14PS zmmreg|mask|z,zmmrm512|b32 [rm:fv: evex.512.66.0f38.w0 4e /r ] AVX512,FUTURE
-VRSQRT14SD xmmreg|mask|z,xmmreg*,xmmrm64 [rvm:t1s: evex.nds.128.66.0f38.w1 4f /r ] AVX512,FUTURE
-VRSQRT14SS xmmreg|mask|z,xmmreg*,xmmrm32 [rvm:t1s: evex.nds.128.66.0f38.w0 4f /r ] AVX512,FUTURE
-VRSQRT28PD zmmreg|mask|z,zmmrm512|b64|sae [rm:fv: evex.512.66.0f38.w1 cc /r ] AVX512ER,FUTURE
-VRSQRT28PS zmmreg|mask|z,zmmrm512|b32|sae [rm:fv: evex.512.66.0f38.w0 cc /r ] AVX512ER,FUTURE
-VRSQRT28SD xmmreg|mask|z,xmmreg*,xmmrm64|sae [rvm:t1s: evex.nds.128.66.0f38.w1 cd /r ] AVX512ER,FUTURE
-VRSQRT28SS xmmreg|mask|z,xmmreg*,xmmrm32|sae [rvm:t1s: evex.nds.128.66.0f38.w0 cd /r ] AVX512ER,FUTURE
-VSCALEFPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 2c /r ] AVX512VL,AVX512,FUTURE
-VSCALEFPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 2c /r ] AVX512VL,AVX512,FUTURE
-VSCALEFPD zmmreg|mask|z,zmmreg*,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 2c /r ] AVX512,FUTURE
-VSCALEFPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 2c /r ] AVX512VL,AVX512,FUTURE
-VSCALEFPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 2c /r ] AVX512VL,AVX512,FUTURE
-VSCALEFPS zmmreg|mask|z,zmmreg*,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 2c /r ] AVX512,FUTURE
-VSCALEFSD xmmreg|mask|z,xmmreg*,xmmrm64|er [rvm:t1s: evex.nds.128.66.0f38.w1 2d /r ] AVX512,FUTURE
-VSCALEFSS xmmreg|mask|z,xmmreg*,xmmrm32|er [rvm:t1s: evex.nds.128.66.0f38.w0 2d /r ] AVX512,FUTURE
-VSCATTERDPD xmem64|mask,xmmreg [mr:t1s: vsibx evex.128.66.0f38.w1 a2 /r ] AVX512VL,AVX512,FUTURE
-VSCATTERDPD xmem64|mask,ymmreg [mr:t1s: vsibx evex.256.66.0f38.w1 a2 /r ] AVX512VL,AVX512,FUTURE
-VSCATTERDPD ymem64|mask,zmmreg [mr:t1s: vsiby evex.512.66.0f38.w1 a2 /r ] AVX512,FUTURE
-VSCATTERDPS xmem32|mask,xmmreg [mr:t1s: vsibx evex.128.66.0f38.w0 a2 /r ] AVX512VL,AVX512,FUTURE
-VSCATTERDPS ymem32|mask,ymmreg [mr:t1s: vsiby evex.256.66.0f38.w0 a2 /r ] AVX512VL,AVX512,FUTURE
-VSCATTERDPS zmem32|mask,zmmreg [mr:t1s: vsibz evex.512.66.0f38.w0 a2 /r ] AVX512,FUTURE
-VSCATTERPF0DPD ymem64|mask [m:t1s: vsiby evex.512.66.0f38.w1 c6 /5 ] AVX512PF,FUTURE
-VSCATTERPF0DPS zmem32|mask [m:t1s: vsibz evex.512.66.0f38.w0 c6 /5 ] AVX512PF,FUTURE
-VSCATTERPF0QPD zmem64|mask [m:t1s: vsibz evex.512.66.0f38.w1 c7 /5 ] AVX512PF,FUTURE
-VSCATTERPF0QPS zmem32|mask [m:t1s: vsibz evex.512.66.0f38.w0 c7 /5 ] AVX512PF,FUTURE
-VSCATTERPF1DPD ymem64|mask [m:t1s: vsiby evex.512.66.0f38.w1 c6 /6 ] AVX512PF,FUTURE
-VSCATTERPF1DPS zmem32|mask [m:t1s: vsibz evex.512.66.0f38.w0 c6 /6 ] AVX512PF,FUTURE
-VSCATTERPF1QPD zmem64|mask [m:t1s: vsibz evex.512.66.0f38.w1 c7 /6 ] AVX512PF,FUTURE
-VSCATTERPF1QPS zmem32|mask [m:t1s: vsibz evex.512.66.0f38.w0 c7 /6 ] AVX512PF,FUTURE
-VSCATTERQPD xmem64|mask,xmmreg [mr:t1s: vsibx evex.128.66.0f38.w1 a3 /r ] AVX512VL,AVX512,FUTURE
-VSCATTERQPD ymem64|mask,ymmreg [mr:t1s: vsiby evex.256.66.0f38.w1 a3 /r ] AVX512VL,AVX512,FUTURE
-VSCATTERQPD zmem64|mask,zmmreg [mr:t1s: vsibz evex.512.66.0f38.w1 a3 /r ] AVX512,FUTURE
-VSCATTERQPS xmem32|mask,xmmreg [mr:t1s: vsibx evex.128.66.0f38.w0 a3 /r ] AVX512VL,AVX512,FUTURE
-VSCATTERQPS ymem32|mask,xmmreg [mr:t1s: vsiby evex.256.66.0f38.w0 a3 /r ] AVX512VL,AVX512,FUTURE
-VSCATTERQPS zmem32|mask,ymmreg [mr:t1s: vsibz evex.512.66.0f38.w0 a3 /r ] AVX512,FUTURE
-VSHUFF32X4 ymmreg|mask|z,ymmreg*,ymmrm256|b32,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w0 23 /r ib ] AVX512VL,AVX512,FUTURE
-VSHUFF32X4 zmmreg|mask|z,zmmreg*,zmmrm512|b32,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w0 23 /r ib ] AVX512,FUTURE
-VSHUFF64X2 ymmreg|mask|z,ymmreg*,ymmrm256|b64,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w1 23 /r ib ] AVX512VL,AVX512,FUTURE
-VSHUFF64X2 zmmreg|mask|z,zmmreg*,zmmrm512|b64,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w1 23 /r ib ] AVX512,FUTURE
-VSHUFI32X4 ymmreg|mask|z,ymmreg*,ymmrm256|b32,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w0 43 /r ib ] AVX512VL,AVX512,FUTURE
-VSHUFI32X4 zmmreg|mask|z,zmmreg*,zmmrm512|b32,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w0 43 /r ib ] AVX512,FUTURE
-VSHUFI64X2 ymmreg|mask|z,ymmreg*,ymmrm256|b64,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w1 43 /r ib ] AVX512VL,AVX512,FUTURE
-VSHUFI64X2 zmmreg|mask|z,zmmreg*,zmmrm512|b64,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w1 43 /r ib ] AVX512,FUTURE
-VSHUFPD xmmreg|mask|z,xmmreg*,xmmrm128|b64,imm8 [rvmi:fv: evex.nds.128.66.0f.w1 c6 /r ib ] AVX512VL,AVX512,FUTURE
-VSHUFPD ymmreg|mask|z,ymmreg*,ymmrm256|b64,imm8 [rvmi:fv: evex.nds.256.66.0f.w1 c6 /r ib ] AVX512VL,AVX512,FUTURE
-VSHUFPD zmmreg|mask|z,zmmreg*,zmmrm512|b64,imm8 [rvmi:fv: evex.nds.512.66.0f.w1 c6 /r ib ] AVX512,FUTURE
-VSHUFPS xmmreg|mask|z,xmmreg*,xmmrm128|b32,imm8 [rvmi:fv: evex.nds.128.0f.w0 c6 /r ib ] AVX512VL,AVX512,FUTURE
-VSHUFPS ymmreg|mask|z,ymmreg*,ymmrm256|b32,imm8 [rvmi:fv: evex.nds.256.0f.w0 c6 /r ib ] AVX512VL,AVX512,FUTURE
-VSHUFPS zmmreg|mask|z,zmmreg*,zmmrm512|b32,imm8 [rvmi:fv: evex.nds.512.0f.w0 c6 /r ib ] AVX512,FUTURE
-VSQRTPD xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.66.0f.w1 51 /r ] AVX512VL,AVX512,FUTURE
-VSQRTPD ymmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.66.0f.w1 51 /r ] AVX512VL,AVX512,FUTURE
-VSQRTPD zmmreg|mask|z,zmmrm512|b64|er [rm:fv: evex.512.66.0f.w1 51 /r ] AVX512,FUTURE
-VSQRTPS xmmreg|mask|z,xmmrm128|b32 [rm:fv: evex.128.0f.w0 51 /r ] AVX512VL,AVX512,FUTURE
-VSQRTPS ymmreg|mask|z,ymmrm256|b32 [rm:fv: evex.256.0f.w0 51 /r ] AVX512VL,AVX512,FUTURE
-VSQRTPS zmmreg|mask|z,zmmrm512|b32|er [rm:fv: evex.512.0f.w0 51 /r ] AVX512,FUTURE
-VSQRTSD xmmreg|mask|z,xmmreg*,xmmrm64|er [rvm:t1s: evex.nds.128.f2.0f.w1 51 /r ] AVX512,FUTURE
-VSQRTSS xmmreg|mask|z,xmmreg*,xmmrm32|er [rvm:t1s: evex.nds.128.f3.0f.w0 51 /r ] AVX512,FUTURE
-VSUBPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 5c /r ] AVX512VL,AVX512,FUTURE
-VSUBPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 5c /r ] AVX512VL,AVX512,FUTURE
-VSUBPD zmmreg|mask|z,zmmreg*,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f.w1 5c /r ] AVX512,FUTURE
-VSUBPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.0f.w0 5c /r ] AVX512VL,AVX512,FUTURE
-VSUBPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.0f.w0 5c /r ] AVX512VL,AVX512,FUTURE
-VSUBPS zmmreg|mask|z,zmmreg*,zmmrm512|b32|er [rvm:fv: evex.nds.512.0f.w0 5c /r ] AVX512,FUTURE
-VSUBSD xmmreg|mask|z,xmmreg*,xmmrm64|er [rvm:t1s: evex.nds.128.f2.0f.w1 5c /r ] AVX512,FUTURE
-VSUBSS xmmreg|mask|z,xmmreg*,xmmrm32|er [rvm:t1s: evex.nds.128.f3.0f.w0 5c /r ] AVX512,FUTURE
-VUCOMISD xmmreg,xmmrm64|sae [rm:t1s: evex.128.66.0f.w1 2e /r ] AVX512,FUTURE
-VUCOMISS xmmreg,xmmrm32|sae [rm:t1s: evex.128.0f.w0 2e /r ] AVX512,FUTURE
-VUNPCKHPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 15 /r ] AVX512VL,AVX512,FUTURE
-VUNPCKHPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 15 /r ] AVX512VL,AVX512,FUTURE
-VUNPCKHPD zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 15 /r ] AVX512,FUTURE
-VUNPCKHPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.0f.w0 15 /r ] AVX512VL,AVX512,FUTURE
-VUNPCKHPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.0f.w0 15 /r ] AVX512VL,AVX512,FUTURE
-VUNPCKHPS zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.0f.w0 15 /r ] AVX512,FUTURE
-VUNPCKLPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 14 /r ] AVX512VL,AVX512,FUTURE
-VUNPCKLPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 14 /r ] AVX512VL,AVX512,FUTURE
-VUNPCKLPD zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 14 /r ] AVX512,FUTURE
-VUNPCKLPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.0f.w0 14 /r ] AVX512VL,AVX512,FUTURE
-VUNPCKLPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.0f.w0 14 /r ] AVX512VL,AVX512,FUTURE
-VUNPCKLPS zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.0f.w0 14 /r ] AVX512,FUTURE
-VXORPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 57 /r ] AVX512VL,AVX512DQ,FUTURE
-VXORPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 57 /r ] AVX512VL,AVX512DQ,FUTURE
-VXORPD zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 57 /r ] AVX512DQ,FUTURE
-VXORPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.0f.w0 57 /r ] AVX512VL,AVX512DQ,FUTURE
-VXORPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.0f.w0 57 /r ] AVX512VL,AVX512DQ,FUTURE
-VXORPS zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.0f.w0 57 /r ] AVX512DQ,FUTURE
-; MJC PUBLIC END
-
-;# Intel memory protection keys for userspace (PKU aka PKEYs)
-RDPKRU void [ 0f 01 ee] X64,FUTURE
-WRPKRU void [ 0f 01 ef] X64,FUTURE
-
-;# Read Processor ID
-RDPID reg32 [m: f3 0f c7 /7] NOLONG,FUTURE
-RDPID reg64 [m: o64nw f3 0f c7 /7] X64,FUTURE
-RDPID reg32 [m: f3 0f c7 /7] X64,UNDOC,FUTURE
-
-;# New memory instructions
-CLFLUSHOPT mem [m: 66 0f ae /7] FUTURE
-CLWB mem [m: 66 0f ae /6] FUTURE
-; This one was killed before it saw the light of day
-PCOMMIT void [ 66 0f ae f8] FUTURE,UNDOC,OBSOLETE
-
-; AMD Zen v1
-CLZERO void [ 0f 01 fc] FUTURE,AMD
-
-;# Systematic names for the hinting nop instructions
-; These should be last in the file
-HINT_NOP0 rm16 [m: o16 0f 18 /0] P6,UNDOC
-HINT_NOP0 rm32 [m: o32 0f 18 /0] P6,UNDOC
-HINT_NOP0 rm64 [m: o64 0f 18 /0] X64,UNDOC
-HINT_NOP1 rm16 [m: o16 0f 18 /1] P6,UNDOC
-HINT_NOP1 rm32 [m: o32 0f 18 /1] P6,UNDOC
-HINT_NOP1 rm64 [m: o64 0f 18 /1] X64,UNDOC
-HINT_NOP2 rm16 [m: o16 0f 18 /2] P6,UNDOC
-HINT_NOP2 rm32 [m: o32 0f 18 /2] P6,UNDOC
-HINT_NOP2 rm64 [m: o64 0f 18 /2] X64,UNDOC
-HINT_NOP3 rm16 [m: o16 0f 18 /3] P6,UNDOC
-HINT_NOP3 rm32 [m: o32 0f 18 /3] P6,UNDOC
-HINT_NOP3 rm64 [m: o64 0f 18 /3] X64,UNDOC
-HINT_NOP4 rm16 [m: o16 0f 18 /4] P6,UNDOC
-HINT_NOP4 rm32 [m: o32 0f 18 /4] P6,UNDOC
-HINT_NOP4 rm64 [m: o64 0f 18 /4] X64,UNDOC
-HINT_NOP5 rm16 [m: o16 0f 18 /5] P6,UNDOC
-HINT_NOP5 rm32 [m: o32 0f 18 /5] P6,UNDOC
-HINT_NOP5 rm64 [m: o64 0f 18 /5] X64,UNDOC
-HINT_NOP6 rm16 [m: o16 0f 18 /6] P6,UNDOC
-HINT_NOP6 rm32 [m: o32 0f 18 /6] P6,UNDOC
-HINT_NOP6 rm64 [m: o64 0f 18 /6] X64,UNDOC
-HINT_NOP7 rm16 [m: o16 0f 18 /7] P6,UNDOC
-HINT_NOP7 rm32 [m: o32 0f 18 /7] P6,UNDOC
-HINT_NOP7 rm64 [m: o64 0f 18 /7] X64,UNDOC
-HINT_NOP8 rm16 [m: o16 0f 19 /0] P6,UNDOC
-HINT_NOP8 rm32 [m: o32 0f 19 /0] P6,UNDOC
-HINT_NOP8 rm64 [m: o64 0f 19 /0] X64,UNDOC
-HINT_NOP9 rm16 [m: o16 0f 19 /1] P6,UNDOC
-HINT_NOP9 rm32 [m: o32 0f 19 /1] P6,UNDOC
-HINT_NOP9 rm64 [m: o64 0f 19 /1] X64,UNDOC
-HINT_NOP10 rm16 [m: o16 0f 19 /2] P6,UNDOC
-HINT_NOP10 rm32 [m: o32 0f 19 /2] P6,UNDOC
-HINT_NOP10 rm64 [m: o64 0f 19 /2] X64,UNDOC
-HINT_NOP11 rm16 [m: o16 0f 19 /3] P6,UNDOC
-HINT_NOP11 rm32 [m: o32 0f 19 /3] P6,UNDOC
-HINT_NOP11 rm64 [m: o64 0f 19 /3] X64,UNDOC
-HINT_NOP12 rm16 [m: o16 0f 19 /4] P6,UNDOC
-HINT_NOP12 rm32 [m: o32 0f 19 /4] P6,UNDOC
-HINT_NOP12 rm64 [m: o64 0f 19 /4] X64,UNDOC
-HINT_NOP13 rm16 [m: o16 0f 19 /5] P6,UNDOC
-HINT_NOP13 rm32 [m: o32 0f 19 /5] P6,UNDOC
-HINT_NOP13 rm64 [m: o64 0f 19 /5] X64,UNDOC
-HINT_NOP14 rm16 [m: o16 0f 19 /6] P6,UNDOC
-HINT_NOP14 rm32 [m: o32 0f 19 /6] P6,UNDOC
-HINT_NOP14 rm64 [m: o64 0f 19 /6] X64,UNDOC
-HINT_NOP15 rm16 [m: o16 0f 19 /7] P6,UNDOC
-HINT_NOP15 rm32 [m: o32 0f 19 /7] P6,UNDOC
-HINT_NOP15 rm64 [m: o64 0f 19 /7] X64,UNDOC
-HINT_NOP16 rm16 [m: o16 0f 1a /0] P6,UNDOC
-HINT_NOP16 rm32 [m: o32 0f 1a /0] P6,UNDOC
-HINT_NOP16 rm64 [m: o64 0f 1a /0] X64,UNDOC
-HINT_NOP17 rm16 [m: o16 0f 1a /1] P6,UNDOC
-HINT_NOP17 rm32 [m: o32 0f 1a /1] P6,UNDOC
-HINT_NOP17 rm64 [m: o64 0f 1a /1] X64,UNDOC
-HINT_NOP18 rm16 [m: o16 0f 1a /2] P6,UNDOC
-HINT_NOP18 rm32 [m: o32 0f 1a /2] P6,UNDOC
-HINT_NOP18 rm64 [m: o64 0f 1a /2] X64,UNDOC
-HINT_NOP19 rm16 [m: o16 0f 1a /3] P6,UNDOC
-HINT_NOP19 rm32 [m: o32 0f 1a /3] P6,UNDOC
-HINT_NOP19 rm64 [m: o64 0f 1a /3] X64,UNDOC
-HINT_NOP20 rm16 [m: o16 0f 1a /4] P6,UNDOC
-HINT_NOP20 rm32 [m: o32 0f 1a /4] P6,UNDOC
-HINT_NOP20 rm64 [m: o64 0f 1a /4] X64,UNDOC
-HINT_NOP21 rm16 [m: o16 0f 1a /5] P6,UNDOC
-HINT_NOP21 rm32 [m: o32 0f 1a /5] P6,UNDOC
-HINT_NOP21 rm64 [m: o64 0f 1a /5] X64,UNDOC
-HINT_NOP22 rm16 [m: o16 0f 1a /6] P6,UNDOC
-HINT_NOP22 rm32 [m: o32 0f 1a /6] P6,UNDOC
-HINT_NOP22 rm64 [m: o64 0f 1a /6] X64,UNDOC
-HINT_NOP23 rm16 [m: o16 0f 1a /7] P6,UNDOC
-HINT_NOP23 rm32 [m: o32 0f 1a /7] P6,UNDOC
-HINT_NOP23 rm64 [m: o64 0f 1a /7] X64,UNDOC
-HINT_NOP24 rm16 [m: o16 0f 1b /0] P6,UNDOC
-HINT_NOP24 rm32 [m: o32 0f 1b /0] P6,UNDOC
-HINT_NOP24 rm64 [m: o64 0f 1b /0] X64,UNDOC
-HINT_NOP25 rm16 [m: o16 0f 1b /1] P6,UNDOC
-HINT_NOP25 rm32 [m: o32 0f 1b /1] P6,UNDOC
-HINT_NOP25 rm64 [m: o64 0f 1b /1] X64,UNDOC
-HINT_NOP26 rm16 [m: o16 0f 1b /2] P6,UNDOC
-HINT_NOP26 rm32 [m: o32 0f 1b /2] P6,UNDOC
-HINT_NOP26 rm64 [m: o64 0f 1b /2] X64,UNDOC
-HINT_NOP27 rm16 [m: o16 0f 1b /3] P6,UNDOC
-HINT_NOP27 rm32 [m: o32 0f 1b /3] P6,UNDOC
-HINT_NOP27 rm64 [m: o64 0f 1b /3] X64,UNDOC
-HINT_NOP28 rm16 [m: o16 0f 1b /4] P6,UNDOC
-HINT_NOP28 rm32 [m: o32 0f 1b /4] P6,UNDOC
-HINT_NOP28 rm64 [m: o64 0f 1b /4] X64,UNDOC
-HINT_NOP29 rm16 [m: o16 0f 1b /5] P6,UNDOC
-HINT_NOP29 rm32 [m: o32 0f 1b /5] P6,UNDOC
-HINT_NOP29 rm64 [m: o64 0f 1b /5] X64,UNDOC
-HINT_NOP30 rm16 [m: o16 0f 1b /6] P6,UNDOC
-HINT_NOP30 rm32 [m: o32 0f 1b /6] P6,UNDOC
-HINT_NOP30 rm64 [m: o64 0f 1b /6] X64,UNDOC
-HINT_NOP31 rm16 [m: o16 0f 1b /7] P6,UNDOC
-HINT_NOP31 rm32 [m: o32 0f 1b /7] P6,UNDOC
-HINT_NOP31 rm64 [m: o64 0f 1b /7] X64,UNDOC
-HINT_NOP32 rm16 [m: o16 0f 1c /0] P6,UNDOC
-HINT_NOP32 rm32 [m: o32 0f 1c /0] P6,UNDOC
-HINT_NOP32 rm64 [m: o64 0f 1c /0] X64,UNDOC
-HINT_NOP33 rm16 [m: o16 0f 1c /1] P6,UNDOC
-HINT_NOP33 rm32 [m: o32 0f 1c /1] P6,UNDOC
-HINT_NOP33 rm64 [m: o64 0f 1c /1] X64,UNDOC
-HINT_NOP34 rm16 [m: o16 0f 1c /2] P6,UNDOC
-HINT_NOP34 rm32 [m: o32 0f 1c /2] P6,UNDOC
-HINT_NOP34 rm64 [m: o64 0f 1c /2] X64,UNDOC
-HINT_NOP35 rm16 [m: o16 0f 1c /3] P6,UNDOC
-HINT_NOP35 rm32 [m: o32 0f 1c /3] P6,UNDOC
-HINT_NOP35 rm64 [m: o64 0f 1c /3] X64,UNDOC
-HINT_NOP36 rm16 [m: o16 0f 1c /4] P6,UNDOC
-HINT_NOP36 rm32 [m: o32 0f 1c /4] P6,UNDOC
-HINT_NOP36 rm64 [m: o64 0f 1c /4] X64,UNDOC
-HINT_NOP37 rm16 [m: o16 0f 1c /5] P6,UNDOC
-HINT_NOP37 rm32 [m: o32 0f 1c /5] P6,UNDOC
-HINT_NOP37 rm64 [m: o64 0f 1c /5] X64,UNDOC
-HINT_NOP38 rm16 [m: o16 0f 1c /6] P6,UNDOC
-HINT_NOP38 rm32 [m: o32 0f 1c /6] P6,UNDOC
-HINT_NOP38 rm64 [m: o64 0f 1c /6] X64,UNDOC
-HINT_NOP39 rm16 [m: o16 0f 1c /7] P6,UNDOC
-HINT_NOP39 rm32 [m: o32 0f 1c /7] P6,UNDOC
-HINT_NOP39 rm64 [m: o64 0f 1c /7] X64,UNDOC
-HINT_NOP40 rm16 [m: o16 0f 1d /0] P6,UNDOC
-HINT_NOP40 rm32 [m: o32 0f 1d /0] P6,UNDOC
-HINT_NOP40 rm64 [m: o64 0f 1d /0] X64,UNDOC
-HINT_NOP41 rm16 [m: o16 0f 1d /1] P6,UNDOC
-HINT_NOP41 rm32 [m: o32 0f 1d /1] P6,UNDOC
-HINT_NOP41 rm64 [m: o64 0f 1d /1] X64,UNDOC
-HINT_NOP42 rm16 [m: o16 0f 1d /2] P6,UNDOC
-HINT_NOP42 rm32 [m: o32 0f 1d /2] P6,UNDOC
-HINT_NOP42 rm64 [m: o64 0f 1d /2] X64,UNDOC
-HINT_NOP43 rm16 [m: o16 0f 1d /3] P6,UNDOC
-HINT_NOP43 rm32 [m: o32 0f 1d /3] P6,UNDOC
-HINT_NOP43 rm64 [m: o64 0f 1d /3] X64,UNDOC
-HINT_NOP44 rm16 [m: o16 0f 1d /4] P6,UNDOC
-HINT_NOP44 rm32 [m: o32 0f 1d /4] P6,UNDOC
-HINT_NOP44 rm64 [m: o64 0f 1d /4] X64,UNDOC
-HINT_NOP45 rm16 [m: o16 0f 1d /5] P6,UNDOC
-HINT_NOP45 rm32 [m: o32 0f 1d /5] P6,UNDOC
-HINT_NOP45 rm64 [m: o64 0f 1d /5] X64,UNDOC
-HINT_NOP46 rm16 [m: o16 0f 1d /6] P6,UNDOC
-HINT_NOP46 rm32 [m: o32 0f 1d /6] P6,UNDOC
-HINT_NOP46 rm64 [m: o64 0f 1d /6] X64,UNDOC
-HINT_NOP47 rm16 [m: o16 0f 1d /7] P6,UNDOC
-HINT_NOP47 rm32 [m: o32 0f 1d /7] P6,UNDOC
-HINT_NOP47 rm64 [m: o64 0f 1d /7] X64,UNDOC
-HINT_NOP48 rm16 [m: o16 0f 1e /0] P6,UNDOC
-HINT_NOP48 rm32 [m: o32 0f 1e /0] P6,UNDOC
-HINT_NOP48 rm64 [m: o64 0f 1e /0] X64,UNDOC
-HINT_NOP49 rm16 [m: o16 0f 1e /1] P6,UNDOC
-HINT_NOP49 rm32 [m: o32 0f 1e /1] P6,UNDOC
-HINT_NOP49 rm64 [m: o64 0f 1e /1] X64,UNDOC
-HINT_NOP50 rm16 [m: o16 0f 1e /2] P6,UNDOC
-HINT_NOP50 rm32 [m: o32 0f 1e /2] P6,UNDOC
-HINT_NOP50 rm64 [m: o64 0f 1e /2] X64,UNDOC
-HINT_NOP51 rm16 [m: o16 0f 1e /3] P6,UNDOC
-HINT_NOP51 rm32 [m: o32 0f 1e /3] P6,UNDOC
-HINT_NOP51 rm64 [m: o64 0f 1e /3] X64,UNDOC
-HINT_NOP52 rm16 [m: o16 0f 1e /4] P6,UNDOC
-HINT_NOP52 rm32 [m: o32 0f 1e /4] P6,UNDOC
-HINT_NOP52 rm64 [m: o64 0f 1e /4] X64,UNDOC
-HINT_NOP53 rm16 [m: o16 0f 1e /5] P6,UNDOC
-HINT_NOP53 rm32 [m: o32 0f 1e /5] P6,UNDOC
-HINT_NOP53 rm64 [m: o64 0f 1e /5] X64,UNDOC
-HINT_NOP54 rm16 [m: o16 0f 1e /6] P6,UNDOC
-HINT_NOP54 rm32 [m: o32 0f 1e /6] P6,UNDOC
-HINT_NOP54 rm64 [m: o64 0f 1e /6] X64,UNDOC
-HINT_NOP55 rm16 [m: o16 0f 1e /7] P6,UNDOC
-HINT_NOP55 rm32 [m: o32 0f 1e /7] P6,UNDOC
-HINT_NOP55 rm64 [m: o64 0f 1e /7] X64,UNDOC
-HINT_NOP56 rm16 [m: o16 0f 1f /0] P6,UNDOC
-HINT_NOP56 rm32 [m: o32 0f 1f /0] P6,UNDOC
-HINT_NOP56 rm64 [m: o64 0f 1f /0] X64,UNDOC
-HINT_NOP57 rm16 [m: o16 0f 1f /1] P6,UNDOC
-HINT_NOP57 rm32 [m: o32 0f 1f /1] P6,UNDOC
-HINT_NOP57 rm64 [m: o64 0f 1f /1] X64,UNDOC
-HINT_NOP58 rm16 [m: o16 0f 1f /2] P6,UNDOC
-HINT_NOP58 rm32 [m: o32 0f 1f /2] P6,UNDOC
-HINT_NOP58 rm64 [m: o64 0f 1f /2] X64,UNDOC
-HINT_NOP59 rm16 [m: o16 0f 1f /3] P6,UNDOC
-HINT_NOP59 rm32 [m: o32 0f 1f /3] P6,UNDOC
-HINT_NOP59 rm64 [m: o64 0f 1f /3] X64,UNDOC
-HINT_NOP60 rm16 [m: o16 0f 1f /4] P6,UNDOC
-HINT_NOP60 rm32 [m: o32 0f 1f /4] P6,UNDOC
-HINT_NOP60 rm64 [m: o64 0f 1f /4] X64,UNDOC
-HINT_NOP61 rm16 [m: o16 0f 1f /5] P6,UNDOC
-HINT_NOP61 rm32 [m: o32 0f 1f /5] P6,UNDOC
-HINT_NOP61 rm64 [m: o64 0f 1f /5] X64,UNDOC
-HINT_NOP62 rm16 [m: o16 0f 1f /6] P6,UNDOC
-HINT_NOP62 rm32 [m: o32 0f 1f /6] P6,UNDOC
-HINT_NOP62 rm64 [m: o64 0f 1f /6] X64,UNDOC
-HINT_NOP63 rm16 [m: o16 0f 1f /7] P6,UNDOC
-HINT_NOP63 rm32 [m: o32 0f 1f /7] P6,UNDOC
-HINT_NOP63 rm64 [m: o64 0f 1f /7] X64,UNDOC
--- a/src/as/target/x86/proc.h
+++ /dev/null
@@ -1,158 +1,0 @@
-enum args {
- AREG_CS = AMAX,
- AREG_DS,
- AREG_SS,
- AREG_ES,
- AREG_FS,
- AREG_GS,
-
- AREG_EFLAGS,
- AREG_CF,
- AREG_PF,
- AREG_AF,
- AREG_ZF,
- AREG_SF,
- AREG_TF,
- AREG_IF,
- AREG_DF,
- AREG_OF,
- AREG_IOPL,
- AREG_NT,
- AREG_RF,
- AREG_VM,
- AREG_AC,
- AREG_VIF,
- AREG_VIP,
- AREG_ID,
-
- AREG_AX,
- AREG_AL,
- AREG_AH,
- AREG_EAX,
- AREG_RAX,
-
- AREG_BX,
- AREG_BL,
- AREG_BH,
- AREG_EBX,
- AREG_RBX,
-
- AREG_CX,
- AREG_CL,
- AREG_CH,
- AREG_ECX,
- AREG_RCX,
-
- AREG_DX,
- AREG_DL,
- AREG_DH,
- AREG_EDX,
- AREG_RDX,
-
- AREG_SI,
- AREG_SIL,
- AREG_ESI,
- AREG_RSI,
- AREG_DI,
- AREG_DIL,
- AREG_EDI,
- AREG_RDI,
-
- AREG_SP,
- AREG_SPL,
- AREG_ESP,
- AREG_RSP,
-
- AREG_BP,
- AREG_BPL,
- AREG_EBP,
- AREG_RBP,
-
- AREG_R0,
- AREG_MM0,
- AREG_R1,
- AREG_MM1,
- AREG_R2,
- AREG_MM2,
- AREG_R3,
- AREG_MM3,
- AREG_R4,
- AREG_MM4,
- AREG_R5,
- AREG_MM5,
- AREG_R6,
- AREG_MM6,
- AREG_R7,
- AREG_MM7,
-
- AREG_R8,
- AREG_R8L,
- AREG_R8W,
- AREG_R9,
- AREG_R9L,
- AREG_R9W,
- AREG_R10,
- AREG_R10L,
- AREG_R10W,
- AREG_R11,
- AREG_R11L,
- AREG_R11W,
- AREG_R12,
- AREG_R12L,
- AREG_R12W,
- AREG_R13,
- AREG_R13L,
- AREG_R13W,
- AREG_R14,
- AREG_R14L,
- AREG_R14W,
- AREG_R15,
- AREG_R15L,
- AREG_R15W,
-
- AREG_XMM0,
- AREG_XMM1,
- AREG_XMM2,
- AREG_XMM3,
- AREG_XMM4,
- AREG_XMM5,
- AREG_XMM6,
- AREG_XMM7,
- AREG_XMM8,
- AREG_XMM9,
- AREG_XMM10,
- AREG_XMM11,
- AREG_XMM12,
- AREG_XMM13,
- AREG_XMM14,
- AREG_XMM15,
-
- AREG_YMM0,
- AREG_YMM1,
- AREG_YMM2,
- AREG_YMM3,
- AREG_YMM4,
- AREG_YMM5,
- AREG_YMM6,
- AREG_YMM7,
- AREG_YMM8,
- AREG_YMM9,
- AREG_YMM10,
- AREG_YMM11,
- AREG_YMM12,
- AREG_YMM13,
- AREG_YMM14,
- AREG_YMM15,
-
- AREG_MXCSR,
-
- AREG_R8CLASS, /* register class for 8 bit registers in i286 */
- AREG_R16CLASS, /* register class for 16 bit registers in i286,i386,amd64 */
- AREG_R32CLASS, /* register class for 32 bit registers in i386,amd64 */
-};
-
-enum class {
- R8CLASS = 1 << 0,
- R16CLASS = 1 << 1,
- R32CLASS = 1 << 2,
-};
--- a/src/as/target/x86/rules.dat
+++ /dev/null
@@ -1,10 +1,0 @@
-reg8 AREG_R8CLASS
-reg16 AREG_R16CLASS
-reg32 AREG_R32CLASS
-imm8 AIMM8
-imm16 AIMM16
-imm32 AIMM32
-imm64 AIMM64
-\(n\) ADIRECT
-sym ASYM
-string ASTR
--- a/src/as/target/x86/x86.dat
+++ /dev/null
@@ -1,31 +1,0 @@
-# Tab 16, tabs 16, :set ts=16
-# op args size bytes format cpu
-.DB imm8+ 0 none defb I286,I386,AMD64
-.DEFB imm8+ 0 none defb I286,I386,AMD64
-.BYTE imm8+ 0 none defb I286,I386,AMD64
-.DW imm16+ 0 none defw I286,I386,AMD64
-.DEFW imm16+ 0 none defw I286,I386,AMD64
-.SHORT imm16+ 0 none defw I286,I386,AMD64
-.WORD imm16+ 0 none defw I286
-.WORD imm32+ 0 none defd I386,AMD64
-.DD imm32+ 0 none defd I286,I386,AMD64
-.DEFD imm32+ 0 none defd I286,I386,AMD64
-.LONG imm32+ 0 none defd I286,I386
-.LONG imm64+ 0 none defq AMD64
-.INT imm32+ 0 none defd I386,AMD64
-.INT imm16+ 0 none defd I286
-.DQ imm64+ 0 none defq I286,I386,AMD64
-.DEFQ imm64+ 0 none defq I286,I386,AMD64
-.EQU imm16 0 none equ I286
-.EQU imm32 0 none equ I386
-.EQU imm64 0 none equ AMD64
-NOP none 1 0x90 noargs I286,I386,AMD64
-RET none 1 0xc3 noargs I286,I386,AMD64
-
-
-# 8 bit arithmetic operations
-ADDB reg8,reg8 2 0x00 reg8_reg8 I286,I386,AMD64
-ADDB imm8,reg8 3 0x80 imm8_reg8 I286,I386,AMD64
-ADDW reg16,reg16 2 0x01 reg16_reg16 I286
-ADDW reg16,reg16 3 0x66,0x01 reg16_reg16 I386,AMD64
-ADDL reg32,reg32 2 0x01 reg32_reg32 I386,AMD64
--- a/src/as/target/z80.mk
+++ /dev/null
@@ -1,10 +1,0 @@
-Z80_OBJ = $(OBJS) \
- target/x80/z80tbl.o \
- target/x80/z80.o \
- target/x80/ins.o \
-
-target/x80/z80tbl.c: target/x80/x80.dat target/x80/rules.dat
- ./mktbl -f x80 -c z80
-
-$(LIBEXEC)/as-z80: $(OBJ) $(Z80_OBJ)
- $(CC) $(SCC_LDFLAGS) $(Z80_OBJ) -lscc -o $@
--- a/src/cc1/Makefile
+++ /dev/null
@@ -1,38 +1,0 @@
-.POSIX:
-
-PROJECTDIR = ../..
-include $(PROJECTDIR)/scripts/rules.mk
-
-OBJS = types.o \
- decl.o \
- lex.o \
- error.o \
- symbol.o \
- main.o \
- expr.o \
- code.o \
- stmt.o \
- cpp.o \
- fold.o \
- init.o \
- builtin.o \
-
-TARGET = $(LIBEXEC)/cc1-amd64-sysv \
- $(LIBEXEC)/cc1-arm64-sysv \
- $(LIBEXEC)/cc1-i386-sysv \
- $(LIBEXEC)/cc1-z80-scc \
-
-all: $(TARGET)
-
-$(TARGET): $(LIBDIR)/libscc.a
-
-dep: inc-dep
-
-clean:
- rm -f target/*/*.o
-
-include target/amd64-sysv/arch.mk
-include target/arm64-sysv/arch.mk
-include target/i386-sysv/arch.mk
-include target/z80-scc/arch.mk
-include deps.mk
--- a/src/cc1/TODO
+++ /dev/null
@@ -1,14 +1,0 @@
-* Implement bitfields
-* Rewrite error recovery code, and ensure correct state after recovery
-* Parse correctly all integer and float constants
-* Add C99 features (almost all the new features of C99 are missed)
-* Add correct emit for any kind of constant
-* Add warning when some ANSI limit is violated.
-* Free memory in emit after some error happened.
-* Rewrite initializers to deal with the idea of "current object"
-* Add some test about pointer airthmetic.
-* Merge all the definitions of the same string
-* Do not assign identifierss until symbols are emitted. This change will
- avoid identifiers that are not emitted.
-* Fix assignation abbreviations. They fail whe lhs type is smaller than
- the type in rhs
--- a/src/cc1/builtin.c
+++ /dev/null
@@ -1,121 +1,0 @@
-static char sccsid[] = "@(#) ./cc1/builtin.c";
-
-#include <stdio.h>
-
-#include <scc/scc.h>
-#include "cc1.h"
-
-static Node *
-builtin_va_arg(Symbol *sym)
-{
- Node *np, *ap;
- Type *tp;
-
- ap = assign();
- expect(',');
- tp = typename();
-
- if (!valid_va_list(ap->type)) {
- errorp("incorrect parameters for va_arg");
- goto error;
- }
- if (tp == booltype ||
- tp == chartype || tp == uchartype || tp == schartype ||
- tp == shortype || tp == ushortype) {
- warn("bool, char and short are promoted to int when passed through '...'");
- tp = (tp->prop & TSIGNED) ? inttype : uinttype;
- }
-
- np = node(OBUILTIN, tp, ap, NULL);
- np->sym = sym;
- return np;
-
-error:
- return constnode(zero);
-}
-
-static Node *
-builtin_va_copy(Symbol *sym)
-{
- Node *np, *src, *dst;
-
- dst = assign();
- expect(',');
- src = assign();
-
- if (!valid_va_list(dst->type) || !valid_va_list(src->type)) {
- errorp("incorrect parameters for va_copy");
- return constnode(zero);
- }
-
- np = node(OBUILTIN, voidtype, dst, src);
- np->sym = sym;
- return np;
-}
-
-static Node *
-builtin_va_start(Symbol *sym)
-{
- Node *np, *ap, *last;
- Symbol **p;
- Type *tp;
-
- ap = assign();
- expect(',');
- last = assign();
- if (last->op != OSYM)
- goto error;
-
- if (!valid_va_list(ap->type) || !(last->sym->flags&SDECLARED))
- goto error;
-
- for (p = curfun->u.pars; p && *p != last->sym; ++p)
- ;
- if (!p || *p == NULL || p[1] == NULL || p[1]->type != ellipsistype)
- warn("second parameter of 'va_start' not last named argument");
-
- tp = last->type;
- if (tp == booltype ||
- tp == chartype || tp == uchartype || tp == schartype ||
- tp == shortype || tp == ushortype) {
- warn("last parameter before '...' must not be bool, char or short");
- }
-
- np = node(OBUILTIN, voidtype, ap, last);
- np->sym = sym;
- return np;
-
-error:
- errorp("incorrect parameters for va_start");
- return constnode(zero);
-}
-
-static Node *
-builtin_va_end(Symbol *sym)
-{
- Node *ap, *np;
-
- ap = assign();
-
- if (!valid_va_list(ap->type)) {
- errorp("incorrect parameters for va_end");
- return constnode(zero);
- }
-
- np = node(OBUILTIN, voidtype, ap, NULL);
- np->sym = sym;
- return np;
-}
-
-void
-ibuilts(void)
-{
- struct builtin built[] = {
- {"__builtin_va_arg", builtin_va_arg},
- {"__builtin_va_copy", builtin_va_copy},
- {"__builtin_va_start", builtin_va_start},
- {"__builtin_va_end", builtin_va_end},
- {NULL}
- };
- builtins(built);
-}
--- a/src/cc1/cc1.h
+++ /dev/null
@@ -1,496 +1,0 @@
-#define INPUTSIZ LINESIZ
-
-#define GLOBALCTX 0
-#define PARAMCTX 1
-
-#define NR_USWITCHES 20
-
-/*
- * Definition of enumerations
- */
-enum {
- NOALLOC,
- ALLOC
-};
-
-enum typeprops {
- TDEFINED = 1 << 0, /* type defined */
- TSIGNED = 1 << 1, /* signedness of the type */
- TINTEGER = 1 << 2, /* the type is INT of enum */
- TARITH = 1 << 3, /* the type is INT, ENUM or FLOAT */
- TAGGREG = 1 << 4, /* the type is struct or union */
- TK_R = 1 << 5, /* this is a K&R-function */
- TELLIPSIS= 1 << 6, /* this function has an ellipsis par */
- TFUNDEF = 1 << 7, /* function definition */
-};
-
-enum inputtype {
- IMACRO = 1 << 0, /* macro expansion type */
- IFILE = 1 << 1, /* input file type */
- ISTDIN = 1 << 2, /* stdin type */
- IEOF = 1 << 3, /* EOF mark */
- ITYPE = IMACRO | IFILE | ISTDIN,
-};
-
-/* data type letters */
-enum ns {
- L_INT8 = 'C',
- L_INT16 = 'I',
- L_INT32 = 'W',
- L_INT64 = 'Q',
- L_UINT8 = 'K',
- L_UINT16 = 'N',
- L_UINT32 = 'Z',
- L_UINT64 = 'O',
- L_BOOL = 'B',
-
- L_FLOAT = 'J',
- L_DOUBLE = 'D',
- L_LDOUBLE = 'H',
-
- L_ELLIPSIS = 'E',
- L_VOID = '0',
- L_POINTER = 'P',
- L_FUNCTION = 'F',
- L_ARRAY = 'V',
- L_UNION = 'U',
- L_STRUCT = 'S',
- L_VA_ARG = '1',
-};
-
-/* recovery points */
-enum {
- END_DECL,
- END_LDECL,
- END_COMP,
- END_COND
-};
-
-/* type constructors */
-enum typeop {
- FTN = 1,
- PTR,
- ARY,
- KRFTN
-};
-
-/* namespaces */
-enum namespaces {
- NS_DUMMY,
- NS_IDEN,
- NS_TAG,
- NS_LABEL,
- NS_CPP,
- NS_KEYWORD,
- NS_CPPCLAUSES,
- NS_STRUCTS
-};
-
-/* symbol flags */
-enum {
- SAUTO = 1 << 0,
- SREGISTER = 1 << 1,
- SDECLARED = 1 << 2,
- SFIELD = 1 << 3,
- SEXTERN = 1 << 4,
- SUSED = 1 << 5,
- SCONSTANT = 1 << 6,
- SGLOBAL = 1 << 7,
- SPRIVATE = 1 << 8,
- SLOCAL = 1 << 9,
- SEMITTED = 1 << 10,
- SDEFINED = 1 << 11,
- SSTRING = 1 << 12,
- STYPEDEF = 1 << 13,
- SINITLST = 1 << 14,
- SHASINIT = 1 << 15
-};
-
-/* node flags */
-enum {
- NLVAL = 1 << 0,
- NCONST = 1 << 1,
- NEFFECT = 1 << 2
-};
-
-/* lexer mode, compiler or preprocessor directive */
-enum {
- CCMODE,
- CPPMODE
-};
-
-/* input tokens */
-enum tokens {
- CONST = 1 << 0, /* type qualifier tokens are used as flags */
- RESTRICT = 1 << 1,
- VOLATILE = 1 << 2,
- INLINE = 1 << 3,
- TQUALIFIER = 1 << 7, /* this value is picked outside of ASCII range */
- TYPE,
- IDEN,
- SCLASS,
- CONSTANT,
- STRING,
- SIZEOF,
- INDIR,
- INC,
- DEC,
- SHL,
- SHR,
- LE,
- GE,
- EQ,
- NE,
- AND,
- OR,
- MUL_EQ,
- DIV_EQ,
- MOD_EQ,
- ADD_EQ,
- SUB_EQ,
- AND_EQ,
- XOR_EQ,
- OR_EQ,
- SHL_EQ,
- SHR_EQ,
- ELLIPSIS,
- CASE,
- DEFAULT,
- IF,
- ELSE,
- SWITCH,
- WHILE,
- DO,
- FOR,
- GOTO,
- VOID,
- FLOAT,
- INT,
- BOOL,
- VA_LIST,
- STRUCT,
- UNION,
- CHAR,
- DOUBLE,
- SHORT,
- LONG,
- LLONG,
- COMPLEX,
- TYPEDEF,
- EXTERN,
- STATIC,
- AUTO,
- REGISTER,
- ENUM,
- TYPEIDEN,
- UNSIGNED,
- SIGNED,
- CONTINUE,
- BREAK,
- RETURN,
- DEFINE,
- INCLUDE,
- LINE,
- PRAGMA,
- ERROR,
- IFDEF,
- ELIF,
- IFNDEF,
- UNDEF,
- ENDIF,
- BUILTIN,
- EOFTOK
-};
-
-/* operations */
-enum op {
- OADD,
- OMUL,
- OSUB,
- OINC,
- ODEC,
- ODIV,
- OMOD,
- OSHL,
- OSHR,
- OBAND,
- OBXOR,
- OBOR,
- OSNEG,
- ONEG,
- OCPL,
- OAND,
- OOR,
- OEQ,
- ONE,
- OLT,
- OGE,
- OLE,
- OGT,
- OASSIGN,
- OA_MUL,
- OA_DIV,
- OA_MOD,
- OA_ADD,
- OA_SUB,
- OA_SHL,
- OA_SHR,
- OA_AND,
- OA_XOR,
- OA_OR,
- OADDR,
- OCOMMA,
- OCAST,
- OPTR,
- OSYM,
- OASK,
- OCOLON,
- OFIELD,
- OLABEL,
- ODEFAULT,
- OCASE,
- OJUMP,
- OBRANCH,
- OEXPR,
- OEFUN,
- OELOOP,
- OBLOOP,
- OFUN,
- OPAR,
- OCALL,
- OCALLE,
- ORET,
- ODECL,
- OBSWITCH,
- OESWITCH,
- OINIT,
- OBUILTIN,
- OTYP,
-};
-
-/*
- * Definition of structures
- */
-typedef struct type Type;
-typedef struct symbol Symbol;
-typedef struct swtch Switch;
-typedef struct node Node;
-typedef struct input Input;
-
-struct limits {
- union {
- TUINT i;
- TFLOAT f;
- } max;
- union {
- TUINT i;
- TFLOAT f;
- } min;
-};
-
-struct builtin {
- char *str;
- Node *(*fun)(Symbol *);
-};
-
-struct keyword {
- char *str;
- unsigned char token, value;
-};
-
-struct type {
- unsigned char op; /* type builder operator */
- unsigned char ns; /* namespace for struct members */
- short id; /* type id, used in dcls */
- char letter; /* letter of the type */
- unsigned char prop; /* type properties */
- unsigned char align; /* align of the type */
- unsigned long size; /* sizeof the type */
- Type *type; /* base type */
- Symbol *tag; /* symbol of the strug tag */
- union {
- Type **pars; /* Function type parameters */
- Symbol **fields; /* fields of aggregate type */
- } p;
- union {
- unsigned char rank; /* convertion rank */
- TINT elem; /* number of type parameters */
- } n;
- Type *next; /* local list pointer */
- Type *h_next; /* hash collision list */
-};
-
-struct symbol {
- unsigned char ctx;
- unsigned char hide;
- char ns;
- unsigned short id;
- unsigned short flags;
- char *name;
- Type *type;
- unsigned char token;
- union {
- TINT i;
- TUINT u;
- TFLOAT f;
- char *s;
- unsigned char token;
- Node **init;
- Symbol **pars;
- Node *(*fun)(Symbol *);
- } u;
- struct symbol *next;
- struct symbol *hash;
-};
-
-struct node {
- unsigned char op;
- unsigned char flags;
- Type *type;
- Symbol *sym;
- struct node *left, *right;
-};
-
-struct swtch {
- short nr;
- char hasdef;
-};
-
-struct yystype {
- Symbol *sym;
- unsigned char token;
-};
-
-#ifdef stdin
-struct input {
- char flags;
- unsigned lineno;
- char *filenam;
- FILE *fp;
- Symbol *hide;
- char *line, *begin, *p;
- struct input *next;
-};
-#endif
-
-/* error.c */
-extern void error(char *fmt, ...);
-extern void warn(char *fmt, ...);
-extern void unexpected(void);
-extern void errorp(char *fmt, ...);
-extern void cpperror(char *fmt, ...);
-extern Type *deftype(Type *tp);
-
-/* types.c */
-extern int eqtype(Type *tp1, Type *tp2, int eqflag);
-extern Type *ctype(int type, int sign, int size);
-extern Type *mktype(Type *tp, int op, TINT nelem, Type *data[]);
-extern Type *duptype(Type *base);
-extern struct limits *getlimits(Type *tp);
-extern void typesize(Type *tp);
-extern void flushtypes(void);
-
-/* symbol.c */
-extern void dumpstab(Symbol **tbl, char *msg);
-extern Symbol *lookup(int ns, char *name, int alloc);
-extern Symbol *nextsym(Symbol *sym, int ns);
-extern Symbol *install(int ns, Symbol *sym);
-extern Symbol *newsym(int ns, char *name);
-extern void pushctx(void), popctx(void);
-extern void killsym(Symbol *sym);
-extern Symbol *newlabel(void);
-extern void keywords(struct keyword *key, int ns);
-extern void builtins(struct builtin *builts);
-extern Symbol *newstring(char *s, size_t len);
-extern unsigned newid(void);
-
-/* stmt.c */
-extern void compound(Symbol *lbreak, Symbol *lcont, Switch *sw);
-
-/* decl.c */
-extern Type *typename(void);
-extern void decl(void);
-
-/* lex.c */
-extern int ahead(void);
-extern int next(void);
-extern void expect(int tok);
-extern void discard(void);
-extern void addinput(char *fname, Symbol *hide, char *buffer);
-extern void delinput(void);
-extern void setsafe(int type);
-extern void ilex(void);
-extern void setloc(char *fname, unsigned line);
-#define accept(t) ((yytoken == (t)) ? next() : 0)
-
-/* code.c */
-extern void prtree(Node *np);
-extern void emit(int, void *);
-extern Node *node(int op, Type *tp, Node *left, Node *rigth);
-extern Node *varnode(Symbol *sym);
-extern Node *constnode(Symbol *sym);
-extern Node *sizeofnode(Type *tp);
-extern void freetree(Node *np);
-extern void icode(void);
-#define BTYPE(np) ((np)->type->op)
-
-/* fold.c */
-extern Node *simplify(Node *np);
-extern TUINT ones(int nbytes);
-
-/* expr.c */
-extern Node *decay(Node *), *negate(Node *np), *assign(void);
-extern Node *convert(Node *np, Type *tp1, int iscast);
-extern Node *constexpr(void), *condexpr(int neg), *expr(void);
-extern int isnodecmp(int op);
-extern int negop(int op);
-extern int cmpnode(Node *np, TUINT val);
-
-/* init.c */
-extern void initializer(Symbol *sym, Type *tp);
-extern Node *initlist(Type *tp);
-
-/* cpp.c */
-extern void icpp(void);
-extern int cpp(void);
-extern int expand(char *begin, Symbol *sym);
-extern void incdir(char *dir);
-extern void outcpp(void);
-extern void defdefine(char *macro, char *val, char *source);
-extern void undefmacro(char *s);
-extern void ppragmaln(void);
-
-/* builtin.c */
-extern void ibuilts(void);
-
-/* arch.c */
-extern void iarch(void);
-extern int valid_va_list(Type *tp);
-
-/*
- * Definition of global variables
- */
-extern struct yystype yylval;
-extern char yytext[];
-extern int yytoken;
-extern unsigned short yylen;
-extern int disexpand;
-extern unsigned cppctx;
-extern Input *input;
-extern int lexmode, namespace;
-extern int onlycpp, onlyheader;
-extern unsigned curctx;
-extern Symbol *curfun, *zero, *one;
-extern char *infile;
-extern unsigned lineno;
-extern char filenam[];
-
-extern Type *voidtype, *pvoidtype, *booltype,
- *uchartype, *chartype, *schartype,
- *uinttype, *inttype,
- *sizettype, *pdifftype,
- *ushortype, *shortype,
- *longtype, *ulongtype,
- *ullongtype, *llongtype,
- *floattype, *doubletype, *ldoubletype,
- *ellipsistype, *va_list_type, *va_type;
--- a/src/cc1/code.c
+++ /dev/null
@@ -1,550 +1,0 @@
-static char sccsid[] = "@(#) ./cc1/code.c";
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-
-#include <scc/scc.h>
-#include "cc1.h"
-
-static void emitbin(int, void *),
- emitcast(int, void *),
- emitsym(int, void *),
- emitexp(int, void *),
- emitsymid(int, void *),
- emittext(int, void *),
- emitfun(int, void *),
- emitdcl(int, void *),
- emitinit(int, void *),
- emittype(int, void *),
- emitbuilt(int, void *);
-
-char *optxt[] = {
- [OADD] = "+",
- [OSUB] = "-",
- [OMUL] = "*",
- [OINC] = ":i",
- [ODEC] = ":d",
- [OPTR] = "@",
- [OMOD] = "%",
- [ODIV] = "/",
- [OSHL] = "l",
- [OSHR] = "r",
- [OLT] = "<",
- [OGT] = ">",
- [OGE] = "]",
- [OLE] = "[",
- [OEQ] = "=",
- [ONE] = "!",
- [OBAND] = "&",
- [OBXOR] = "^",
- [OBOR] = "|",
- [OASSIGN] = ":",
- [OA_MUL] = ":*",
- [OA_DIV] = ":/",
- [OA_MOD] = ":%",
- [OA_ADD] = ":+",
- [OA_SUB] = ":-",
- [OA_SHL] = ":l",
- [OA_SHR] = ":r",
- [OA_AND] = ":&",
- [OA_XOR] = ":^",
- [OA_OR] = ":|",
- [OADDR] = "'",
- [OSNEG] = "_",
- [ONEG] = "n",
- [OCPL] = "~",
- [OAND] = "a",
- [OOR] = "o",
- [OASK] = "?",
- [OCOMMA] = ",",
- [OLABEL] = "L%d\n",
- [ODEFAULT] = "\tf\tL%d\n",
- [OBSWITCH] = "\ts",
- [OESWITCH] = "\tt\tL%d\n",
- [OCASE] = "\tv\tL%d",
- [OJUMP] = "\tj\tL%d\n",
- [OBRANCH] = "\ty\tL%d",
- [OEFUN] = "}\n",
- [OELOOP] = "\tb\n",
- [OBLOOP] = "\te\n",
- [ORET] = "\th",
- [OPAR] = "p",
- [OCALL] = "c",
- [OCALLE] = "z",
- [OFIELD] = "."
-};
-
-void (*opcode[])(int, void *) = {
- [OADD] = emitbin,
- [OSUB] = emitbin,
- [OMUL] = emitbin,
- [OINC] = emitbin,
- [ODEC] = emitbin,
- [OPTR] = emitbin,
- [OMOD] = emitbin,
- [ODIV] = emitbin,
- [OSHL] = emitbin,
- [OSHR] = emitbin,
- [OLT] = emitbin,
- [OGT] = emitbin,
- [OGE] = emitbin,
- [OLE] = emitbin,
- [OEQ] = emitbin,
- [ONE] = emitbin,
- [OBAND] = emitbin,
- [OBXOR] = emitbin,
- [OBOR] = emitbin,
- [OASSIGN] = emitbin,
- [OA_MUL] = emitbin,
- [OA_DIV] = emitbin,
- [OA_MOD] = emitbin,
- [OA_ADD] = emitbin,
- [OA_SUB] = emitbin,
- [OA_SHL] = emitbin,
- [OA_SHR] = emitbin,
- [OA_AND] = emitbin,
- [OA_XOR] = emitbin,
- [OA_OR] = emitbin,
- [OADDR] = emitbin,
- [OSNEG] = emitbin,
- [ONEG] = emitbin,
- [OCPL] = emitbin,
- [OAND] = emitbin,
- [OOR] = emitbin,
- [OCOMMA] = emitbin,
- [OCAST] = emitcast,
- [OSYM] = emitsym,
- [OASK] = emitbin,
- [OCOLON] = emitbin,
- [OFIELD]= emitbin,
- [OEXPR] = emitexp,
- [OLABEL] = emitsymid,
- [ODEFAULT] = emitsymid,
- [OCASE] = emitsymid,
- [OJUMP] = emitsymid,
- [OBRANCH] = emitsymid,
- [OEFUN] = emittext,
- [OELOOP] = emittext,
- [OBLOOP] = emittext,
- [OFUN] = emitfun,
- [ORET] = emittext,
- [ODECL] = emitdcl,
- [OBSWITCH] = emittext,
- [OESWITCH] = emitsymid,
- [OPAR] = emitbin,
- [OCALL] = emitbin,
- [OCALLE] = emitbin,
- [OINIT] = emitinit,
- [OBUILTIN] = emitbuilt,
- [OTYP] = emittype,
-};
-
-static FILE *outfp;
-
-void
-icode(void)
-{
- outfp = stdout;
-}
-
-void
-freetree(Node *np)
-{
- if (!np)
- return;
- freetree(np->left);
- freetree(np->right);
- free(np);
-}
-
-static void
-emitnode(Node *np)
-{
- if (np)
- (*opcode[np->op])(np->op, np);
-}
-
-void
-prtree(Node *np)
-{
- outfp = stderr;
- fputs("DBG prtree", outfp);
- emitnode(np);
- putc('\n', outfp);
- outfp = stdout;
-}
-
-void
-emit(int op, void *arg)
-{
- extern int failure;
-
- if (failure || onlycpp || onlyheader)
- return;
- (*opcode[op])(op, arg);
-}
-
-static void
-emitvar(Symbol *sym)
-{
- int c;
- short flags = sym->flags;
-
- if (flags & SLOCAL)
- c = 'T';
- else if (flags & SPRIVATE)
- c = 'Y';
- else if (flags & SGLOBAL)
- c = 'G';
- else if (flags & SREGISTER)
- c = 'R';
- else if (flags & SFIELD)
- c = 'M';
- else if (flags & SEXTERN)
- c = 'X';
- else
- c = 'A';
- fprintf(outfp, "%c%u", c, sym->id);
-}
-
-static void
-emitconst(Node *np)
-{
- Symbol *sym = np->sym;
- Type *tp = np->type;
- TUINT u;
-
- switch (tp->op) {
- case PTR:
- case INT:
- case ENUM:
- u = (tp->prop & TSIGNED) ? (TUINT) sym->u.i : sym->u.u;
- fprintf(outfp,
- "#%c%llX",
- np->type->letter,
- (long long) u & ones(tp->size));
- break;
- default:
- abort();
- }
-}
-
-static void
-emitsym(int op, void *arg)
-{
- Node *np = arg;
-
- if ((np->sym->flags & SINITLST) == 0) {
- /*
- * When we have a compound literal we are going
- * to call to emitnode for every element of it,
- * and it means that we will have two '\t'
- * for the first element
- */
- putc('\t', outfp);
- }
- (np->flags & NCONST) ? emitconst(np) : emitvar(np->sym);
-}
-
-static void
-emitletter(Type *tp)
-{
- int letter;
-
- letter = (tp->prop&TELLIPSIS) ? 'E' : tp->letter;
- putc(letter, outfp);
- switch (tp->op) {
- case ARY:
- case STRUCT:
- case UNION:
- fprintf(outfp, "%u", tp->id);
- }
-}
-
-static void
-emittype(int op, void *arg)
-{
- TINT n;
- Symbol **sp;
- char *tag;
- Type *tp = arg;
-
- if (!(tp->prop & TDEFINED))
- return;
-
- switch (tp->op) {
- case ARY:
- emitletter(tp);
- putc('\t', outfp);
- emitletter(tp->type);
- fprintf(outfp,
- "\t#%c%llX\n",
- sizettype->letter, (long long) tp->n.elem);
- return;
- case UNION:
- case STRUCT:
- emitletter(tp);
- tag = tp->tag->name;
- fprintf(outfp,
- "\t\"%s\t#%c%lX\t#%c%X\n",
- (tag) ? tag : "",
- sizettype->letter,
- tp->size,
- sizettype->letter,
- tp->align);
- n = tp->n.elem;
- for (sp = tp->p.fields; n-- > 0; ++sp)
- emit(ODECL, *sp);
- break;
- case PTR:
- case FTN:
- case ENUM:
- return;
- default:
- abort();
- }
-}
-
-static void
-emitstring(Symbol *sym, Type *tp)
-{
- char *bp, *s, *lim;
- int n;
-
- bp = sym->u.s;
- lim = &sym->u.s[tp->n.elem];
- while (bp < lim) {
- s = bp;
- while (bp < lim && isprint(*bp))
- ++bp;
- if ((n = bp - s) > 1)
- fprintf(outfp, "\t#\"%.*s\n", n, s);
- else
- bp = s;
- if (bp == lim)
- break;
- do {
- fprintf(outfp,
- "\t#%c%02X\n",
- chartype->letter, (*bp++) & 0xFF);
- } while (bp < lim && !isprint(*bp));
- }
-}
-
-static void
-emitdesig(Node *np, Type *tp)
-{
- Symbol *sym;
- size_t n; /* TODO: This should be SIZET */
- Node *aux;
- Type *p;
-
- if (!np) {
- sym = NULL;
- } else {
- if (!np->sym)
- goto emit_expression;
- sym = np->sym;
- if (sym->flags & SSTRING) {
- emitstring(sym, tp);
- return;
- }
- if ((sym->flags & SINITLST) == 0)
- goto emit_expression;
- }
-
- switch (tp->op) {
- case PTR:
- case INT:
- case ENUM:
- aux = (sym) ? *sym->u.init : convert(constnode(zero), tp, 0);
- emitexp(OEXPR, aux);
- break;
- case UNION:
- n = tp->n.elem-1;
- aux = (sym) ? sym->u.init[0] : NULL;
- emitdesig(aux, aux->type);
- break;
- case STRUCT:
- case ARY:
- for (n = 0; n < tp->n.elem; ++n) {
- aux = (sym) ? sym->u.init[n] : NULL;
- p = (tp->op == ARY) ? tp->type : tp->p.fields[n]->type;
- emitdesig(aux, p);
- }
- break;
- default:
- abort();
- }
-
- if (sym) {
- free(sym->u.init);
- sym->u.init = NULL;
- }
- freetree(np);
- return;
-
-emit_expression:
- emitexp(OEXPR, np);
-}
-
-static void
-emitinit(int op, void *arg)
-{
- Node *np = arg;
-
- fputs("\t(\n", outfp);
- emitdesig(np, np->type);
- fputs(")\n", outfp);
-}
-
-static void
-emitdcl(int op, void *arg)
-{
- Symbol *sym = arg;
-
- if (sym->flags & SEMITTED)
- return;
- emitvar(sym);
- putc('\t', outfp);
- if (sym->type->op == FTN) {
- emitletter(sym->type->type);
- putc('\t', outfp);
- }
- emitletter(sym->type);
- fprintf(outfp, "\t\"%s", (sym->name) ? sym->name : "");
- if (sym->flags & SFIELD)
- fprintf(outfp, "\t#%c%llX", sizettype->letter, sym->u.i);
- sym->flags |= SEMITTED;
- if ((sym->flags & SHASINIT) == 0)
- putc('\n', outfp);
-}
-
-static void
-emitcast(int op, void *arg)
-{
- Node *np = arg, *lp = np->left;
-
- emitnode(lp);
- if (np->type != voidtype)
- fprintf(outfp, "\tg%c", np->type->letter);
-}
-
-static void
-emitbin(int op, void *arg)
-{
- Node *np = arg;
- char *s;
-
- emitnode(np->left);
- emitnode(np->right);
- if ((s = optxt[op]) != NULL) { /* do not print in OCOLON case */
- fprintf(outfp, "\t%s", s);
- emitletter(np->type);
- }
-}
-
-static void
-emitbuilt(int op, void *arg)
-{
- Node *np = arg;
-
- emitnode(np->left);
- emitnode(np->right);
- fprintf(outfp, "\t\"%s\tm", np->sym->name);
- emitletter(np->type);
-}
-
-
-static void
-emitexp(int op, void *arg)
-{
- Node *np = arg;
-
- emitnode(np);
- putc('\n', outfp);
- freetree(np);
-}
-
-static void
-emitfun(int op, void *arg)
-{
- Symbol *sym = arg, **sp;
-
- emitdcl(op, arg);
- fputs("{\n", outfp);
-
- for (sp = sym->u.pars; sp && *sp; ++sp)
- emit(ODECL, *sp);
- fputs("\\\n", outfp);
-}
-
-static void
-emittext(int op, void *arg)
-{
- fputs(optxt[op], outfp);
-}
-
-static void
-emitsymid(int op, void *arg)
-{
- Symbol *sym = arg;
- fprintf(outfp, optxt[op], sym->id);
-}
-
-Node *
-node(int op, Type *tp, Node *lp, Node *rp)
-{
- Node *np;
-
- np = xmalloc(sizeof(*np));
- np->op = op;
- np->type = tp;
- np->sym = NULL;
- np->flags = 0;
- np->left = lp;
- np->right = rp;
-
- if (lp)
- np->flags |= lp->flags & NEFFECT;
- if (rp)
- np->flags |= rp->flags & NEFFECT;
- return np;
-}
-
-Node *
-varnode(Symbol *sym)
-{
- Node *np;
- Type *tp = sym->type;
-
- np = node(OSYM, sym->type, NULL, NULL);
- np->type = sym->type;
- np->flags = (tp->op != FTN && tp->op != ARY) ? NLVAL : 0;
- np->sym = sym;
- return np;
-}
-
-Node *
-constnode(Symbol *sym)
-{
- Node *np;
-
- np = node(OSYM, sym->type, NULL, NULL);
- np->type = sym->type;
- np->flags = NCONST;
- np->sym = sym;
- return np;
-}
-
-Node *
-sizeofnode(Type *tp)
-{
- Symbol *sym;
-
- sym = newsym(NS_IDEN, NULL);
- sym->type = sizettype;
- sym->u.i = tp->size;
- return constnode(sym);
-}
--- a/src/cc1/cpp.c
+++ /dev/null
@@ -1,839 +1,0 @@
-static char sccsid[] = "@(#) ./cc1/cpp.c";
-#include <ctype.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include <scc/cstd.h>
-#include <scc/scc.h>
-#include "cc1.h"
-
-static char *argp, *macroname;
-static unsigned arglen;
-static unsigned ncmdlines;
-static Symbol *symline, *symfile;
-static unsigned char ifstatus[NR_COND];
-static int cppoff;
-static struct items dirinclude;
-
-unsigned cppctx;
-int disexpand;
-
-void
-defdefine(char *macro, char *val, char *source)
-{
- char *def, *fmt = "#define %s %s\n";
- Symbol dummy = {.flags = SDECLARED};
-
- if (!val)
- val = "";
- def = xmalloc(strlen(fmt) + strlen(macro) + strlen(val));
-
- sprintf(def, fmt, macro, val);
- lineno = ++ncmdlines;
- addinput(source, &dummy, def);
- cpp();
- delinput();
-}
-
-void
-undefmacro(char *s)
-{
- killsym(lookup(NS_CPP, s, NOALLOC));
-}
-
-void
-icpp(void)
-{
- static char sdate[14], stime[11];
- struct tm *tm;
- time_t t;
- static char **bp, *list[] = {
- "__STDC__",
- "__STDC_HOSTED__",
- "__SCC__",
- NULL
- };
- static struct keyword keys[] = {
- {"define", DEFINE, DEFINE},
- {"include", INCLUDE, INCLUDE},
- {"line", LINE, LINE},
- {"ifdef", IFDEF, IFDEF},
- {"if", IF, IF},
- {"elif", ELIF, ELIF},
- {"else", ELSE, ELSE},
- {"ifndef", IFNDEF, IFNDEF},
- {"endif", ENDIF, ENDIF},
- {"undef", UNDEF, UNDEF},
- {"pragma", PRAGMA, PRAGMA},
- {"error", ERROR, ERROR},
- {NULL, 0, 0}
- };
-
- keywords(keys, NS_CPPCLAUSES);
-
- t = time(NULL);
- tm = localtime(&t);
- strftime(sdate, sizeof(sdate), "\"%b %d %Y\"", tm);
- strftime(stime, sizeof(stime), "\"%H:%M:%S\"", tm);
- defdefine("__DATE__", sdate, "built-in");
- defdefine("__TIME__", stime, "built-in");
- defdefine("__STDC_VERSION__", STDC_VERSION, "built-in");
- defdefine("__LINE__", NULL, "built-in");
- defdefine("__FILE__", NULL, "built-in");
-
- symline = lookup(NS_CPP, "__LINE__", ALLOC);
- symfile = lookup(NS_CPP, "__FILE__", ALLOC);
-
- for (bp = list; *bp; ++bp)
- defdefine(*bp, "1", "built-in");
-
- ncmdlines = 0;
-}
-
-static void
-nextcpp(void)
-{
- next();
- if (yytoken == EOFTOK)
- error("unterminated argument list invoking macro \"%s\"",
- macroname);
- if (yylen + 1 > arglen)
- error("argument overflow invoking macro \"%s\"",
- macroname);
- if (yytoken == IDEN)
- yylval.sym->flags |= SUSED;
- memcpy(argp, yytext, yylen);
- argp += yylen;
- *argp++ = ' ';
- arglen -= yylen + 1;
-}
-
-static void
-paren(void)
-{
- for (;;) {
- nextcpp();
- switch (yytoken) {
- case ')':
- return;
- case '(':
- paren();
- break;
- }
- }
-}
-
-static void
-parameter(void)
-{
- for (;;) {
- nextcpp();
- switch (yytoken) {
- case ')':
- case ',':
- argp -= 3; /* remove " , " or " ) "*/
- *argp++ = '\0';
- return;
- case '(':
- paren();
- break;
- }
- }
-}
-
-static int
-parsepars(char *buffer, char **listp, int nargs)
-{
- int n;
-
- if (nargs == -1)
- return -1;
- if (ahead() != '(' && nargs > 0)
- return 0;
-
- disexpand = 1;
- next();
- n = 0;
- argp = buffer;
- arglen = INPUTSIZ;
- if (ahead() == ')') {
- next();
- } else {
- do {
- *listp++ = argp;
- parameter();
- } while (++n < NR_MACROARG && yytoken == ',');
- }
- if (yytoken != ')')
- error("incorrect macro function-alike invocation");
- disexpand = 0;
-
- if (n == NR_MACROARG)
- error("too many parameters in macro \"%s\"", macroname);
- if (n != nargs) {
- error("macro \"%s\" received %d arguments, but it takes %d",
- macroname, n, nargs);
- }
-
- return 1;
-}
-
-static size_t
-copymacro(char *buffer, char *s, size_t bufsiz, char *arglist[])
-{
- int delim, prevc, c;
- char *p, *arg, *bp = buffer;
- size_t size;
-
- for (prevc = '\0'; c = *s; prevc = c, ++s) {
- switch (c) {
- case '$':
- while (bp[-1] == ' ')
- --bp, ++bufsiz;
- while (s[1] == ' ')
- ++s;
- case '#':
- break;
- case '\'':
- delim = '\'';
- goto search_delim;
- case '\"':
- delim = '"';
- search_delim:
- for (p = s; *++s != delim; )
- ;
- size = s - p + 1;
- if (size > bufsiz)
- goto expansion_too_long;
- memcpy(bp, p, size);
- bufsiz -= size;
- bp += size;
- break;
- case '@':
- if (prevc == '#')
- bufsiz -= 2;
- arg = arglist[atoi(++s)];
- size = strlen(arg);
- if (size > bufsiz)
- goto expansion_too_long;
- if (prevc == '#')
- *bp++ = '"';
- memcpy(bp, arg, size);
- bp += size;
- if (prevc == '#')
- *bp++ = '"';
- bufsiz -= size;
- s += 2;
- break;
- default:
- if (bufsiz-- == 0)
- goto expansion_too_long;
- *bp++ = c;
- break;
- }
- }
- *bp = '\0';
-
- return bp - buffer;
-
-expansion_too_long:
- error("macro expansion of \"%s\" too long", macroname);
-}
-
-int
-expand(char *begin, Symbol *sym)
-{
- size_t elen;
- int n, i;
- char *s = sym->u.s;
- char *arglist[NR_MACROARG], arguments[INPUTSIZ], buffer[INPUTSIZ];
-
- macroname = sym->name;
- if (sym == symfile) {
- elen = sprintf(buffer, "\"%s\" ", filenam);
- goto substitute;
- }
- if (sym == symline) {
- elen = sprintf(buffer, "%d ", lineno);
- goto substitute;
- }
- if (!s)
- return 1;
-
- n = atoi(s);
- if (!parsepars(arguments, arglist, n))
- return 0;
- for (i = 0; i < n; ++i)
- DBG("MACRO par%d:%s", i, arglist[i]);
-
- elen = copymacro(buffer, s+3, INPUTSIZ-1, arglist);
-
-substitute:
- DBG("MACRO '%s' expanded to :'%s'", macroname, buffer);
- buffer[elen] = '\0';
- addinput(filenam, sym, xstrdup(buffer));
-
- return 1;
-}
-
-static int
-getpars(Symbol *args[NR_MACROARG])
-{
- int n, c;
- Symbol *sym;
-
- c = *input->p;
- next();
- if (c != '(')
- return -1;
- next(); /* skip the '(' */
- if (accept(')'))
- return 0;
-
- n = 0;
- do {
- if (n == NR_MACROARG) {
- cpperror("too many parameters in macro");
- return NR_MACROARG;
- }
- if (accept(ELLIPSIS)) {
- args[n++] = NULL;
- break;
- }
- if (yytoken != IDEN) {
- cpperror("macro arguments must be identifiers");
- return NR_MACROARG;
- }
- sym = install(NS_IDEN, yylval.sym);
- sym->flags |= SUSED;
- args[n++] = sym;
- next();
- } while (accept(','));
- expect(')');
-
- return n;
-}
-
-static int
-getdefs(Symbol *args[NR_MACROARG], int nargs, char *bp, size_t bufsiz)
-{
- Symbol **argp;
- size_t len;
- int prevc = 0, ispar;
-
- if (yytoken == '$') {
- cpperror("'##' cannot appear at either ends of a macro expansion");
- return 0;
- }
-
- for (;;) {
- ispar = 0;
- if (yytoken == IDEN && nargs >= 0) {
- for (argp = args; argp < &args[nargs]; ++argp) {
- if (*argp == yylval.sym)
- break;
- }
- if (argp != &args[nargs]) {
- sprintf(yytext, "@%02d@", (int) (argp - args));
- ispar = 1;
- }
- }
- if (prevc == '#' && !ispar) {
- cpperror("'#' is not followed by a macro parameter");
- return 0;
- }
- if (yytoken == '\n')
- break;
-
- if ((len = strlen(yytext)) >= bufsiz) {
- cpperror("macro too long");
- return 0;
- }
- if (yytoken == '$') {
- *bp++ = '$';
- --bufsiz;
- } else {
- memcpy(bp, yytext, len);
- bp += len;
- bufsiz -= len;
- }
- if ((prevc = yytoken) != '#') {
- *bp++ = ' ';
- --bufsiz;
- }
- next();
- }
- *bp = '\0';
- return 1;
-}
-
-static void
-define(void)
-{
- Symbol *sym,*args[NR_MACROARG];
- char buff[LINESIZ+1];
- int n;
-
- if (cppoff)
- return;
-
- namespace = NS_CPP;
- next();
-
- if (yytoken != IDEN) {
- cpperror("macro names must be identifiers");
- return;
- }
- sym = yylval.sym;
- if (sym->flags & SDECLARED) {
- warn("'%s' redefined", yytext);
- free(sym->u.s);
- } else {
- sym = install(NS_CPP, sym);
- sym->flags |= SDECLARED|SSTRING;
- }
-
- namespace = NS_IDEN; /* Avoid polution in NS_CPP */
- if ((n = getpars(args)) == NR_MACROARG)
- goto delete;
- if (n > 0 && !args[n-1]) /* it is a variadic function */
- --n;
- sprintf(buff, "%02d#", n);
- if (!getdefs(args, n, buff+3, LINESIZ-3))
- goto delete;
- sym->u.s = xstrdup(buff);
- DBG("MACRO '%s' defined as '%s'", sym->name, buff);
- return;
-
-delete:
- killsym(sym);
-}
-
-void
-incdir(char *dir)
-{
- if (!dir || *dir == '\0')
- die("cc1: incorrect -I flag");
- newitem(&dirinclude, dir);
-}
-
-static int
-includefile(char *dir, char *file, size_t filelen)
-{
- size_t dirlen;
- char path[FILENAME_MAX];
-
- if (!dir) {
- dirlen = 0;
- if (filelen > FILENAME_MAX-1)
- return 0;
- } else {
- dirlen = strlen(dir);
- if (dirlen + filelen > FILENAME_MAX-2)
- return 0;
- memcpy(path, dir, dirlen);
- if (dir[dirlen-1] != '/')
- path[dirlen++] = '/';
- }
- memcpy(path+dirlen, file, filelen);
- path[dirlen + filelen] = '\0';
-
- addinput(path, NULL, NULL);
- return 1;
-}
-
-static char *
-cwd(char *buf)
-{
- char *p, *s = filenam;
- size_t len;
-
- if ((p = strrchr(s, '/')) == NULL)
- return NULL;
- if ((len = p - s) >= FILENAME_MAX)
- die("cc1: current work directory too long");
- memcpy(buf, s, len);
- buf[len] = '\0';
- return buf;
-}
-
-static void
-include(void)
-{
- char dir[FILENAME_MAX], file[FILENAME_MAX], *p, **bp;
- size_t filelen;
- int n;
-
- if (cppoff)
- return;
-
- namespace = NS_IDEN;
- next();
-
- switch (*yytext) {
- case '<':
- if ((p = strchr(input->begin, '>')) == NULL || p[-1] == '<')
- goto bad_include;
- filelen = p - input->begin;
- if (filelen >= FILENAME_MAX)
- goto too_long;
- memcpy(file, input->begin, filelen);
- file[filelen] = '\0';
-
- input->begin = input->p = p+1;
- if (next() != '\n')
- goto trailing_characters;
-
- break;
- case '"':
- if (yylen < 3)
- goto bad_include;
- filelen = yylen-2;
- if (filelen >= FILENAME_MAX)
- goto too_long;
- memcpy(file, yytext+1, filelen);
- file[filelen] = '\0';
-
- if (next() != '\n')
- goto trailing_characters;
-
- if (includefile(cwd(dir), file, filelen))
- goto its_done;
- break;
- default:
- goto bad_include;
- }
-
- n = dirinclude.n;
- for (bp = dirinclude.s; n--; ++bp) {
- if (includefile(*bp, file, filelen))
- goto its_done;
- }
- cpperror("included file '%s' not found", file);
-
-its_done:
- return;
-
-trailing_characters:
- cpperror("trailing characters after preprocessor directive");
- return;
-
-too_long:
- cpperror("too long file name in #include");
- return;
-
-bad_include:
- cpperror("#include expects \"FILENAME\" or <FILENAME>");
- return;
-}
-
-static void
-line(void)
-{
- long n;
- char *endp, *fname;
-
- if (cppoff)
- return;
-
- disexpand = 0;
- next();
- n = strtol(yytext, &endp, 10);
- if (n <= 0 || n > USHRT_MAX || *endp != '\0') {
- cpperror("first parameter of #line is not a positive integer");
- return;
- }
-
- next();
- if (yytoken == '\n') {
- fname = NULL;
- } else {
- if (*yytext != '\"' || yylen == 1) {
- cpperror("second parameter of #line is not a valid filename");
- return;
- }
- fname = yylval.sym->u.s;
- }
- setloc(fname, n - 1);
- if (yytoken != '\n')
- next();
-}
-
-static void
-pragma(void)
-{
- if (cppoff)
- return;
- next();
- warn("ignoring pragma '%s'", yytext);
- *input->p = '\0';
- next();
-}
-
-static void
-usererr(void)
-{
- if (cppoff)
- return;
- cpperror("#error %s", input->p);
- *input->p = '\0';
- next();
-}
-
-static void
-ifclause(int negate, int isifdef)
-{
- Symbol *sym;
- unsigned n;
- int status;
- Node *expr;
-
- if (cppctx == NR_COND-1)
- error("too many nesting levels of conditional inclusion");
-
- n = cppctx++;
- namespace = NS_CPP;
- next();
-
- if (isifdef) {
- if (yytoken != IDEN) {
- cpperror("no macro name given in #%s directive",
- (negate) ? "ifndef" : "ifdef");
- return;
- }
- sym = yylval.sym;
- next();
- status = (sym->flags & SDECLARED) != 0;
- if (!status)
- killsym(sym);
- } else {
- /* TODO: catch recovery here */
- if ((expr = constexpr()) == NULL) {
- cpperror("parameter of #if is not an integer constant expression");
- return;
- }
- status = expr->sym->u.i != 0;
- freetree(expr);
- }
-
- if (negate)
- status = !status;
- if ((ifstatus[n] = status) == 0)
- ++cppoff;
-}
-
-static void
-cppif(void)
-{
- disexpand = 0;
- ifclause(0, 0);
-}
-
-static void
-ifdef(void)
-{
- ifclause(0, 1);
-}
-
-static void
-ifndef(void)
-{
- ifclause(1, 1);
-}
-
-static void
-elseclause(void)
-{
- int status;
-
- if (cppctx == 0) {
- cpperror("#else without #ifdef/ifndef");
- return;
- }
-
- status = ifstatus[cppctx-1];
- ifstatus[cppctx-1] = !status;
- cppoff += (status) ? 1 : -1;
-}
-
-static void
-cppelse(void)
-{
- elseclause();
- next();
-}
-
-static void
-elif(void)
-{
- elseclause();
- if (ifstatus[cppctx-1]) {
- --cppctx;
- cppif();
- }
-}
-
-static void
-endif(void)
-{
- if (cppctx == 0)
- error("#endif without #if");
- if (!ifstatus[--cppctx])
- --cppoff;
- next();
-}
-
-static void
-undef(void)
-{
- if (cppoff)
- return;
-
- namespace = NS_CPP;
- next();
- if (yytoken != IDEN) {
- error("no macro name given in #undef directive");
- return;
- }
- killsym(yylval.sym);
- next();
-}
-
-int
-cpp(void)
-{
- static struct {
- unsigned char token;
- void (*fun)(void);
- } *bp, clauses [] = {
- {DEFINE, define},
- {INCLUDE, include},
- {LINE, line},
- {IFDEF, ifdef},
- {IF, cppif},
- {ELIF, elif},
- {IFNDEF, ifndef},
- {ELSE, cppelse},
- {ENDIF, endif},
- {UNDEF, undef},
- {PRAGMA, pragma},
- {ERROR, usererr},
- {0, NULL}
- };
- int ns;
- char *p;
-
- for (p = input->p; isspace(*p); ++p)
- ;
-
- if (*p != '#')
- return cppoff;
- input->p = p+1;
-
- disexpand = 1;
- lexmode = CPPMODE;
- ns = namespace;
- namespace = NS_CPPCLAUSES;
- next();
- namespace = NS_IDEN;
-
- for (bp = clauses; bp->token && bp->token != yytoken; ++bp)
- ;
- if (!bp->token) {
- errorp("incorrect preprocessor directive '%s'", yytext);
- goto error;
- }
-
- DBG("CPP %s", yytext);
-
- pushctx(); /* create a new context to avoid polish */
- (*bp->fun)(); /* the current context, and to get all */
- popctx(); /* the symbols freed at the end */
-
- /*
- * #include changes the content of input->line, so the correctness
- * of the line must be checked in the own include(), and we have
- * to skip this tests. For the same reason include() is the only
- * function which does not prepare the next token
- */
- if (yytoken != '\n' && !cppoff && bp->token != INCLUDE)
- errorp("trailing characters after preprocessor directive");
-
-error:
- disexpand = 0;
- lexmode = CCMODE;
- namespace = ns;
-
- return 1;
-}
-
-void
-ppragmaln(void)
-{
- static char file[FILENAME_MAX];
- static unsigned nline;
- char *s;
-
- putchar('\n');
- if (strcmp(file, filenam)) {
- strcpy(file, filenam);
- s = "#line %u \"%s\"\n";
- } else if (nline+1 != lineno) {
- s = "#line %u\n";
- } else {
- s = "";
- }
- nline = lineno;
- printf(s, nline, file);
-}
-
-void
-outcpp(void)
-{
- int c;
- char *s, *t;
-
- for (next(); yytoken != EOFTOK; next()) {
- if (onlyheader)
- continue;
- if (yytoken != STRING) {
- printf("%s ", yytext);
- continue;
- }
- for (s = yytext; c = *s; ++s) {
- switch (c) {
- case '\n':
- t = "\\n";
- goto print_str;
- case '\v':
- t = "\\v";
- goto print_str;
- case '\b':
- t = "\\b";
- goto print_str;
- case '\t':
- t = "\\t";
- goto print_str;
- case '\a':
- t = "\\a";
- print_str:
- fputs(t, stdout);
- break;
- case '\\':
- putchar('\\');
- default:
- if (!isprint(c))
- printf("\\x%x", c);
- else
- putchar(c);
- break;
- }
- }
- putchar(' ');
- }
- putchar('\n');
-}
-
--- a/src/cc1/decl.c
+++ /dev/null
@@ -1,967 +1,0 @@
-static char sccsid[] = "@(#) ./cc1/decl.c";
-#include <stdarg.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <scc/cstd.h>
-#include <scc/scc.h>
-#include "cc1.h"
-
-#define NOSCLASS 0
-
-#define NOREP 0
-#define REP 1
-#define QUIET 1
-#define NOQUIET 0
-
-#define NR_DCL_TYP (NR_DECLARATORS+NR_FUNPARAM)
-#define NR_DCL_SYM (NR_DECLARATORS+NR_FUNPARAM+1)
-
-struct declarators {
- unsigned nr;
- unsigned ns;
- struct decl *dcl;
- unsigned nr_types;
- Type **tpars;
- Symbol **pars;
- struct declarator {
- unsigned char op;
- TINT nelem;
- Symbol *sym;
- Type **tpars;
- Symbol **pars;
- } d [NR_DECLARATORS];
-};
-
-struct decl {
- unsigned ns;
- int sclass;
- int qualifier;
- Symbol *sym;
- Type *type;
- Type *parent;
- Symbol **pars;
- Symbol *bufpars[NR_DCL_SYM];
- Type *buftpars[NR_DCL_TYP];
-};
-
-
-static void
-endfundcl(Type *tp, Symbol **pars)
-{
- if (tp->prop&TK_R && *pars)
- warn("parameter names (without types) in function declaration");
- /*
- * avoid non used warnings in prototypes
- */
- while (*pars)
- (*pars++)->flags |= SUSED;
- popctx();
-}
-
-static void
-push(struct declarators *dp, int op, ...)
-{
- va_list va;
- unsigned n;
- struct declarator *p;
-
- va_start(va, op);
- if ((n = dp->nr++) == NR_DECLARATORS)
- error("too many declarators");
-
- p = &dp->d[n];
- p->op = op;
- p->tpars = NULL;
-
- switch (op) {
- case ARY:
- p->nelem = va_arg(va, TINT);
- break;
- case KRFTN:
- case FTN:
- p->nelem = va_arg(va, unsigned);
- p->tpars = va_arg(va, Type **);
- p->pars = va_arg(va, Symbol **);
- break;
- case IDEN:
- p->sym = va_arg(va, Symbol *);
- break;
- }
- va_end(va);
-}
-
-static int
-pop(struct declarators *dp, struct decl *dcl)
-{
- struct declarator *p;
-
- if (dp->nr == 0)
- return 0;
-
- p = &dp->d[--dp->nr];
- if (p->op == IDEN) {
- dcl->sym = p->sym;
- return 1;
- }
-
- if (dcl->type->op == FTN)
- endfundcl(dcl->type, dcl->pars);
- dcl->pars = p->pars;
-
- dcl->type = mktype(dcl->type, p->op, p->nelem, p->tpars);
- return 1;
-}
-
-static void
-arydcl(struct declarators *dp)
-{
- Node *np = NULL;
- TINT n = 0;
-
- expect('[');
- if (yytoken != ']') {
- if ((np = constexpr()) == NULL) {
- errorp("invalid storage size");
- } else {
- if ((n = np->sym->u.i) <= 0) {
- errorp("array size is not a positive number");
- n = 1;
- }
- freetree(np);
- }
- }
- expect(']');
-
- push(dp, ARY, n);
-}
-
-static int
-empty(Symbol *sym, Type *tp, int param)
-{
- if (!sym->name) {
- sym->type = tp;
- switch (tp->op) {
- default:
- /* warn if it is not a parameter */
- if (!param)
- warn("empty declaration");
- case STRUCT:
- case UNION:
- case ENUM:
- return 1;
- }
- }
- return 0;
-}
-
-static void
-bad_storage(Type *tp, char *name)
-{
- if (tp->op != FTN)
- errorp("incorrect storage class for file-scope declaration");
- else
- errorp("invalid storage class for function '%s'", name);
-}
-
-static Symbol *
-redcl(Symbol *sym, Type *tp, int sclass)
-{
- int flags;
- char *name = sym->name;
-
- if (!eqtype(sym->type, tp, 1)) {
- errorp("conflicting types for '%s'", name);
- return sym;
- }
-
- if (sym->token == TYPEIDEN && sclass != TYPEDEF ||
- sym->token != TYPEIDEN && sclass == TYPEDEF) {
- goto redeclaration;
- }
- if (curctx != GLOBALCTX && tp->op != FTN) {
- /* is it the redeclaration of a local variable? */
- if ((sym->flags & SEXTERN) && sclass == EXTERN)
- return sym;
- goto redeclaration;
- }
-
- flags = sym->flags;
- switch (sclass) {
- case REGISTER:
- case AUTO:
- bad_storage(tp, name);
- break;
- case NOSCLASS:
- if ((flags & SPRIVATE) == 0) {
- if (flags & SEXTERN)
- flags &= ~(SEXTERN|SEMITTED);
- flags |= SGLOBAL;
- break;
- }
- errorp("non-static declaration of '%s' follows static declaration",
- name);
- break;
- case TYPEDEF:
- /* Only C11 allows multiple definitions of a typedef. */
- goto redeclaration;
- case EXTERN:
- break;
- case STATIC:
- if ((flags & (SGLOBAL|SEXTERN)) == 0) {
- flags |= SPRIVATE;
- break;
- }
- errorp("static declaration of '%s' follows non-static declaration",
- name);
- break;
- }
- sym->flags = flags;
-
- return sym;
-
-redeclaration:
- errorp("redeclaration of '%s'", name);
- return sym;
-}
-
-static Symbol *
-identifier(struct decl *dcl)
-{
- Symbol *sym = dcl->sym;
- Type *tp = dcl->type;
- int sclass = dcl->sclass;
- char *name = sym->name;
-
- if (empty(sym, tp, 0))
- return sym;
-
- /* TODO: Add warning about ANSI limits */
- if (!(tp->prop & TDEFINED) &&
- sclass != EXTERN && sclass != TYPEDEF &&
- !(tp->op == ARY && yytoken == '=')) {
- errorp("declared variable '%s' of incomplete type", name);
- }
-
- if (tp->op == FTN) {
- if (sclass == NOSCLASS)
- sclass = EXTERN;
- if (!strcmp(name, "main") && tp->type != inttype) {
- errorp("main shall be defined with a return type of int");
- errorp("please contact __20h__ on irc.freenode.net (#bitreich-en) via IRC");
- }
- }
-
- if (sym->flags & SDECLARED) {
- sym = redcl(dcl->sym, tp, sclass);
- } else {
- int flags = sym->flags | SDECLARED;
-
- sym->type = tp;
-
- switch (sclass) {
- case REGISTER:
- case AUTO:
- if (curctx != GLOBALCTX && tp->op != FTN) {
- flags |= (sclass == REGISTER) ? SREGISTER : SAUTO;
- break;
- }
- bad_storage(tp, name);
- case NOSCLASS:
- if (tp->op == FTN)
- flags |= SEXTERN;
- else
- flags |= (curctx == GLOBALCTX) ? SGLOBAL : SAUTO;
- break;
- case EXTERN:
- flags |= SEXTERN;
- break;
- case STATIC:
- flags |= (curctx == GLOBALCTX) ? SPRIVATE : SLOCAL;
- break;
- case TYPEDEF:
- flags |= STYPEDEF;
- sym->u.token = sym->token = TYPEIDEN;
- break;
- }
- sym->flags = flags;
- }
-
- if (accept('='))
- initializer(sym, sym->type);
- if (!(sym->flags & (SGLOBAL|SEXTERN)) && tp->op != FTN)
- sym->flags |= SDEFINED;
- if (sym->token == IDEN && tp->op != FTN)
- emit(ODECL, sym);
- return sym;
-}
-
-static Symbol *
-parameter(struct decl *dcl)
-{
- Symbol *sym = dcl->sym;
- Type *funtp = dcl->parent, *tp = dcl->type;
- char *name = sym->name;
- int flags;
-
- flags = 0;
- switch (dcl->sclass) {
- case STATIC:
- case EXTERN:
- case AUTO:
- errorp("bad storage class in function parameter");
- break;
- case REGISTER:
- flags |= SREGISTER;
- break;
- case NOSCLASS:
- flags |= SAUTO;
- break;
- }
-
- switch (tp->op) {
- case VOID:
- funtp->n.elem = 1;
- if (dcl->sclass)
- errorp("void as unique parameter may not be qualified");
- return NULL;
- case ARY:
- tp = mktype(tp->type, PTR, 0, NULL);
- break;
- case FTN:
- errorp("incorrect function type for a function parameter");
- return NULL;
- }
- if (!empty(sym, tp, 1)) {
- int isdcl = sym->flags&SDECLARED, isk_r = funtp->prop & TK_R;
- if (isdcl && !isk_r) {
- errorp("redefinition of parameter '%s'", name);
- return NULL;
- }
- if (!isdcl && isk_r) {
- errorp("declaration for parameter '%s' but no such parameter",
- sym->name);
- return NULL;
- }
- sym->flags |= SDECLARED;
- }
-
- sym->type = tp;
- sym->flags &= ~(SAUTO|SREGISTER);
- sym->flags |= flags;
- return sym;
-}
-
-static Symbol *dodcl(int rep,
- Symbol *(*fun)(struct decl *),
- unsigned ns,
- Type *type);
-
-static int
-krpars(struct declarators *dp)
-{
- Symbol *sym;
- int toomany = 0;
- unsigned npars = 0;
-
- do {
- sym = yylval.sym;
- expect(IDEN);
- sym->flags |= SAUTO;
- if ((sym = install(NS_IDEN, sym)) == NULL) {
- errorp("redefinition of parameter '%s'",
- yylval.sym->name);
- continue;
- }
- if (npars < NR_FUNPARAM) {
- ++npars;
- *dp->pars++ = sym;
- continue;
- }
- if (!toomany)
- toomany = 1;
- } while (accept(','));
-
- return toomany;
-}
-
-static unsigned
-krfun(struct declarators *dp)
-{
- int toomany = 0;
-
-
- if (yytoken != ')')
- toomany = krpars(dp);
-
- if (dp->nr_types == NR_DCL_TYP) {
- toomany = 1;
- } else {
- ++dp->nr_types;
- *dp->tpars++ = ellipsistype;
- }
-
- if (toomany)
- errorp("too many parameters in function definition");
- return 1;
-}
-
-static unsigned
-ansifun(struct declarators *dp)
-{
- Symbol *sym;
- unsigned npars, ntype, toomany, distoomany, voidpar;
- Type type, *tp;
-
- type.n.elem = 0;
- type.prop = 0;
- npars = ntype = toomany = distoomany = voidpar = 0;
-
- do {
- if (accept(ELLIPSIS)) {
- if (ntype < 1)
- errorp("a named argument is requiered before '...'");
- if (yytoken != ')')
- errorp("... must be the last parameter");
- sym = NULL;
- tp = ellipsistype;
- } else if ((sym = dodcl(NOREP, parameter, NS_IDEN, &type)) == NULL) {
- if (type.n.elem == 1 && ntype > 1)
- voidpar = 1;
- sym = NULL;
- tp = NULL;
- } else {
- tp = sym->type;
- }
-
- if (sym) {
- if (npars == NR_FUNPARAM) {
- toomany = 1;
- } else {
- npars++;
- *dp->pars++ = sym;
- }
- }
-
- if (tp) {
- if (dp->nr_types == NR_DCL_TYP) {
- toomany = 1;
- } else {
- ntype++;
- dp->nr_types++;
- *dp->tpars++ = tp;
- }
- }
-
- } while (accept(','));
-
- if (toomany == 1)
- errorp("too many parameters in function definition");
- if (voidpar && ntype > 1)
- errorp("'void' must be the only parameter");
- return ntype;
-}
-
-static int
-funbody(Symbol *sym, Symbol *pars[])
-{
- Type *tp;
- Symbol **bp, *p;
-
- if (!sym)
- return 0;
- tp = sym->type;
- if (tp->op != FTN)
- return 0;
-
- switch (yytoken) {
- case '{':
- case TYPE:
- case TYPEIDEN:
- if (curctx != PARAMCTX)
- errorp("nested function declaration");
- if (sym && sym->ns == NS_IDEN)
- break;
- default:
- emit(ODECL, sym);
- endfundcl(tp, pars);
- return 0;
- }
-
- tp->prop |= TFUNDEF;
- curfun = sym;
- if (sym->type->prop & TK_R) {
- while (yytoken != '{') {
- dodcl(REP, parameter, NS_IDEN, sym->type);
- expect(';');
- }
- for (bp = pars; p = *bp; ++bp) {
- if (p->type == NULL) {
- warn("type of '%s' defaults to int", p->name);
- p->type = inttype;
- }
- }
- }
- if (sym->flags & STYPEDEF)
- errorp("function definition declared 'typedef'");
- if (sym->flags & SDEFINED)
- errorp("redefinition of '%s'", sym->name);
- if (sym->flags & SEXTERN) {
- sym->flags &= ~SEXTERN;
- sym->flags |= SGLOBAL;
- }
- sym->flags |= SDEFINED;
- sym->flags &= ~SEMITTED;
- sym->u.pars = pars;
- emit(OFUN, sym);
- compound(NULL, NULL, NULL);
- emit(OEFUN, NULL);
- popctx();
- flushtypes();
- curfun = NULL;
- return 1;
-}
-
-static void
-fundcl(struct declarators *dp)
-{
- Type **types = dp->tpars;
- unsigned ntypes, typefun;
- Symbol **pars = dp->pars;
- unsigned (*fun)(struct declarators *);
-
- pushctx();
- expect('(');
- if (yytoken == ')' || yytoken == IDEN) {
- typefun = KRFTN;
- fun = krfun;
- } else {
- typefun = FTN;
- fun = ansifun;
- }
- ntypes = (*fun)(dp);
- *dp->pars++= NULL;
- expect(')');
-
- push(dp, typefun, ntypes, types, pars);
-}
-
-static void declarator(struct declarators *dp);
-
-static void
-directdcl(struct declarators *dp)
-{
- Symbol *p, *sym;
- static int nested;
-
- if (accept('(')) {
- if (nested == NR_SUBTYPE)
- error("too many declarators nested by parentheses");
- ++nested;
- declarator(dp);
- --nested;
- expect(')');
- } else {
- if (yytoken == IDEN || yytoken == TYPEIDEN) {
- sym = yylval.sym;
- if (p = install(dp->ns, sym)) {
- sym = p;
- sym->flags &= ~SDECLARED;
- }
- next();
- } else {
- sym = newsym(dp->ns, NULL);
- }
- push(dp, IDEN, sym);
- }
-
- for (;;) {
- switch (yytoken) {
- case '(': fundcl(dp); break;
- case '[': arydcl(dp); break;
- default: return;
- }
- }
-}
-
-static void
-declarator(struct declarators *dp)
-{
- unsigned n;
-
- for (n = 0; accept('*'); ++n) {
- while (accept(TQUALIFIER))
- ;
- }
-
- directdcl(dp);
-
- while (n--)
- push(dp, PTR);
-}
-
-static Type *structdcl(void), *enumdcl(void);
-
-static Type *
-specifier(int *sclass, int *qualifier)
-{
- Type *tp = NULL;
- unsigned spec, qlf, sign, type, cls, size;
-
- spec = qlf = sign = type = cls = size = 0;
-
- for (;;) {
- unsigned *p = NULL;
- Type *(*dcl)(void) = NULL;
-
- switch (yytoken) {
- case SCLASS:
- p = &cls;
- break;
- case TQUALIFIER:
- qlf |= yylval.token;
- next();
- continue;
- case TYPEIDEN:
- if (type)
- goto return_type;
- tp = yylval.sym->type;
- p = &type;
- break;
- case TYPE:
- switch (yylval.token) {
- case ENUM:
- dcl = enumdcl;
- p = &type;
- break;
- case STRUCT:
- case UNION:
- dcl = structdcl;
- p = &type;
- break;
- case VA_LIST:
- case VOID:
- case BOOL:
- case CHAR:
- case INT:
- case FLOAT:
- case DOUBLE:
- p = &type;
- break;
- case SIGNED:
- case UNSIGNED:
- p = &sign;
- break;
- case LONG:
- if (size == LONG) {
- yylval.token = LLONG;
- size = 0;
- }
- case SHORT:
- p = &size;
- break;
- }
- break;
- default:
- goto return_type;
- }
- if (*p)
- errorp("invalid type specification");
- *p = yylval.token;
- if (dcl) {
- if (size || sign)
- errorp("invalid type specification");
- tp = (*dcl)();
- goto return_type;
- } else {
- next();
- }
- spec = 1;
- }
-
-return_type:
- *sclass = cls;
- *qualifier = qlf;
- if (!tp) {
- if (spec) {
- tp = ctype(type, sign, size);
- } else {
- if (curctx != GLOBALCTX)
- unexpected();
- warn("type defaults to 'int' in declaration");
- tp = inttype;
- }
- }
- return tp;
-}
-
-static Symbol *
-newtag(void)
-{
- Symbol *sym;
- int ns, op, tag = yylval.token;
- static unsigned tpns = NS_STRUCTS;
-
- ns = namespace;
- namespace = NS_TAG;
- next();
- namespace = ns;
-
- switch (yytoken) {
- case IDEN:
- case TYPEIDEN:
- sym = yylval.sym;
- if ((sym->flags & SDECLARED) == 0)
- install(NS_TAG, yylval.sym);
- next();
- break;
- default:
- sym = newsym(NS_TAG, NULL);
- break;
- }
- if (!sym->type) {
- Type *tp;
-
- if (tpns == NS_STRUCTS + NR_MAXSTRUCTS)
- error("too many tags declared");
- tp = mktype(NULL, tag, 0, NULL);
- tp->ns = tpns++;
- sym->type = tp;
- tp->tag = sym;
- DBG("declared tag '%s' with ns = %d\n",
- (sym->name) ? sym->name : "anonymous", tp->ns);
- }
-
- if ((op = sym->type->op) != tag && op != INT)
- error("'%s' defined as wrong kind of tag", sym->name);
- return sym;
-}
-
-static void fieldlist(Type *tp);
-
-static Type *
-structdcl(void)
-{
- Symbol *sym;
- Type *tp;
- static int nested;
- int ns;
-
- sym = newtag();
- tp = sym->type;
-
- if (!accept('{'))
- return tp;
-
- ns = namespace;
- namespace = tp->ns;
-
- if (tp->prop & TDEFINED && sym->ctx == curctx)
- error("redefinition of struct/union '%s'", sym->name);
-
- if (nested == NR_STRUCT_LEVEL)
- error("too many levels of nested structure or union definitions");
-
- ++nested;
- while (yytoken != '}') {
- fieldlist(tp);
- }
- --nested;
-
- deftype(tp);
- namespace = ns;
- expect('}');
- return tp;
-}
-
-static Type *
-enumdcl(void)
-{
- Type *tp;
- Symbol *sym, *tagsym;
- int ns, val, toomany;
- unsigned nctes;
-
- ns = namespace;
- tagsym = newtag();
- tp = tagsym->type;
-
- if (!accept('{'))
- goto restore_name;
- if (tp->prop & TDEFINED)
- errorp("redefinition of enumeration '%s'", tagsym->name);
- deftype(tp);
- namespace = NS_IDEN;
-
- /* TODO: check incorrect values in val */
- for (nctes = val = 0; yytoken != '}'; ++nctes, ++val) {
- if (yytoken != IDEN)
- unexpected();
- sym = yylval.sym;
- next();
- if (nctes == NR_ENUM_CTES && !toomany) {
- errorp("too many enum constants in a single enum");
- toomany = 1;
- }
- if (accept('=')) {
- Node *np = constexpr();
-
- if (np == NULL)
- errorp("invalid enumeration value");
- else
- val = np->sym->u.i;
- freetree(np);
- }
- if ((sym = install(NS_IDEN, sym)) == NULL) {
- errorp("'%s' redeclared as different kind of symbol",
- yytext);
- } else {
- sym->u.i = val;
- sym->flags |= SCONSTANT;
- sym->type = inttype;
- }
- if (!accept(','))
- break;
- }
- expect('}');
-
-restore_name:
- namespace = ns;
- return tp;
-}
-
-static Symbol *
-type(struct decl *dcl)
-{
- Symbol *sym = dcl->sym;
-
- if (dcl->sclass)
- error("class storage in type name");
- if (sym->name)
- error("unexpected identifier in type name");
- sym->type = dcl->type;
-
- return sym;
-}
-
-static Symbol *
-field(struct decl *dcl)
-{
- static char *anon = "<anonymous>";
- Symbol *sym = dcl->sym;
- char *name = (sym->name) ? sym->name : anon;
- Type *structp = dcl->parent, *tp = dcl->type;
- TINT n = structp->n.elem;
- int err = 0;
-
- if (accept(':')) {
- Node *np;
- TINT n;
-
- if ((np = constexpr()) == NULL) {
- unexpected();
- n = 0;
- } else {
- n = np->sym->u.i;
- freetree(np);
- }
- if (n == 0 && name != anon)
- errorp("zero width for bit-field '%s'", name);
- if (tp != booltype && tp != inttype && tp != uinttype)
- errorp("bit-field '%s' has invalid type", name);
- if (n < 0)
- errorp("negative width in bit-field '%s'", name);
- else if (n > tp->size*8)
- errorp("width of '%s' exceeds its type", name);
- } else if (empty(sym, tp, 0)) {
- return sym;
- }
-
- if (tp->op == FTN) {
- errorp("invalid type '%s' in struct/union", name);
- err = 1;
- }
- if (dcl->sclass) {
- errorp("storage class in struct/union field '%s'", name);
- err = 1;
- }
- if (!(tp->prop & TDEFINED)) {
- error("field '%s' has incomplete type", name);
- err = 1;
- }
- if (err)
- return sym;
-
- if (sym->flags & SDECLARED)
- error("duplicated member '%s'", name);
- sym->flags |= SFIELD|SDECLARED;
- sym->type = tp;
-
- if (n == NR_FIELDS)
- error("too many fields in struct/union");
- DBG("New field '%s' in namespace %d\n", name, structp->ns);
- structp->p.fields = xrealloc(structp->p.fields, ++n * sizeof(*sym));
- structp->p.fields[n-1] = sym;
- structp->n.elem = n;
-
- return sym;
-}
-
-static Symbol *
-dodcl(int rep, Symbol *(*fun)(struct decl *), unsigned ns, Type *parent)
-{
- Symbol *sym;
- Type *base;
- struct decl dcl;
- struct declarators stack;
-
- dcl.ns = ns;
- dcl.parent = parent;
- base = specifier(&dcl.sclass, &dcl.qualifier);
-
- do {
- dcl.type = base;
- stack.nr_types = stack.nr = 0;
- stack.tpars = dcl.buftpars;
- stack.pars = dcl.bufpars;
- stack.dcl = &dcl;
- stack.ns = ns;
-
- declarator(&stack);
-
- while (pop(&stack, &dcl))
- ;
- sym = (*fun)(&dcl);
- if (funbody(sym, dcl.pars))
- return sym;
- } while (rep && accept(','));
-
- return sym;
-}
-
-void
-decl(void)
-{
- Symbol *sym;
-
- if (accept(';'))
- return;
- sym = dodcl(REP, identifier, NS_IDEN, NULL);
- if (sym->type->prop & TFUNDEF)
- return;
- expect(';');
-}
-
-static void
-fieldlist(Type *tp)
-{
- if (yytoken != ';')
- dodcl(REP, field, tp->ns, tp);
- expect(';');
-}
-
-Type *
-typename(void)
-{
- return dodcl(NOREP, type, NS_DUMMY, NULL)->type;
-}
--- a/src/cc1/deps.mk
+++ /dev/null
@@ -1,44 +1,0 @@
-#deps
-builtin.o: $(INCDIR)/scc/scc/scc.h
-builtin.o: cc1.h
-code.o: $(INCDIR)/scc/scc/scc.h
-code.o: cc1.h
-cpp.o: $(INCDIR)/scc/scc/cstd.h
-cpp.o: $(INCDIR)/scc/scc/scc.h
-cpp.o: cc1.h
-decl.o: $(INCDIR)/scc/scc/cstd.h
-decl.o: $(INCDIR)/scc/scc/scc.h
-decl.o: cc1.h
-error.o: $(INCDIR)/scc/scc/scc.h
-error.o: cc1.h
-expr.o: $(INCDIR)/scc/scc/cstd.h
-expr.o: $(INCDIR)/scc/scc/scc.h
-expr.o: cc1.h
-fold.o: $(INCDIR)/scc/scc/scc.h
-fold.o: cc1.h
-init.o: $(INCDIR)/scc/scc/cstd.h
-init.o: $(INCDIR)/scc/scc/scc.h
-init.o: cc1.h
-lex.o: $(INCDIR)/scc/scc/cstd.h
-lex.o: $(INCDIR)/scc/scc/scc.h
-lex.o: cc1.h
-main.o: $(INCDIR)/scc/scc/arg.h
-main.o: $(INCDIR)/scc/scc/scc.h
-main.o: cc1.h
-stmt.o: $(INCDIR)/scc/scc/cstd.h
-stmt.o: $(INCDIR)/scc/scc/scc.h
-stmt.o: cc1.h
-symbol.o: $(INCDIR)/scc/scc/cstd.h
-symbol.o: $(INCDIR)/scc/scc/scc.h
-symbol.o: cc1.h
-target/amd64-sysv/arch.o: $(INCDIR)/scc/scc/scc.h
-target/amd64-sysv/arch.o: target/amd64-sysv/../../cc1.h
-target/arm64-sysv/arch.o: $(INCDIR)/scc/scc/scc.h
-target/arm64-sysv/arch.o: target/arm64-sysv/../../cc1.h
-target/i386-sysv/arch.o: $(INCDIR)/scc/scc/scc.h
-target/i386-sysv/arch.o: target/i386-sysv/../../cc1.h
-target/z80-scc/arch.o: $(INCDIR)/scc/scc/scc.h
-target/z80-scc/arch.o: target/z80-scc/../../cc1.h
-types.o: $(INCDIR)/scc/scc/cstd.h
-types.o: $(INCDIR)/scc/scc/scc.h
-types.o: cc1.h
--- a/src/cc1/error.c
+++ /dev/null
@@ -1,85 +1,0 @@
-static char sccsid[] = "@(#) ./cc1/error.c";
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <scc/scc.h>
-#include "cc1.h"
-
-#define MAXERRNUM 10
-
-extern int failure;
-static unsigned nerrors;
-
-static void
-warn_error(int flag, char *fmt, va_list va)
-{
- if (flag == 0)
- return;
- fprintf(stderr, "%s:%u: %s: ",
- filenam, lineno,
- (flag < 0) ? "error" : "warning");
- vfprintf(stderr, fmt, va);
- putc('\n', stderr);
-
- if (flag < 0) {
- if (!failure)
- fclose(stdout);
- failure = 1;
- if (++nerrors == MAXERRNUM) {
- fputs("too many errors\n", stderr);
- exit(1);
- }
- }
-}
-
-void
-warn(char *fmt, ...)
-{
- extern int warnings;
-
- va_list va;
- va_start(va, fmt);
- warn_error(warnings, fmt, va);
- va_end(va);
-}
-
-void
-error(char *fmt, ...)
-{
- va_list va;
-
- va_start(va, fmt);
- warn_error(-1, fmt, va);
- va_end(va);
- exit(1);
- discard();
-}
-
-void
-errorp(char *fmt, ...)
-{
- va_list va;
- va_start(va, fmt);
- warn_error(-1, fmt, va);
- va_end(va);
-}
-
-void
-cpperror(char *fmt, ...)
-{
- va_list va;
- va_start(va, fmt);
- warn_error(-1, fmt, va);
- va_end(va);
-
- /* discard input until the end of the line */
- *input->p = '\0';
- next();
-}
-
-void
-unexpected(void)
-{
- error("unexpected '%s'", yytext);
-}
--- a/src/cc1/expr.c
+++ /dev/null
@@ -1,1185 +1,0 @@
-static char sccsid[] = "@(#) ./cc1/expr.c";
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <scc/cstd.h>
-#include <scc/scc.h>
-#include "cc1.h"
-
-#define XCHG(lp, rp, np) (np = lp, lp = rp, rp = np)
-
-static Node *xexpr(void), *xassign(void);
-
-int
-cmpnode(Node *np, TUINT val)
-{
- Symbol *sym;
- Type *tp;
- TUINT mask, nodeval;
-
- if (!np || !(np->flags & NCONST) || !np->sym)
- return 0;
- sym = np->sym;
- tp = sym->type;
-
- switch (tp->op) {
- case PTR:
- case INT:
- mask = (val > 1) ? ones(np->type->size) : -1;
- nodeval = (tp->prop & TSIGNED) ? sym->u.i : sym->u.u;
- return (nodeval & mask) == (val & mask);
- case FLOAT:
- return sym->u.f == val;
- }
- return 0;
-}
-
-static Node *
-promote(Node *np)
-{
- Type *tp;
- Node *new;
- struct limits *lim, *ilim;
-
- tp = np->type;
-
- switch (tp->op) {
- case ENUM:
- case INT:
- if (tp->n.rank >= inttype->n.rank)
- return np;
- lim = getlimits(tp);
- ilim = getlimits(inttype);
- tp = (lim->max.i <= ilim->max.i) ? inttype : uinttype;
- break;
- case FLOAT:
- /* TODO: Add support for C99 float math */
- tp = doubletype;
- break;
- default:
- abort();
- }
- if ((new = convert(np, tp, 1)) != NULL)
- return new;
- return np;
-}
-
-static void
-arithconv(Node **p1, Node **p2)
-{
- int to = 0, s1, s2;
- unsigned r1, r2;
- Type *tp1, *tp2;
- Node *np1, *np2;
- struct limits *lp1, *lp2;
-
- np1 = promote(*p1);
- np2 = promote(*p2);
-
- tp1 = np1->type;
- tp2 = np2->type;
-
- if (tp1 == tp2)
- goto set_p1_p2;
-
- s1 = (tp1->prop & TSIGNED) != 0;
- r1 = tp1->n.rank;
- lp1 = getlimits(tp1);
-
- s2 = (tp2->prop & TSIGNED) != 0;
- r2 = tp2->n.rank;
- lp2 = getlimits(tp2);
-
- if (s1 == s2 || tp1->op == FLOAT || tp2->op == FLOAT) {
- to = r1 - r2;
- } else if (!s1) {
- if (r1 >= r2 || lp1->max.i >= lp2->max.i)
- to = 1;
- else
- to = -1;
- } else {
- if (r2 >= r1 || lp2->max.i >= lp1->max.i)
- to = -1;
- else
- to = 1;
- }
-
- if (to > 0)
- np2 = convert(np2, tp1, 1);
- else if (to < 0)
- np1 = convert(np1, tp2, 1);
-
-set_p1_p2:
- *p1 = np1;
- *p2 = np2;
-}
-
-static int
-null(Node *np)
-{
- if (np->type != pvoidtype || np->op != OCAST)
- return 0;
-
- np = np->left;
- if (np->type != inttype)
- return 0;
-
- return cmpnode(np, 0);
-}
-
-static Node *
-chkternary(Node *yes, Node *no)
-{
- /*
- * FIXME:
- * We are ignoring type qualifiers here,
- * but the standard has strong rules about this.
- * take a look to 6.5.15
- */
-
- if (!eqtype(yes->type, no->type, 1)) {
- if ((yes->type->prop & TARITH) && (no->type->prop & TARITH)) {
- arithconv(&yes, &no);
- } else if (yes->type->op != PTR && no->type->op != PTR) {
- goto wrong_type;
- } else {
- /* convert integer 0 to NULL */
- if ((yes->type->prop & TINTEGER) && cmpnode(yes, 0))
- yes = convert(yes, pvoidtype, 0);
- if ((no->type->prop & TINTEGER) && cmpnode(no, 0))
- no = convert(no, pvoidtype, 0);
- /*
- * At this point the type of both should be
- * a pointer to something, or we have don't
- * compatible types
- */
- if (yes->type->op != PTR || no->type->op != PTR)
- goto wrong_type;
- /*
- * If we have a null pointer constant then
- * convert to the another type
- */
- if (null(yes))
- yes = convert(yes, no->type, 0);
- if (null(no))
- no = convert(no, yes->type, 0);
-
- if (!eqtype(yes->type, no->type, 1))
- goto wrong_type;
- }
- }
- return node(OCOLON, yes->type, yes, no);
-
-wrong_type:
- errorp("type mismatch in conditional expression");
- freetree(yes);
- freetree(no);
- return constnode(zero);
-}
-
-static void
-chklvalue(Node *np)
-{
- if (!(np->flags & NLVAL))
- errorp("lvalue required in operation");
- if (np->type == voidtype)
- errorp("invalid use of void expression");
-}
-
-Node *
-decay(Node *np)
-{
- Node *new;
- Type *tp = np->type;
-
- switch (tp->op) {
- case ARY:
- tp = tp->type;
- if (np->op == OPTR) {
- new = np->left;
- free(np);
- new->type = mktype(tp, PTR, 0, NULL);
- return new;
- }
- case FTN:
- new = node(OADDR, mktype(tp, PTR, 0, NULL), np, NULL);
- if (np->sym && np->sym->flags & (SGLOBAL|SLOCAL|SPRIVATE))
- new->flags |= NCONST;
- return new;
- default:
- return np;
- }
-}
-
-static Node *
-integerop(int op, Node *lp, Node *rp)
-{
- if (!(lp->type->prop & TINTEGER) || !(rp->type->prop & TINTEGER))
- error("operator requires integer operands");
- arithconv(&lp, &rp);
- return node(op, lp->type, lp, rp);
-}
-
-static Node *
-integeruop(int op, Node *np)
-{
- if (!(np->type->prop & TINTEGER))
- error("unary operator requires integer operand");
- np = promote(np);
- return node(op, np->type, np, NULL);
-}
-
-static Node *
-numericaluop(int op, Node *np)
-{
- if (!(np->type->prop & TARITH))
- error("unary operator requires numerical operand");
- np = promote(np);
- return node(op, np->type, np, NULL);
-}
-
-Node *
-convert(Node *np, Type *newtp, int iscast)
-{
- Type *oldtp = np->type;
-
- if (eqtype(newtp, oldtp, 0))
- return np;
-
- switch (oldtp->op) {
- case ENUM:
- case INT:
- case FLOAT:
- switch (newtp->op) {
- case PTR:
- if (oldtp->op == FLOAT || !cmpnode(np, 0) && !iscast)
- return NULL;
- case INT:
- case FLOAT:
- case ENUM:
- break;
- default:
- return NULL;
- }
- break;
- case PTR:
- switch (newtp->op) {
- case ENUM:
- case INT:
- case VOID:
- if (!iscast)
- return NULL;
- break;
- case PTR:
- if (eqtype(newtp, oldtp, 1) ||
- iscast ||
- newtp == pvoidtype || oldtp == pvoidtype) {
- np->type = newtp;
- return np;
- }
- default:
- return NULL;
- }
- break;
- default:
- return NULL;
- }
- return node(OCAST, newtp, np, NULL);
-}
-
-static Node *
-parithmetic(int op, Node *lp, Node *rp)
-{
- Type *tp;
- Node *size, *np;
-
- if (lp->type->op != PTR)
- XCHG(lp, rp, np);
-
- tp = rp->type;
- if (tp->op == PTR && !(tp->type->prop & TDEFINED))
- goto incomplete;
- tp = lp->type;
- if (!(tp->type->prop & TDEFINED))
- goto incomplete;
- size = sizeofnode(tp->type);
-
- if (op == OSUB && BTYPE(rp) == PTR) {
- if ((rp = convert(rp, lp->type, 0)) == NULL)
- goto incorrect;
- lp = node(OSUB, pdifftype, lp, rp);
- return node(ODIV, inttype, lp, size);
- }
- if (!(rp->type->prop & TINTEGER))
- goto incorrect;
-
- rp = convert(promote(rp), sizettype, 0);
- rp = node(OMUL, sizettype, rp, size);
- rp = convert(rp, tp, 1);
-
- return node(op, tp, lp, rp);
-
-incomplete:
- errorp("invalid use of undefined type");
- return lp;
-incorrect:
- errorp("incorrect arithmetic operands");
- return lp;
-
-}
-
-static Node *
-arithmetic(int op, Node *lp, Node *rp)
-{
- Type *ltp = lp->type, *rtp = rp->type;
-
- if ((ltp->prop & TARITH) && (rtp->prop & TARITH)) {
- arithconv(&lp, &rp);
- return node(op, lp->type, lp, rp);
- } else if ((ltp->op == PTR || rtp->op == PTR)) {
- switch (op) {
- case OADD:
- case OSUB:
- case OA_ADD:
- case OA_SUB:
- case OINC:
- case ODEC:
- return parithmetic(op, lp, rp);
- }
- }
- errorp("incorrect arithmetic operands");
-}
-
-static Node *
-pcompare(int op, Node *lp, Node *rp)
-{
- Node *np;
-
- if (lp->type->prop & TINTEGER)
- XCHG(lp, rp, np);
- else if (eqtype(lp->type, pvoidtype, 1))
- XCHG(lp, rp, np);
-
- if ((np = convert(rp, lp->type, 0)) != NULL)
- rp = np;
- else
- errorp("incompatible types in comparison");
- return convert(node(op, pvoidtype, lp, rp), inttype, 1);
-}
-
-static Node *
-compare(int op, Node *lp, Node *rp)
-{
- Type *ltp, *rtp;
-
- ltp = lp->type;
- rtp = rp->type;
-
- if (ltp->op == PTR || rtp->op == PTR) {
- return pcompare(op, rp, lp);
- } else if ((ltp->prop & TARITH) && (rtp->prop & TARITH)) {
- arithconv(&lp, &rp);
- return convert(node(op, lp->type, lp, rp), inttype, 1);;
- } else {
- errorp("incompatible types in comparison");
- freetree(lp);
- freetree(rp);
- return constnode(zero);
- }
-}
-
-int
-negop(int op)
-{
- switch (op) {
- case OEQ: return ONE;
- case ONE: return OEQ;
- case OLT: return OGE;
- case OGE: return OLT;
- case OLE: return OGT;
- case OGT: return OLE;
- default: abort();
- }
- return op;
-}
-
-static Node *
-exp2cond(Node *np, int neg)
-{
- if (np->type->prop & TAGGREG) {
- errorp("used struct/union type value where scalar is required");
- return constnode(zero);
- }
- switch (np->op) {
- case ONEG:
- case OOR:
- case OAND:
- return (neg) ? node(ONEG, inttype, np, NULL) : np;
- case OEQ:
- case ONE:
- case OLT:
- case OGE:
- case OLE:
- case OGT:
- if (neg)
- np->op = negop(np->op);
- return np;
- default:
- return compare((neg) ? OEQ : ONE, np, constnode(zero));
- }
-}
-
-static Node *
-logic(int op, Node *lp, Node *rp)
-{
- lp = exp2cond(lp, 0);
- rp = exp2cond(rp, 0);
- return node(op, inttype, lp, rp);
-}
-
-static Node *
-field(Node *np)
-{
- Symbol *sym;
-
- namespace = np->type->ns;
- next();
- namespace = NS_IDEN;
-
- sym = yylval.sym;
- if (yytoken != IDEN)
- unexpected();
- next();
-
- if (!(np->type->prop & TAGGREG)) {
- errorp("request for member '%s' in something not a structure or union",
- yylval.sym->name);
- goto free_np;
- }
- if ((sym->flags & SDECLARED) == 0) {
- errorp("incorrect field in struct/union");
- goto free_np;
- }
- np = node(OFIELD, sym->type, np, varnode(sym));
- np->flags |= NLVAL;
- return np;
-
-free_np:
- freetree(np);
- return constnode(zero);
-}
-
-static Node *
-content(int op, Node *np)
-{
- if (BTYPE(np) != PTR) {
- errorp("invalid argument of memory indirection");
- } else {
- if (np->op == OADDR) {
- Node *new = np->left;
- new->type = np->type->type;
- free(np);
- np = new;
- } else {
- np = node(op, np->type->type, np, NULL);
- }
- np->flags |= NLVAL;
- }
- return np;
-}
-
-static Node *
-array(Node *lp, Node *rp)
-{
- Type *tp;
- Node *np;
-
- if (!(lp->type->prop & TINTEGER) && !(rp->type->prop & TINTEGER))
- error("array subscript is not an integer");
- np = arithmetic(OADD, lp, rp);
- tp = np->type;
- if (tp->op != PTR)
- errorp("subscripted value is neither array nor pointer");
- return content(OPTR, np);
-}
-
-static Node *
-assignop(int op, Node *lp, Node *rp)
-{
- if ((rp = convert(rp, lp->type, 0)) == NULL) {
- errorp("incompatible types when assigning");
- return lp;
- }
-
- return node(op, lp->type, lp, rp);
-}
-
-static Node *
-incdec(Node *np, int op)
-{
- Type *tp = np->type;
- Node *inc;
-
- chklvalue(np);
- np->flags |= NEFFECT;
-
- if (!(tp->prop & TDEFINED)) {
- errorp("invalid use of undefined type");
- return np;
- } else if (tp->op == PTR && !(tp->type->prop & TDEFINED)) {
- errorp("%s of pointer to an incomplete type",
- (op == OINC || op == OA_ADD) ? "increment" : "decrement");
- return np;
- } else if (tp->op == PTR || (tp->prop & TARITH)) {
- inc = constnode(one);
- } else {
- errorp("wrong type argument to increment or decrement");
- return np;
- }
- return arithmetic(op, np, inc);
-}
-
-static Node *
-address(int op, Node *np)
-{
- Node *new;
-
- /*
- * ansi c accepts & applied to a function name, and it generates
- * a function pointer
- */
- if (np->op == OSYM) {
- if (np->type->op == FTN)
- return decay(np);
- if (np->type->op == ARY)
- goto dont_check_lvalue;
- }
- chklvalue(np);
-
-dont_check_lvalue:
- if (np->sym && (np->sym->flags & SREGISTER))
- errorp("address of register variable '%s' requested", yytext);
- new = node(op, mktype(np->type, PTR, 0, NULL), np, NULL);
- if (np->sym && np->sym->flags & (SGLOBAL|SLOCAL|SPRIVATE))
- new->flags |= NCONST;
- return new;
-}
-
-static Node *
-negation(int op, Node *np)
-{
- if (!(np->type->prop & TARITH) && np->type->op != PTR) {
- errorp("invalid argument of unary '!'");
- return constnode(zero);
- }
- return exp2cond(np, 1);
-}
-
-static Symbol *
-notdefined(Symbol *sym)
-{
- int isdef;
-
- if (namespace == NS_CPP && !strcmp(sym->name, "defined")) {
- disexpand = 1;
- next();
- expect('(');
- sym = yylval.sym;
- expect(IDEN);
- expect(')');
-
- isdef = (sym->flags & SDECLARED) != 0;
- sym = newsym(NS_IDEN, NULL);
- sym->type = inttype;
- sym->flags |= SCONSTANT;
- sym->u.i = isdef;
- disexpand = 0;
- return sym;
- }
- errorp("'%s' undeclared", yytext);
- sym->type = inttype;
- return install(sym->ns, yylval.sym);
-}
-
-static Symbol *
-adjstrings(Symbol *sym)
-{
- char *s, *t;
- size_t len, n;
- Type *tp;
-
- tp = sym->type;
- s = sym->u.s;
- for (len = strlen(s);; len += n) {
- next();
- if (yytoken != STRING)
- break;
- t = yylval.sym->u.s;
- n = strlen(t);
- s = xrealloc(s, len + n + 1);
- memcpy(s+len, t, n);
- s[len + n] = '\0';
- killsym(yylval.sym);
- }
- ++len;
- if (tp->n.elem != len) {
- sym->type = mktype(chartype, ARY, len, NULL);
- sym->u.s = s;
- }
- return sym;
-}
-
-/*************************************************************
- * grammar functions *
- *************************************************************/
-static Node *
-primary(void)
-{
- Node *np;
- Symbol *sym;
- Node *(*fun)(Symbol *);
-
- sym = yylval.sym;
- switch (yytoken) {
- case STRING:
- np = constnode(adjstrings(sym));
- sym->flags |= SHASINIT;
- emit(ODECL, sym);
- emit(OINIT, np);
- return varnode(sym);
- case BUILTIN:
- fun = sym->u.fun;
- next();
- expect('(');
- np = (*fun)(sym);
- expect(')');
-
- /* do not call to next */
- return np;
- case CONSTANT:
- np = constnode(sym);
- break;
- case IDEN:
- assert((sym->flags & SCONSTANT) == 0);
- if ((sym->flags & SDECLARED) == 0) {
- if (namespace == NS_CPP) {
- np = constnode(zero);
- break;
- }
- sym = notdefined(sym);
- }
- sym->flags |= SUSED;
- np = varnode(sym);
- break;
- default:
- unexpected();
- }
- next();
-
- return np;
-}
-
-static Node *
-arguments(Node *np)
-{
- int toomany, n, op;
- Node *par = NULL, *arg;
- Type *argtype, **targs, *tp = np->type, *rettype;
-
- if (tp->op == PTR && tp->type->op == FTN) {
- np = content(OPTR, np);
- tp = np->type;
- }
- if (tp->op != FTN) {
- targs = (Type *[]) {ellipsistype};
- n = 1;
- rettype = inttype;
- errorp("function or function pointer expected");
- } else {
- targs = tp->p.pars;
- n = tp->n.elem;
- rettype = tp->type;
- }
-
- expect('(');
- if (yytoken == ')')
- goto no_pars;
- toomany = 0;
-
- do {
- arg = xassign();
- argtype = *targs;
- if (argtype == ellipsistype) {
- n = 0;
- switch (arg->type->op) {
- case INT:
- arg = promote(arg);
- break;
- case FLOAT:
- if (arg->type == floattype)
- arg = convert(arg, doubletype, 1);
- break;
- }
- par = node(OPAR, arg->type, par, arg);
- continue;
- }
- if (--n < 0) {
- if (!toomany)
- errorp("too many arguments in function call");
- toomany = 1;
- continue;
- }
- ++targs;
- if ((arg = convert(arg, argtype, 0)) != NULL) {
- par = node(OPAR, arg->type, par, arg);
- continue;
- }
- errorp("incompatible type for argument %d in function call",
- tp->n.elem - n + 1);
- } while (accept(','));
-
-no_pars:
- expect(')');
- if (n > 0 && *targs != ellipsistype)
- errorp("too few arguments in function call");
-
- op = (tp->prop&TELLIPSIS) ? OCALLE : OCALL;
- return node(op, rettype, np, par);
-}
-
-static Node *unary(int);
-
-static Type *
-typeof(Node *np)
-{
- Type *tp;
-
- if (np == NULL)
- unexpected();
- tp = np->type;
- freetree(np);
- return tp;
-}
-
-static Type *
-sizeexp(void)
-{
- Type *tp;
-
- expect('(');
- switch (yytoken) {
- case TYPE:
- case TYPEIDEN:
- tp = typename();
- break;
- default:
- tp = typeof(unary(0));
- break;
- }
- expect(')');
- return tp;
-}
-
-static Node *
-postfix(Node *lp)
-{
- Node *rp;
-
- for (;;) {
- switch (yytoken) {
- case '[':
- case DEC:
- case INC:
- case INDIR:
- case '.':
- case '(':
- lp = decay(lp);
- switch (yytoken) {
- case '[':
- next();
- rp = xexpr();
- expect(']');
- lp = array(lp, rp);
- break;
- case DEC:
- case INC:
- lp = incdec(lp, (yytoken == INC) ? OINC : ODEC);
- next();
- break;
- case INDIR:
- lp = content(OPTR, lp);
- case '.':
- lp = field(lp);
- break;
- case '(':
- lp = arguments(lp);
- lp->flags |= NEFFECT;
- break;
- }
- break;
- default:
- return lp;
- }
- }
-}
-
-static Node *
-defined(void)
-{
- Symbol *sym;
- int paren;
-
- disexpand = 1;
- next();
- paren = accept('(');
- if (yytoken != IDEN && yytoken != TYPEIDEN)
- cpperror("operator 'defined' requires an identifier");
- if (yytoken == TYPEIDEN || !(yylval.sym->flags & SDECLARED))
- sym = zero;
- else
- sym = one;
- disexpand = 0;
- next();
- if (paren)
- expect(')');
- return constnode(sym);
-}
-
-static Node *cast(int);
-
-static Node *
-unary(int needdecay)
-{
- Node *(*fun)(int, Node *), *np;
- int op;
- Type *tp;
-
- switch (yytoken) {
- case '!': op = 0; fun = negation; break;
- case '+': op = OADD; fun = numericaluop; break;
- case '-': op = OSNEG; fun = numericaluop; break;
- case '~': op = OCPL; fun = integeruop; break;
- case '&': op = OADDR; fun = address; break;
- case '*': op = OPTR; fun = content; break;
- case SIZEOF:
- next();
- tp = (yytoken == '(') ? sizeexp() : typeof(unary(0));
- if (!(tp->prop & TDEFINED))
- errorp("sizeof applied to an incomplete type");
- return sizeofnode(tp);
- case INC:
- case DEC:
- op = (yytoken == INC) ? OA_ADD : OA_SUB;
- next();
- np = incdec(unary(1), op);
- goto chk_decay;
- case IDEN:
- case TYPEIDEN:
- if (lexmode == CPPMODE && !strcmp(yylval.sym->name, "defined"))
- return defined();
- default:
- np = postfix(primary());
- goto chk_decay;
- }
-
- next();
- np = (*fun)(op, cast(op != OADDR));
-
-chk_decay:
- if (needdecay)
- np = decay(np);
- return np;
-}
-
-static Node *
-cast(int needdecay)
-{
- Node *lp, *rp;
- Type *tp;
- static int nested;
-
- if (!accept('('))
- return unary(needdecay);
-
- switch (yytoken) {
- case TQUALIFIER:
- case TYPE:
- case TYPEIDEN:
- tp = typename();
- expect(')');
-
- if (yytoken == '{')
- return initlist(tp);
-
- switch (tp->op) {
- case ARY:
- error("cast specifies an array type");
- default:
- lp = cast(needdecay);
- if ((rp = convert(lp, tp, 1)) == NULL)
- error("bad type conversion requested");
- rp->flags &= ~NLVAL;
- rp->flags |= lp->flags & NLVAL;
- }
- break;
- default:
- if (nested == NR_SUBEXPR)
- error("too many expressions nested by parentheses");
- ++nested;
- rp = xexpr();
- --nested;
- expect(')');
- rp = postfix(rp);
- break;
- }
-
- return rp;
-}
-
-static Node *
-mul(void)
-{
- Node *np, *(*fun)(int, Node *, Node *);
- int op;
-
- np = cast(1);
- for (;;) {
- switch (yytoken) {
- case '*': op = OMUL; fun = arithmetic; break;
- case '/': op = ODIV; fun = arithmetic; break;
- case '%': op = OMOD; fun = integerop; break;
- default: return np;
- }
- next();
- np = (*fun)(op, np, cast(1));
- }
-}
-
-static Node *
-add(void)
-{
- int op;
- Node *np;
-
- np = mul();
- for (;;) {
- switch (yytoken) {
- case '+': op = OADD; break;
- case '-': op = OSUB; break;
- default: return np;
- }
- next();
- np = arithmetic(op, np, mul());
- }
-}
-
-static Node *
-shift(void)
-{
- int op;
- Node *np;
-
- np = add();
- for (;;) {
- switch (yytoken) {
- case SHL: op = OSHL; break;
- case SHR: op = OSHR; break;
- default: return np;
- }
- next();
- np = integerop(op, np, add());
- }
-}
-
-static Node *
-relational(void)
-{
- int op;
- Node *np;
-
- np = shift();
- for (;;) {
- switch (yytoken) {
- case '<': op = OLT; break;
- case '>': op = OGT; break;
- case GE: op = OGE; break;
- case LE: op = OLE; break;
- default: return np;
- }
- next();
- np = compare(op, np, shift());
- }
-}
-
-static Node *
-eq(void)
-{
- int op;
- Node *np;
-
- np = relational();
- for (;;) {
- switch (yytoken) {
- case EQ: op = OEQ; break;
- case NE: op = ONE; break;
- default: return np;
- }
- next();
- np = compare(op, np, relational());
- }
-}
-
-static Node *
-bit_and(void)
-{
- Node *np;
-
- np = eq();
- while (accept('&'))
- np = integerop(OBAND, np, eq());
- return np;
-}
-
-static Node *
-bit_xor(void)
-{
- Node *np;
-
- np = bit_and();
- while (accept('^'))
- np = integerop(OBXOR, np, bit_and());
- return np;
-}
-
-static Node *
-bit_or(void)
-{
- Node *np;
-
- np = bit_xor();
- while (accept('|'))
- np = integerop(OBOR, np, bit_xor());
- return np;
-}
-
-static Node *
-and(void)
-{
- Node *np;
-
- np = bit_or();
- while (accept(AND))
- np = logic(OAND, np, bit_or());
- return np;
-}
-
-static Node *
-or(void)
-{
- Node *np;
-
- np = and();
- while (accept(OR))
- np = logic(OOR, np, and());
- return np;
-}
-
-static Node *
-ternary(void)
-{
- Node *cond;
-
- cond = or();
- while (accept('?')) {
- Node *ifyes, *ifno, *np;
-
- cond = exp2cond(cond, 0);
- ifyes = xexpr();
- expect(':');
- ifno = ternary();
- np = chkternary(ifyes, ifno);
- cond = node(OASK, np->type, cond, np);
- }
- return cond;
-}
-
-static Node *
-xassign(void)
-{
- Node *np, *(*fun)(int , Node *, Node *);
- int op;
-
- np = ternary();
- for (;;) {
- switch (yytoken) {
- case '=': op = OASSIGN; fun = assignop; break;
- case MUL_EQ: op = OA_MUL; fun = arithmetic; break;
- case DIV_EQ: op = OA_DIV; fun = arithmetic; break;
- case MOD_EQ: op = OA_MOD; fun = integerop; break;
- case ADD_EQ: op = OA_ADD; fun = arithmetic; break;
- case SUB_EQ: op = OA_SUB; fun = arithmetic; break;
- case SHL_EQ: op = OA_SHL; fun = integerop; break;
- case SHR_EQ: op = OA_SHR; fun = integerop; break;
- case AND_EQ: op = OA_AND; fun = integerop; break;
- case XOR_EQ: op = OA_XOR; fun = integerop; break;
- case OR_EQ: op = OA_OR; fun = integerop; break;
- default: return np;
- }
- chklvalue(np);
- np->flags |= NEFFECT;
- next();
- np = (fun)(op, np, assign());
- }
-}
-
-static Node *
-xexpr(void)
-{
- Node *lp, *rp;
-
- lp = xassign();
- while (accept(',')) {
- rp = xassign();
- lp = node(OCOMMA, rp->type, lp, rp);
- }
- return lp;
-}
-
-Node *
-assign(void)
-{
- return simplify(xassign());
-}
-
-Node *
-constexpr(void)
-{
- Node *np;
-
- np = ternary();
- if (np && np->type->op == INT) {
- np = simplify(convert(np, inttype, 0));
- if (np->flags & NCONST)
- return np;
- }
- freetree(np);
- return NULL;
-}
-
-Node *
-expr(void)
-{
- return simplify(xexpr());
-}
-
-Node *
-condexpr(int neg)
-{
- Node *np;
-
- np = exp2cond(xexpr(), neg);
- if (np->flags & NCONST)
- warn("conditional expression is constant");
- return simplify(np);
-}
--- a/src/cc1/fold.c
+++ /dev/null
@@ -1,685 +1,0 @@
-static char sccsid[] = "@(#) ./cc1/fold.c";
-#include <assert.h>
-#include <stdlib.h>
-
-#include <scc/scc.h>
-#include "cc1.h"
-
-
-TUINT
-ones(int nbytes)
-{
- return (nbytes == 8) ? -1 : ~(-1ull << nbytes * 8);
-}
-
-static int
-addi(TINT l, TINT r, Type *tp)
-{
- struct limits *lim = getlimits(tp);
- TINT max = lim->max.i, min = -lim->min.i;
-
- if (l < 0 && r < 0 && l >= min - r ||
- l == 0 ||
- r == 0 ||
- l < 0 && r > 0 ||
- l > 0 && r < 0 ||
- l > 0 && r > 0 && l <= max - r) {
- return 1;
- }
- warn("overflow in constant expression");
- return 0;
-}
-
-static int
-addf(TFLOAT l, TFLOAT r, Type *tp)
-{
- struct limits *lim = getlimits(tp);
- TFLOAT max = lim->max.f, min = lim->min.f;
-
- if (l < 0 && r < 0 && l >= min - r ||
- l == 0 ||
- r == 0 ||
- l < 0 && r > 0 ||
- l > 0 && r < 0 ||
- l > 0 && r > 0 && l <= max - r) {
- return 1;
- }
- warn("overflow in constant expression");
- return 0;
-}
-
-static int
-subi(TINT l, TINT r, Type *tp)
-{
- return addi(l, -r, tp);
-}
-
-static int
-subf(TFLOAT l, TFLOAT r, Type *tp)
-{
- return addf(l, -r, tp);
-}
-
-static int
-muli(TINT l, TINT r, Type *tp)
-{
- struct limits *lim = getlimits(tp);
- TINT max = lim->max.i, min = -lim->min.i;
-
- if (l > -1 && l <= 1 ||
- r > -1 && r <= 1 ||
- l < 0 && r < 0 && -l <= max/-r ||
- l < 0 && r > 0 && l >= min/r ||
- l > 0 && r < 0 && r >= min/l ||
- l > 0 && r > 0 && l <= max/r) {
- return 1;
- }
- warn("overflow in constant expression");
- return 0;
-}
-
-static int
-mulf(TFLOAT l, TFLOAT r, Type *tp)
-{
- struct limits *lim = getlimits(tp);
- TFLOAT max = lim->max.f, min = lim->min.f;
-
- if (l > -1 && l <= 1 ||
- r > -1 && r <= 1 ||
- l < 0 && r < 0 && -l <= max/-r ||
- l < 0 && r > 0 && l >= min/r ||
- l > 0 && r < 0 && r >= min/l ||
- l > 0 && r > 0 && l <= max/r) {
- return 1;
- }
- warn("overflow in constant expression");
- return 0;
-}
-
-static int
-divi(TINT l, TINT r, Type *tp)
-{
- struct limits *lim = getlimits(tp);
-
- if (r == 0 || l == -lim->min.i && r == -1) {
- warn("overflow in constant expression");
- return 0;
- }
- return 1;
-}
-
-static int
-divf(TFLOAT l, TFLOAT r, Type *tp)
-{
- struct limits *lim = getlimits(tp);
-
- if (l < 0) l = -l;
- if (r < 0) r = -r;
-
- if (r == 0.0 || r < 1.0 && l > lim->max.f * r) {
- warn("overflow in constant expression");
- return 0;
- }
- return 1;
-}
-
-static int
-lshi(TINT l, TINT r, Type *tp)
-{
- if (r < 0 || r >= tp->size * 8) {
- warn("shifting %d bits is undefined", r);
- return 0;
- }
- return muli(l, 1 << r, tp);
-}
-
-static int
-rshi(TINT l, TINT r, Type *tp)
-{
- if (r < 0 || r >= tp->size * 8) {
- warn("shifting %d bits is undefined", r);
- return 0;
- }
- return 1;
-}
-
-static int
-foldint(int op, Symbol *res, TINT l, TINT r)
-{
- TINT i;
- Type *tp = res->type;
- int (*validate)(TINT, TINT, Type *tp);
-
- switch (op) {
- case OADD: validate = addi; break;
- case OSUB: validate = subi; break;
- case OMUL: validate = muli; break;
- case ODIV: validate = divi; break;
- case OSHL: validate = lshi; break;
- case OSHR: validate = rshi; break;
- case OMOD: validate = divi; break;
- default: validate = NULL; break;
- }
-
- if (validate && !(*validate)(l, r, tp))
- return 0;
-
- switch (op) {
- case OADD: i = l + r; break;
- case OSUB: i = l - r; break;
- case OMUL: i = l * r; break;
- case ODIV: i = l / r; break;
- case OMOD: i = l % r; break;
- case OSHL: i = l << r; break;
- case OSHR: i = l >> r; break;
- case OBAND: i = l & r; break;
- case OBXOR: i = l ^ r; break;
- case OBOR: i = l | r; break;
- case OAND: i = l && r; break;
- case OOR: i = l || r; break;
- case OLT: i = l < r; break;
- case OGT: i = l > r; break;
- case OGE: i = l >= r; break;
- case OLE: i = l <= r; break;
- case OEQ: i = l == r; break;
- case ONE: i = l != r; break;
- case ONEG: i = !l; break;
- case OSNEG: i = -l; break;
- case OCPL: i = ~l; break;
- default: return 0;
- }
- res->u.i = i;
-
- DBG("FOLD i l=%lld %d r=%lld = %lld", l, op, r, i);
- return 1;
-}
-
-static int
-folduint(int op, Symbol *res, TUINT l, TUINT r)
-{
- TINT i;
- TUINT u;
-
- switch (op) {
- case OADD: u = l + r; break;
- case OSUB: u = l - r; break;
- case OMUL: u = l * r; break;
- case ODIV: u = l / r; break;
- case OMOD: u = l % r; break;
- case OSHL: u = l << r; break;
- case OSHR: u = l >> r; break;
- case OBAND: u = l & r; break;
- case OBXOR: u = l ^ r; break;
- case OBOR: u = l | r; break;
- case ONEG: u = !l; break;
- case OSNEG: u = -l; break;
- case OCPL: u = ~l; break;
- case OAND: i = l && r; goto sign;
- case OOR: i = l || r; goto sign;
- case OLT: i = l < r; goto sign;
- case OGT: i = l > r; goto sign;
- case OGE: i = l >= r; goto sign;
- case OLE: i = l <= r; goto sign;
- case OEQ: i = l == r; goto sign;
- case ONE: i = l != r; goto sign;
- default: return 0;
- }
- res->u.u = u & ones(res->type->size);
-
- DBG("FOLD ui l=%llu %d r=%llu = %llu", l, op, r, u);
- return 1;
-
-sign:
- res->u.i = i;
-
- DBG("FOLD sui %llu %d %llu = %llu", l, op, r, i);
- return 1;
-}
-
-static int
-foldfloat(int op, Symbol *res, TFLOAT l, TFLOAT r)
-{
- TFLOAT f;
- TINT i;
- int (*validate)(TFLOAT, TFLOAT, Type *tp);
-
- switch (op) {
- case OADD: validate = addf; break;
- case OSUB: validate = subf; break;
- case OMUL: validate = mulf; break;
- case ODIV: validate = divf; break;
- default: validate = NULL; break;
- }
-
- if (validate && !(*validate)(l, r, res->type))
- return 0;
-
- switch (op) {
- case OADD: f = l + r; break;
- case OSUB: f = l - r; break;
- case OMUL: f = l * r; break;
- case ODIV: f = l / r; break;
- case OLT: i = l < r; goto comparison;
- case OGT: i = l > r; goto comparison;
- case OGE: i = l >= r; goto comparison;
- case OLE: i = l <= r; goto comparison;
- case OEQ: i = l == r; goto comparison;
- case ONE: i = l != r; goto comparison;
- default: return 0;
- }
- res->u.f = f;
-
- DBG("FOLD f l=%lf %d r=%lf = %lf", l, op, r, f);
- return 1;
-
-comparison:
- res->u.i = i;
-
- DBG("FOLD if l=%lf %d r=%lf = %lld", l, op, r, i);
- return 1;
-}
-
-static Node *
-foldconst(int type, int op, Type *tp, Symbol *ls, Symbol *rs)
-{
- Symbol *sym, aux;
- TINT i;
- TUINT u;
- TFLOAT f;
-
- aux.type = tp;
- switch (type) {
- case INT:
- i = (rs) ? rs->u.i : 0;
- if (!foldint(op, &aux, ls->u.i, i))
- return NULL;
- break;
- case UNSIGNED:
- u = (rs) ? rs->u.u : 0u;
- if (!folduint(op, &aux, ls->u.u, u))
- return NULL;
- break;
- case FLOAT:
- f = (rs) ? rs->u.f : 0.0;
- if (!foldfloat(op, &aux, ls->u.f, f))
- return NULL;
- break;
- }
- sym = newsym(NS_IDEN, NULL);
- sym->flags |= SCONSTANT;
- sym->type = tp;
- sym->u = aux.u;
- return constnode(sym);
-}
-
-static Node *
-foldcast(Node *np, Node *l)
-{
- TUINT negmask, mask, u;
- Type *newtp = np->type, *oldtp = l->type;
- Symbol aux, *sym, *osym = l->sym;
-
- if (!(l->flags & NCONST))
- return np;
-
- switch (newtp->op) {
- case PTR:
- case INT:
- case ENUM:
- switch (oldtp->op) {
- case PTR:
- case INT:
- case ENUM:
- u = (oldtp->prop & TSIGNED) ? osym->u.i : osym->u.u;
- break;
- case FLOAT:
- oldtp = newtp;
- u = osym->u.f;
- break;
- default:
- return np;
- }
- mask = ones(newtp->size);
- if (newtp->prop & TSIGNED) {
- negmask = ~mask;
- if (u & (negmask >> 1) & mask)
- u |= negmask;
- aux.u.i = u;
- } else {
- aux.u.u = u & mask;
- }
- break;
- case FLOAT:
- /* FIXME: The cast can be from another float type */
- aux.u.f = (oldtp->prop & TSIGNED) ? osym->u.i : osym->u.u;
- break;
- default:
- return np;
- }
- DBG("FOLD cast %c->%c", oldtp->letter, newtp->letter);
- freetree(np);
- sym = newsym(NS_IDEN, NULL);
- sym->flags |= SCONSTANT;
- sym->type = newtp;
- sym->u = aux.u;
- return constnode(sym);
-}
-
-static Node *
-foldunary(Node *np, Node *l)
-{
- int op = l->op;
- Node *aux;
-
- switch (np->op) {
- case ONEG:
- if (l->op == ONEG)
- break;
- return NULL;
- case OADD:
- DBG("FOLD unary delete %d", np->op);
- np->left = NULL;
- freetree(np);
- return l;
- case OCAST:
- if (op != OCAST)
- return foldcast(np, l);
- /* TODO: This is wrong: (float)(int) 7.2 */
- DBG("FOLD unary collapse %d", np->op);
- np->left = l->left;
- l->left = NULL;
- freetree(l);
- return np;
- case OSNEG:
- case OCPL:
- if (op != np->op)
- return NULL;
- break;
- case OPTR:
- if (op != OADDR || np->type != l->left->type)
- return NULL;
- break;
- case OADDR:
- if (op != OPTR)
- return NULL;
- break;
- default:
- return NULL;
- }
- DBG("FOLD unary cancel %d", np->op);
- aux = l->left;
- l->left = NULL;
- freetree(np);
- return aux;
-}
-
-static Node *
-fold(Node *np)
-{
- Symbol *rs, *ls;
- Type *optype;
- int type;
- int op = np->op;
- Node *p, *lp = np->left, *rp = np->right;
- Type *tp = np->type;
-
- assert(lp && rp);
- if ((op == ODIV || op == OMOD) && cmpnode(rp, 0)) {
- warn("division by 0");
- return NULL;
- }
- /*
- * Return if any of the children is no constant,
- * or it is a constant generated when
- * the address of a static variable is taken
- * (when we don't know the physical address so
- * we cannot fold it)
- */
- if (!rp) {
- rs = NULL;
- } else {
- if (!(rp->flags & NCONST) || !rp->sym)
- return NULL;
- rs = rp->sym;
- }
-
- if (!(lp->flags & NCONST) || !lp->sym)
- return NULL;
- optype = lp->type;
- ls = lp->sym;
-
- switch (type = optype->op) {
- case ENUM:
- case INT:
- if (!(optype->prop & TSIGNED))
- type = UNSIGNED;
- case PTR:
- case FLOAT:
- if ((p = foldconst(type, op, tp, ls, rs)) == NULL)
- return NULL;
- freetree(np);
- return p;
- default:
- return NULL;
- }
-}
-
-static void
-commutative(Node *np, Node *l, Node *r)
-{
- int op = np->op;
-
- if (r == NULL || r->flags&NCONST || !(l->flags&NCONST))
- return;
-
- switch (op) {
- case OLT:
- case OGT:
- case OGE:
- case OLE:
- DBG("FOLD neg commutative %d", np->op);
- np->op = negop(op);
- case OEQ:
- case ONE:
- case OADD:
- case OMUL:
- case OBAND:
- case OBXOR:
- case OBOR:
- DBG("FOLD commutative %d", np->op);
- np->left = r;
- np->right = l;
- break;
- }
-}
-
-static Node *
-identity(Node *np)
-{
- int iszeror, isoner;
- int iszerol, isonel;
- Node *lp = np->left, *rp = np->right;
-
- if (!rp)
- return NULL;
-
- iszeror = cmpnode(rp, 0);
- isoner = cmpnode(rp, 1),
- iszerol = cmpnode(lp, 0);
- isonel = cmpnode(lp, 1);
-
- switch (np->op) {
- case OOR:
- /*
- * 1 || i => 1 (free right)
- * i || 0 => i (free right)
- * 0 || i => i (free left)
- * i || 1 => i,1 (comma)
- */
- if (isonel | iszeror)
- goto free_right;
- if (iszerol)
- goto free_left;
- if (isoner)
- goto change_to_comma;
- return NULL;
- case OAND:
- /*
- * 0 && i => 0 (free right)
- * i && 1 => i (free right)
- * 1 && i => i (free left)
- * i && 0 => i,0 (comma)
- */
- if (iszerol | isoner)
- goto free_right;
- if (isonel)
- goto free_left;
- if (iszeror)
- goto change_to_comma;
- return NULL;
- case OSHL:
- case OSHR:
- /*
- * i >> 0 => i (free right)
- * i << 0 => i (free right)
- * 0 >> i => 0 (free right)
- * 0 << i => 0 (free right)
- */
- if (iszeror | iszerol)
- goto free_right;
- return NULL;
- case OBXOR:
- case OADD:
- case OBOR:
- case OSUB:
- /*
- * i + 0 => i
- * i - 0 => i
- * i | 0 => i
- * i ^ 0 => i
- */
- if (iszeror)
- goto free_right;
- return NULL;
- case OMUL:
- /*
- * i * 0 => i,0
- * i * 1 => i
- */
- if (iszeror)
- goto change_to_comma;
- if (isoner)
- goto free_right;
- return NULL;
- case ODIV:
- /* i / 1 => i */
- if (isoner)
- goto free_right;
- return NULL;
- case OBAND:
- /* i & ~0 => i */
- if (cmpnode(rp, -1))
- goto free_right;
- return NULL;
- case OMOD:
- /* i % 1 => i,1 */
- /* TODO: i % 2^n => i & n-1 */
- if (isoner)
- goto change_to_comma;
- default:
- return NULL;
- }
-
-free_right:
- DBG("FOLD identity %d", np->op);
- np->left = NULL;
- freetree(np);
- return lp;
-
-free_left:
- DBG("FOLD identity %d", np->op);
- np->right = NULL;
- freetree(np);
- return rp;
-
-change_to_comma:
- DBG("FOLD identity %d", np->op);
- np->op = OCOMMA;
- return np;
-}
-
-static Node *
-foldternary(Node *np, Node *cond, Node *body)
-{
- if (!(cond->flags & NCONST))
- return np;
- if (cmpnode(cond, 0)) {
- np = body->right;
- freetree(body->left);
- } else {
- np = body->left;
- freetree(body->right);
- }
-
- DBG("FOLD ternary");
- body->left = NULL;
- body->right = NULL;
- freetree(cond);
- free(body);
- return np;
-}
-
-/* TODO: fold OCOMMA */
-
-Node *
-simplify(Node *np)
-{
- Node *p, *l, *r;
-
- if (!np)
- return NULL;
- if (debug)
- prtree(np);
-
- l = np->left = simplify(np->left);
- r = np->right = simplify(np->right);
-
- switch (np->op) {
- case OASK:
- return foldternary(np, l, r);
- case OCALL:
- case OPAR:
- case OSYM:
- case OASSIGN:
- case OA_MUL:
- case OA_DIV:
- case OA_MOD:
- case OA_ADD:
- case OA_SUB:
- case OA_SHL:
- case OA_SHR:
- case OA_AND:
- case OA_XOR:
- case OA_OR:
- return np;
- case OSNEG:
- case OCPL:
- case OADDR:
- case OPTR:
- case INC:
- case DEC:
- case OCAST:
- case ONEG:
- assert(!r);
- if ((p = foldunary(np, l)) != NULL)
- return p;
- return np;
- default:
- commutative(np, l, r);
- if ((p = fold(np)) != NULL)
- return p;
- if ((p = identity(np)) != NULL)
- return p;
- return np;
- }
-}
--- a/src/cc1/init.c
+++ /dev/null
@@ -1,378 +1,0 @@
-static char sccsid[] = "@(#) ./cc1/init.c";
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <scc/cstd.h>
-#include <scc/scc.h>
-#include "cc1.h"
-
-
-typedef struct init Init;
-
-struct designator {
- TINT pos;
- Node *expr;
- struct designator *next;
-};
-
-struct init {
- TUINT pos;
- TUINT max;
- struct designator *tail;
- struct designator *head;
-};
-
-static TINT
-arydesig(Type *tp, Init *ip)
-{
- TINT npos;
- Node *np;
-
- if (tp->op != ARY)
- errorp("array index in non-array initializer");
- next();
- np = constexpr();
- npos = np->sym->u.i;
- if (npos < 0 || (tp->prop & TDEFINED) && npos >= tp->n.elem) {
- errorp("array index in initializer exceeds array bounds");
- npos = 0;
- }
- freetree(np);
- expect(']');
- return npos;
-}
-
-static TINT
-fielddesig(Type *tp, Init *ip)
-{
- int ons;
- Symbol *sym, **p;
-
- if (!(tp->prop & TAGGREG))
- errorp("field name not in record or union initializer");
- ons = namespace;
- namespace = tp->ns;
- next();
- namespace = ons;
- if (yytoken != IDEN)
- unexpected();
- sym = yylval.sym;
- next();
- if ((sym->flags & SDECLARED) == 0) {
- errorp("unknown field '%s' specified in initializer",
- sym->name);
- return 0;
- }
- for (p = tp->p.fields; *p != sym; ++p)
- ;
- return p - tp->p.fields;
-}
-
-static Init *
-init(Init *ip)
-{
- ip->tail = ip->head = NULL;
- ip->pos = ip->max = 0;
- return ip;
-}
-
-static Node *
-str2ary(Type *tp)
-{
- Node *np;
- Type *btp = tp->type;;
- Symbol *sym;
- size_t len;
- char *s;
-
- np = assign();
- sym = np->left->sym;
- if (btp != chartype && btp != uchartype && btp != schartype) {
- errorp("array of inappropriate type initialized from string constant");
- return constnode(zero);
- }
-
- len = sym->type->n.elem-1;
- if (!(tp->prop & TDEFINED)) {
- tp->n.elem = len+1;
- deftype(tp);
- } else if (tp->n.elem < len) {
- warn("initializer-string for array of chars is too long");
- }
-
- len = tp->n.elem;
- s = sym->u.s;
- sym = newstring(NULL, len);
- strncpy(sym->u.s, s, len);
- np->sym = sym;
- np->type = sym->type;
-
- return np;
-}
-
-static Node *
-initialize(Type *tp)
-{
- Node *np;
- Symbol *sym;
-
- if (tp->op == ARY && yytoken == STRING)
- return str2ary(tp);
-
- if (yytoken == '{' || tp->op == STRUCT || tp->op == ARY)
- return initlist(tp);
-
- np = assign();
- if (eqtype(tp, np->type, 1))
- return np;
-
- np = convert(decay(np), tp, 0);
- if (!np) {
- errorp("incorrect initializer");
- return constnode(zero);
- }
-
- return simplify(np);
-}
-
-static Node *
-mkcompound(Init *ip, Type *tp)
-{
- Node **v, **p;
- size_t n;
- struct designator *dp, *next;
- Symbol *sym;
-
- if (tp->op == UNION) {
- Node *np = NULL;
-
- v = xmalloc(sizeof(*v));
- for (dp = ip->head; dp; dp = next) {
- freetree(np);
- np = dp->expr;
- next = dp->next;
- free(dp);
- }
- *v = np;
- } else {
- n = (tp->prop&TDEFINED) ? tp->n.elem : ip->max;
- if (n == 0) {
- v = NULL;
- } else if (n > SIZE_MAX / sizeof(*v)) {
- errorp("compound literal too big");
- return constnode(zero);
- } else {
- n *= sizeof(*v);
- v = memset(xmalloc(n), 0, n);
-
- for (dp = ip->head; dp; dp = next) {
- p = &v[dp->pos];
- freetree(*p);
- *p = dp->expr;
- next = dp->next;
- free(dp);
- }
- }
- }
-
- sym = newsym(NS_IDEN, NULL);
- sym->u.init = v;
- sym->type = tp;
- sym->flags |= SINITLST;
-
- return constnode(sym);
-}
-
-static void
-newdesig(Init *ip, Node *np)
-{
- struct designator *dp;
-
- dp = xmalloc(sizeof(*dp));
- dp->pos = ip->pos;
- dp->expr = np;
- dp->next = NULL;
-
- if (ip->head == NULL) {
- ip->head = ip->tail = dp;
- } else {
- ip->tail->next = dp;
- ip->tail = dp;
- }
-
- if (ip->pos+1 > ip->max)
- ip->max = ip->pos+1;
-}
-
-Node *
-initlist(Type *tp)
-{
- Init in;
- Node *np;
- Type *curtp;
- int braces, scalar, toomany, outbound;
- TINT nelem = tp->n.elem;
- static int depth;
-
- if (depth == NR_SUBTYPE)
- error("too many nested initializers");
- ++depth;
- init(&in);
- braces = scalar = toomany = 0;
-
- if (accept('{'))
- braces = 1;
-
- do {
- curtp = inttype;
- switch (yytoken) {
- case '[':
- in.pos = arydesig(tp, &in);
- curtp = tp->type;
- goto desig_list;
- case '.':
- in.pos = fielddesig(tp, &in);
- if (in.pos < nelem)
- curtp = tp->p.fields[in.pos]->type;
- desig_list:
- if (yytoken == '[' || yytoken == '.') {
- np = initlist(curtp);
- goto new_desig;
- }
- expect('=');
- default:
- outbound = 0;
-
- switch (tp->op) {
- case ARY:
- curtp = tp->type;
- if (!(tp->prop & TDEFINED) || in.pos < tp->n.elem)
- break;
- if (!toomany)
- warn("excess elements in array initializer");
- toomany = 1;
- outbound = 1;
- break;
- case UNION:
- case STRUCT:
- if (in.pos < nelem) {
- curtp = tp->p.fields[in.pos]->type;
- break;
- }
- if (!toomany)
- warn("excess elements in struct initializer");
- toomany = 1;
- outbound = 1;
- break;
- default:
- curtp = tp;
- if (!scalar)
- warn("braces around scalar initializer");
- scalar = 1;
- if (in.pos == 0)
- break;
- if (!toomany)
- warn("excess elements in scalar initializer");
- toomany = 1;
- outbound = 1;
- break;
- }
- np = initialize(curtp);
- if (outbound) {
- freetree(np);
- np = NULL;
- }
- }
-
-new_desig:
- if (np)
- newdesig(&in, np);
- if (++in.pos == 0)
- errorp("compound literal too big");
- if (nelem == in.pos && !braces)
- break;
- } while (accept(','));
-
- if (braces)
- expect('}');
-
-
- if (tp->op == ARY && !(tp->prop & TDEFINED)) {
- tp->n.elem = in.max;
- deftype(tp);
- }
- if (in.max == 0) {
- errorp("empty braced initializer");
- return constnode(zero);
- }
-
- return mkcompound(&in, tp);
-}
-
-static void
-autoinit(Symbol *sym, Node *np)
-{
- Symbol *hidden;
- Type *tp = sym->type;
- size_t n; /* FIXME: It should be SIZET */
-
-repeat:
- switch (tp->op) {
- case UNION:
- np = np->sym->u.init[0];
- tp = np->type;
- goto repeat;
- case ARY:
- case STRUCT:
- if (!(np->flags & NCONST))
- abort(); /* TODO */
- hidden = newsym(NS_IDEN, NULL);
- hidden->type = sym->type;
- hidden->flags |= SLOCAL | SHASINIT;
- emit(ODECL, hidden);
- emit(OINIT, np);
- emit(ODECL, sym);
- emit(OEXPR,
- node(OASSIGN, tp, varnode(sym), varnode(hidden)));
- break;
- default:
- emit(ODECL, sym);
- np = node(OASSIGN, tp, varnode(sym), np);
- emit(OEXPR, np);
- break;
- }
-}
-
-void
-initializer(Symbol *sym, Type *tp)
-{
- Node *np;
- int flags = sym->flags;
-
- if (tp->op == FTN) {
- errorp("function '%s' initialized like a variable",
- sym->name);
- tp = inttype;
- }
- np = initialize(tp);
-
- if (flags & SDEFINED) {
- errorp("redeclaration of '%s'", sym->name);
- } else if ((flags & (SGLOBAL|SLOCAL|SPRIVATE)) != 0) {
- if (!(np->flags & NCONST)) {
- errorp("initializer element is not constant");
- return;
- }
- sym->flags |= SHASINIT;
- sym->flags &= ~SEMITTED;
- emit(ODECL, sym);
- emit(OINIT, np);
- sym->flags |= SDEFINED;
- } else if ((flags & (SEXTERN|STYPEDEF)) != 0) {
- errorp("'%s' has both '%s' and initializer",
- sym->name, (flags&SEXTERN) ? "extern" : "typedef");
- } else {
- autoinit(sym, np);
- }
-}
--- a/src/cc1/ir.md
+++ /dev/null
@@ -1,443 +1,0 @@
-# scc intermediate representation #
-
-The scc IR tries to be be a simple and easily parseable intermediate
-representation, and it makes it a bit terse and cryptic. The main
-characteristic of the IR is that all the types and operations are
-represented with only one letter, so parsing tables can be used
-to parse it.
-
-The language is composed of lines, representing statements.
-Each statement is composed of tab-separated fields.
-Declaration statements begin in column 0, expressions and
-control flow begin with a tabulator.
-When the frontend detects an error, it closes the output stream.
-
-## Types ##
-
-Types are represented with uppercase letters:
-
-* C -- signed 8-Bit integer
-* I -- signed 16-Bit integer
-* W -- signed 32-Bit integer
-* Q -- signed 64-Bit integer
-* K -- unsigned 8-Bit integer
-* N -- unsigned 16-Bit integer
-* Z -- unsigned 32-Bit integer
-* O -- unsigned 64-Bit integer
-* 0 -- void
-* P -- pointer
-* F -- function
-* V -- vector
-* U -- union
-* S -- struct
-* B -- bool
-* J -- float
-* D -- double
-* H -- long double
-
-This list has been built for the original Z80 backend, where 'int'
-has the same size as 'short'. Several types (S, F, V, U and others) need
-an identifier after the type letter for better differentiation
-between multiple structs, functions, vectors and unions (S1, V12 ...)
-naturally occuring in a C-program.
-
-## Storage classes ##
-
-The storage classes are represented using uppercase letters:
-
-* A -- automatic
-* R -- register
-* G -- public (global variable declared in the module)
-* X -- extern (global variable declared in another module)
-* Y -- private (variable in file-scope)
-* T -- local (static variable in function-scope)
-* M -- member (struct/union member)
-* L -- label
-
-## Declarations/definitions ##
-
-Variable names are composed of a storage class and an identifier
-(e.g. A1, R2, T3).
-Declarations and definitions are composed of a variable
-name, a type and the name of the variable:
-
- A1 I maxweight
- R2 C flag
- A3 S4 statstruct
-
-### Type declarations ###
-
-Some declarations (e.g. structs) involve the declaration of member
-variables.
-Struct members are declared normally after the type declaration in
-parentheses.
-
-For example the struct declaration
-
- struct foo {
- int i;
- long c;
- } var1;
-
-generates
-
- S2 foo (
- M3 I i
- M4 W c
- )
- G5 S2 var1
-
-## Functions ##
-
-A function prototype
-
- int printf(char *cmd, int flag, void *data);
-
-will generate a type declaration and a variable declaration
-
- F5 P I P
- X1 F5 printf
-
-The first line gives the function-type specification 'F' with
-an identifier '5' and subsequently lists the types of the
-function parameters.
-The second line declares the 'printf' function as a publicly
-scoped variable.
-
-Analogously, a statically declared function in file scope
-
- static int printf(char *cmd, int flag, void *data);
-
-generates
-
- F5 P I P
- T1 F5 printf
-
-Thus, the 'printf' variable went into local scope ('T').
-
-A '{' in the first column starts the body of the previously
-declared function:
-
- int printf(char *cmd, int flag, void *data) {}
-
-generates
-
- F5 P I P
- G1 F5 printf
- {
- A2 P cmd
- A3 I flag
- A4 P data
- -
- }
-
-Again, the frontend must ensure that '{' appears only after the
-declaration of a function. The character '-' marks the separation
-between parameters and local variables:
-
- int printf(register char *cmd, int flag, void *data) {int i;};
-
-generates
-
- F5 P I P
- G1 F5 printf
- {
- R2 P cmd
- A3 I flag
- A4 P data
- -
- A6 I i
- }
-
-### Expressions ###
-
-Expressions are emitted in reverse polish notation, simplifying
-parsing and converting into a tree representation.
-
-#### Operators ####
-
-Operators allowed in expressions are:
-
-* \+ -- addition
-* \- -- substraction
-* \* -- multiplication
-* % -- modulo
-* / -- division
-* l -- left shift
-* r -- right shift
-* < -- less than
-* > -- greather than
-* ] -- greather or equal than
-* [ -- less or equal than
-* = -- equal than
-* ! -- different than
-* & -- bitwise and
-* | -- bitwise or
-* ^ -- bitwise xor
-* ~ -- bitwise complement
-* : -- asignation
-* _ -- unary negation
-* c -- function call
-* p -- parameter
-* . -- field
-* , -- comma operator
-* ? -- ternary operator
-* ' -- take address
-* a -- logical shortcut and
-* o -- logical shortcut or
-* @ -- content of pointer
-
-Assignation has some suboperators:
-
-* :/ -- divide and assign
-* :% -- modulo and assign
-* :+ -- addition and assign
-* :- -- substraction and assign
-* :l -- left shift and assign
-* :r -- right shift and assign
-* :& -- bitwise and and assign
-* :^ -- bitwise xor and assign
-* :| -- bitwise or and assign
-* :i -- post increment
-* :d -- post decrement
-
-Every operator in an expression has a type descriptor.
-
-#### Constants ####
-
-Constants are introduced with the character '#'. For instance, 10 is
-translated to #IA (all constants are emitted in hexadecimal),
-where I indicates that it is an integer constant.
-Strings are a special case because they are represented with
-the " character.
-The constant "hello" is emitted as "68656C6C6F. For example
-
- int
- main(void)
- {
- int i, j;
-
- i = j+2*3;
- }
-
-generates
-
- F1
- G1 F1 main
- {
- -
- A2 I i
- A3 I j
- A2 A3 #I6 +I :I
- }
-
-Type casts are expressed with a tuple denoting the
-type conversion
-
- int
- main(void)
- {
- int i;
- long j;
-
- j = (long)i;
- }
-
-generates
-
- F1
- G1 F1 main
- {
- -
- A2 I i
- A3 W j
- A2 A3 WI :I
- }
-
-### Statements ###
-#### Jumps #####
-
-Jumps have the following form:
-
- j L# [expression]
-
-the optional expression field indicates some condition which
-must be satisfied to jump. Example:
-
- int
- main(void)
- {
- int i;
-
- goto label;
- label:
- i -= i;
- }
-
-generates
-
- F1
- G1 F1 main
- {
- -
- A2 I i
- j L3
- L3
- A2 A2 :-I
- }
-
-Another form of jump is the return statement, which uses the
-letter 'y' followed by a type identifier.
-Depending on the type, an optional expression follows.
-
- int
- main(void)
- {
- return 16;
- }
-
-generates
-
- F1
- G1 F1 main
- {
- -
- yI #I10
- }
-
-
-#### Loops ####
-
-There are two special characters that are used to indicate
-to the backend that the following statements are part of
-a loop body.
-
-* b -- beginning of loop
-* e -- end of loop
-
-#### Switch statement ####
-
-Switches are represented using a table, in which the labels
-where to jump for each case are indicated. Common cases are
-represented with 'v' and default with 'f'.
-The switch statement itself is represented with 's' followed
-by the label where the jump table is located, and the
-expression of the switch:
-
- int
- func(int n)
- {
- switch (n+1) {
- case 1:
- case 2:
- case 3:
- default:
- ++n;
- }
- }
-
-generates
-
- F2 I
- G1 F2 func
- {
- A1 I n
- -
- s L4 A1 #I1 +I
- L5
- L6
- L7
- L8
- A1 #I1 :+I
- j L3
- L4
- t #4
- v L7 #I3
- v L6 #I2
- v L5 #I1
- f L8
- L3
- }
-
-The beginning of the jump table is indicated by the the letter 't',
-followed by the number of cases (including default case) of the
-switch.
-
-## Resumen ##
-
-* C -- signed 8-Bit integer
-* I -- signed 16-Bit integer
-* W -- signed 32-Bit integer
-* O -- signed 64-Bit integer
-* M -- unsigned 8-Bit integer
-* N -- unsigned 16-Bit integer
-* Z -- unsigned 32-Bit integer
-* Q -- unsigned 64-Bit integer
-* 0 -- void
-* P -- pointer
-* F -- function
-* V -- vector
-* U -- union
-* S -- struct
-* B -- bool
-* J -- float
-* D -- double
-* H -- long double
-* A -- automatic
-* R -- register
-* G -- public (global variable declared in the module)
-* X -- extern (global variable declared in another module)
-* Y -- private (variable in file-scope)
-* T -- local (static variable in function-scope)
-* M -- member (struct/union member)
-* L -- label
-* { -- beginning of function body
-* } -- end of function body
-* \\ -- end of function parameters
-* \+ -- addition
-* \- -- substraction
-* \* -- multiplication
-* % -- modulo
-* / -- division
-* l -- left shift
-* r -- right shift
-* < -- less than
-* > -- greather than
-* ] -- greather or equal than
-* [ -- less or equal than
-* = -- equal than
-* ! -- different than
-* & -- bitwise and
-* | -- bitwise or
-* ^ -- bitwise xor
-* ~ -- bitwise complement
-* : -- asignation
-* _ -- unary negation
-* c -- function call
-* p -- parameter
-* . -- field
-* , -- comma operator
-* ? -- ternary operator
-* ' -- take address
-* a -- logical shortcut and
-* o -- logical shortcut or
-* @ -- content of pointer
-* :/ -- divide and assign
-* :% -- modulo and assign
-* :+ -- addition and assign
-* :- -- substraction and assign
-* :l -- left shift and assign
-* :r -- right shift and assign
-* :& -- bitwise and and assign
-* :^ -- bitwise xor and assign
-* :| -- bitwise or and assign
-* ;+ -- post increment
-* ;- -- post decrement
-* j -- jump
-* y -- return
-* b -- begin of loop
-* d -- end of loop
-* s -- switch statement
-* t -- switch table
-* v -- case entry in switch table
-* f -- default entry in switch table
--- a/src/cc1/lex.c
+++ /dev/null
@@ -1,801 +1,0 @@
-static char sccsid[] = "@(#) ./cc1/lex.c";
-#include <assert.h>
-#include <ctype.h>
-#include <errno.h>
-#include <limits.h>
-#include <setjmp.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <scc/cstd.h>
-#include <scc/scc.h>
-#include "cc1.h"
-
-int yytoken;
-struct yystype yylval;
-char yytext[STRINGSIZ+3];
-unsigned short yylen;
-int lexmode = CCMODE;
-unsigned lineno;
-char filenam[FILENAME_MAX];
-
-int namespace = NS_IDEN;
-static int safe;
-Input *input;
-
-void
-ilex(void)
-{
- static struct keyword keys[] = {
- {"auto", SCLASS, AUTO},
- {"break", BREAK, BREAK},
- {"_Bool", TYPE, BOOL},
- {"__builtin_va_list", TYPE, VA_LIST},
- {"case", CASE, CASE},
- {"char", TYPE, CHAR},
- {"const", TQUALIFIER, CONST},
- {"continue", CONTINUE, CONTINUE},
- {"default", DEFAULT, DEFAULT},
- {"do", DO, DO},
- {"double", TYPE, DOUBLE},
- {"else", ELSE, ELSE},
- {"enum", TYPE, ENUM},
- {"extern", SCLASS, EXTERN},
- {"float", TYPE, FLOAT},
- {"for", FOR, FOR},
- {"goto", GOTO, GOTO},
- {"if", IF, IF},
- {"inline", TQUALIFIER, INLINE},
- {"int", TYPE, INT},
- {"long", TYPE, LONG},
- {"register", SCLASS, REGISTER},
- {"restrict", TQUALIFIER, RESTRICT},
- {"return", RETURN, RETURN},
- {"short", TYPE, SHORT},
- {"signed", TYPE, SIGNED},
- {"sizeof", SIZEOF, SIZEOF},
- {"static", SCLASS, STATIC},
- {"struct", TYPE, STRUCT},
- {"switch", SWITCH, SWITCH},
- {"typedef", SCLASS, TYPEDEF},
- {"union", TYPE, UNION},
- {"unsigned", TYPE, UNSIGNED},
- {"void", TYPE, VOID},
- {"volatile", TQUALIFIER, VOLATILE},
- {"while", WHILE, WHILE},
- {NULL, 0, 0},
- };
- keywords(keys, NS_KEYWORD);
-}
-
-void
-setloc(char *fname, unsigned line)
-{
- size_t len;
-
- if ((len = strlen(fname)) >= FILENAME_MAX)
- die("cc1: %s: file name too long", fname);
- memmove(filenam, fname, len);
- filenam[len] = '\0';
-
- free(input->filenam);
- input->filenam = xstrdup(fname);
- lineno = input->lineno = line;
-}
-
-void
-addinput(char *fname, Symbol *hide, char *buffer)
-{
- FILE *fp;
- char *extp;
- unsigned flags;
- int infileln;
- Input *newip, *curip = input;
-
- if (hide) {
- /* this is a macro expansion */
- fp = NULL;
- if (hide->hide == UCHAR_MAX)
- die("cc1: too many macro expansions");
- ++hide->hide;
- flags = IMACRO;
- } else if (fname) {
- /* a new file */
- if ((fp = fopen(fname, "r")) == NULL)
- die("cc1: %s: %s", fname, strerror(errno));
- flags = IFILE;
- if (curip && onlyheader) {
- infileln = strlen(infile);
- if (extp = strrchr(infile, '.'))
- infileln -= strlen(extp);
- printf("%.*s.o: %s %s\n",
- infileln, infile, infile, fname);
- }
- } else {
- /* reading from stdin */
- fp = stdin;
- fname = "<stdin>";
- flags = ISTDIN;
- }
-
- newip = xmalloc(sizeof(*newip));
-
- if (!buffer) {
- buffer = xmalloc(INPUTSIZ);
- buffer[0] = '\0';
- }
-
- if (curip)
- curip->lineno = lineno;
-
- newip->p = newip->begin = newip->line = buffer;
- newip->filenam = NULL;
- newip->lineno = 0;
- newip->next = curip;
- newip->fp = fp;
- newip->hide = hide;
- newip->flags = flags;
- input = newip;
-
- setloc(fname, (curip) ? curip->lineno : newip->lineno);
-}
-
-void
-delinput(void)
-{
- Input *ip = input;
- Symbol *hide = ip->hide;
-
- switch (ip->flags & ITYPE) {
- case IFILE:
- if (fclose(ip->fp))
- die("cc1: %s: %s", ip->filenam, strerror(errno));
- break;
- case IMACRO:
- assert(hide->hide == 1);
- --hide->hide;
- break;
- }
- input = ip->next;
- free(ip->filenam);
- free(ip->line);
- if (input) {
- lineno = input->lineno;
- strcpy(filenam, input->filenam);
- }
-}
-
-static void
-newline(void)
-{
- if (++lineno == 0)
- die("cc1: %s: file too long", filenam);
-}
-
-/*
- * Read the next character from the input file, counting number of lines
- * and joining lines escaped with \
- */
-static int
-readchar(void)
-{
- FILE *fp = input->fp;
- int c;
-
-repeat:
- switch (c = getc(fp)) {
- case '\\':
- if ((c = getc(fp)) == '\n') {
- newline();
- goto repeat;
- }
- ungetc(c, fp);
- c = '\\';
- break;
- case '\n':
- newline();
- break;
- default:
- if (!isprint(c) && !ispunct(c) && !isspace(c))
- warn("invalid input character. The shame of UB is yours");
- break;
- }
-
- return c;
-}
-
-/*
- * discard a C comment. This function is only called from readline
- * because it is impossible to have a comment in a macro, because
- * comments are always discarded before processing any cpp directive
- */
-static void
-comment(int type)
-{
- int c;
-
-repeat:
- while ((c = readchar()) != EOF && c != type)
- ;
-
- if (c == EOF) {
- errorp("unterminated comment");
- return;
- }
-
- if (type == '*' && (c = readchar()) != '/')
- goto repeat;
-}
-
-/*
- * readline is used to read a full logic line from a file.
- * It discards comments and check that the line fits in
- * the input buffer
- */
-static int
-readline(void)
-{
- char *bp, *lim;
- int c, peekc = 0;
-
- if (feof(input->fp)) {
- input->flags |= IEOF;
- return 0;
- }
-
- *input->line = '\0';
- lim = &input->line[INPUTSIZ-1];
- for (bp = input->line; bp < lim-1; *bp++ = c) {
- c = (peekc) ? peekc : readchar();
- peekc = 0;
- if (c == '\n' || c == EOF)
- break;
- if (c != '/')
- continue;
-
- /* check for /* or // */
- peekc = readchar();
- if (peekc != '*' && peekc != '/')
- continue;
- comment((peekc == '/') ? '\n' : '*');
- peekc = 0;
- c = ' ';
- }
-
- input->begin = input->p = input->line;
- if (bp == lim-1) {
- errorp("line too long");
- --bp;
- }
- *bp++ = '\n';
- *bp = '\0';
-
- return 1;
-}
-
-/*
- * moreinput gets more bytes to be passed to the lexer.
- * It can take more bytes from macro expansions or
- * directly reading from files. When a cpp directive
- * is processed the line is discarded because it must not
- * be passed to the lexer
- */
-static int
-moreinput(void)
-{
- int wasexpand = 0;
-
-repeat:
- if (!input)
- return 0;
-
- if (*input->p == '\0') {
- if ((input->flags&ITYPE) == IMACRO) {
- wasexpand = 1;
- input->flags |= IEOF;
- }
- if (input->flags & IEOF) {
- delinput();
- goto repeat;
- }
- if (!readline() || cpp()) {
- *input->p = '\0';
- goto repeat;
- }
- }
-
- if (onlycpp && !wasexpand)
- ppragmaln();
- return 1;
-}
-
-static void
-tok2str(void)
-{
- if ((yylen = input->p - input->begin) > INTIDENTSIZ)
- error("token too big");
- memcpy(yytext, input->begin, yylen);
- yytext[yylen] = '\0';
- input->begin = input->p;
-}
-
-static Symbol *
-readint(char *s, int base, int sign, Symbol *sym)
-{
- Type *tp = sym->type;
- struct limits *lim;
- TUINT u, val, max;
- int c;
-
- lim = getlimits(tp);
- max = lim->max.i;
- if (*s == '0')
- ++s;
- if (toupper(*s) == 'X')
- ++s;
-
- for (u = 0; isxdigit(c = *s++); u = u*base + val) {
- static char letters[] = "0123456789ABCDEF";
- val = strchr(letters, toupper(c)) - letters;
- repeat:
- if (u <= max/base && u*base <= max - val)
- continue;
- if (tp->prop & TSIGNED) {
- if (tp == inttype)
- tp = (base==10) ? longtype : uinttype;
- else if (tp == longtype)
- tp = (base==10) ? llongtype : ulongtype;
- else
- goto overflow;
- } else {
- if (tp == uinttype)
- tp = (sign==UNSIGNED) ? ulongtype : longtype;
- else if (tp == ulongtype)
- tp = (sign==UNSIGNED) ? ullongtype : llongtype;
- else
- goto overflow;
- }
- sym->type = tp;
- lim = getlimits(tp);
- max = lim->max.i;
- goto repeat;
- }
-
- if (tp->prop & TSIGNED)
- sym->u.i = u;
- else
- sym->u.u = u;
-
- return sym;
-
-overflow:
- errorp("overflow in integer constant");
- return sym;
-}
-
-static int
-integer(char *s, int base)
-{
- Type *tp;
- Symbol *sym;
- unsigned size, sign;
-
- for (size = sign = 0; ; ++input->p) {
- switch (toupper(*input->p)) {
- case 'L':
- if (size == LLONG)
- goto wrong_type;
- size = (size == LONG) ? LLONG : LONG;
- continue;
- case 'U':
- if (sign == UNSIGNED)
- goto wrong_type;
- sign = UNSIGNED;
- continue;
- default:
- goto convert;
- wrong_type:
- error("invalid suffix in integer constant");
- }
- }
-
-convert:
- tp = ctype(INT, sign, size);
- sym = newsym(NS_IDEN, NULL);
- sym->type = tp;
- sym->flags |= SCONSTANT;
- yylval.sym = readint(s, base, sign, sym);
- return CONSTANT;
-}
-
-static char *
-digits(int base)
-{
- char *p;
- int c;
-
- for (p = input->p; c = *p; ++p) {
- switch (base) {
- case 8:
- if (!strchr("01234567", c))
- goto end;
- break;
- case 10:
- if (!isdigit(c))
- goto end;
- break;
- case 16:
- if (!isxdigit(c))
- goto end;
- break;
- }
- }
-end:
- input->p = p;
- tok2str();
- return yytext;
-}
-
-static int
-number(void)
-{
- int base;
-
- if (*input->p != '0') {
- base = 10;
- } else {
- if (toupper(*++input->p) == 'X') {
- ++input->p;
- base = 16;
- } else {
- base = 8;
- }
- }
-
- return integer(digits(base), base);
-}
-
-static int
-escape(void)
-{
- int c, base;
-
- switch (*++input->p) {
- case 'a': return '\a';
- case 'f': return '\f';
- case 'n': return '\n';
- case 'r': return '\r';
- case 't': return '\t';
- case 'v': return '\v';
- case '"': return '"';
- case '\'': return '\'';
- case '\\': return '\\';
- case '\?': return '\?';
- case 'u':
- /*
- * FIXME: universal constants are not correctly handled
- */
- if (!isdigit(*++input->p))
- warn("incorrect digit for numerical character constant");
- base = 10;
- break;
- case 'x':
- if (!isxdigit(*++input->p))
- warn("\\x used with no following hex digits");
- base = 16;
- break;
- case '0':
- if (!strchr("01234567", *++input->p))
- warn("\\0 used with no following octal digits");
- base = 8;
- break;
- default:
- warn("unknown escape sequence");
- return ' ';
- }
- errno = 0;
- c = strtoul(input->p, &input->p, base);
- if (errno || c > 255)
- warn("character constant out of range");
- --input->p;
- return c;
-}
-
-static int
-character(void)
-{
- int c;
- Symbol *sym;
-
- if ((c = *++input->p) == '\\')
- c = escape();
- else
- c = *input->p;
- ++input->p;
- if (*input->p != '\'')
- errorp("invalid character constant");
- else
- ++input->p;
-
- sym = newsym(NS_IDEN, NULL);
- sym->u.i = c;
- sym->type = inttype;
- yylval.sym = sym;
- tok2str();
- return CONSTANT;
-}
-
-static int
-string(void)
-{
- char *bp = yytext;
- int c;
-
- *bp++ = '"';
- for (++input->p; (c = *input->p) != '"'; ++input->p) {
- if (c == '\0') {
- errorp("missing terminating '\"' character");
- break;
- }
- if (c == '\\')
- c = escape();
- if (bp == &yytext[STRINGSIZ+1]) {
- /* TODO: proper error handling here */
- error("string too long");
- }
- *bp++ = c;
- }
-
- input->begin = ++input->p;
- *bp = '\0';
-
- yylen = bp - yytext + 1;
- yylval.sym = newstring(yytext+1, yylen-1);
- *bp++ = '"';
- *bp = '\0';
- return STRING;
-}
-
-static int
-iden(void)
-{
- Symbol *sym;
- char *p, *begin;
-
- begin = input->p;
- for (p = begin; isalnum(*p) || *p == '_'; ++p)
- ;
- input->p = p;
- tok2str();
- if ((sym = lookup(NS_CPP, yytext, NOALLOC)) != NULL) {
- if (!disexpand && !sym->hide && expand(begin, sym))
- return next();
- }
- sym = lookup(namespace, yytext, ALLOC);
- yylval.sym = sym;
- if (sym->flags & SCONSTANT)
- return CONSTANT;
- if (sym->token != IDEN)
- yylval.token = sym->u.token;
- return sym->token;
-}
-
-static int
-follow(int expect, int ifyes, int ifno)
-{
- if (*input->p++ == expect)
- return ifyes;
- --input->p;
- return ifno;
-}
-
-static int
-minus(void)
-{
- switch (*input->p++) {
- case '-': return DEC;
- case '>': return INDIR;
- case '=': return SUB_EQ;
- default: --input->p; return '-';
- }
-}
-
-static int
-plus(void)
-{
- switch (*input->p++) {
- case '+': return INC;
- case '=': return ADD_EQ;
- default: --input->p; return '+';
- }
-}
-
-static int
-relational(int op, int equal, int shift, int assig)
-{
- int c;
-
- if ((c = *input->p++) == '=')
- return equal;
- if (c == op)
- return follow('=', assig, shift);
- --input->p;
- return op;
-}
-
-static int
-logic(int op, int equal, int logic)
-{
- int c;
-
- if ((c = *input->p++) == '=')
- return equal;
- if (c == op)
- return logic;
- --input->p;
- return op;
-}
-
-static int
-dot(void)
-{
- int c;
-
- if ((c = *input->p) != '.')
- return '.';
- if ((c = *++input->p) != '.')
- error("incorrect token '..'");
- ++input->p;
- return ELLIPSIS;
-}
-
-static int
-operator(void)
-{
- int t;
-
- switch (t = *input->p++) {
- case '<': t = relational('<', LE, SHL, SHL_EQ); break;
- case '>': t = relational('>', GE, SHR, SHR_EQ); break;
- case '&': t = logic('&', AND_EQ, AND); break;
- case '|': t = logic('|', OR_EQ, OR); break;
- case '=': t = follow('=', EQ, '='); break;
- case '^': t = follow('=', XOR_EQ, '^'); break;
- case '*': t = follow('=', MUL_EQ, '*'); break;
- case '/': t = follow('=', DIV_EQ, '/'); break;
- case '!': t = follow('=', NE, '!'); break;
- case '#': t = follow('#', '$', '#'); break;
- case '-': t = minus(); break;
- case '+': t = plus(); break;
- case '.': t = dot(); break;
- }
- tok2str();
- return t;
-}
-
-/* TODO: Ensure that namespace is NS_IDEN after a recovery */
-
-/*
- * skip all the spaces until the next token. When we are in
- * CPPMODE \n is not considered a whitespace
- */
-static int
-skipspaces(void)
-{
- int c;
-
- for (;;) {
- switch (c = *input->p) {
- case '\n':
- if (lexmode == CPPMODE)
- goto return_byte;
- ++input->p;
- case '\0':
- if (!moreinput())
- return EOF;
- break;
- case ' ':
- case '\t':
- case '\v':
- case '\r':
- case '\f':
- ++input->p;
- break;
- default:
- goto return_byte;
- }
- }
-
-return_byte:
- input->begin = input->p;
- return c;
-}
-
-int
-next(void)
-{
- int c;
-
- if ((c = skipspaces()) == EOF)
- yytoken = EOFTOK;
- else if (isalpha(c) || c == '_')
- yytoken = iden();
- else if (isdigit(c))
- yytoken = number();
- else if (c == '"')
- yytoken = string();
- else if (c == '\'')
- yytoken = character();
- else
- yytoken = operator();
-
- if (yytoken == EOF) {
- strcpy(yytext, "<EOF>");
- if (cppctx)
- errorp("#endif expected");
- }
-
- DBG("TOKEN %s", yytext);
- return yytoken;
-}
-
-void
-expect(int tok)
-{
- if (yytoken != tok) {
- if (isgraph(tok))
- errorp("expected '%c' before '%s'", tok, yytext);
- else
- errorp("unexpected '%s'", yytext);
- } else {
- next();
- }
-}
-
-int
-ahead(void)
-{
- skipspaces();
- return *input->begin;
-}
-
-void
-setsafe(int type)
-{
- safe = type;
-}
-
-void
-discard(void)
-{
- extern jmp_buf recover;
- int c;
-
- input->begin = input->p;
- for (c = yytoken; ; c = *input->begin++) {
- switch (safe) {
- case END_COMP:
- if (c == '}')
- goto jump;
- goto semicolon;
- case END_COND:
- if (c == ')')
- goto jump;
- break;
- case END_LDECL:
- if (c == ',')
- goto jump;
- case END_DECL:
- semicolon:
- if (c == ';')
- goto jump;
- break;
- }
- if (c == '\0' && !moreinput())
- exit(1);
- }
-jump:
- yytoken = c;
- longjmp(recover, 1);
-}
--- a/src/cc1/main.c
+++ /dev/null
@@ -1,102 +1,0 @@
-static char sccsid[] = "@(#) ./cc1/main.c";
-#include <setjmp.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-
-#include <scc/arg.h>
-#include <scc/scc.h>
-#include "cc1.h"
-
-char *argv0, *infile;
-
-int warnings;
-jmp_buf recover;
-
-static struct items uflags;
-int onlycpp, onlyheader;
-
-
-extern int failure;
-
-static void
-defmacro(char *macro)
-{
- char *p = strchr(macro, '=');
-
- if (p)
- *p++ = '\0';
- else
- p = "1";
-
- defdefine(macro, p, "command-line");
-}
-
-static void
-usage(void)
-{
- fputs("usage: cc1 [-Ewd] [-D def[=val]]... [-U def]... "
- "[-I dir]... [-o output] [input]\n", stderr);
- exit(1);
-}
-
-int
-main(int argc, char *argv[])
-{
- int i;
-
- ilex();
- icpp();
- icode();
- ibuilts();
-
- ARGBEGIN {
- case 'D':
- defmacro(EARGF(usage()));
- break;
- case 'M':
- onlyheader = 1;
- break;
- case 'E':
- onlycpp = 1;
- break;
- case 'I':
- incdir(EARGF(usage()));
- break;
- case 'U':
- newitem(&uflags, EARGF(usage()));
- break;
- case 'd':
- DBGON();
- break;
- case 'w':
- warnings = 1;
- break;
- default:
- usage();
- } ARGEND
-
- if (argc > 1)
- usage();
-
- for (i = 0; i < uflags.n; ++i)
- undefmacro(uflags.s[i]);
-
- infile = (*argv) ? *argv : "<stdin>";
- addinput(*argv, NULL, NULL);
-
- /*
- * we cannot initialize arch until we have an
- * output stream, because we maybe want to emit new types
- */
- iarch();
- if (onlycpp || onlyheader) {
- outcpp();
- } else {
- for (next(); yytoken != EOFTOK; decl())
- ;
- }
-
- return failure;
-}
--- a/src/cc1/stmt.c
+++ /dev/null
@@ -1,386 +1,0 @@
-static char sccsid[] = "@(#) ./cc1/stmt.c";
-#include <stddef.h>
-#include <setjmp.h>
-
-#include <scc/cstd.h>
-#include <scc/scc.h>
-#include "cc1.h"
-
-#define NEGATE 1
-#define NONEGATE 0
-
-Symbol *curfun;
-
-static void stmt(Symbol *lbreak, Symbol *lcont, Switch *lswitch);
-
-static void
-label(void)
-{
- Symbol *sym;
-
- switch (yytoken) {
- case IDEN:
- case TYPEIDEN:
- sym = lookup(NS_LABEL, yytext, ALLOC);
- if (sym->flags & SDEFINED)
- error("label '%s' already defined", yytext);
- if ((sym->flags & SDECLARED) == 0)
- sym = install(NS_LABEL, sym);
- sym->flags |= SDEFINED;
- emit(OLABEL, sym);
- next();
- expect(':');
- break;
- default:
- unexpected();
- }
-}
-
-static void
-stmtexp(Symbol *lbreak, Symbol *lcont, Switch *lswitch)
-{
- Node *np;
-
- if (accept(';'))
- return;
- if (yytoken == IDEN && ahead() == ':') {
- label();
- stmt(lbreak, lcont, lswitch);
- return;
- }
- np = expr();
- if ((np->flags & NEFFECT) == 0)
- warn("expression without side effects");
- emit(OEXPR, np);
- expect(';');
-}
-
-static Node *
-condition(int neg)
-{
- Node *np;
-
- expect('(');
- np = condexpr(neg);
- expect(')');
-
- return np;
-}
-
-static void
-While(Symbol *lbreak, Symbol *lcont, Switch *lswitch)
-{
- Symbol *begin;
- Node *np;
-
- begin = newlabel();
- lcont = newlabel();
- lbreak = newlabel();
-
- expect(WHILE);
- np = condition(NONEGATE);
-
- emit(OJUMP, lcont);
-
- emit(OBLOOP, NULL);
- emit(OLABEL, begin);
- stmt(lbreak, lcont, lswitch);
- emit(OLABEL, lcont);
- emit(OBRANCH, begin);
- emit(OEXPR, np);
- emit(OELOOP, NULL);
-
- emit(OLABEL, lbreak);
-}
-
-static void
-For(Symbol *lbreak, Symbol *lcont, Switch *lswitch)
-{
- Symbol *begin, *cond;
- Node *econd, *einc;
-
- begin = newlabel();
- lcont = newlabel();
- cond = newlabel();
- lbreak = newlabel();
-
- pushctx();
-
- expect(FOR);
- expect('(');
- switch (yytoken) {
- case TYPE:
- case TYPEIDEN:
- case TQUALIFIER:
- case SCLASS:
- decl();
- break;
- default:
- emit(OEXPR, expr());
- case ';':
- expect(';');
- break;
- }
- econd = (yytoken != ';') ? condexpr(NONEGATE) : NULL;
- expect(';');
- einc = (yytoken != ')') ? expr() : NULL;
- expect(')');
-
- emit(OJUMP, cond);
-
- emit(OBLOOP, NULL);
- emit(OLABEL, begin);
- stmt(lbreak, lcont, lswitch);
- emit(OLABEL, lcont);
- emit(OEXPR, einc);
- emit(OLABEL, cond);
- emit((econd) ? OBRANCH : OJUMP, begin);
- emit(OEXPR, econd);
- emit(OELOOP, NULL);
-
- emit(OLABEL, lbreak);
-
- popctx();
-}
-
-static void
-Dowhile(Symbol *lbreak, Symbol *lcont, Switch *lswitch)
-{
- Symbol *begin;
- Node *np;
-
- begin = newlabel();
- lcont = newlabel();
- lbreak = newlabel();
-
- expect(DO);
-
- emit(OBLOOP, NULL);
- emit(OLABEL, begin);
- stmt(lbreak, lcont, lswitch);
- expect(WHILE);
- np = condition(NONEGATE);
- emit(OLABEL, lcont);
- emit(OBRANCH, begin);
- emit(OEXPR, np);
- emit(OELOOP, NULL);
-
- emit(OLABEL, lbreak);
-}
-
-static void
-Return(Symbol *lbreak, Symbol *lcont, Switch *lswitch)
-{
- Node *np;
- Type *tp = curfun->type->type;
-
- expect(RETURN);
- np = (yytoken != ';') ? decay(expr()) : NULL;
- expect(';');
- if (!np) {
- if (tp != voidtype)
- warn("function returning non void returns no value");
- tp = voidtype;
- } else if (np->type != tp) {
- if (tp == voidtype)
- warn("function returning void returns a value");
- else if ((np = convert(np, tp, 0)) == NULL)
- errorp("incorrect type in return");
- }
- emit(ORET, NULL);
- emit(OEXPR, np);
-}
-
-static void
-Break(Symbol *lbreak, Symbol *lcont, Switch *lswitch)
-{
- expect(BREAK);
- if (!lbreak) {
- errorp("break statement not within loop or switch");
- } else {
- emit(OJUMP, lbreak);
- expect(';');
- }
-}
-
-static void
-Continue(Symbol *lbreak, Symbol *lcont, Switch *lswitch)
-{
- expect(CONTINUE);
- if (!lcont) {
- errorp("continue statement not within loop");
- } else {
- emit(OJUMP, lcont);
- expect(';');
- }
-}
-
-static void
-Goto(Symbol *lbreak, Symbol *lcont, Switch *lswitch)
-{
- Symbol *sym;
-
- namespace = NS_LABEL;
- next();
- namespace = NS_IDEN;
-
- if (yytoken != IDEN)
- unexpected();
- sym = yylval.sym;
- if ((sym->flags & SDECLARED) == 0)
- sym = install(NS_LABEL, sym);
- sym->flags |= SUSED;
- emit(OJUMP, sym);
- next();
- expect(';');
-}
-
-static void
-Swtch(Symbol *obr, Symbol *lcont, Switch *osw)
-{
- Switch sw = {0};
- Node *cond;
- Symbol *lbreak;
-
- expect(SWITCH);
-
- expect ('(');
- if ((cond = convert(expr(), inttype, 0)) == NULL) {
- errorp("incorrect type in switch statement");
- cond = constnode(zero);
- }
- expect (')');
-
- lbreak = newlabel();
- emit(OBSWITCH, NULL);
- emit(OEXPR, cond);
- stmt(lbreak, lcont, &sw);
- emit(OESWITCH, lbreak);
- emit(OLABEL, lbreak);
-}
-
-static void
-Case(Symbol *lbreak, Symbol *lcont, Switch *sw)
-{
- Node *np;
- Symbol *label;
-
- expect(CASE);
- if ((np = constexpr()) == NULL)
- errorp("case label does not reduce to an integer constant");
- if (!sw) {
- errorp("case label not within a switch statement");
- } else if (sw->nr >= 0 && ++sw->nr == NR_SWITCH) {
- errorp("too many case labels for a switch statement");
- sw->nr = -1;
- }
- expect(':');
-
- label = newlabel();
- emit(OCASE, label);
- emit(OEXPR, np);
- emit(OLABEL, label);
- stmt(lbreak, lcont, sw);
-}
-
-static void
-Default(Symbol *lbreak, Symbol *lcont, Switch *sw)
-{
- Symbol *label = newlabel();
-
- if (sw->hasdef)
- errorp("multiple default labels in one switch");
- sw->hasdef = 1;
- expect(DEFAULT);
- expect(':');
- emit(ODEFAULT, label);
- emit(OLABEL, label);
- stmt(lbreak, lcont, sw);
-}
-
-static void
-If(Symbol *lbreak, Symbol *lcont, Switch *lswitch)
-{
- Symbol *end, *lelse;
- Node *np;
-
- lelse = newlabel();
- expect(IF);
- np = condition(NEGATE);
- emit(OBRANCH, lelse);
- emit(OEXPR, np);
- stmt(lbreak, lcont, lswitch);
- if (accept(ELSE)) {
- end = newlabel();
- emit(OJUMP, end);
- emit(OLABEL, lelse);
- stmt(lbreak, lcont, lswitch);
- emit(OLABEL, end);
- } else {
- emit(OLABEL, lelse);
- }
-}
-
-static void
-blockit(Symbol *lbreak, Symbol *lcont, Switch *lswitch)
-{
- switch (yytoken) {
- case TYPEIDEN:
- if (ahead() == ':')
- goto parse_stmt;
- case TYPE:
- case TQUALIFIER:
- case SCLASS:
- decl();
- return;
- default:
- parse_stmt:
- stmt(lbreak, lcont, lswitch);
- }
-}
-
-void
-compound(Symbol *lbreak, Symbol *lcont, Switch *lswitch)
-{
- static int nested;
-
- pushctx();
- expect('{');
-
- if (nested == NR_BLOCK)
- error("too many nesting levels of compound statements");
-
- ++nested;
- for (;;) {
- if (yytoken == '}')
- break;
- blockit(lbreak, lcont, lswitch);
- }
- --nested;
-
- popctx();
- expect('}');
-}
-
-static void
-stmt(Symbol *lbreak, Symbol *lcont, Switch *lswitch)
-{
- void (*fun)(Symbol *, Symbol *, Switch *);
-
- switch (yytoken) {
- case '{': fun = compound; break;
- case RETURN: fun = Return; break;
- case WHILE: fun = While; break;
- case FOR: fun = For; break;
- case DO: fun = Dowhile; break;
- case IF: fun = If; break;
- case BREAK: fun = Break; break;
- case CONTINUE: fun = Continue; break;
- case GOTO: fun = Goto; break;
- case SWITCH: fun = Swtch; break;
- case CASE: fun = Case; break;
- case DEFAULT: fun = Default; break;
- default: fun = stmtexp; break;
- }
- (*fun)(lbreak, lcont, lswitch);
-}
--- a/src/cc1/symbol.c
+++ /dev/null
@@ -1,353 +1,0 @@
-static char sccsid[] = "@(#) ./cc1/symbol.c";
-#include <assert.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <scc/cstd.h>
-#include <scc/scc.h>
-#include "cc1.h"
-
-#define NR_SYM_HASH 64
-#define NR_CPP_HASH 32
-#define NR_LBL_HASH 16
-
-unsigned curctx;
-static unsigned short counterid;
-
-static Symbol *head, *labels;
-static Symbol *htab[NR_SYM_HASH];
-static Symbol *htabcpp[NR_CPP_HASH];
-static Symbol *htablbl[NR_LBL_HASH];
-
-#ifndef NDEBUG
-void
-dumpstab(Symbol **tbl, char *msg)
-{
- Symbol **bp, *sym;
- unsigned size;
-
- fprintf(stderr, "Symbol Table dump at ctx=%u\n%s\n", curctx, msg);
- if (tbl == htab)
- size = NR_SYM_HASH;
- else if (tbl == htabcpp)
- size = NR_CPP_HASH;
- else if (tbl == htablbl)
- size = NR_LBL_HASH;
- else
- abort();
-
- for (bp = tbl; bp < &tbl[size]; ++bp) {
- if (*bp == NULL)
- continue;
- fprintf(stderr, "%d", (int) (bp - htab));
- for (sym = *bp; sym; sym = sym->hash)
- fprintf(stderr, "->[%d,%d:'%s'=%p]",
- sym->ns, sym->ctx, sym->name, (void *) sym);
- putc('\n', stderr);
- }
- fputs("head:", stderr);
- for (sym = head; sym; sym = sym->next) {
- fprintf(stderr, "->[%d,%d:'%s'=%p]",
- sym->ns, sym->ctx,
- (sym->name) ? sym->name : "", (void *) sym);
- }
- fputs("\nlabels:", stderr);
- for (sym = labels; sym; sym = sym->next) {
- fprintf(stderr, "->[%d,%d:'%s'=%p]",
- sym->ns, sym->ctx,
- (sym->name) ? sym->name : "", (void *) sym);
- }
- putc('\n', stderr);
-}
-#endif
-
-static Symbol **
-hash(char *s, int ns)
-{
- unsigned c, h, size;
- Symbol **tab;
-
- for (h = 0; c = *s; ++s)
- h = h*33 ^ c;
-
- switch (ns) {
- case NS_CPP:
- tab = htabcpp;
- size = NR_CPP_HASH-1;
- break;
- case NS_LABEL:
- tab = htablbl;
- size = NR_LBL_HASH-1;
- break;
- default:
- tab = htab;
- size = NR_SYM_HASH-1;
- break;
- }
- return &tab[h & size];
-}
-
-static void
-unlinkhash(Symbol *sym)
-{
- Symbol **h;
-
- if ((sym->flags & SDECLARED) == 0)
- return;
- h = hash(sym->name, sym->ns);
- assert(sym->ns == NS_CPP || *h == sym);
- while (*h != sym)
- h = &(*h)->hash;
- *h = sym->hash;
-}
-
-void
-pushctx(void)
-{
- DBG("SYM: pushed context %d", curctx+1);
- if (++curctx == NR_BLOCK+1)
- error("too many nested blocks");
-}
-
-void
-killsym(Symbol *sym)
-{
- short f;
- char *name;
-
- if (!sym)
- return;
- f = sym->flags;
- if (f & SSTRING)
- free(sym->u.s);
- if (sym->ns == NS_TAG)
- sym->type->prop &= ~TDEFINED;
- unlinkhash(sym);
- if ((name = sym->name) != NULL) {
- switch (sym->ns) {
- case NS_LABEL:
- if ((f & SDEFINED) == 0)
- errorp("label '%s' is not defined", name);
- case NS_IDEN:
- if ((f & (SUSED|SGLOBAL|SDECLARED)) == SDECLARED)
- warn("'%s' defined but not used", name);
- break;
- }
- }
- free(name);
- free(sym);
-}
-
-void
-popctx(void)
-{
- Symbol *next, *sym;
- int ns, dangling = 0;
-
- DBG("SYM: poped context %d", curctx);
- /*
- * we have to be careful before popping the current
- * context, because since the parser is one token
- * ahead it may already have read an identifier at
- * this point, and yylval.sym is a pointer to
- * the symbol associated to such token. If that
- * symbol is from the context that we are popping
- * then we are going to generate a dangling pointer.
- * We can detect this situation and call again to
- * lookup.
- */
- if ((yytoken == IDEN || yytoken == TYPEIDEN) &&
- yylval.sym->ctx == curctx) {
- ns = yylval.sym->ns;
- dangling = 1;
- }
-
- for (sym = head; sym && sym->ctx == curctx; sym = next) {
- /*
- * Since we are unlinking them in the inverse order
- * we do know that sym is always the head of the
- * collision list
- */
- next = sym->next;
- killsym(sym);
- }
- head = sym;
-
- if (--curctx == GLOBALCTX) {
- for (sym = labels; sym; sym = next) {
- next = sym->next;
- killsym(sym);
- }
- labels = NULL;
- }
-
- if (dangling) {
- yylval.sym = lookup(ns, yytext, ALLOC);
- yytoken = yylval.sym->token;
- }
-}
-
-unsigned
-newid(void)
-{
- unsigned short id;
-
- if (lexmode == CPPMODE)
- return 0;
- id = ++counterid;
- if (id == 0) {
- die("cc1: overflow in %s identifiers",
- (curctx) ? "internal" : "external");
- }
- return id;
-}
-
-Symbol *
-newsym(int ns, char *name)
-{
- Symbol *sym;
-
- sym = xmalloc(sizeof(*sym));
- if (name)
- name = xstrdup(name);
- sym->name = name;
- sym->id = 0;
- sym->hide = 0;
- sym->ns = ns;
- sym->ctx = curctx;
- sym->token = IDEN;
- sym->flags = 0;
- sym->u.s = NULL;
- sym->type = NULL;
- sym->hash = NULL;
-
- if (ns == NS_LABEL) {
- sym->next = labels;
- labels = sym;
- } else if (ns != NS_CPP) {
- sym->next = head;
- head = sym;
- }
- return sym;
-}
-
-static Symbol *
-linkhash(Symbol *sym)
-{
- Symbol **h;
-
- h = hash(sym->name, sym->ns);
- sym->hash = *h;
- *h = sym;
-
- if (sym->ns != NS_CPP)
- sym->id = newid();
- sym->flags |= SDECLARED;
- return sym;
-}
-
-Symbol *
-newstring(char *s, size_t len)
-{
- Symbol *sym = newsym(NS_IDEN, NULL);
-
- if (lexmode != CPPMODE)
- sym->type = mktype(chartype, ARY, len, NULL);
- sym->id = newid();
- sym->flags |= SSTRING | SCONSTANT | SPRIVATE;
- sym->u.s = xmalloc(len);
- if (s)
- memcpy(sym->u.s, s, len);
-
- return sym;
-}
-
-Symbol *
-newlabel(void)
-{
- Symbol *sym = newsym(NS_LABEL, NULL);
- sym->id = newid();
- return sym;
-}
-
-Symbol *
-lookup(int ns, char *name, int alloc)
-{
- Symbol *sym;
- int sns, c;
- char *t;
-
- c = *name;
- for (sym = *hash(name, ns); sym; sym = sym->hash) {
- t = sym->name;
- if (*t != c || strcmp(t, name))
- continue;
- sns = sym->ns;
- if (sns == ns)
- return sym;
- /*
- * When a lookup is done in a namespace associated
- * to a struct we also want symbols of NS_IDEN which
- * are typedef, because in other case we cannot declare
- * fields of such types.
- * TODO: Remove this trick
- */
- if (sns == NS_KEYWORD ||
- (sym->flags & STYPEDEF) && ns >= NS_STRUCTS) {
- return sym;
- }
- }
- return (alloc == ALLOC) ? newsym(ns, name) : NULL;
-}
-
-Symbol *
-install(int ns, Symbol *sym)
-{
- if (sym->flags & SDECLARED || sym->ctx != curctx) {
- if (sym->ctx == curctx && ns == sym->ns)
- return NULL;
- sym = newsym(ns, sym->name);
- }
- return linkhash(sym);
-}
-
-void
-keywords(struct keyword *key, int ns)
-{
- Symbol *sym;
-
- for ( ; key->str; ++key) {
- sym = linkhash(newsym(ns, key->str));
- sym->token = key->token;
- sym->u.token = key->value;
- }
- /*
- * Remove all the predefined symbols from * the symbol list. It
- * will make faster some operations. There is no problem of memory
- * leakeage because this memory is not ever freed
- */
- counterid = 0;
- head = NULL;
-}
-
-void
-builtins(struct builtin *built)
-{
- Symbol *sym;
- struct builtin *bp;
-
- for (bp = built; bp->str; ++bp) {
- sym = linkhash(newsym(NS_KEYWORD, bp->str));
- sym->token = BUILTIN;
- sym->u.fun = bp->fun;
- }
- /*
- * Remove all the predefined symbols from * the symbol list. It
- * will make faster some operations. There is no problem of memory
- * leakeage because this memory is not ever freed
- */
- counterid = 0;
- head = NULL;
-}
--- a/src/cc1/target/amd64-sysv/arch.c
+++ /dev/null
@@ -1,220 +1,0 @@
-static char sccsid[] = "@(#) ./cc1/arch/amd64-sysv/arch.c";
-
-#include <scc/scc.h>
-#include "../../cc1.h"
-
-#define RANK_BOOL 0
-#define RANK_SCHAR 1
-#define RANK_UCHAR 1
-#define RANK_CHAR 1
-#define RANK_SHORT 2
-#define RANK_USHORT 2
-#define RANK_INT 3
-#define RANK_UINT 3
-#define RANK_LONG 4
-#define RANK_ULONG 4
-#define RANK_LLONG 5
-#define RANK_ULLONG 5
-#define RANK_FLOAT 6
-#define RANK_DOUBLE 7
-#define RANK_LDOUBLE 8
-
-/*
- * Initializaion of type pointers were done with
- * a C99 initilizator '... = &(Type) {...', but
- * c compiler in Plan9 gives error with this
- * syntax, so I have switched it to this ugly form
- * I hope I will change it again in the future
- */
-
-static Type types[] = {
- { /* 0 = voidtype */
- .op = VOID,
- .letter = L_VOID,
- },
- { /* 1 = pvoidtype */
- .op = PTR,
- .letter = L_POINTER,
- .prop = TDEFINED,
- .type = &types[5], /* chartype */
- .size = 8,
- .align = 8,
- },
- { /* 2 = booltype */
- .op = INT,
- .letter = L_BOOL,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 1,
- .align = 1,
- .n.rank = RANK_BOOL,
- },
- { /* 3 = schartype */
- .op = INT,
- .letter = L_INT8,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 1,
- .align = 1,
- .n.rank = RANK_SCHAR,
- },
- { /* 4 = uchartype */
- .op = INT,
- .letter = L_UINT8,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 1,
- .align = 1,
- .n.rank = RANK_UCHAR,
- },
- { /* 5 = chartype */
- .op = INT,
- .letter = L_INT8,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 1,
- .align = 1,
- .n.rank = RANK_CHAR,
- },
- { /* 6 = ushortype */
- .op = INT,
- .letter = L_UINT16,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 2,
- .align = 2,
- .n.rank = RANK_USHORT,
- },
- { /* 7 = shortype */
- .op = INT,
- .letter = L_INT16,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 2,
- .align = 2,
- .n.rank = RANK_SHORT,
- },
- { /* 8 = uinttype */
- .op = INT,
- .letter = L_UINT32,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 4,
- .align = 4,
- .n.rank = RANK_UINT,
- },
- { /* 9 = inttype */
- .op = INT,
- .letter = L_INT32,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 4,
- .align = 4,
- .n.rank = RANK_INT,
- },
- { /* 10 = longtype */
- .op = INT,
- .letter = L_INT64,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 8,
- .align = 8,
- .n.rank = RANK_LONG,
- },
- { /* 11 = ulongtype */
- .op = INT,
- .letter = L_UINT64,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 8,
- .align = 8,
- .n.rank = RANK_ULONG,
- },
- { /* 12 = ullongtype */
- .op = INT,
- .letter = L_UINT64,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 8,
- .align = 8,
- .n.rank = RANK_ULLONG,
- },
- { /* 13 = llongtype */
- .op = INT,
- .letter = L_INT64,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 8,
- .align = 8,
- .n.rank = RANK_LLONG,
- },
- { /* 14 = floattype */
- .op = FLOAT,
- .letter = L_FLOAT,
- .prop = TDEFINED | TARITH,
- .size = 4,
- .align = 4,
- .n.rank = RANK_FLOAT,
- },
- { /* 15 = doubletype */
- .op = FLOAT,
- .letter = L_DOUBLE,
- .prop = TDEFINED | TARITH,
- .size = 8,
- .align = 8,
- .n.rank = RANK_DOUBLE,
- },
- { /* 16 = ldoubletype */
- .op = FLOAT,
- .letter = L_LDOUBLE,
- .prop = TDEFINED | TARITH,
- .size = 16,
- .align = 16,
- .n.rank = RANK_LDOUBLE,
- },
- { /* 17 = sizettype */
- .op = INT,
- .letter = L_UINT64,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 8,
- .align = 8,
- .n.rank = RANK_UINT,
- },
- { /* 18 = ellipsis */
- .op = ELLIPSIS,
- .letter = L_ELLIPSIS,
- .prop = TDEFINED,
- },
- { /* 19 = pdifftype */
- .op = INT,
- .letter = L_INT64,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 8,
- .align = 8,
- .n.rank = RANK_LONG,
- },
- { /* 20 = va_type */
- .op = STRUCT,
- .letter = L_VA_ARG,
- .prop = TDEFINED,
- .size = 24,
- .align = 8,
- },
-};
-
-Type *voidtype = &types[0], *pvoidtype = &types[1],
- *booltype = &types[2], *schartype = &types[3],
- *uchartype = &types[4], *chartype = &types[5],
- *ushortype = &types[6], *shortype = &types[7],
- *uinttype = &types[8], *inttype = &types[9],
- *longtype = &types[10], *ulongtype = &types[11],
- *ullongtype = &types[12], *llongtype = &types[13],
- *floattype = &types[14], *doubletype = &types[15],
- *ldoubletype = &types[16],
- *sizettype = &types[17], *pdifftype = &types[19],
- *ellipsistype = &types[18], *va_type = &types[20],
- *va_list_type;
-
-static Symbol dummy0 = {.u.i = 0, .type = &types[9]},
- dummy1 = {.u.i = 1, .type = &types[9]};
-Symbol *zero = &dummy0, *one = &dummy1;
-
-void
-iarch(void)
-{
- va_list_type = mktype(va_type, ARY, 1, NULL);
-}
-
-int
-valid_va_list(Type *tp)
-{
- return tp->op == PTR && eqtype(tp->type, va_type, 1);
-}
--- a/src/cc1/target/amd64-sysv/arch.mk
+++ /dev/null
@@ -1,4 +1,0 @@
-OBJ-amd64-sysv= $(OBJS) target/amd64-sysv/arch.o
-
-$(LIBEXEC)/cc1-amd64-sysv: $(OBJ-amd64-sysv)
- $(CC) $(SCC_LDFLAGS) $(OBJ-amd64-sysv) -lscc -o $@
--- a/src/cc1/target/arm64-sysv/arch.c
+++ /dev/null
@@ -1,220 +1,0 @@
-static char sccsid[] = "@(#) ./cc1/arch/arm64-sysv/arch.c";
-
-#include <scc/scc.h>
-#include "../../cc1.h"
-
-#define RANK_BOOL 0
-#define RANK_SCHAR 1
-#define RANK_UCHAR 1
-#define RANK_CHAR 1
-#define RANK_SHORT 2
-#define RANK_USHORT 2
-#define RANK_INT 3
-#define RANK_UINT 3
-#define RANK_LONG 4
-#define RANK_ULONG 4
-#define RANK_LLONG 5
-#define RANK_ULLONG 5
-#define RANK_FLOAT 6
-#define RANK_DOUBLE 7
-#define RANK_LDOUBLE 8
-
-/*
- * Initializaion of type pointers were done with
- * a C99 initilizator '... = &(Type) {...', but
- * c compiler in Plan9 gives error with this
- * syntax, so I have switched it to this ugly form
- * I hope I will change it again in the future
- */
-
-static Type types[] = {
- { /* 0 = voidtype */
- .op = VOID,
- .letter = L_VOID,
- },
- { /* 1 = pvoidtype */
- .op = PTR,
- .letter = L_POINTER,
- .prop = TDEFINED,
- .type = &types[5], /* chartype */
- .size = 8,
- .align = 8,
- },
- { /* 2 = booltype */
- .op = INT,
- .letter = L_BOOL,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 1,
- .align = 1,
- .n.rank = RANK_BOOL,
- },
- { /* 3 = schartype */
- .op = INT,
- .letter = L_INT8,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 1,
- .align = 1,
- .n.rank = RANK_SCHAR,
- },
- { /* 4 = uchartype */
- .op = INT,
- .letter = L_UINT8,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 1,
- .align = 1,
- .n.rank = RANK_UCHAR,
- },
- { /* 5 = chartype */
- .op = INT,
- .letter = L_INT8,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 1,
- .align = 1,
- .n.rank = RANK_CHAR,
- },
- { /* 6 = ushortype */
- .op = INT,
- .letter = L_UINT16,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 2,
- .align = 2,
- .n.rank = RANK_USHORT,
- },
- { /* 7 = shortype */
- .op = INT,
- .letter = L_INT16,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 2,
- .align = 2,
- .n.rank = RANK_SHORT,
- },
- { /* 8 = uinttype */
- .op = INT,
- .letter = L_UINT32,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 4,
- .align = 4,
- .n.rank = RANK_UINT,
- },
- { /* 9 = inttype */
- .op = INT,
- .letter = L_INT32,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 4,
- .align = 4,
- .n.rank = RANK_INT,
- },
- { /* 10 = longtype */
- .op = INT,
- .letter = L_INT64,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 8,
- .align = 8,
- .n.rank = RANK_LONG,
- },
- { /* 11 = ulongtype */
- .op = INT,
- .letter = L_UINT64,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 8,
- .align = 8,
- .n.rank = RANK_ULONG,
- },
- { /* 12 = ullongtype */
- .op = INT,
- .letter = L_UINT64,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 8,
- .align = 8,
- .n.rank = RANK_ULLONG,
- },
- { /* 13 = llongtype */
- .op = INT,
- .letter = L_INT64,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 8,
- .align = 8,
- .n.rank = RANK_LLONG,
- },
- { /* 14 = floattype */
- .op = FLOAT,
- .letter = L_FLOAT,
- .prop = TDEFINED | TARITH,
- .size = 4,
- .align = 4,
- .n.rank = RANK_FLOAT,
- },
- { /* 15 = doubletype */
- .op = FLOAT,
- .letter = L_DOUBLE,
- .prop = TDEFINED | TARITH,
- .size = 8,
- .align = 8,
- .n.rank = RANK_DOUBLE,
- },
- { /* 16 = ldoubletype */
- .op = FLOAT,
- .letter = L_LDOUBLE,
- .prop = TDEFINED | TARITH,
- .size = 16,
- .align = 16,
- .n.rank = RANK_LDOUBLE,
- },
- { /* 17 = sizettype */
- .op = INT,
- .letter = L_UINT64,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 8,
- .align = 8,
- .n.rank = RANK_UINT,
- },
- { /* 18 = ellipsis */
- .op = ELLIPSIS,
- .letter = L_ELLIPSIS,
- .prop = TDEFINED,
- },
- { /* 19 = pdifftype */
- .op = INT,
- .letter = L_INT64,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 8,
- .align = 8,
- .n.rank = RANK_LONG,
- },
- { /* 20 = va_type */
- .op = STRUCT,
- .letter = L_VA_ARG,
- .prop = TDEFINED,
- .size = 24,
- .align = 8,
- },
-};
-
-Type *voidtype = &types[0], *pvoidtype = &types[1],
- *booltype = &types[2], *schartype = &types[3],
- *uchartype = &types[4], *chartype = &types[5],
- *ushortype = &types[6], *shortype = &types[7],
- *uinttype = &types[8], *inttype = &types[9],
- *longtype = &types[10], *ulongtype = &types[11],
- *ullongtype = &types[12], *llongtype = &types[13],
- *floattype = &types[14], *doubletype = &types[15],
- *ldoubletype = &types[16],
- *sizettype = &types[17], *pdifftype = &types[19],
- *ellipsistype = &types[18], *va_type = &types[20],
- *va_list_type;
-
-static Symbol dummy0 = {.u.i = 0, .type = &types[9]},
- dummy1 = {.u.i = 1, .type = &types[9]};
-Symbol *zero = &dummy0, *one = &dummy1;
-
-void
-iarch(void)
-{
- va_list_type = mktype(va_type, ARY, 1, NULL);
-}
-
-int
-valid_va_list(Type *tp)
-{
- return tp->op == PTR && eqtype(tp->type, va_type, 1);
-}
--- a/src/cc1/target/arm64-sysv/arch.mk
+++ /dev/null
@@ -1,4 +1,0 @@
-OBJ-arm64-sysv= $(OBJS) target/arm64-sysv/arch.o
-
-$(LIBEXEC)/cc1-arm64-sysv: $(OBJ-arm64-sysv)
- $(CC) $(SCC_LDFLAGS) $(OBJ-arm64-sysv) -lscc -o $@
--- a/src/cc1/target/i386-sysv/arch.c
+++ /dev/null
@@ -1,221 +1,0 @@
-static char sccsid[] = "@(#) ./cc1/arch/i386-sysv/arch.c";
-
-#include <scc/scc.h>
-#include "../../cc1.h"
-
-#define RANK_BOOL 0
-#define RANK_SCHAR 1
-#define RANK_UCHAR 1
-#define RANK_CHAR 1
-#define RANK_SHORT 2
-#define RANK_USHORT 2
-#define RANK_INT 3
-#define RANK_UINT 3
-#define RANK_LONG 4
-#define RANK_ULONG 4
-#define RANK_LLONG 5
-#define RANK_ULLONG 5
-#define RANK_FLOAT 6
-#define RANK_DOUBLE 7
-#define RANK_LDOUBLE 8
-
-/*
- * Initializaion of type pointers were done with
- * a C99 initilizator '... = &(Type) {...', but
- * c compiler in Plan9 gives error with this
- * syntax, so I have switched it to this ugly form
- * I hope I will change it again in the future
- */
-
-static Type types[] = {
- { /* 0 = voidtype */
- .op = VOID,
- .letter = L_VOID,
- },
- { /* 1 = pvoidtype */
- .op = PTR,
- .letter = L_POINTER,
- .prop = TDEFINED,
- .type = &types[5], /* chartype */
- .size = 4,
- .align = 4,
- },
- { /* 2 = booltype */
- .op = INT,
- .letter = L_BOOL,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 1,
- .align = 1,
- .n.rank = RANK_BOOL,
- },
- { /* 3 = schartype */
- .op = INT,
- .letter = L_INT8,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 1,
- .align = 1,
- .n.rank = RANK_SCHAR,
- },
- { /* 4 = uchartype */
- .op = INT,
- .letter = L_UINT8,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 1,
- .align = 1,
- .n.rank = RANK_UCHAR,
- },
- { /* 5 = chartype */
- .op = INT,
- .letter = L_INT8,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 1,
- .align = 1,
- .n.rank = RANK_CHAR,
- },
- { /* 6 = ushortype */
- .op = INT,
- .letter = L_UINT16,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 2,
- .align = 2,
- .n.rank = RANK_USHORT,
- },
- { /* 7 = shortype */
- .op = INT,
- .letter = L_INT16,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 2,
- .align = 2,
- .n.rank = RANK_SHORT,
- },
- { /* 8 = uinttype */
- .op = INT,
- .letter = L_UINT32,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 4,
- .align = 4,
- .n.rank = RANK_UINT,
- },
- { /* 9 = inttype */
- .op = INT,
- .letter = L_INT32,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 4,
- .align = 4,
- .n.rank = RANK_INT,
- },
- { /* 10 = longtype */
- .op = INT,
- .letter = L_INT32,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 4,
- .align = 4,
- .n.rank = RANK_LONG,
- },
- { /* 11 = ulongtype */
- .op = INT,
- .letter = L_UINT32,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 4,
- .align = 4,
- .n.rank = RANK_ULONG,
- },
- { /* 12 = ullongtype */
- .op = INT,
- .letter = L_UINT64,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 8,
- .align = 4,
- .n.rank = RANK_ULLONG,
- },
- { /* 13 = llongtype */
- .op = INT,
- .letter = L_INT64,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 8,
- .align = 4,
- .n.rank = RANK_LLONG,
- },
- { /* 14 = floattype */
- .op = FLOAT,
- .letter = L_FLOAT,
- .prop = TDEFINED | TARITH,
- .size = 4,
- .align = 4,
- .n.rank = RANK_FLOAT,
- },
- { /* 15 = doubletype */
- .op = FLOAT,
- .letter = L_DOUBLE,
- .prop = TDEFINED | TARITH,
- .size = 8,
- .align = 4,
- .n.rank = RANK_DOUBLE,
- },
- { /* 16 = ldoubletype */
- .op = FLOAT,
- .letter = L_LDOUBLE,
- .prop = TDEFINED | TARITH,
- .size = 12,
- .align = 4,
- .n.rank = RANK_LDOUBLE,
- },
- { /* 17 = sizettype */
- .op = INT,
- .letter = L_UINT32,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 4,
- .align = 4,
- .n.rank = RANK_UINT,
- },
- { /* 18 = ellipsis */
- .op = ELLIPSIS,
- .letter = L_ELLIPSIS,
- .prop = TDEFINED,
- },
- { /* 19 = pdifftype */
- .op = INT,
- .letter = L_INT32,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 4,
- .align = 4,
- .n.rank = RANK_INT,
- },
- { /* 20 = va_list_type */
- .op = PTR,
- .letter = L_POINTER,
- .prop = TDEFINED,
- .size = 4,
- .align = 4,
- },
-};
-
-
-Type *voidtype = &types[0], *pvoidtype = &types[1],
- *booltype = &types[2], *schartype = &types[3],
- *uchartype = &types[4], *chartype = &types[5],
- *ushortype = &types[6], *shortype = &types[7],
- *uinttype = &types[8], *inttype = &types[9],
- *longtype = &types[10], *ulongtype = &types[11],
- *ullongtype = &types[12], *llongtype = &types[13],
- *floattype = &types[14], *doubletype = &types[15],
- *ldoubletype = &types[16],
- *sizettype = &types[17], *pdifftype = &types[19],
- *ellipsistype = &types[18], *va_list_type = &types[20];
-
-
-
-static Symbol dummy0 = {.u.i = 0, .type = &types[9]},
- dummy1 = {.u.i = 1, .type = &types[9]};
-Symbol *zero = &dummy0, *one = &dummy1;
-
-void
-iarch(void)
-{
-}
-
-int
-valid_va_list(Type *tp)
-{
- return eqtype(tp, va_list_type, 1);
-}
--- a/src/cc1/target/i386-sysv/arch.mk
+++ /dev/null
@@ -1,4 +1,0 @@
-OBJ-i386-sysv= $(OBJS) target/i386-sysv/arch.o
-
-$(LIBEXEC)/cc1-i386-sysv: $(OBJ-i386-sysv)
- $(CC) $(SCC_LDFLAGS) $(OBJ-i386-sysv) -lscc -o $@
--- a/src/cc1/target/z80-scc/arch.c
+++ /dev/null
@@ -1,219 +1,0 @@
-static char sccsid[] = "@(#) ./cc1/arch/z80/arch.c";
-
-#include <scc/scc.h>
-#include "../../cc1.h"
-
-#define RANK_BOOL 0
-#define RANK_SCHAR 1
-#define RANK_UCHAR 1
-#define RANK_CHAR 1
-#define RANK_SHORT 2
-#define RANK_USHORT 2
-#define RANK_INT 3
-#define RANK_UINT 3
-#define RANK_LONG 4
-#define RANK_ULONG 4
-#define RANK_LLONG 5
-#define RANK_ULLONG 5
-#define RANK_FLOAT 6
-#define RANK_DOUBLE 7
-#define RANK_LDOUBLE 8
-
-/*
- * Initializaion of type pointers were done with
- * a C99 initilizator '... = &(Type) {...', but
- * c compiler in Plan9 gives error with this
- * syntax, so I have switched it to this ugly form
- * I hope I will change it again in the future
- */
-
-static Type types[] = {
- { /* 0 = voidtype */
- .op = VOID,
- .letter = L_VOID,
- },
- { /* 1 = pvoidtype */
- .op = PTR,
- .letter = L_POINTER,
- .prop = TDEFINED,
- .type = &types[5], /* char type */
- .size = 2,
- .align = 2,
- },
- { /* 2 = booltype */
- .op = INT,
- .letter = L_BOOL,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 1,
- .align = 1,
- .n.rank = RANK_BOOL,
- },
- { /* 3 = schartype */
- .op = INT,
- .letter = L_INT8,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 1,
- .align = 1,
- .n.rank = RANK_SCHAR,
- },
- { /* 4 = uchartype */
- .op = INT,
- .letter = L_UINT8,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 1,
- .align = 1,
- .n.rank = RANK_UCHAR,
- },
- { /* 5 = chartype */
- .op = INT,
- .letter = L_UINT8,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 1,
- .align = 1,
- .n.rank = RANK_CHAR,
- },
- { /* 6 = ushortype */
- .op = INT,
- .letter = L_UINT16,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 2,
- .align = 1,
- .n.rank = RANK_USHORT,
- },
- { /* 7 = shortype */
- .op = INT,
- .letter = L_INT16,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 2,
- .align = 1,
- .n.rank = RANK_SHORT,
- },
- { /* 8 = uinttype */
- .op = INT,
- .letter = L_UINT16,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 2,
- .align = 1,
- .n.rank = RANK_UINT,
- },
- { /* 9 = inttype */
- .op = INT,
- .letter = L_INT16,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 2,
- .align = 1,
- .n.rank = RANK_INT,
- },
- { /* 10 = longtype */
- .op = INT,
- .letter = L_INT32,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 4,
- .align = 1,
- .n.rank = RANK_LONG,
- },
- { /* 11 = ulongtype */
- .op = INT,
- .letter = L_UINT32,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 4,
- .align = 1,
- .n.rank = RANK_ULONG,
- },
- { /* 12 = ullongtype */
- .op = INT,
- .letter = L_UINT64,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 8,
- .align = 1,
- .n.rank = RANK_ULLONG,
- },
- { /* 13 = llongtype */
- .op = INT,
- .letter = L_INT64,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 8,
- .align = 1,
- .n.rank = RANK_LLONG,
- },
- { /* 14 = floattype */
- .op = FLOAT,
- .letter = L_FLOAT,
- .prop = TDEFINED | TARITH,
- .size = 4,
- .align = 1,
- .n.rank = RANK_FLOAT,
- },
- { /* 15 = doubletype */
- .op = FLOAT,
- .letter = L_DOUBLE,
- .prop = TDEFINED | TARITH,
- .size = 8,
- .align = 1,
- .n.rank = RANK_DOUBLE,
- },
- { /* 16 = ldoubletype */
- .op = FLOAT,
- .letter = L_LDOUBLE,
- .prop = TDEFINED | TARITH,
- .size = 16,
- .align = 1,
- .n.rank = RANK_LDOUBLE,
- },
- { /* 17 = sizettype */
- .op = INT,
- .letter = L_UINT16,
- .prop = TDEFINED | TINTEGER | TARITH,
- .size = 2,
- .align = 1,
- .n.rank = RANK_UINT,
- },
- { /* 18 = ellipsis */
- .op = ELLIPSIS,
- .letter = L_ELLIPSIS,
- .prop = TDEFINED,
- },
- { /* 7 = pdifftype */
- .op = INT,
- .letter = L_INT16,
- .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
- .size = 2,
- .align = 1,
- .n.rank = RANK_SHORT,
- },
- { /* 20 = va_list_type */
- .op = PTR,
- .letter = L_POINTER,
- .prop = TDEFINED,
- .size = 2,
- .align = 1,
- }
-};
-
-Type *voidtype = &types[0], *pvoidtype = &types[1],
- *booltype = &types[2], *schartype = &types[3],
- *uchartype = &types[4], *chartype = &types[5],
- *ushortype = &types[6], *shortype = &types[7],
- *uinttype = &types[8], *inttype = &types[9],
- *longtype = &types[10], *ulongtype = &types[11],
- *ullongtype = &types[12], *llongtype = &types[13],
- *floattype = &types[14], *doubletype = &types[15],
- *ldoubletype = &types[16],
- *sizettype = &types[17], *pdifftype = &types[19],
- *ellipsistype = &types[18], *va_list_type = &types[20];
-
-
-static Symbol dummy0 = {.u.i = 0, .type = &types[9]},
- dummy1 = {.u.i = 1, .type = &types[9]};
-Symbol *zero = &dummy0, *one = &dummy1;
-
-void
-iarch(void)
-{
-}
-
-int
-valid_va_list(Type *tp)
-{
- return eqtype(tp, va_list_type, 1);
-}
--- a/src/cc1/target/z80-scc/arch.mk
+++ /dev/null
@@ -1,4 +1,0 @@
-OBJ-z80-scc= $(OBJS) target/z80-scc/arch.o
-
-$(LIBEXEC)/cc1-z80-scc: $(OBJ-z80-scc)
- $(CC) $(SCC_LDFLAGS) $(OBJ-z80-scc) -lscc -o $@
--- a/src/cc1/types.c
+++ /dev/null
@@ -1,438 +1,0 @@
-static char sccsid[] = "@(#) ./cc1/types.c";
-#include <assert.h>
-#include <inttypes.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <scc/cstd.h>
-#include <scc/scc.h>
-#include "cc1.h"
-
-#define NR_TYPE_HASH 16
-#define HASH(t) (((t)->op ^ (uintptr_t) (t)->type>>3) & NR_TYPE_HASH-1)
-
-static Type *typetab[NR_TYPE_HASH], *localtypes;
-
-/* FIXME:
- * Compiler can generate warnings here if the ranges of TINT,
- * TUINT and TFLOAT are smaller than any of the constants in this
- * array. Ignore them if you know that the target types are correct
- */
-static struct limits limits[][4] = {
- {
- { /* 0 = unsigned 1 byte */
- .min.i = 0,
- .max.i = 0xff
- },
- { /* 1 = unsigned 2 bytes */
- .min.i = 0,
- .max.i = 0xffff
- },
- { /* 2 = unsigned 4 bytes */
- .min.i = 0,
- .max.i = 0xffffffff
- },
- { /* 3 = unsigned 8 bytes */
- .min.i = 0,
- .max.i = 0xffffffffffffffff
- }
- },
- {
- { /* 0 = signed 1 byte */
- .min.i = -0x7f-1,
- .max.i = 0x7f
- },
- { /* 1 = signed 2 byte */
- .min.i = -0x7fff-1,
- .max.i = 0x7fff
- },
- { /* 2 = signed 4 byte */
- .min.i = -0x7fffffff-1,
- .max.i = 0x7fffffff
- },
- { /* 3 = signed 8 byte */
- .min.i = -0x7fffffffffffffff-1,
- .max.i = 0x7fffffffffffffff,
- }
- },
- {
- {
- /* 0 = float 4 bytes */
- .min.f = -1,
- .max.f = 2
- },
- {
- /* 1 = float 8 bytes */
- .min.f = -1,
- .max.f = 2,
- },
- {
- /* 2 = float 16 bytes */
- .min.f = -1,
- .max.f = 2,
- }
- }
-};
-
-struct limits *
-getlimits(Type *tp)
-{
- int ntable, ntype;
-
- switch (tp->op) {
- case ENUM:
- case INT:
- ntable = ((tp->prop & TSIGNED) != 0);
- switch (tp->size) {
- case 1: ntype = 0; break;
- case 2: ntype = 1; break;
- case 4: ntype = 2; break;
- case 8: ntype = 3; break;
- }
- break;
- case FLOAT:
- ntable = 2;
- switch (tp->size) {
- case 4: ntype = 0; break;
- case 8: ntype = 1; break;
- case 16: ntype = 2; break;
- }
- break;
- default:
- abort();
- }
-
- return &limits[ntable][ntype];
-}
-
-Type *
-ctype(int type, int sign, int size)
-{
- switch (type) {
- case CHAR:
- if (size)
- goto invalid_type;
- switch (sign) {
- case 0:
- return chartype;
- case SIGNED:
- return schartype;
- case UNSIGNED:
- return uchartype;
- }
- break;
- case VA_LIST:
- if (size || sign)
- goto invalid_type;
- return va_list_type;
- case VOID:
- if (size || sign)
- goto invalid_type;
- return voidtype;
- case BOOL:
- if (size || sign)
- goto invalid_type;
- return booltype;
- case 0:
- case INT:
- switch (size) {
- case 0:
- return (sign == UNSIGNED) ? uinttype : inttype;
- case SHORT:
- return (sign == UNSIGNED) ? ushortype : shortype;
- case LONG:
- return (sign == UNSIGNED) ? ulongtype : longtype;
- case LLONG:
- return (sign == UNSIGNED) ? ullongtype : llongtype;
- }
- break;
- case DOUBLE:
- if (size == LLONG)
- goto invalid_type;
- if (size == LONG)
- size = LLONG;
- else
- size = LONG;
- goto floating;
- case FLOAT:
- if (size == LLONG)
- goto invalid_type;
- floating:
- if (sign)
- goto invalid_type;
- switch (size) {
- case 0:
- return floattype;
- case LONG:
- return doubletype;
- case LLONG:
- return ldoubletype;
- }
- break;
- }
-
-invalid_type:
- error("invalid type specification");
-}
-
-void
-typesize(Type *tp)
-{
- Symbol **sp;
- Type *type;
- unsigned long size, offset;
- int align, a;
- TINT n;
-
- switch (tp->op) {
- case ARY:
- /* FIXME: Control overflow */
- tp->size = tp->n.elem * tp->type->size;
- tp->align = tp->type->align;
- return;
- case PTR:
- tp->size = pvoidtype->size;
- tp->align = pvoidtype->align;
- return;
- case STRUCT:
- case UNION:
- /* FIXME: Control overflow */
- /*
- * The alignment of the struct/union is
- * he alignment of the largest included type.
- * The size of an union is the size of the largest
- * field, and the size of a struct is the sum
- * of the size of every field plus padding bits.
- */
- offset = align = size = 0;
- n = tp->n.elem;
- for (sp = tp->p.fields; n--; ++sp) {
- (*sp)->u.i = offset;
- type = (*sp)->type;
- a = type->align;
- if (a > align)
- align = a;
- if (tp->op == STRUCT) {
- if (--a != 0)
- size = (size + a) & ~a;
- size += type->size;
- offset = size;
- } else {
- if (type->size > size)
- size = type->size;
- }
- }
-
- tp->align = align;
- /*
- * We have to add the padding bits to
- * ensure next struct in an array is well
- * alignment.
- */
- if (tp->op == STRUCT && align-- > 1)
- size += size+align & ~align;
- tp->size = size;
- return;
- case ENUM:
- tp->size = inttype->size;
- tp->align = inttype->align;
- return;
- case FTN:
- return;
- default:
- abort();
- }
-}
-
-Type *
-deftype(Type *tp)
-{
- tp->prop |= TDEFINED;
- typesize(tp);
- emit(OTYP, tp);
- return tp;
-}
-
-static Type *
-newtype(Type *base)
-{
- Type *tp;
- size_t siz;
-
- tp = xmalloc(sizeof(*tp));
- *tp = *base;
- tp->id = newid();
-
- if (tp->op == FTN) {
- siz = tp->n.elem * sizeof(Type *);
- tp->p.pars = memcpy(xmalloc(siz), tp->p.pars, siz);
- }
-
- if (curfun) {
- /* it is a type defined in the body of a function */
- tp->next = localtypes;
- localtypes = tp;
- }
- if (tp->prop & TDEFINED)
- deftype(tp);
- return tp;
-}
-
-Type *
-mktype(Type *tp, int op, TINT nelem, Type *pars[])
-{
- Type **tbl, type;
- Type *bp;
-
- if (op == PTR && tp == voidtype)
- return pvoidtype;
-
- memset(&type, 0, sizeof(type));
- type.type = tp;
- type.op = op;
- type.p.pars = pars;
- type.n.elem = nelem;
-
- switch (op) {
- case ARY:
- if (tp == voidtype) {
- errorp("declaration of array of voids type");
- tp = inttype;
- }
- type.letter = L_ARRAY;
- if (nelem != 0)
- type.prop |= TDEFINED;
- break;
- case KRFTN:
- type.prop |= TDEFINED | TK_R;
- type.op = FTN;
- type.letter = L_FUNCTION;
- break;
- case FTN:
- if (nelem > 0 && pars[nelem-1] == ellipsistype)
- type.prop |= TELLIPSIS;
- type.letter = L_FUNCTION;
- type.prop |= TDEFINED;
- break;
- case PTR:
- type.letter = L_POINTER;
- type.prop |= TDEFINED;
- break;
- case ENUM:
- type.letter = inttype->letter;
- type.prop |= TINTEGER | TARITH;
- type.n.rank = inttype->n.rank;
- goto create_type;
- case STRUCT:
- type.letter = L_STRUCT;
- type.prop |= TAGGREG;
- goto create_type;
- case UNION:
- type.letter = L_UNION;
- type.prop |= TAGGREG;
- create_type:
- return newtype(&type);
- default:
- abort();
- }
-
- tbl = &typetab[HASH(&type)];
- for (bp = *tbl; bp; bp = bp->h_next) {
- if (eqtype(bp, &type, 0))
- return bp;
- }
-
- bp = newtype(&type);
- bp->h_next = *tbl;
- *tbl = bp;
-
- return bp;
-}
-
-int
-eqtype(Type *tp1, Type *tp2, int equiv)
-{
- TINT n;
- Type **p1, **p2;
- Symbol **s1, **s2;
-
- if (tp1 == tp2)
- return 1;
- if (!tp1 || !tp2)
- return 0;
- if (tp1->op != tp2->op)
- return 0;
-
- switch (tp1->op) {
- case UNION:
- case STRUCT:
- if (tp1->letter != tp2->letter)
- return 0;
- if (tp1->tag->name || tp2->tag->name)
- return tp1->tag == tp2->tag;
- if (tp1->n.elem != tp2->n.elem)
- return 0;
- s1 = tp1->p.fields, s2 = tp2->p.fields;
- for (n = tp1->n.elem; n > 0; --n, ++s1, ++s2) {
- if (strcmp((*s1)->name, (*s2)->name))
- return 0;
- if (!eqtype((*s1)->type, (*s2)->type, equiv))
- return 0;
- }
- return 1;
- case FTN:
- if (tp1->n.elem != tp2->n.elem)
- return 0;
- p1 = tp1->p.pars, p2 = tp2->p.pars;
- for (n = tp1->n.elem; n > 0; --n) {
- if (!eqtype(*p1++, *p2++, equiv))
- return 0;
- }
- goto check_base;
- case ARY:
- if (equiv && (tp1->n.elem == 0 || tp2->n.elem == 0))
- goto check_base;
- if (tp1->n.elem != tp2->n.elem)
- return 0;
- case PTR:
- check_base:
- return eqtype(tp1->type, tp2->type, equiv);
- case VOID:
- case ENUM:
- return 0;
- case INT:
- case FLOAT:
- return tp1->letter == tp2->letter;
- default:
- abort();
- }
-}
-
-void
-flushtypes(void)
-{
- Type *tp, *next, **h;
-
- for (tp = localtypes; tp; tp = next) {
- next = tp->next;
- switch (tp->op) {
- default:
- /*
- * All the local types are linked after
- * global types, and since we are
- * unlinking them in the inverse order
- * we do know that tp is always the head
- * of the collision list
- */
- h = &typetab[HASH(tp)];
- assert(*h == tp);
- *h = tp->h_next;
- case STRUCT:
- case UNION:
- case ENUM:
- free(tp);
- break;
- }
- }
- localtypes = NULL;
-}
--- a/src/cc2/.gitignore
+++ /dev/null
@@ -1,1 +1,0 @@
-error.h
--- a/src/cc2/Makefile
+++ /dev/null
@@ -1,40 +1,0 @@
-.POSIX:
-
-PROJECTDIR = ../..
-include $(PROJECTDIR)/scripts/rules.mk
-
-MORECFLAGS = -I$(INCDIR)/$(STD)
-
-OBJS = main.o \
- parser.o \
- peep.o \
- symbol.o \
- node.o \
- code.o \
- optm.o \
-
-TARGET = $(LIBEXEC)/cc2-amd64-sysv \
- $(LIBEXEC)/cc2-i386-sysv \
- $(LIBEXEC)/cc2-qbe_amd64-sysv \
- $(LIBEXEC)/cc2-z80-scc \
-
-all: $(TARGET)
-
-$(TARGET): error.h
-
-error.h: cc2.h
- rm -f $@;\
- trap 'r=$?;rm -f $$$$.h;exit $r' EXIT INT QUIT ;\
- awk -f generror.awk cc2.h > $$$$.h && mv $$$$.h $@
-
-dep: inc-dep
-
-clean:
- rm -f target/*/*.o error.h
-
-include target/amd64-sysv/target.mk
-include target/i386-sysv/target.mk
-include target/qbe_amd64-sysv/target.mk
-include target/qbe_arm64-sysv/target.mk
-include target/z80-scc/target.mk
-include deps.mk
--- a/src/cc2/cc2.h
+++ /dev/null
@@ -1,256 +1,0 @@
-enum iflags {
- BBENTRY = 1, /* basic block entry */
-};
-
-enum tflags {
- SIGNF = 1 << 0, /* Signed type */
- INTF = 1 << 1, /* integer type */
- FLOATF = 1 << 2, /* float type */
- STRF = 1 << 3, /* string */
- AGGRF = 1 << 4, /* aggregate */
- FUNF = 1 << 5, /* function */
- PARF = 1 << 6, /* parameter */
- INITF = 1 << 7, /* initializer flag */
- ELLIPS = 1 << 8, /* vararg function */
-};
-
-enum sclass {
- SAUTO = 'A',
- SREG = 'R',
- SLABEL = 'L',
- SINDEX = 'I',
- STMP = 'N',
- SGLOB = 'G',
- SEXTRN = 'X',
- SPRIV = 'Y',
- SLOCAL = 'T',
- SMEMB = 'M',
- SCONST = '#',
- STRING = '"',
- SNONE = 0 /* cc2 relies on SNONE being 0 in nextpc() */
-};
-
-enum types {
- ELLIPSIS = 'E',
- INT8 = 'C',
- INT16 = 'I',
- INT32 = 'W',
- INT64 = 'Q',
- UINT8 = 'K',
- UINT16 = 'N',
- UINT32 = 'Z',
- UINT64 = 'O',
- POINTER = 'P',
- FUNCTION = 'F',
- VECTOR = 'V',
- UNION = 'U',
- STRUCT = 'S',
- BOOL = 'B',
- FLOAT = 'J',
- DOUBLE = 'D',
- LDOUBLE = 'H',
- VOID = '0'
-};
-
-enum op {
- /* kind of operand */
- /* operands */
- OMEM = 'M',
- OTMP = 'N',
- OAUTO = 'A',
- OREG = 'R',
- OCONST = '#',
- OSTRING = '"',
- OLOAD = 'D',
- OLABEL = 'L',
- OADD = '+',
- OSUB = '-',
- OMUL = '*',
- OMOD = '%',
- ODIV = '/',
- OSHL = 'l',
- OSHR = 'r',
- OLT = '<',
- OGT = '>',
- OLE = '[',
- OGE = ']',
- OEQ = '=',
- ONE = '!',
- OBAND = '&',
- OBOR = '|',
- OBXOR = '^',
- OCPL = '~',
- OASSIG = ':',
- OSNEG = '_',
- OCALL = 'c',
- OCALLE = 'z',
- OPAR = 'p',
- OFIELD = '.',
- OCOMMA = ',',
- OASK = '?',
- OCOLON = ' ',
- OADDR = '\'',
- OAND = 'a',
- OOR = 'o',
- ONEG = 'n',
- OPTR = '@',
- OCAST = 'g',
- OINC = 'i',
- ODEC = 'd',
- OBUILTIN = 'm',
- /*statements */
- ONOP = 'q',
- OJMP = 'j',
- OBRANCH = 'y',
- ORET = 'h',
- OBLOOP = 'b',
- OELOOP = 'e',
- OCASE = 'v',
- ODEFAULT = 'f',
- OBSWITCH = 's',
- OESWITCH = 't',
- OBFUN = 'x',
- OEFUN = 'k',
-};
-
-enum builtins {
- BVA_START = 's',
- BVA_END = 'e',
- BVA_ARG = 'a',
- BVA_COPY = 'c',
-};
-
-enum nerrors {
- EEOFFUN, /* EOF while parsing function */
- ENLABEL, /* label without statement */
- EIDOVER, /* identifier overflow */
- EOUTPAR, /* out pf params */
- ESYNTAX, /* syntax error */
- ESTACKA, /* stack unaligned */
- ESTACKO, /* stack overflow */
- ESTACKU, /* stack underflow */
- ELNLINE, /* line too long */
- ELNBLNE, /* line without new line */
- EFERROR, /* error reading from file:%s */
- EBADID, /* incorrect symbol id */
- EWTACKO, /* switch stack overflow */
- EWTACKU, /* switch stack underflow */
- ENOSWTC, /* Out of switch statement */
- EBBUILT, /* Unknown builtin */
- ENUMERR
-};
-
-typedef struct node Node;
-typedef struct type Type;
-typedef struct symbol Symbol;
-typedef struct addr Addr;
-typedef struct inst Inst;
-
-struct type {
- unsigned long size;
- unsigned long align;
- short flags;
-};
-
-struct symbol {
- Type type;
- Type rtype;
- unsigned short id;
- unsigned short numid;
- char *name;
- char kind;
- union {
- unsigned long off;
- Node *stmt;
- Inst *inst;
- } u;
- Symbol *next;
- Symbol *h_next;
-};
-
-struct node {
- char op;
- Type type;
- char complex;
- char address;
- unsigned char flags;
- union {
- TUINT i;
- TFLOAT f;
- char reg;
- char *s;
- Symbol *sym;
- char subop;
- } u;
- Symbol *label;
- Node *left, *right;
- Node *next, *prev;
-};
-
-struct addr {
- char kind;
- union {
- char reg;
- TUINT i;
- Symbol *sym;
- } u;
-};
-
-struct inst {
- unsigned char op;
- unsigned char flags;
- Symbol *label;
- Inst *next, *prev;
- Addr from1, from2, to;
-};
-
-/* main.c */
-extern void error(unsigned nerror, ...);
-
-/* parse.c */
-extern void parse(void);
-
-/* optm.c */
-extern Node *optm_dep(Node *np), *optm_ind(Node *np);
-
-/* cgen.c */
-extern Node *sethi(Node *np);
-extern Node *cgen(Node *np);
-
-/* peep.c */
-extern void peephole(void);
-
-/* code.c */
-extern void data(Node *np);
-extern void writeout(void), endinit(void), newfun(void);
-extern void code(int op, Node *to, Node *from1, Node *from2);
-extern void defvar(Symbol *), defpar(Symbol *), defglobal(Symbol *);
-extern void setlabel(Symbol *sym), getbblocks(void);
-extern Node *label2node(Node *np, Symbol *sym);
-extern Node *constnode(Node *np, TUINT n, Type *tp);
-extern Symbol *newlabel(void);
-
-/* node.c */
-#define SETCUR 1
-#define KEEPCUR 0
-extern void apply(Node *(*fun)(Node *));
-extern void cleannodes(void);
-extern void delnode(Node *np);
-extern void deltree(Node *np);
-extern void prtree(Node *np), prforest(char *msg);
-extern Node *node(int op);
-extern Node *addstmt(Node *np, int flags);
-extern Node *delstmt(void);
-extern Node *nextstmt(void);
-
-/* symbol.c */
-#define TMPSYM 0
-extern Symbol *getsym(unsigned id);
-extern void popctx(void);
-extern void pushctx(void);
-extern void freesym(Symbol *sym);
-
-/* globals */
-extern Symbol *curfun;
-extern Symbol *locals;
-extern Inst *pc, *prog;
--- a/src/cc2/code.c
+++ /dev/null
@@ -1,133 +1,0 @@
-static char sccsid[] = "@(#) ./cc2/code.c";
-#include <stdlib.h>
-#include <string.h>
-
-#include <scc/scc.h>
-#include "cc2.h"
-
-Inst *pc, *prog;
-
-static void
-nextpc(void)
-{
- Inst *new;
-
- new = xcalloc(1, sizeof(*new)); /* TODO: create an arena */
-
- if (!pc) {
- prog = new;
- } else {
- new->next = pc->next;
- pc->next = new;
- }
-
- /* SNONE being 0, calloc initialized {from1,from2,to}.kind for us */
- new->prev = pc;
- pc = new;
-}
-
-static void
-addr(Node *np, Addr *addr)
-{
- Symbol *sym;
-
- switch (np->op) {
- case OREG:
- /* TODO:
- * At this moment this op is used also for register variables
- */
- addr->kind = SREG;
- addr->u.reg = np->u.reg;
- break;
- case OCONST:
- addr->kind = SCONST;
- /* TODO: Add support for more type of constants */
- addr->u.i = np->u.i;
- break;
- case OTMP:
- case OLABEL:
- case OAUTO:
- case OMEM:
- sym = np->u.sym;
- addr->kind = sym->kind;
- addr->u.sym = sym;
- break;
- default:
- abort();
- }
-}
-
-Symbol *
-newlabel(void)
-{
- Symbol *sym = getsym(TMPSYM);
-
- sym->kind = SLABEL;
- return sym;
-}
-
-Node *
-label2node(Node *np, Symbol *sym)
-{
- if(!sym)
- sym = newlabel();
- if (!np)
- np = node(OLABEL);
- np->op = OLABEL;
- np->u.sym = sym;
-
- return np;
-}
-
-Node *
-constnode(Node *np, TUINT n, Type *tp)
-{
- if (!np)
- np = node(OCONST);
- np->op = OCONST;
- np->left = NULL;
- np->right = NULL;
- np->type = *tp;
- np->u.i = n;
- return np;
-}
-
-void
-setlabel(Symbol *sym)
-{
- if (!sym)
- return;
- code(0, NULL, NULL, NULL);
- pc->label = sym;
- sym->u.inst = pc;
-}
-
-void
-code(int op, Node *to, Node *from1, Node *from2)
-{
- nextpc();
- if (from1)
- addr(from1, &pc->from1);
- if (from2)
- addr(from2, &pc->from2);
- if (to)
- addr(to, &pc->to);
- pc->op = op;
-}
-
-void
-delcode(void)
-{
- Inst *prev = pc->prev, *next = pc->next;
-
- free(pc);
- if (!prev) {
- pc = next;
- prog = NULL;
- } else {
- pc = prev;
- prev->next = next;
- if (next)
- next->prev = prev;
- }
-}
--- a/src/cc2/deps.mk
+++ /dev/null
@@ -1,61 +1,0 @@
-#deps
-code.o: $(INCDIR)/scc/scc/scc.h
-code.o: cc2.h
-main.o: $(INCDIR)/scc/scc/arg.h
-main.o: $(INCDIR)/scc/scc/scc.h
-main.o: cc2.h
-main.o: error.h
-node.o: $(INCDIR)/scc/scc/scc.h
-node.o: cc2.h
-optm.o: $(INCDIR)/scc/scc/scc.h
-optm.o: cc2.h
-parser.o: $(INCDIR)/scc/scc/cstd.h
-parser.o: $(INCDIR)/scc/scc/scc.h
-parser.o: cc2.h
-peep.o: $(INCDIR)/scc/scc/scc.h
-peep.o: cc2.h
-symbol.o: $(INCDIR)/scc/scc/scc.h
-symbol.o: cc2.h
-target/amd64-sysv/cgen.o: $(INCDIR)/scc/scc/scc.h
-target/amd64-sysv/cgen.o: target/amd64-sysv/../../cc2.h
-target/amd64-sysv/cgen.o: target/amd64-sysv/arch.h
-target/amd64-sysv/code.o: $(INCDIR)/scc/scc/cstd.h
-target/amd64-sysv/code.o: $(INCDIR)/scc/scc/scc.h
-target/amd64-sysv/code.o: target/amd64-sysv/../../cc2.h
-target/amd64-sysv/code.o: target/amd64-sysv/arch.h
-target/amd64-sysv/optm.o: $(INCDIR)/scc/scc/scc.h
-target/amd64-sysv/optm.o: target/amd64-sysv/../../cc2.h
-target/amd64-sysv/types.o: $(INCDIR)/scc/scc/scc.h
-target/amd64-sysv/types.o: target/amd64-sysv/../../cc2.h
-target/i386-sysv/cgen.o: $(INCDIR)/scc/scc/scc.h
-target/i386-sysv/cgen.o: target/i386-sysv/../../cc2.h
-target/i386-sysv/cgen.o: target/i386-sysv/arch.h
-target/i386-sysv/code.o: $(INCDIR)/scc/scc/cstd.h
-target/i386-sysv/code.o: $(INCDIR)/scc/scc/scc.h
-target/i386-sysv/code.o: target/i386-sysv/../../cc2.h
-target/i386-sysv/code.o: target/i386-sysv/arch.h
-target/i386-sysv/optm.o: $(INCDIR)/scc/scc/scc.h
-target/i386-sysv/optm.o: target/i386-sysv/../../cc2.h
-target/i386-sysv/types.o: $(INCDIR)/scc/scc/scc.h
-target/i386-sysv/types.o: target/i386-sysv/../../cc2.h
-target/qbe/cgen.o: $(INCDIR)/scc/scc/cstd.h
-target/qbe/cgen.o: $(INCDIR)/scc/scc/scc.h
-target/qbe/cgen.o: target/qbe/../../cc2.h
-target/qbe/cgen.o: target/qbe/arch.h
-target/qbe/code.o: $(INCDIR)/scc/scc/cstd.h
-target/qbe/code.o: $(INCDIR)/scc/scc/scc.h
-target/qbe/code.o: target/qbe/../../cc2.h
-target/qbe/code.o: target/qbe/arch.h
-target/qbe/optm.o: $(INCDIR)/scc/scc/scc.h
-target/qbe/optm.o: target/qbe/../../cc2.h
-target/z80-scc/cgen.o: $(INCDIR)/scc/scc/scc.h
-target/z80-scc/cgen.o: target/z80-scc/../../cc2.h
-target/z80-scc/cgen.o: target/z80-scc/arch.h
-target/z80-scc/code.o: $(INCDIR)/scc/scc/cstd.h
-target/z80-scc/code.o: $(INCDIR)/scc/scc/scc.h
-target/z80-scc/code.o: target/z80-scc/../../cc2.h
-target/z80-scc/code.o: target/z80-scc/arch.h
-target/z80-scc/optm.o: $(INCDIR)/scc/scc/scc.h
-target/z80-scc/optm.o: target/z80-scc/../../cc2.h
-target/z80-scc/types.o: $(INCDIR)/scc/scc/scc.h
-target/z80-scc/types.o: target/z80-scc/../../cc2.h
--- a/src/cc2/generror.awk
+++ /dev/null
@@ -1,9 +1,0 @@
-/^enum nerrors \{/ {print "char *errlist[] = {"; inhome = 1}
-
-inhome && /E[A-Z]*, / {sub(/,/, "", $1)
- printf("\t[%s] = \"", $1)
- for (i = 3; i <= NF-1; ++i)
- printf("%s%s", $i, (i == NF-1) ? "\"" : " ")
- print ","}
-
-inhome && /^}/ {print "};" ; inhome = 0}
--- a/src/cc2/main.c
+++ /dev/null
@@ -1,70 +1,0 @@
-static char sccsid[] = "@(#) ./cc2/main.c";
-
-#include <errno.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <scc/arg.h>
-#include <scc/scc.h>
-#include "cc2.h"
-#include "error.h"
-
-char *argv0;
-
-void
-error(unsigned nerror, ...)
-{
- va_list va;
- va_start(va, nerror);
- vfprintf(stderr, errlist[nerror], va);
- va_end(va);
- putc('\n', stderr);
- exit(1);
-}
-
-static int
-moreinput(void)
-{
- int c;
-
-repeat:
- if (feof(stdin))
- return 0;
- if ((c = getchar()) == '\n' || c == EOF)
- goto repeat;
- ungetc(c, stdin);
- return 1;
-}
-
-static void
-usage(void)
-{
- fputs("usage: cc2 [irfile]\n", stderr);
- exit(1);
-}
-
-int
-main(int argc, char *argv[])
-{
- ARGBEGIN {
- default:
- usage();
- } ARGEND
-
- if (argv[0] && !freopen(argv[0], "r", stdin))
- die("cc2: %s: %s", argv[0], strerror(errno));
-
- while (moreinput()) {
- parse();
- apply(optm_ind);
- apply(optm_dep);
- apply(sethi);
- apply(cgen);
- getbblocks(); /* TODO: run apply over asm ins too */
- peephole();
- writeout();
- }
- return 0;
-}
--- a/src/cc2/node.c
+++ /dev/null
@@ -1,142 +1,0 @@
-static char sccsid[] = "@(#) ./cc2/node.c";
-#include <stdlib.h>
-#include <string.h>
-
-#include <scc/scc.h>
-
-#include "cc2.h"
-
-#define NNODES 32
-
-Node *curstmt;
-Symbol *curfun;
-
-static Alloc *arena;
-
-
-Node *
-node(int op)
-{
- struct arena *ap;
- Node *np;
-
- if (!arena)
- arena = alloc(sizeof(Node), NNODES);
- np = memset(new(arena), 0, sizeof(*np));
- np->op = op;
-
- return np;
-}
-
-#ifndef NDEBUG
-#include <stdio.h>
-
-static void
-prnode(Node *np)
-{
- if (np->left)
- prnode(np->left);
- if (np->right)
- prnode(np->right);
- fprintf(stderr, "\t%c%lu", np->op, np->type.size);
-}
-
-void
-prtree(Node *np)
-{
- prnode(np);
- putc('\n', stderr);
-}
-
-void
-prforest(char *msg)
-{
- Node *np;
-
- if (!curfun)
- return;
-
- fprintf(stderr, "%s {\n", msg);
- for (np = curfun->u.stmt; np; np = np->next)
- prtree(np);
- fputs("}\n", stderr);
-}
-#endif
-
-Node *
-addstmt(Node *np, int flag)
-{
- if (curstmt)
- np->next = curstmt->next;
- np->prev = curstmt;
-
- if (!curfun->u.stmt)
- curfun->u.stmt = np;
- else
- curstmt->next = np;
-
- if (flag == SETCUR)
- curstmt = np;
-
- return np;
-}
-
-Node *
-delstmt(void)
-{
- Node *next, *prev;
-
- next = curstmt->next;
- prev = curstmt->prev;
- if (next)
- next->prev = prev;
- if (prev)
- prev->next = next;
- else
- curfun->u.stmt = next;
- deltree(curstmt);
-
- return curstmt = next;
-}
-
-Node *
-nextstmt(void)
-{
- return curstmt = curstmt->next;
-}
-
-void
-delnode(Node *np)
-{
- delete(arena, np);
-}
-
-void
-deltree(Node *np)
-{
- if (!np)
- return;
- deltree(np->left);
- deltree(np->right);
- delnode(np);
-}
-
-void
-cleannodes(void)
-{
- if (arena) {
- dealloc(arena);
- arena = NULL;
- }
- curstmt = NULL;
-}
-
-void
-apply(Node *(*fun)(Node *))
-{
- if (!curfun)
- return;
- curstmt = curfun->u.stmt;
- while (curstmt)
- (*fun)(curstmt) ? nextstmt() : delstmt();
-}
--- a/src/cc2/optm.c
+++ /dev/null
@@ -1,9 +1,0 @@
-#include <scc/scc.h>
-#include "cc2.h"
-
-Node *
-optm_ind(Node *np)
-{
- return np;
-}
-
--- a/src/cc2/parser.c
+++ /dev/null
@@ -1,722 +1,0 @@
-static char sccsid[] = "@(#) ./cc2/parser.c";
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <scc/cstd.h>
-#include <scc/scc.h>
-
-#include "cc2.h"
-
-#define STACKSIZ 50
-
-extern Type int8type, int16type, int32type, int64type,
- uint8type, uint16type, uint32type, uint64type,
- float32type, float64type, float80type,
- booltype,
- ptrtype,
- voidtype,
- arg_type;
-
-Type funetype = {
- .flags = FUNF | ELLIPS
-};
-
-Type funtype = {
- .flags = FUNF
-};
-
-union tokenop {
- void *arg;
- unsigned op;
-};
-
-struct swtch {
- int nr;
- Node *first;
- Node *last;
-};
-
-static struct swtch swtbl[NR_BLOCK], *swp = swtbl;
-static Symbol *lastfun;
-
-typedef void parsefun(char *, union tokenop);
-static parsefun type, symbol, getname, unary, binary, ternary, call,
- constant, composed, binit, einit,
- jump, oreturn, loop, assign,
- ocase, bswitch, eswitch, builtin;
-
-typedef void evalfun(void);
-static evalfun vardecl, beginfun, endfun, endpars, stmt,
- array, aggregate, flddecl, labeldcl;
-
-static struct decoc {
- void (*eval)(void);
- void (*parse)(char *token, union tokenop);
- union tokenop u;
-} optbl[] = { /* eval parse args */
- ['A'] = { vardecl, symbol, .u.op = SAUTO<<8 | OAUTO},
- ['R'] = { vardecl, symbol, .u.op = SREG<<8 | OREG},
- ['G'] = { vardecl, symbol, .u.op = SGLOB<<8 | OMEM},
- ['X'] = { vardecl, symbol, .u.op = SEXTRN<<8 | OMEM},
- ['Y'] = { vardecl, symbol, .u.op = SPRIV<<8 | OMEM},
- ['T'] = { vardecl, symbol, .u.op = SLOCAL<<8 | OMEM},
- ['M'] = { flddecl, symbol, .u.op = SMEMB<<8 | OMEM},
- ['L'] = { labeldcl, symbol, .u.op = SLABEL<<8 | OLABEL},
-
- ['C'] = { NULL, type, .u.arg = &int8type},
- ['I'] = { NULL, type, .u.arg = &int16type},
- ['W'] = { NULL, type, .u.arg = &int32type},
- ['Q'] = { NULL, type, .u.arg = &int64type},
- ['K'] = { NULL, type, .u.arg = &uint8type},
- ['N'] = { NULL, type, .u.arg = &uint16type},
- ['Z'] = { NULL, type, .u.arg = &uint32type},
- ['O'] = { NULL, type, .u.arg = &uint64type},
- ['J'] = { NULL, type, .u.arg = &float32type},
- ['D'] = { NULL, type, .u.arg = &float64type},
- ['H'] = { NULL, type, .u.arg = &float80type},
- ['0'] = { NULL, type, .u.arg = &voidtype},
- ['B'] = { NULL, type, .u.arg = &booltype},
- ['P'] = { NULL, type, .u.arg = &ptrtype},
- ['E'] = { NULL, type, .u.arg = &funetype},
- ['1'] = { NULL, type, .u.arg = &arg_type},
-
- ['F'] = { NULL, type, .u.arg = &funtype},
- ['V'] = { array,composed, 0},
- ['U'] = {aggregate,composed, 0},
- ['S'] = {aggregate,composed, 0},
-
- ['"'] = { NULL, getname, 0},
- ['{'] = { beginfun, NULL, 0},
- ['}'] = { endfun, NULL, 0},
- ['('] = { NULL, binit, 0},
- [')'] = { NULL, einit, 0},
- ['\\'] = { endpars, NULL, 0},
- ['\t'] = { stmt, NULL, 0},
-
- ['~'] = { NULL, unary, .u.op = OCPL},
- ['_'] = { NULL, unary, .u.op = OSNEG},
- ['\''] = { NULL, unary, .u.op = OADDR},
- ['@'] = { NULL, unary, .u.op = OPTR},
- ['g'] = { NULL, unary, .u.op = OCAST},
- ['p'] = { NULL, unary, .u.op = OPAR},
- ['n'] = { NULL, unary, .u.op = ONEG},
-
- ['a'] = { NULL, binary, .u.op = OAND},
- ['o'] = { NULL, binary, .u.op = OOR},
- ['.'] = { NULL, binary, .u.op = OFIELD},
- ['+'] = { NULL, binary, .u.op = OADD},
- ['-'] = { NULL, binary, .u.op = OSUB},
- ['*'] = { NULL, binary, .u.op = OMUL},
- ['%'] = { NULL, binary, .u.op = OMOD},
- ['/'] = { NULL, binary, .u.op = ODIV},
- ['l'] = { NULL, binary, .u.op = OSHL},
- ['r'] = { NULL, binary, .u.op = OSHR},
- ['<'] = { NULL, binary, .u.op = OLT},
- ['>'] = { NULL, binary, .u.op = OGT},
- ['['] = { NULL, binary, .u.op = OLE},
- [']'] = { NULL, binary, .u.op = OGE},
- ['='] = { NULL, binary, .u.op = OEQ},
- ['!'] = { NULL, binary, .u.op = ONE},
- ['&'] = { NULL, binary, .u.op = OBAND},
- ['|'] = { NULL, binary, .u.op = OBOR},
- ['^'] = { NULL, binary, .u.op = OBXOR},
- [','] = { NULL, binary, .u.op = OCOMMA},
- ['m'] = { NULL, builtin,.u.op = OBUILTIN},
-
- [':'] = { NULL, assign, .u.op = OASSIG},
- ['?'] = { NULL, ternary, .u.op = OASK},
- ['c'] = { NULL, call, .u.op = OCALL},
- ['z'] = { NULL, call, .u.op = OCALLE},
-
- ['#'] = { NULL,constant, .u.op = OCONST},
-
- ['j'] = { NULL, jump, .u.op = OJMP},
- ['y'] = { NULL, jump, .u.op = OBRANCH},
- ['h'] = { NULL, oreturn, .u.op = ORET},
- ['i'] = { NULL, NULL, .u.op = OINC},
- ['d'] = { NULL, NULL, .u.op = ODEC},
-
- ['b'] = { NULL, loop, .u.op = OBLOOP},
- ['e'] = { NULL, loop, .u.op = OELOOP},
-
- ['v'] = { NULL, ocase, .u.op = OCASE},
- ['f'] = { NULL, ocase, .u.op = ODEFAULT},
- ['t'] = { NULL, eswitch, .u.op = OESWITCH},
- ['s'] = { NULL, bswitch, .u.op = OBSWITCH},
-};
-
-static int sclass, inpars, ininit, endf, lineno;
-static void *stack[STACKSIZ], **sp = stack;
-
-static Node *
-push(void *elem)
-{
- if (sp == &stack[STACKSIZ])
- error(ESTACKO);
- return *sp++ = elem;
-}
-
-static void *
-pop(void)
-{
- if (sp == stack)
- error(ESTACKU);
- return *--sp;
-}
-
-static int
-empty(void)
-{
- return sp == stack;
-}
-
-static void
-type(char *token, union tokenop u)
-{
- push(u.arg);
-}
-
-static void
-composed(char *token, union tokenop u)
-{
- Symbol *sym;
-
- sym = getsym(atoi(token+1));
- push(&sym->type);
-}
-
-static void
-getname(char *t, union tokenop u)
-{
- push((*++t) ? xstrdup(t) : NULL);
-}
-
-static void
-symbol(char *token, union tokenop u)
-{
- Node *np = node(u.op & 0xFF);
- Symbol *sym = getsym(atoi(token+1));
-
- sclass = u.op >> 8;
- np->u.sym = sym;
- np->type = sym->type;
- push(np);
-}
-
-static Type *
-gettype(char *token)
-{
- struct decoc *dp;
-
- dp = &optbl[*token];
- if (!dp->parse)
- error(ESYNTAX);
- (*dp->parse)(token, dp->u);
- return pop();
-}
-
-static void
-constant(char *token, union tokenop u)
-{
- static char letters[] = "0123456789ABCDEF";
- Node *np;
- TUINT v;
- unsigned c;
-
- ++token;
- if (*token == '"') {
- ++token;
- np = node(OSTRING);
- np->type.flags = STRF;
- np->type.size = strlen(token);
- np->type.align = int8type.align;
- np->u.s = xstrdup(token);
- } else {
- np = node(OCONST);
- np->type = *gettype(token++);
- for (v = 0; c = *token++; v += c) {
- v <<= 4;
- c = strchr(letters, c) - letters;
- }
- np->u.i = v;
- }
- push(np);
-}
-
-static void
-assign(char *token, union tokenop u)
-{
- int subop;
- Node *np = node(u.op);
-
- switch (subop = *++token) {
- case '+':
- case '-':
- case '*':
- case '%':
- case '/':
- case 'l':
- case 'r':
- case '&':
- case '|':
- case '^':
- case 'i':
- case 'd':
- ++token;
- subop = optbl[subop].u.op;
- break;
- default:
- subop = 0;
- break;
- }
-
- np->u.subop = subop;
- np->type = *gettype(token);
- np->right = pop();
- np->left = pop();
- push(np);
-}
-
-static void
-ternary(char *token, union tokenop u)
-{
- Node *ask = node(OASK), *colon = node(OCOLON);
- Type *tp = gettype(token+1);
-
- colon->right = pop();
- colon->left = pop();
-
- ask->type = *tp;
- ask->left = pop();
- ask->right = colon;
- push(ask);
-}
-
-static void
-eval(char *tok)
-{
- struct decoc *dp;
-
- do {
- dp = &optbl[*tok];
- if (!dp->parse)
- break;
- (*dp->parse)(tok, dp->u);
- } while (tok = strtok(NULL, "\t\n"));
-}
-
-static int
-nextline(void)
-{
- static char line[LINESIZ];
- size_t len;
- int c;
- void (*fun)(void);
-
-repeat:
- ++lineno;
- if (!fgets(line, sizeof(line), stdin))
- return 0;
- if ((len = strlen(line)) == 0 || line[0] == '\n')
- goto repeat;
- if (line[len-1] != '\n')
- error(len < sizeof(line)-1 ? ELNBLNE : ELNLINE);
- line[len-1] = '\0';
-
- c = *line;
- eval(strtok(line, "\t\n"));
- if ((fun = *optbl[c].eval) != NULL)
- (*fun)();
- if (sp != stack)
- error(ESTACKA);
- return 1;
-}
-
-static void
-oreturn(char *token, union tokenop u)
-{
- Node *np = node(u.op);
-
- if (token = strtok(NULL, "\t\n"))
- eval(token);
- if (!empty())
- np->left = pop();
- push(np);
-}
-
-/*
- * Move np (which is a OCASE/ODEFAULT/OESWITCH) to be contigous with
- * the last switch table. It is a bit ugly to touch directly curstmt
- * here, but moving this function to node.c is worse, because we are
- * putting knowledge of how the text is parsed into the node
- * represtation module.
- */
-static void
-waft(Node *np)
-{
- Node *lastcase, *next;;
- struct swtch *cur;
- extern Node *curstmt;
-
- if (swp == swtbl)
- error(EWTACKU);
-
- cur = swp - 1;
- lastcase = cur->last;
- next = lastcase->next;
-
- np->next = next;
- np->prev = lastcase;
-
- if (next)
- next->prev = np;
- lastcase->next = np;
-
- if (curstmt == cur->last)
- curstmt = np;
- cur->last = np;
- cur->nr++;
-}
-
-static void
-bswitch(char *token, union tokenop u)
-{
- struct swtch *cur;
- Node *np = node(u.op);
-
- if (swp == &swtbl[NR_BLOCK])
- error(EWTACKO);
- cur = swp++;
- cur->nr = 0;
-
- eval(strtok(NULL, "\t\n"));
- np->left = pop();
-
- push(cur->first = cur->last = np);
-}
-
-static void
-eswitch(char *token, union tokenop u)
-{
- struct swtch *cur;
-
- if (swp == swtbl)
- error(EWTACKU);
- jump(token, u);
- waft(pop());
- cur = --swp;
- cur->first->u.i = cur->nr;
-}
-
-static void
-ocase(char *token, union tokenop u)
-{
- jump(token, u);
- waft(pop());
-}
-
-static void
-jump(char *token, union tokenop u)
-{
- Node *aux, *np = node(u.op);
-
- eval(strtok(NULL, "\t\n"));
-
- if (u.op == OBRANCH || u.op == OCASE)
- np->left = pop();
- aux = pop();
- np->u.sym = aux->u.sym;
- delnode(aux);
- push(np);
-}
-
-static void
-loop(char *token, union tokenop u)
-{
- push(node(u.op));
-}
-
-static void
-unary(char *token, union tokenop u)
-{
- Node *np = node(u.op);
-
- np->type = *gettype(token+1);
- np->left = pop();
- np->right = NULL;
- push(np);
-}
-
-static void
-call(char *token, union tokenop u)
-{
- Node *np, *par, *fun = node(u.op);
-
- for (par = NULL;; par = np) {
- np = pop();
- if (np->op != OPAR)
- break;
- np->right = par;
- }
-
- fun->type = *gettype(token+1);
- fun->left = np;
- fun->right = par;
- push(fun);
-}
-
-static void
-builtin(char *token, union tokenop u)
-{
- Node *np = node(u.op);
- char *name;
- unsigned subop, nchilds;
-
- np->type = *gettype(token+1);
- name = pop();
-
- if (!strcmp("__builtin_va_arg", name)) {
- nchilds = 1;
- subop = BVA_ARG;
- } else if (!strcmp("__builtin_va_start", name)) {
- nchilds = 2;
- subop = BVA_START;
- } else if (!strcmp("__builtin_va_end", name)) {
- nchilds = 1;
- subop = BVA_END;
- } else if (!strcmp("__builtin_va_copy", name)) {
- nchilds = 2;
- subop = BVA_COPY;
- } else {
- error(EBBUILT);;
- }
-
- np->u.subop = subop;
- np->right = (nchilds == 2) ? pop() : NULL;
- np->left = (nchilds != 0) ? pop() : NULL;
-
- free(name);
- push(np);
-}
-
-static void
-binary(char *token, union tokenop u)
-{
- Node *np = node(u.op);
-
- np->type = *gettype(token+1);
- np->right = pop();
- np->left = pop();
- push(np);
-}
-
-static void
-binit(char *token, union tokenop u)
-{
- ininit = 1;
-}
-
-static void
-einit(char *token, union tokenop u)
-{
- ininit = 0;
- endinit();
-}
-
-static void
-endpars(void)
-{
- if (!curfun || !inpars)
- error(ESYNTAX);
- inpars = 0;
-}
-
-static void
-aggregate(void)
-{
- Node *align, *size;
- char *name;
- Type *tp;
- Symbol *sym;
-
- align = pop();
- size = pop();
- name = pop();
- tp = pop();
-
- tp->size = size->u.i;
- tp->align = align->u.i;
- tp->flags = AGGRF;
- /*
- * type is the first field of Symbol so we can obtain the
- * address of the symbol from the address of the type.
- * We have to do this because composed returns the pointer
- * to the type, but in this function we also need the
- * symbol to store the name.
- */
- sym = (Symbol *) tp;
- sym->name = name;
-
- delnode(align);
- delnode(size);
-}
-
-static void
-array(void)
-{
- Type *tp, *base;
- Node *size;
-
- size = pop();
- base = pop();
- tp = pop();
- tp->size = size->u.i * base->size; /* FIXME check for overflow */
- tp->align = base->align;
-
- delnode(size);
-}
-
-static void
-decl(Symbol *sym)
-{
- Type *tp = &sym->type;
-
- if (tp->flags & FUNF) {
- lastfun = sym;
- } else {
- switch (sym->kind) {
- case SEXTRN:
- case SGLOB:
- case SPRIV:
- case SLOCAL:
- defglobal(sym);
- break;
- case SAUTO:
- case SREG:
- if (!curfun)
- error(ESYNTAX);
- ((inpars) ? defpar : defvar)(sym);
- break;
- default:
- abort();
- }
- }
-}
-
-static void
-vardecl(void)
-{
- Type *tp, *rp;
- Node *np;
- Symbol *sym;
- char *name;
-
- name = pop();
- tp = pop();
- if (tp->flags & FUNF)
- rp = pop();
- np = pop();
-
- sym = np->u.sym;
- /*
- * We have to free sym->name because in tentative declarations
- * we can have multiple declarations of the same symbol, and in
- * this case our parser will allocate twice the memory
- */
- free(sym->name);
- sym->name = name;
- sym->type = *tp;
- if (tp->flags & FUNF)
- sym->rtype = *rp;
- sym->kind = sclass;
-
- if (ininit)
- sym->type.flags |= INITF;
- decl(sym);
- delnode(np);
-}
-
-static void
-flddecl(void)
-{
- Node *off, *np;
- char *name;
- Type *tp;
- Symbol *sym;
-
- off = pop();
- name = pop();
- tp = pop();
- np = pop();
-
- sym = np->u.sym;
- sym->u.off = off->u.i;
- sym->name = name;
- sym->type = *tp;
-
- delnode(np);
- delnode(off);
-}
-
-static void
-labeldcl(void)
-{
- Node *np;
- Symbol *sym;
-
- np = pop();
- np->op = ONOP;
- sym = np->u.sym;
- sym->kind = SLABEL;
- sym->u.stmt = np;
- np->label = sym;
- addstmt(np, SETCUR);
-}
-
-static void
-stmt(void)
-{
- Node *np;
-
- if (empty())
- return;
- np = pop();
- if (ininit) {
- data(np);
- deltree(np);
- return;
- }
- addstmt(np, SETCUR);
-}
-
-static void
-beginfun(void)
-{
- curfun = lastfun;
- inpars = 1;
- pushctx();
- addstmt(node(OBFUN), SETCUR);
-}
-
-static void
-endfun(void)
-{
- endf = 1;
- addstmt(node(OEFUN), SETCUR);
-}
-
-void
-parse(void)
-{
- cleannodes(); /* remove code of previous function */
- popctx(); /* remove context of previous function */
- curfun = NULL;
- endf = 0;
-
- while (!endf && nextline())
- ;
- if (ferror(stdin))
- error(EFERROR, strerror(errno));
-}
--- a/src/cc2/peep.c
+++ /dev/null
@@ -1,8 +1,0 @@
-static char sccsid[] = "@(#) ./cc2/peep.c";
-#include <scc/scc.h>
-#include "cc2.h"
-
-void
-peephole(void)
-{
-}
--- a/src/cc2/symbol.c
+++ /dev/null
@@ -1,92 +1,0 @@
-static char sccsid[] = "@(#) ./cc2/symbol.c";
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <scc/scc.h>
-
-#include "cc2.h"
-
-#define NR_SYMHASH 64
-
-Symbol *locals;
-
-static Symbol *symtab[NR_SYMHASH], *curlocal;
-static int infunction;
-
-
-void
-freesym(Symbol *sym)
-{
- free(sym->name);
- free(sym);
-}
-
-void
-pushctx(void)
-{
- infunction = 1;
-}
-
-void
-popctx(void)
-{
- Symbol *sym, *next;
-
- infunction = 0;
- for (sym = locals; sym; sym = next) {
- next = sym->next;
- /*
- * Symbols are inserted in the hash in the inverted
- * order they are found in locals and it is impossible
- * to have a global over a local, because a local is
- * any symbol defined in the body of a function,
- * even if it has extern linkage.
- * For this reason when we reach a symbol in the
- * locals list we know that it is the head of it
- * collision list and we can remove it assigning
- * it h_next to the hash table position
- */
- if (sym->id != TMPSYM)
- symtab[sym->id & NR_SYMHASH-1] = sym->h_next;
- freesym(sym);
- }
- curlocal = locals = NULL;
-}
-
-Symbol *
-getsym(unsigned id)
-{
- Symbol **htab, *sym;
- static unsigned short num;
-
- if (id >= USHRT_MAX)
- error(EBADID);
-
- if (id != TMPSYM) {
- htab = &symtab[id & NR_SYMHASH-1];
- for (sym = *htab; sym; sym = sym->h_next) {
- if (sym->id == id)
- return sym;
- }
- }
-
- sym = xcalloc(1, sizeof(*sym));
- sym->id = id;
- if (infunction) {
- if (!locals)
- locals = sym;
- if (curlocal)
- curlocal->next = sym;
- curlocal = sym;
- }
- if (id != TMPSYM) {
- sym->h_next = *htab;
- *htab = sym;
- }
- if ((sym->numid = ++num) == 0)
- error(EIDOVER);
-
- return sym;
-}
--- a/src/cc2/target/amd64-sysv/cgen.c
+++ /dev/null
@@ -1,15 +1,0 @@
-static char sccsid[] = "@(#) ./cc2/arch/amd64-sysv/cgen.c";
-
-#include "arch.h"
-#include <scc/scc.h>
-#include "../../cc2.h"
-
-Node *
-cgen(Node *np)
-{
-}
-
-Node *
-sethi(Node *np)
-{
-}
--- a/src/cc2/target/amd64-sysv/code.c
+++ /dev/null
@@ -1,211 +1,0 @@
-static char sccsid[] = "@(#) ./cc2/arch/amd64-sysv/code.c";
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <scc/cstd.h>
-#include <scc/scc.h>
-
-#include "arch.h"
-#include "../../cc2.h"
-
-enum segment {
- CODESEG,
- DATASEG,
- BSSSEG,
- NOSEG
-};
-
-static int curseg = NOSEG;
-
-static void
-segment(int seg)
-{
- static char *txt[] = {
- [CODESEG] = "\t.text\n",
- [DATASEG] = "\t.data\n",
- [BSSSEG] = "\t.bss\n",
- };
-
- if (seg == curseg)
- return;
- fputs(txt[seg], stdout);
- curseg = seg;
-}
-
-static char *
-symname(Symbol *sym)
-{
- static char name[INTIDENTSIZ+1];
-
- if (sym->name) {
- switch (sym->kind) {
- case SEXTRN:
- case SGLOB:
- case SPRIV:
- return sym->name;
- }
- }
-
- sprintf(name, ".L%d", sym->numid);
-
- return name;
-}
-
-static void
-emitconst(Node *np)
-{
- switch (np->type.size) {
- case 1:
- printf("%d", (int) np->u.i & 0xFF);
- break;
- case 2:
- printf("%d", (int) np->u.i & 0xFFFF);
- break;
- case 4:
- printf("%ld", (long) np->u.i & 0xFFFFFFFF);
- break;
- case 8:
- printf("%lld", (long long) np->u.i & 0xFFFFFFFF);
- break;
- default:
- abort();
- }
-}
-
-static void
-emittree(Node *np)
-{
- if (!np)
- return;
-
- switch (np->op) {
- case OSTRING:
- printf("\"%s\"", np->u.s);
- free(np->u.s);
- np->u.s = NULL;
- break;
- case OCONST:
- emitconst(np);
- break;
- case OADDR:
- emittree(np->left);
- break;
- case OMEM:
- fputs(symname(np->u.sym), stdout);
- break;
- default:
- emittree(np->left);
- printf(" %c ", np->op);
- emittree(np->right);
- break;
- }
-}
-static void
-size2asm(Type *tp)
-{
- char *s;
-
- if (tp->flags & STRF) {
- s = "\t.ascii\t";
- } else {
- switch (tp->size) {
- case 1:
- s = "\t.byte\t";
- break;
- case 2:
- s = "\t.short\t";
- break;
- case 4:
- s = "\t.long\t";
- break;
- case 8:
- s = "\t.quad\t";
- break;
- default:
- s = "\t.space\t%lu,";
- break;
- }
- }
- printf(s, tp->size);
-}
-
-
-void
-data(Node *np)
-{
- size2asm(&np->type);
- emittree(np);
- putchar('\n');
-}
-
-static void
-label(Symbol *sym)
-{
- int seg;
- char *name = symname(sym);
- Type *tp = &sym->type;
-
- if (sym->type.flags & FUNF)
- seg = CODESEG;
- else if (sym->type.flags & INITF)
- seg = DATASEG;
- else
- seg = BSSSEG;
- segment(seg);
-
- switch (sym->kind) {
- case SEXTRN:
- printf("\t.extern\t%s\n", name);
- case SLOCAL:
- return;
- case SGLOB:
- printf("\t.global\t%s\n", name);
- if (seg == BSSSEG)
- printf("\t.comm\t%s,%lu\n", name, tp->size);
- break;
- }
- if (sym->type.align != 1)
- printf("\t.align\t%lu\n", sym->type.align );
- printf("%s:\n", name);
-}
-
-void
-defglobal(Symbol *sym)
-{
- label(sym);
- if (sym->kind == SEXTRN || (sym->type.flags & INITF))
- return;
- size2asm(&sym->type);
- puts("0");
-}
-
-void
-defvar(Symbol *sym)
-{
-}
-
-void
-defpar(Symbol *sym)
-{
-}
-
-void
-newfun(void)
-{
-}
-
-void
-writeout(void)
-{
-}
-
-void
-endinit(void)
-{
-}
-
-void
-getbblocks(void)
-{
-}
--- a/src/cc2/target/amd64-sysv/optm.c
+++ /dev/null
@@ -1,11 +1,0 @@
-static char sccsid[] = "@(#) ./cc2/arch/amd64-sysv/optm.c";
-
-#include <scc/scc.h>
-
-#include "../../cc2.h"
-
-Node *
-optm_dep(Node *np)
-{
- return np;
-}
--- a/src/cc2/target/amd64-sysv/target.mk
+++ /dev/null
@@ -1,8 +1,0 @@
-OBJ-amd64-sysv = $(OBJS) \
- target/amd64-sysv/cgen.o \
- target/amd64-sysv/optm.o \
- target/amd64-sysv/code.o \
- target/amd64-sysv/types.o
-
-$(LIBEXEC)/cc2-amd64-sysv: $(OBJ-amd64-sysv)
- $(CC) $(SCC_LDFLAGS) $(OBJ-amd64-sysv) -lscc -o $@
--- a/src/cc2/target/amd64-sysv/types.c
+++ /dev/null
@@ -1,94 +1,0 @@
-static char sccsid[] = "@(#) ./cc2/arch/amd64-sysv/types.c";
-
-#include <scc/scc.h>
-
-#include "../../cc2.h"
-
-
-Type int8type = {
- .flags = SIGNF | INTF,
- .size = 1,
- .align = 1
-};
-
-Type int16type = {
- .flags = SIGNF | INTF,
- .size = 2,
- .align = 2
-};
-
-Type int32type = {
- .flags = SIGNF | INTF,
- .size = 4,
- .align = 4
-};
-
-Type int64type = {
- .flags = SIGNF | INTF,
- .size = 8,
- .align = 8
-};
-
-Type uint8type = {
- .flags = INTF,
- .size = 1,
- .align = 1
-};
-
-Type uint16type = {
- .flags = INTF,
- .size = 2,
- .align = 2
-};
-
-Type uint32type = {
- .flags = INTF,
- .size = 4,
- .align = 4
-};
-
-Type uint64type = {
- .flags = INTF,
- .size = 8,
- .align = 2
-};
-
-Type ptrtype = {
- .flags = INTF,
- .size = 8,
- .align = 8
-};
-
-Type booltype = {
- .flags = INTF,
- .size = 1,
- .align = 1
-};
-
-Type float32type = {
- .flags = FLOATF,
- .size = 4,
- .align = 4
-};
-
-Type float64type = {
- .flags = FLOATF,
- .size = 8,
- .align = 8
-};
-
-Type float80type = {
- .flags = FLOATF,
- .size = 16,
- .align = 16
-};
-
-Type voidtype = {
- .size = 0,
- .align = 0
-};
-
-Type arg_type = {
- .size = 24,
- .align = 8
-};
--- a/src/cc2/target/i386-sysv/cgen.c
+++ /dev/null
@@ -1,16 +1,0 @@
-static char sccsid[] = "@(#) ./cc2/arch/i386-sysv/cgen.c";
-
-#include <scc/scc.h>
-
-#include "arch.h"
-#include "../../cc2.h"
-
-Node *
-cgen(Node *np)
-{
-}
-
-Node *
-sethi(Node *np)
-{
-}
--- a/src/cc2/target/i386-sysv/code.c
+++ /dev/null
@@ -1,209 +1,0 @@
-static char sccsid[] = "@(#) ./cc2/arch/i386-sysv/code.c";
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <scc/cstd.h>
-#include <scc/scc.h>
-
-#include "arch.h"
-#include "../../cc2.h"
-
-enum segment {
- CODESEG,
- DATASEG,
- BSSSEG,
- NOSEG
-};
-
-static int curseg = NOSEG;
-
-static void
-segment(int seg)
-{
- static char *txt[] = {
- [CODESEG] = "\t.text\n",
- [DATASEG] = "\t.data\n",
- [BSSSEG] = "\t.bss\n",
- };
-
- if (seg == curseg)
- return;
- fputs(txt[seg], stdout);
- curseg = seg;
-}
-
-static char *
-symname(Symbol *sym)
-{
- static char name[INTIDENTSIZ+1];
-
- if (sym->name) {
- switch (sym->kind) {
- case SEXTRN:
- case SGLOB:
- case SPRIV:
- return sym->name;
- }
- }
-
- sprintf(name, ".L%d", sym->numid);
-
- return name;
-}
-
-static void
-emitconst(Node *np)
-{
- switch (np->type.size) {
- case 1:
- printf("%d", (int) np->u.i & 0xFF);
- break;
- case 2:
- printf("%d", (int) np->u.i & 0xFFFF);
- break;
- case 4:
- printf("%ld", (long) np->u.i & 0xFFFFFFFF);
- break;
- case 8:
- printf("%lld", (long long) np->u.i & 0xFFFFFFFF);
- break;
- default:
- abort();
- }
-}
-
-static void
-emittree(Node *np)
-{
- if (!np)
- return;
-
- switch (np->op) {
- case OSTRING:
- printf("\"%s\"", np->u.s);
- free(np->u.s);
- np->u.s = NULL;
- break;
- case OCONST:
- emitconst(np);
- break;
- case OADDR:
- emittree(np->left);
- break;
- case OMEM:
- fputs(symname(np->u.sym), stdout);
- break;
- default:
- emittree(np->left);
- printf(" %c ", np->op);
- emittree(np->right);
- break;
- }
-}
-static void
-size2asm(Type *tp)
-{
- char *s;
-
- if (tp->flags & STRF) {
- s = "\t.ascii\t";
- } else {
- switch (tp->size) {
- case 1:
- s = "\t.byte\t";
- break;
- case 2:
- s = "\t.short\t";
- break;
- case 4:
- s = "\t.long\t";
- break;
- case 8:
- s = "\t.quad\t";
- break;
- default:
- s = "\t.space\t%lu,";
- break;
- }
- }
- printf(s, tp->size);
-}
-
-void
-data(Node *np)
-{
- size2asm(&np->type);
- emittree(np);
- putchar('\n');
-}
-
-static void
-label(Symbol *sym)
-{
- int seg;
- char *name = symname(sym);
- Type *tp = &sym->type;
-
- if (sym->type.flags & FUNF)
- seg = CODESEG;
- else if (sym->type.flags & INITF)
- seg = DATASEG;
- else
- seg = BSSSEG;
- segment(seg);
-
- switch (sym->kind) {
- case SEXTRN:
- printf("\t.extern\t%s\n", name);
- case SLOCAL:
- return;
- case SGLOB:
- printf("\t.global\t%s\n", name);
- if (seg == BSSSEG)
- printf("\t.comm\t%s,%lu\n", name, tp->size);
- break;
- }
- if (sym->type.align != 1)
- printf("\t.align\t%lu\n", sym->type.align );
- printf("%s:\n", name);
-}
-
-void
-defglobal(Symbol *sym)
-{
- label(sym);
- if (sym->kind == SEXTRN || (sym->type.flags & INITF))
- return;
- size2asm(&sym->type);
- puts("0");
-}
-
-void
-defpar(Symbol *sym)
-{
-}
-
-void
-defvar(Symbol *sym)
-{
-}
-
-void
-newfun(void)
-{
-}
-
-void
-writeout(void)
-{
-}
-
-void
-endinit(void)
-{
-}
-
-void
-getbblocks(void)
-{
-}
--- a/src/cc2/target/i386-sysv/optm.c
+++ /dev/null
@@ -1,11 +1,0 @@
-static char sccsid[] = "@(#) ./cc2/arch/i386-sysv/optm.c";
-
-#include <scc/scc.h>
-
-#include "../../cc2.h"
-
-Node *
-optm_dep(Node *np)
-{
- return np;
-}
--- a/src/cc2/target/i386-sysv/target.mk
+++ /dev/null
@@ -1,8 +1,0 @@
-OBJ-i386-sysv = $(OBJS) \
- target/i386-sysv/cgen.o \
- target/i386-sysv/optm.o \
- target/i386-sysv/code.o \
- target/i386-sysv/types.o
-
-$(LIBEXEC)/cc2-i386-sysv: $(OBJ-i386-sysv)
- $(CC) $(SCC_LDFLAGS) $(OBJ-i386-sysv) -lscc -o $@
--- a/src/cc2/target/i386-sysv/types.c
+++ /dev/null
@@ -1,95 +1,0 @@
-static char sccsid[] = "@(#) ./cc2/arch/i386-sysv/types.c";
-
-#include <scc/scc.h>
-
-#include "../../cc2.h"
-
-
-Type int8type = {
- .flags = SIGNF | INTF,
- .size = 1,
- .align = 1
-};
-
-Type int16type = {
- .flags = SIGNF | INTF,
- .size = 2,
- .align = 2
-};
-
-Type int32type = {
- .flags = SIGNF | INTF,
- .size = 4,
- .align = 4
-};
-
-Type int64type = {
- .flags = SIGNF | INTF,
- .size = 8,
- .align = 4
-};
-
-Type uint8type = {
- .flags = INTF,
- .size = 1,
- .align = 1
-};
-
-Type uint16type = {
- .flags = INTF,
- .size = 2,
- .align = 2
-};
-
-Type uint32type = {
- .flags = INTF,
- .size = 4,
- .align = 2
-};
-
-Type uint64type = {
- .flags = INTF,
- .size = 8,
- .align = 4
-};
-
-Type ptrtype = {
- .flags = INTF,
- .size = 4,
- .align = 4
-};
-
-Type booltype = {
- .flags = INTF,
- .size = 1,
- .align = 1
-};
-
-Type float32type = {
- .flags = FLOATF,
- .size = 4,
- .align = 4
-};
-
-Type float64type = {
- .flags = FLOATF,
- .size = 8,
- .align = 4
-};
-
-Type float80type = {
- .flags = FLOATF,
- .size = 12,
- .align = 4
-};
-
-Type voidtype = {
- .size = 0,
- .align = 0
-};
-
-/* this type is not used in this architecture */
-Type arg_type = {
- .size = 0,
- .align = 0
-};
--- a/src/cc2/target/qbe/arch.h
+++ /dev/null
@@ -1,135 +1,0 @@
-enum asmop {
- ASNOP = 0,
- ASSTB,
- ASSTH,
- ASSTW,
- ASSTL,
- ASSTM,
- ASSTS,
- ASSTD,
-
- ASLDSB,
- ASLDUB,
- ASLDSH,
- ASLDUH,
- ASLDSW,
- ASLDUW,
- ASLDL,
- ASLDS,
- ASLDD,
-
- ASADDW,
- ASSUBW,
- ASMULW,
- ASMODW,
- ASUMODW,
- ASDIVW,
- ASUDIVW,
- ASSHLW,
- ASSHRW,
- ASUSHRW,
- ASLTW,
- ASULTW,
- ASGTW,
- ASUGTW,
- ASLEW,
- ASULEW,
- ASGEW,
- ASUGEW,
- ASEQW,
- ASNEW,
- ASBANDW,
- ASBORW,
- ASBXORW,
-
- ASADDL,
- ASSUBL,
- ASMULL,
- ASMODL,
- ASUMODL,
- ASDIVL,
- ASUDIVL,
- ASSHLL,
- ASSHRL,
- ASUSHRL,
- ASLTL,
- ASULTL,
- ASGTL,
- ASUGTL,
- ASLEL,
- ASULEL,
- ASGEL,
- ASUGEL,
- ASEQL,
- ASNEL,
- ASBANDL,
- ASBORL,
- ASBXORL,
-
- ASADDS,
- ASSUBS,
- ASMULS,
- ASDIVS,
- ASLTS,
- ASGTS,
- ASLES,
- ASGES,
- ASEQS,
- ASNES,
-
- ASADDD,
- ASSUBD,
- ASMULD,
- ASDIVD,
- ASLTD,
- ASGTD,
- ASLED,
- ASGED,
- ASEQD,
- ASNED,
-
- ASEXTBW,
- ASUEXTBW,
- ASEXTBL,
- ASUEXTBL,
- ASEXTHW,
- ASUEXTHW,
- ASEXTHL,
- ASUEXTHL,
- ASEXTWL,
- ASUEXTWL,
-
- ASSTOL,
- ASSTOW,
- ASDTOL,
- ASDTOW,
-
- ASSWTOD,
- ASSWTOS,
- ASSLTOD,
- ASSLTOS,
-
- ASEXTS,
- ASTRUNCD,
-
- ASJMP,
- ASBRANCH,
- ASRET,
- ASCALL,
- ASCALLE,
- ASCALLEX,
- ASPAR,
- ASPARE,
- ASALLOC,
- ASFORM,
-
- ASCOPYB,
- ASCOPYH,
- ASCOPYW,
- ASCOPYL,
- ASCOPYS,
- ASCOPYD,
-
- ASVSTAR,
- ASVARG,
-};
--- a/src/cc2/target/qbe/cgen.c
+++ /dev/null
@@ -1,729 +1,0 @@
-static char sccsid[] = "@(#) ./cc2/arch/qbe/cgen.c";
-
-#include <assert.h>
-#include <stdlib.h>
-
-#include <scc/cstd.h>
-#include <scc/scc.h>
-
-#include "arch.h"
-#include "../../cc2.h"
-
-enum sflags {
- ISTMP = 1,
- ISCONS = 2
-};
-
-static char opasmw[] = {
- [OADD] = ASADDW,
- [OSUB] = ASSUBW,
- [OMUL] = ASMULW,
- [OMOD] = ASMODW,
- [ODIV] = ASDIVW,
- [OSHL] = ASSHLW,
- [OSHR] = ASSHRW,
- [OLT] = ASLTW,
- [OGT] = ASGTW,
- [OLE] = ASLEW,
- [OGE] = ASGEW,
- [OEQ] = ASEQW,
- [ONE] = ASNEW,
- [OBAND] = ASBANDW,
- [OBOR] = ASBORW,
- [OBXOR] = ASBXORW,
-};
-
-static char opasml[] = {
- [OADD] = ASADDL,
- [OSUB] = ASSUBL,
- [OMUL] = ASMULL,
- [OMOD] = ASMODL,
- [ODIV] = ASDIVL,
- [OSHL] = ASSHLL,
- [OSHR] = ASSHRL,
- [OLT] = ASLTL,
- [OGT] = ASGTL,
- [OLE] = ASLEL,
- [OGE] = ASGEL,
- [OEQ] = ASEQL,
- [ONE] = ASNEL,
- [OBAND] = ASBANDL,
- [OBOR] = ASBORL,
- [OBXOR] = ASBXORL,
-};
-
-static char opasms[] = {
- [OADD] = ASADDS,
- [OSUB] = ASSUBS,
- [OMUL] = ASMULS,
- [ODIV] = ASDIVS,
- [OLT] = ASLTS,
- [OGT] = ASGTS,
- [OLE] = ASLES,
- [OGE] = ASGES,
- [OEQ] = ASEQS,
- [ONE] = ASNES,
-};
-static char opasmd[] = {
- [OADD] = ASADDD,
- [OSUB] = ASSUBD,
- [OMUL] = ASMULD,
- [ODIV] = ASDIVD,
- [OLT] = ASLTD,
- [OGT] = ASGTD,
- [OLE] = ASLED,
- [OGE] = ASGED,
- [OEQ] = ASEQD,
- [ONE] = ASNED,
-};
-
-extern Type int32type, uint32type, ptrtype;
-
-static Node *
-tmpnode(Node *np, Type *tp)
-{
- char flags;
- Symbol *sym;
-
- if (!np)
- np = node(OTMP);
- sym = getsym(TMPSYM);
- sym->type = np->type = *tp;
- flags = tp->flags & ~(PARF|INITF);
- sym->type.flags = np->type.flags = flags;
- sym->kind = STMP;
- np->left = np->right = NULL;
- np->u.sym = sym;
- np->op = OTMP;
- np->flags |= ISTMP;
- return np;
-}
-
-static Node *
-load(Type *tp, Node *np, Node *new)
-{
- int op;
- int flags = tp->flags;
-
- if (flags & (AGGRF|FUNF)) {
- *new = *np;
- return new;
- }
- switch (tp->size) {
- case 1:
- op = ASLDSB;
- break;
- case 2:
- op = ASLDSH;
- break;
- case 4:
- op = (flags & FLOATF) ? ASLDS : ASLDSW;
- break;
- case 8:
- op = (flags & FLOATF) ? ASLDD : ASLDL;
- break;
- default:
- abort();
- }
- /*
- * unsigned version of operations are always +1 the
- * signed version
- */
- if ((flags & (INTF|SIGNF)) == INTF && tp->size < 8)
- ++op;
-
- code(op, tmpnode(new, tp), np, NULL);
-
- return new;
-}
-
-static Node *rhs(Node *np, Node *new);
-
-static Node *
-cast(Type *td, Node *ns, Node *nd)
-{
- Type *ts;
- Node aux1, aux2;
- int op, d_isint, s_isint;
-
- ts = &ns->type;
- d_isint = (td->flags & INTF) != 0;
- s_isint = (ts->flags & INTF) != 0;
-
- if (d_isint && s_isint) {
- if (td->size <= ts->size) {
- *nd = *ns;
- return nd;
- }
- assert(td->size == 4 || td->size == 8);
- switch (ts->size) {
- case 1:
- op = (td->size == 4) ? ASEXTBW : ASEXTBL;
- break;
- case 2:
- op = (td->size == 4) ? ASEXTHW : ASEXTHL;
- break;
- case 4:
- op = ASEXTWL;
- break;
- default:
- abort();
- }
- /*
- * unsigned version of operations are always +1 the
- * signed version
- */
- op += (ts->flags & SIGNF) == 0;
- } else if (d_isint) {
- /* conversion from float to int */
- switch (ts->size) {
- case 4:
- op = (td->size == 8) ? ASSTOL : ASSTOW;
- break;
- case 8:
- op = (td->size == 8) ? ASDTOL : ASDTOW;
- break;
- default:
- abort();
- }
- /* TODO: Add signess */
- } else if (s_isint) {
- /* conversion from int to float */
- switch (ts->size) {
- case 1:
- case 2:
- ts = (ts->flags&SIGNF) ? &int32type : &uint32type;
- ns = cast(ts, ns, tmpnode(&aux2, ts));
- case 4:
- op = (td->size == 8) ? ASSWTOD : ASSWTOS;
- break;
- case 8:
- op = (td->size == 8) ? ASSLTOD : ASSLTOS;
- break;
- default:
- abort();
- }
- /* TODO: Add signess */
- } else {
- /* conversion from float to float */
- op = (td->size == 4) ? ASEXTS : ASTRUNCD;
- }
-
- code(op, tmpnode(nd, td), ns, NULL);
- return nd;
-}
-
-static Node *
-call(Node *np, Node *fun, Node *ret)
-{
- int n, op;
- Type *tp;
- Node aux, **q, *p, *pars[NR_FUNPARAM];
-
- for (n = 0, p = np->right; p; p = p->right)
- pars[n++] = rhs(p->left, node(OTMP));
-
- tp = &np->type;
- code(ASCALL, tmpnode(ret, tp), fun, NULL);
-
- for (q = pars; q < &pars[n]; ++q) {
- op = (q == &pars[n-1]) ? ASPARE : ASPAR;
- tmpnode(&aux, &(*q)->type);
- code(op, NULL, *q, &aux);
- }
- code((np->op == OCALL) ? ASCALLE : ASCALLEX, NULL, NULL, NULL);
-
- return ret;
-}
-
-static Node *
-assign(Type *tp, Node *to, Node *from)
-{
- int op;
-
- switch (tp->size) {
- case 1:
- op = ASSTB;
- break;
- case 2:
- op = ASSTH;
- break;
- case 4:
- op = (tp->flags & FLOATF) ? ASSTS : ASSTW;
- break;
- case 8:
- op = (tp->flags & FLOATF) ? ASSTD : ASSTL;
- break;
- default:
- op = ASSTM;
- break;
- }
- code(op, to, from, NULL);
- return from;
-}
-
-static Node *
-copy(Type *tp, Node *to, Node *from)
-{
- int op;
-
- switch (tp->size) {
- case 1:
- op = ASCOPYB;
- break;
- case 2:
- op = ASCOPYH;
- break;
- case 4:
- op = (tp->flags & FLOATF) ? ASCOPYS : ASCOPYW;
- break;
- case 8:
- op = (tp->flags & FLOATF) ? ASCOPYD : ASCOPYL;
- break;
- default:
- /* TODO: Need to handle the general case */
- abort();
- }
- code(op, to, from, NULL);
- return from;
-}
-
-/* TODO: Do field() transformation in sethi */
-
-static Node *
-field(Node *np, Node *ret, int islhs)
-{
- Node base, node, off, add, *addr;
- TUINT offset = np->right->u.sym->u.off;
-
- addr = rhs(np->left, &base);
-
- if (offset != 0) {
- node.op = OADD;
- node.type = ptrtype;
- node.left = addr;
- node.right = constnode(&off, offset, &ptrtype);
- addr = rhs(&node, &add);
- }
-
- if (islhs)
- *ret = *addr;
- else
- load(&np->type, addr, ret);
-
- return ret;
-}
-
-static Node *
-lhs(Node *np, Node *new)
-{
- switch (np->op) {
- case OMEM:
- case OAUTO:
- *new = *np;
- return new;
- case OPTR:
- return rhs(np->left, new);
- case OFIELD:
- return field(np, new, 1);
- default:
- abort();
- }
-}
-
-static void
-bool(Node *np, Symbol *true, Symbol *false)
-{
- Node *l = np->left, *r = np->right;
- Node ret, ifyes, ifno;
- Symbol *label;
-
- switch (np->op) {
- case ONEG:
- bool(l, false, true);
- break;
- case OAND:
- label = newlabel();
- bool(l, label, false);
- setlabel(label);
- bool(r, true, false);
- break;
- case OOR:
- label = newlabel();
- bool(l, true, label);
- setlabel(label);
- bool(r, true, false);
- break;
- default:
- label2node(&ifyes, true);
- label2node(&ifno, false);
- code(ASBRANCH, rhs(np, &ret), &ifyes, &ifno);
- break;
- }
-}
-
-static Node *
-ternary(Node *np, Node *ret)
-{
- Node ifyes, ifno, phi, *colon, aux1, aux2, aux3;
-
- tmpnode(ret, &np->type);
- label2node(&ifyes, NULL);
- label2node(&ifno, NULL);
- label2node(&phi, NULL);
-
- colon = np->right;
- code(ASBRANCH, rhs(np->left, &aux1), &ifyes, &ifno);
-
- setlabel(ifyes.u.sym);
- copy(&ret->type, ret, rhs(colon->left, &aux2));
- code(ASJMP, NULL, &phi, NULL);
-
- setlabel(ifno.u.sym);
- copy(&ret->type, ret, rhs(colon->right, &aux3));
- setlabel(phi.u.sym);
-
- return ret;
-}
-
-static Node *
-function(void)
-{
- Node aux;
- Symbol *p;
-
- /* allocate stack space for parameters */
- for (p = locals; p && (p->type.flags & PARF) != 0; p = p->next)
- code(ASALLOC, label2node(&aux, p), NULL, NULL);
-
- /* allocate stack space for local variables) */
- for ( ; p && p->id != TMPSYM; p = p->next) {
- if (p->kind != SAUTO)
- continue;
- code(ASALLOC, label2node(&aux, p), NULL, NULL);
- }
- /* store formal parameters in parameters */
- for (p = locals; p; p = p->next) {
- if ((p->type.flags & PARF) == 0)
- break;
- code(ASFORM, label2node(&aux, p), NULL, NULL);
- }
- return NULL;
-}
-
-static void
-swtch_if(Node *idx)
-{
- Node aux1, aux2, *np;
- Symbol *deflabel = NULL;
-
- for (;;) {
- np = delstmt();
- setlabel(np->label);
-
- switch (np->op) {
- case OESWITCH:
- if (!deflabel)
- deflabel = np->u.sym;
- aux1.op = OJMP;
- aux1.label = NULL;
- aux1.u.sym = deflabel;
- cgen(&aux1);
- return;
- case OCASE:
- aux1 = *np;
- aux1.op = OBRANCH;
- aux1.label = NULL;
- aux1.left = &aux2;
-
- aux2.op = OEQ;
- aux2.type = idx->type;
- aux2.left = np->left;
- aux2.right = idx;
-
- cgen(&aux1);
- break;
- case ODEFAULT:
- deflabel = np->u.sym;
- break;
- default:
- abort();
- }
- }
-}
-
-static Node *
-rhs(Node *np, Node *ret)
-{
- Node aux1, aux2, *phi, *l = np->left, *r = np->right;
- Type *tp;
- int off, op;
- char *tbl;
- Symbol *true, *false;
-
- tp = &np->type;
-
- switch (np->op) {
- case OBFUN:
- return function();
- case ONOP:
- case OBLOOP:
- case OELOOP:
- case OEFUN:
- return NULL;
- case OTMP:
- case OCONST:
- *ret = *np;
- return np;
- case OMEM:
- case OAUTO:
- return load(tp, np, ret);
- case ONEG:
- case OAND:
- case OOR:
- true = newlabel();
- false = newlabel();
- phi = label2node(&aux1, NULL);
- tmpnode(ret, &int32type);
-
- bool(np, true, false);
-
- setlabel(true);
- code(ASCOPYW, ret, constnode(&aux2, 1, &int32type), NULL);
- code(ASJMP, NULL, phi, NULL);
-
- setlabel(false);
- code(ASCOPYW, ret, constnode(&aux2, 0, &int32type), NULL);
-
- setlabel(phi->u.sym);
- return ret;
- case OMOD:
- case OSHR:
- assert(tp->flags & INTF);
- case ODIV:
- case OLT:
- case OGT:
- case OLE:
- case OGE:
- /*
- * unsigned version of operations are always +1 the
- * signed version
- */
- off = (tp->flags & SIGNF) == 0;
- goto binary;
- case OSHL:
- case OBAND:
- case OBOR:
- case OBXOR:
- assert(tp->flags & INTF);
- case OADD:
- case OSUB:
- case OMUL:
- case OEQ:
- case ONE:
- off = 0;
- binary:
- if (l->complex >= r->complex) {
- rhs(l, &aux1);
- rhs(r, &aux2);
- } else {
- rhs(r, &aux2);
- rhs(l, &aux1);
- }
- switch (tp->size) {
- case 4:
- tbl = (tp->flags & FLOATF) ? opasms : opasmw;
- break;
- case 8:
- tbl = (tp->flags & FLOATF) ? opasmd : opasml;
- break;
- default:
- abort();
- }
- op = tbl[np->op] + off;
- tmpnode(ret, tp);
- code(op, ret, &aux1, &aux2);
- return ret;
- case OCALL:
- case OCALLE:
- if (l->op == OPTR)
- l = rhs(l, &aux1);
- return call(np, l, ret);
- case OCAST:
- return cast(tp, rhs(l, &aux1), ret);
- case OASSIG:
- /* TODO: Do this transformations in sethi */
- switch (np->u.subop) {
- case OINC:
- op = OADD;
- goto post_oper;
- case ODEC:
- op = OSUB;
- post_oper:
- aux1.op = op;
- aux1.left = rhs(l, ret);
- aux1.right = r;
- aux1.type = np->type;
- rhs(&aux1, &aux2);
- lhs(l, &aux1);
- assign(tp, &aux1, &aux2);
- break;
- default:
- aux2.type = np->type;
- aux2.op = np->u.subop;
- aux2.right = np->right;
- aux2.left = np->left;
- r = rhs(&aux2, &aux1);
- Node aux3;
- if (l->op == OCAST) {
- aux3.type = l->left->type;
- aux3.op = OCAST;
- aux3.left = r;
- aux3.right = NULL;
- r = &aux3;
- l = l->left;
- }
- case 0:
- /* TODO: see what is the most difficult */
- lhs(l, &aux2);
- rhs(r, ret);
- return assign(tp, &aux2, ret);
- }
- return ret;
- case OASK:
- return ternary(np, ret);
- case OCOMMA:
- rhs(l, &aux1);
- return rhs(r, ret);
- case OPTR:
- return load(tp, rhs(l, &aux1), ret);
- case OADDR:
- lhs(l, ret);
- ret->type = *tp;
- return ret;
- case OFIELD:
- return field(np, ret, 0);
- case OBUILTIN:
- switch (np->u.subop) {
- case BVA_START:
- l = rhs(l, &aux1);
- code(ASVSTAR, NULL, l, NULL);
- return NULL;
- case BVA_END:
- return NULL;
- case BVA_ARG:
- l = rhs(l, &aux1);
- code(ASVARG, tmpnode(ret, tp), l, NULL);
- return ret;
- case BVA_COPY:
- /* TODO */
- default:
- abort();
- }
- default:
- abort();
- }
- abort();
-}
-
-Node *
-cgen(Node *np)
-{
- Node aux, *p, *next;
-
- setlabel(np->label);
- switch (np->op) {
- case OJMP:
- label2node(&aux, np->u.sym);
- code(ASJMP, NULL, &aux, NULL);
- break;
- case OBRANCH:
- next = np->next;
- if (!next->label)
- next->label = newlabel();
- bool(np->left, np->u.sym, next->label);
- break;
- case ORET:
- p = (np->left) ? rhs(np->left, &aux) : NULL;
- code(ASRET, NULL, p, NULL);
- break;
- case OBSWITCH:
- p = rhs(np->left, &aux);
- swtch_if(p);
- break;
- default:
- rhs(np, &aux);
- break;
- }
- return NULL;
-}
-
-/*
- * This is strongly influenced by
- * http://plan9.bell-labs.com/sys/doc/compiler.ps (/sys/doc/compiler.ps)
- * calculate addresability as follows
- * AUTO => 11 value+fp
- * REG => 11 reg
- * STATIC => 11 (value)
- * CONST => 11 $value
- * These values of addressability are not used in the code generation.
- * They are only used to calculate the Sethi-Ullman numbers. Since
- * QBE is AMD64 targered we could do a better job there, and try to
- * detect some of the complex addressing modes of these processors.
- */
-Node *
-sethi(Node *np)
-{
- Node *lp, *rp;
-
- if (!np)
- return np;
-
- np->complex = 0;
- np->address = 0;
- lp = np->left;
- rp = np->right;
-
- switch (np->op) {
- case OAUTO:
- case OREG:
- case OMEM:
- case OCONST:
- np->address = 11;
- break;
- case OCPL:
- assert(np->type.flags & INTF);
- np->op = OBXOR;
- rp = constnode(NULL, ~(TUINT) 0, &np->type);
- goto binary;
- case OSNEG:
- np->op = OSUB;
- rp = lp;
- lp = constnode(NULL, 0, &np->type);
- if ((np->type.flags & INTF) == 0)
- lp->u.f = 0.0;
- default:
- binary:
- lp = sethi(lp);
- rp = sethi(rp);
- break;
- }
- np->left = lp;
- np->right = rp;
-
- if (np->address > 10)
- return np;
- if (lp)
- np->complex = lp->complex;
- if (rp) {
- int d = np->complex - rp->complex;
-
- if (d == 0)
- ++np->complex;
- else if (d < 0)
- np->complex = rp->complex;
- }
- if (np->complex == 0)
- ++np->complex;
- return np;
-}
--- a/src/cc2/target/qbe/code.c
+++ /dev/null
@@ -1,569 +1,0 @@
-static char sccsid[] = "@(#) ./cc2/arch/qbe/code.c";
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <scc/cstd.h>
-#include <scc/scc.h>
-
-#include "arch.h"
-#include "../../cc2.h"
-
-#define ADDR_LEN (INTIDENTSIZ+64)
-
-static void binary(void), unary(void), store(void), jmp(void), ret(void),
- branch(void), call(void), ecall(void), param(void),
- asalloc(void), form2local(void), ldir(void), vastart(void),
- vaarg(void);
-
-static struct opdata {
- void (*fun)(void);
- char *txt;
- char letter;
-} optbl [] = {
- [ASLDSB] = {.fun = unary, .txt = "loadsb", .letter = 'w'},
- [ASLDUB] = {.fun = unary, .txt = "loadub", .letter = 'w'},
- [ASLDSH] = {.fun = unary, .txt = "loadsh", .letter = 'w'},
- [ASLDUH] = {.fun = unary, .txt = "loaduh", .letter = 'w'},
- [ASLDSW] = {.fun = unary, .txt = "loadsw", .letter = 'w'},
- [ASLDUW] = {.fun = unary, .txt = "loaduw", .letter = 'w'},
- [ASLDL] = {.fun = unary, .txt = "loadl", .letter = 'l'},
- [ASLDS] = {.fun = unary, .txt = "loads", .letter = 's'},
- [ASLDD] = {.fun = unary, .txt = "loadd", .letter = 'd'},
-
- [ASCOPYB] = {.fun = unary, .txt = "copy", .letter = 'b'},
- [ASCOPYH] = {.fun = unary, .txt = "copy", .letter = 'h'},
- [ASCOPYW] = {.fun = unary, .txt = "copy", .letter = 'w'},
- [ASCOPYL] = {.fun = unary, .txt = "copy", .letter = 'l'},
- [ASCOPYS] = {.fun = unary, .txt = "copy", .letter = 's'},
- [ASCOPYD] = {.fun = unary, .txt = "copy", .letter = 'd'},
-
- [ASSTB] = {.fun = store, .txt = "store", .letter = 'b'},
- [ASSTH] = {.fun = store, .txt = "store", .letter = 'h'},
- [ASSTW] = {.fun = store, .txt = "store", .letter = 'w'},
- [ASSTL] = {.fun = store, .txt = "store", .letter = 'l'},
- [ASSTM] = {.fun = ldir},
- [ASSTS] = {.fun = store, .txt = "store", .letter = 's'},
- [ASSTD] = {.fun = store, .txt = "store", .letter = 'd'},
-
- [ASADDW] = {.fun = binary, .txt = "add", .letter = 'w'},
- [ASSUBW] = {.fun = binary, .txt = "sub", .letter = 'w'},
- [ASMULW] = {.fun = binary, .txt = "mul", .letter = 'w'},
- [ASMODW] = {.fun = binary, .txt = "rem", .letter = 'w'},
- [ASUMODW] = {.fun = binary, .txt = "urem", .letter = 'w'},
- [ASDIVW] = {.fun = binary, .txt = "div", .letter = 'w'},
- [ASUDIVW] = {.fun = binary, .txt = "udiv", .letter = 'w'},
- [ASSHLW] = {.fun = binary, .txt = "shl", .letter = 'w'},
- [ASSHRW] = {.fun = binary, .txt = "sar", .letter = 'w'},
- [ASUSHRW] = {.fun = binary, .txt = "shr", .letter = 'w'},
- [ASLTW] = {.fun = binary, .txt = "csltw", .letter = 'w'},
- [ASULTW] = {.fun = binary, .txt = "cultw", .letter = 'w'},
- [ASGTW] = {.fun = binary, .txt = "csgtw", .letter = 'w'},
- [ASUGTW] = {.fun = binary, .txt = "cugtw", .letter = 'w'},
- [ASLEW] = {.fun = binary, .txt = "cslew", .letter = 'w'},
- [ASULEW] = {.fun = binary, .txt = "culew", .letter = 'w'},
- [ASGEW] = {.fun = binary, .txt = "csgew", .letter = 'w'},
- [ASUGEW] = {.fun = binary, .txt = "cugew", .letter = 'w'},
- [ASEQW] = {.fun = binary, .txt = "ceqw", .letter = 'w'},
- [ASNEW] = {.fun = binary, .txt = "cnew", .letter = 'w'},
- [ASBANDW] = {.fun = binary, .txt = "and", .letter = 'w'},
- [ASBORW] = {.fun = binary, .txt = "or", .letter = 'w'},
- [ASBXORW] = {.fun = binary, .txt = "xor", .letter = 'w'},
-
- [ASADDL] = {.fun = binary, .txt = "add", .letter = 'l'},
- [ASSUBL] = {.fun = binary, .txt = "sub", .letter = 'l'},
- [ASMULL] = {.fun = binary, .txt = "mul", .letter = 'l'},
- [ASMODL] = {.fun = binary, .txt = "rem", .letter = 'l'},
- [ASUMODL] = {.fun = binary, .txt = "urem", .letter = 'l'},
- [ASDIVL] = {.fun = binary, .txt = "div", .letter = 'l'},
- [ASUDIVL] = {.fun = binary, .txt = "udiv", .letter = 'l'},
- [ASSHLL] = {.fun = binary, .txt = "shl", .letter = 'l'},
- [ASSHRL] = {.fun = binary, .txt = "sar", .letter = 'l'},
- [ASUSHRL] = {.fun = binary, .txt = "shr", .letter = 'l'},
- [ASLTL] = {.fun = binary, .txt = "csltl", .letter = 'w'},
- [ASULTL] = {.fun = binary, .txt = "cultl", .letter = 'w'},
- [ASGTL] = {.fun = binary, .txt = "csgtl", .letter = 'w'},
- [ASUGTL] = {.fun = binary, .txt = "cugtl", .letter = 'w'},
- [ASLEL] = {.fun = binary, .txt = "cslel", .letter = 'w'},
- [ASULEL] = {.fun = binary, .txt = "culel", .letter = 'w'},
- [ASGEL] = {.fun = binary, .txt = "csgel", .letter = 'w'},
- [ASUGEL] = {.fun = binary, .txt = "cugel", .letter = 'w'},
- [ASEQL] = {.fun = binary, .txt = "ceql", .letter = 'w'},
- [ASNEL] = {.fun = binary, .txt = "cnel", .letter = 'w'},
- [ASBANDL] = {.fun = binary, .txt = "and", .letter = 'l'},
- [ASBORL] = {.fun = binary, .txt = "or", .letter = 'l'},
- [ASBXORL] = {.fun = binary, .txt = "xor", .letter = 'l'},
-
- [ASADDS] = {.fun = binary, .txt = "add", .letter = 's'},
- [ASSUBS] = {.fun = binary, .txt = "sub", .letter = 's'},
- [ASMULS] = {.fun = binary, .txt = "mul", .letter = 's'},
- [ASDIVS] = {.fun = binary, .txt = "div", .letter = 's'},
- [ASLTS] = {.fun = binary, .txt = "clts", .letter = 'w'},
- [ASGTS] = {.fun = binary, .txt = "cgts", .letter = 'w'},
- [ASLES] = {.fun = binary, .txt = "cles", .letter = 'w'},
- [ASGES] = {.fun = binary, .txt = "cges", .letter = 'w'},
- [ASEQS] = {.fun = binary, .txt = "ceqs", .letter = 'w'},
- [ASNES] = {.fun = binary, .txt = "cnes", .letter = 'w'},
-
- [ASADDD] = {.fun = binary, .txt = "add", .letter = 'd'},
- [ASSUBD] = {.fun = binary, .txt = "sub", .letter = 'd'},
- [ASMULD] = {.fun = binary, .txt = "mul", .letter = 'd'},
- [ASDIVD] = {.fun = binary, .txt = "div", .letter = 'd'},
- [ASLTD] = {.fun = binary, .txt = "cltd", .letter = 'w'},
- [ASGTD] = {.fun = binary, .txt = "cgtd", .letter = 'w'},
- [ASLED] = {.fun = binary, .txt = "cled", .letter = 'w'},
- [ASGED] = {.fun = binary, .txt = "cged", .letter = 'w'},
- [ASEQD] = {.fun = binary, .txt = "ceqd", .letter = 'w'},
- [ASNED] = {.fun = binary, .txt = "cned", .letter = 'w'},
-
- [ASEXTBW] = {.fun = unary, .txt = "extsb", .letter = 'w'},
- [ASUEXTBW]= {.fun = unary, .txt = "extub", .letter = 'w'},
- [ASEXTBL] = {.fun = unary, .txt = "extsb", .letter = 'l'},
- [ASUEXTBL]= {.fun = unary, .txt = "extub", .letter = 'l'},
- [ASEXTHW] = {.fun = unary, .txt = "extsh", .letter = 'w'},
- [ASUEXTHW]= {.fun = unary, .txt = "extuh", .letter = 'w'},
- [ASEXTWL] = {.fun = unary, .txt = "extsw", .letter = 'l'},
- [ASUEXTWL]= {.fun = unary, .txt = "extuw", .letter = 'l'},
-
- [ASSTOL] = {.fun = unary, .txt = "stosi", .letter = 'l'},
- [ASSTOW] = {.fun = unary, .txt = "stosi", .letter = 'w'},
- [ASDTOL] = {.fun = unary, .txt = "dtosi", .letter = 'l'},
- [ASDTOW] = {.fun = unary, .txt = "dtosi", .letter = 'w'},
-
- [ASSWTOD] = {.fun = unary, .txt = "swtof", .letter = 'd'},
- [ASSWTOS] = {.fun = unary, .txt = "swtof", .letter = 's'},
- [ASSLTOD] = {.fun = unary, .txt = "sltof", .letter = 'd'},
- [ASSLTOS] = {.fun = unary, .txt = "sltof", .letter = 's'},
-
- [ASEXTS] = {.fun = unary, .txt = "exts", .letter = 'd'},
- [ASTRUNCD] = {.fun = unary, .txt = "truncd", .letter = 's'},
-
- [ASBRANCH] = {.fun = branch},
- [ASJMP] = {.fun = jmp},
- [ASRET] = {.fun = ret},
- [ASCALL] = {.fun = call},
- [ASCALLE] = {.fun = ecall, .txt = ")"},
- [ASCALLEX] = {.fun = ecall, .txt = ", ...)"},
- [ASPAR] = {.fun = param, .txt = "%s %s, "},
- [ASPARE] = {.fun = param, .txt = "%s %s"},
- [ASALLOC] = {.fun = asalloc},
- [ASFORM] = {.fun = form2local},
-
- [ASVSTAR] = {.fun = vastart},
- [ASVARG] = {.fun = vaarg},
-};
-
-static char buff[ADDR_LEN];
-/*
- * : is for user-defined Aggregate Types
- * $ is for globals (represented by a pointer)
- * % is for function-scope temporaries
- * @ is for block labels
- */
-static char
-sigil(Symbol *sym)
-{
- switch (sym->kind) {
- case SEXTRN:
- case SGLOB:
- case SPRIV:
- case SLOCAL:
- return '$';
- case SAUTO:
- case STMP:
- return '%';
- case SLABEL:
- return '@';
- default:
- abort();
- }
-}
-
-static char *
-symname(Symbol *sym)
-{
- char c = sigil(sym);
-
- if (sym->name) {
- switch (sym->kind) {
- case SEXTRN:
- case SGLOB:
- sprintf(buff, "%c%s", c, sym->name);
- return buff;
- case SLOCAL:
- case SPRIV:
- case SAUTO:
- sprintf(buff, "%c%s.%u", c, sym->name, sym->id);
- return buff;
- default:
- abort();
- }
- }
- sprintf(buff, "%c.%u", c, sym->numid);
-
- return buff;
-}
-
-static void
-emitconst(Node *np)
-{
- switch (np->type.size) {
- case 1:
- printf("%d", (int) np->u.i & 0xFF);
- break;
- case 2:
- printf("%d", (int) np->u.i & 0xFFFF);
- break;
- case 4:
- printf("%ld", (long) np->u.i & 0xFFFFFFFF);
- break;
- case 8:
- printf("%lld", (long long) np->u.i);
- break;
- default:
- abort();
- }
-}
-
-static void
-emittree(Node *np)
-{
- if (!np)
- return;
-
- switch (np->op) {
- case OSTRING:
- printf("\"%s\"", np->u.s);
- free(np->u.s);
- np->u.s = NULL;
- break;
- case OCONST:
- emitconst(np);
- break;
- case OADDR:
- emittree(np->left);
- break;
- case OMEM:
- fputs(symname(np->u.sym), stdout);
- break;
- default:
- emittree(np->left);
- printf(" %c ", np->op);
- emittree(np->right);
- break;
- }
-}
-
-static char *
-size2asm(Type *tp)
-{
- if (tp->flags & STRF) {
- return "b";
- } else if (tp->flags & INTF) {
- switch (tp->size) {
- case 1:
- return "b";
- case 2:
- return "h";
- case 4:
- return "w";
- case 8:
- return "l";
- }
- } else if (tp->flags & FLOATF) {
- if (tp->size == 4)
- return "s";
- else if (tp->size == 8)
- return "d";
- }
- abort();
-}
-
-void
-defglobal(Symbol *sym)
-{
- if (sym->kind == SEXTRN)
- return;
- if (sym->kind == SGLOB)
- fputs("export ", stdout);
- printf("data %s = {\n", symname(sym));
- if (sym->type.flags & INITF)
- return;
- printf("\tz\t%lu\n}\n", sym->type.size);
-}
-
-void
-defpar(Symbol *sym)
-{
- sym->type.flags |= PARF;
-}
-
-void
-defvar(Symbol *sym)
-{
- if (sym->kind == SREG)
- sym->kind = SAUTO;
-}
-
-void
-data(Node *np)
-{
- printf("\t%s\t", size2asm(&np->type));
- emittree(np);
- putchar(',');
- putchar('\n');
-}
-
-static char *
-size2stack(Type *tp)
-{
- if (tp->flags & INTF) {
- switch (tp->size) {
- case 1:
- case 2:
- case 4:
- return "w";
- case 8:
- return "l";
- }
- } else if (tp->flags & FLOATF) {
- if (tp->size == 4)
- return "s";
- else if (tp->size == 8)
- return "d";
- } else if (tp->size == 0) {
- return "w";
- }
- abort();
-}
-
-void
-writeout(void)
-{
- Symbol *p;
- Type *tp;
- char *sep, *name;
- int haslabel = 0;
-
- if (!curfun)
- return;
- if (curfun->kind == SGLOB)
- fputs("export ", stdout);
- printf("function %s %s(", size2stack(&curfun->rtype), symname(curfun));
-
- /* declare formal parameters */
- for (sep = "", p = locals; p; p = p->next, sep = ",") {
- if ((p->type.flags & PARF) == 0)
- break;
- printf("%s%s %s.val", sep, size2stack(&p->type), symname(p));
- }
- printf("%s)\n{\n", (curfun->type.flags&ELLIPS) ? ", ..." : "");
-
- /* emit assembler instructions */
- for (pc = prog; pc; pc = pc->next) {
- if (pc->label) {
- haslabel = 1;
- printf("%s\n", symname(pc->label));
- }
- if (!pc->op)
- continue;
- if (pc->flags&BBENTRY && !haslabel)
- printf("%s\n", symname(newlabel()));
- (*optbl[pc->op].fun)();
- if (!pc->label)
- haslabel = 0;
- }
-
- puts("}");
-}
-
-static char *
-addr2txt(Addr *a)
-{
- switch (a->kind) {
- case SCONST:
- sprintf(buff, "%llu", (unsigned long long) a->u.i);
- return buff;
- case SAUTO:
- case SLABEL:
- case STMP:
- case SGLOB:
- case SEXTRN:
- case SPRIV:
- case SLOCAL:
- return symname(a->u.sym);
- default:
- abort();
- }
-}
-
-static void
-binary(void)
-{
- struct opdata *p = &optbl[pc->op];
- char to[ADDR_LEN], from1[ADDR_LEN], from2[ADDR_LEN];
-
- strcpy(to, addr2txt(&pc->to));
- strcpy(from1, addr2txt(&pc->from1));
- strcpy(from2, addr2txt(&pc->from2));
- printf("\t%s =%c\t%s\t%s,%s\n", to, p->letter, p->txt, from1, from2);
-}
-
-static void
-ldir(void)
-{
- struct opdata *p = &optbl[pc->op];
- char to[ADDR_LEN], from[ADDR_LEN];
- /* TODO: what type do we use for the size? */
-
- /* TODO: it is pending */
-}
-
-static void
-store(void)
-{
- struct opdata *p = &optbl[pc->op];
- char to[ADDR_LEN], from[ADDR_LEN];
-
- strcpy(to, addr2txt(&pc->to));
- strcpy(from, addr2txt(&pc->from1));
- printf("\t\t%s%c\t%s,%s\n", p->txt, p->letter, from, to);
-}
-
-static void
-unary(void)
-{
- struct opdata *p = &optbl[pc->op];
- char to[ADDR_LEN], from[ADDR_LEN];
-
- strcpy(to, addr2txt(&pc->to));
- strcpy(from, addr2txt(&pc->from1));
- printf("\t%s =%c\t%s\t%s\n", to, p->letter, p->txt, from);
-}
-
-static void
-call(void)
-{
- struct opdata *p = &optbl[pc->op];
- char to[ADDR_LEN], from[ADDR_LEN];
- Symbol *sym = pc->to.u.sym;
-
- strcpy(to, addr2txt(&pc->to));
- strcpy(from, addr2txt(&pc->from1));
- printf("\t%s =%s\tcall\t%s(",
- to, size2stack(&sym->type), from);
-}
-
-static void
-param(void)
-{
- Symbol *sym = pc->from2.u.sym;
-
- printf(optbl[pc->op].txt,
- size2stack(&sym->type), addr2txt(&pc->from1));
-}
-
-static void
-ecall(void)
-{
- struct opdata *p = &optbl[pc->op];
-
- puts(p->txt);
-}
-
-static void
-ret(void)
-{
- if (pc->from1.kind == SNONE)
- puts("\t\tret");
- else
- printf("\t\tret\t%s\n", addr2txt(&pc->from1));
-}
-
-static void
-jmp(void)
-{
- printf("\t\tjmp\t%s\n", addr2txt(&pc->from1));
-}
-
-static void
-branch(void)
-{
- char to[ADDR_LEN], from1[ADDR_LEN], from2[ADDR_LEN];
-
- strcpy(to, addr2txt(&pc->to));
- strcpy(from1, addr2txt(&pc->from1));
- strcpy(from2, addr2txt(&pc->from2));
- printf("\t\tjnz\t%s,%s,%s\n", to, from1, from2);
-}
-
-static void
-vastart(void)
-{
- printf("\t\tvastart %s\n", addr2txt(&pc->from1));
-}
-
-static void
-vaarg(void)
-{
- Symbol *sym = pc->to.u.sym;
- Type *tp = &sym->type;
- char to[ADDR_LEN], from[ADDR_LEN];
-
- strcpy(to, addr2txt(&pc->to));
- strcpy(from, addr2txt(&pc->from1));
- printf("\t\t%s =%s vaarg %s\n", to, size2asm(tp), from);
-}
-
-static void
-asalloc(void)
-{
- Symbol *sym = pc->to.u.sym;
- Type *tp = &sym->type;
- extern Type ptrtype;
-
- printf("\t%s =%s\talloc%lu\t%lu\n",
- symname(sym), size2asm(&ptrtype), tp->align+3 & ~3, tp->size);
-}
-
-static void
-form2local(void)
-{
- Symbol *sym = pc->to.u.sym;
- Type *tp = &sym->type;
- char *name = symname(sym);
-
- printf("\t\tstore%s\t%s.val,%s\n", size2asm(tp), name, name);
-}
-
-void
-endinit(void)
-{
- puts("}");
-}
-
-void
-getbblocks(void)
-{
- Inst *i;
-
- if (!prog)
- return;
-
- prog->flags |= BBENTRY;
- for (pc = prog; pc; pc = pc->next) {
- switch (pc->op) {
- case ASBRANCH:
- i = pc->from2.u.sym->u.inst;
- i->flags |= BBENTRY;
- case ASJMP:
- i = pc->from1.u.sym->u.inst;
- i->flags |= BBENTRY;
- case ASRET:
- if (pc->next)
- pc->next->flags |= BBENTRY;
- break;
- }
- }
-}
--- a/src/cc2/target/qbe/optm.c
+++ /dev/null
@@ -1,58 +1,0 @@
-static char sccsid[] = "@(#) ./cc2/arch/qbe/optm.c";
-
-#include <stddef.h>
-
-#include <scc/scc.h>
-
-#include "../../cc2.h"
-
-Node *
-optm_dep(Node *np)
-{
- int op = np->op;
- Node *p, *dst, *next = np->next;
- Symbol *sym, *osym;
-
- switch (op) {
- case OEFUN:
- /*
- * In QBE we need at the end of a basic block
- * a jump, so we have to ensure that the last
- * statement of the function is a ret, a jmp
- * or a branch. In the same way, QBE does
- * not accept labels at the end of a function
- * (ONOP is used for labels) so we have to add
- * a ret there, and in the case of branches
- * we need a label for the next statement
- */
- op = (np->prev) ? np->prev->op : 0;
- if (!op || op == ONOP || op == OBRANCH || (op != ORET && op != OJMP))
- addstmt(node(ORET), KEEPCUR);
- break;
- case OBRANCH:
- if (!next->label) {
- sym = getsym(TMPSYM);
- sym->kind = SLABEL;
- next->label = sym;
- }
- case OJMP:
- for (;;) {
- dst = np->u.sym->u.stmt;
- if (dst->op != OJMP)
- break;
- np->u.sym = dst->u.sym;
- }
- for (p = np->next; p; p = p->next) {
- if (p == dst)
- return NULL;
- if (p->op == ONOP ||
- p->op == OBLOOP ||
- p->op == OELOOP) {
- continue;
- }
- break;
- }
- break;
- }
- return np;
-}
--- a/src/cc2/target/qbe_amd64-sysv/target.mk
+++ /dev/null
@@ -1,8 +1,0 @@
-OBJ-qbe_amd64-sysv = $(OBJS) \
- target/qbe/cgen.o \
- target/qbe/optm.o \
- target/qbe/code.o \
- target/amd64-sysv/types.o
-
-$(LIBEXEC)/cc2-qbe_amd64-sysv: $(OBJ-qbe_amd64-sysv)
- $(CC) $(SCC_LDFLAGS) $(OBJ-qbe_amd64-sysv) -lscc -o $@
--- a/src/cc2/target/qbe_arm64-sysv/target.mk
+++ /dev/null
@@ -1,5 +1,0 @@
-OBJ-qbe_arm64-sysv = $(OBJS) \
- target/qbe/cgen.o \
- target/qbe/optm.o \
- target/qbe/code.o \
- target/arm64-sysv/types.o \
--- a/src/cc2/target/z80-scc/arch.h
+++ /dev/null
@@ -1,5 +1,0 @@
-enum asmop {
- ASJMP = 0,
- ASRET,
- ASBRANCH,
-};
--- a/src/cc2/target/z80-scc/cgen.c
+++ /dev/null
@@ -1,161 +1,0 @@
-static char sccsid[] = "@(#) ./cc2/arch/z80/cgen.c";
-
-#include <stdlib.h>
-
-#include <scc/scc.h>
-
-#include "arch.h"
-#include "../../cc2.h"
-
-static void
-swtch(Node *idx)
-{
-}
-
-static Node *
-rhs(Node *np, Node *ret)
-{
-}
-
-static Node *
-field(Node *np, Node *ret, int islhs)
-{
-}
-
-static Node *
-lhs(Node *np, Node *new)
-{
- switch (np->op) {
- case OMEM:
- case OAUTO:
- *new = *np;
- return new;
- case OPTR:
- return rhs(np->left, new);
- case OFIELD:
- return field(np, new, 1);
- default:
- abort();
- }
-}
-
-static void
-bool(Node *np, Symbol *true, Symbol *false)
-{
- Node *l = np->left, *r = np->right;
- Node ret, ifyes, ifno;
- Symbol *label;
-
- switch (np->op) {
- case ONEG:
- bool(l, false, true);
- break;
- case OAND:
- label = newlabel();
- bool(l, label, false);
- setlabel(label);
- bool(r, true, false);
- break;
- case OOR:
- label = newlabel();
- bool(l, true, label);
- setlabel(label);
- bool(r, true, false);
- break;
- default:
- label2node(&ifyes, true);
- label2node(&ifno, false);
- code(ASBRANCH, rhs(np, &ret), &ifyes, &ifno);
- break;
- }
-}
-
-Node *
-cgen(Node *np)
-{
- Node aux, *p, *next;
-
- setlabel(np->label);
- switch (np->op) {
- case OJMP:
- label2node(&aux, np->u.sym);
- code(ASJMP, NULL, &aux, NULL);
- break;
- case OBRANCH:
- next = np->next;
- if (!next->label)
- next->label = newlabel();
- bool(np->left, np->u.sym, next->label);
- break;
- case ORET:
- p = np->left;
- if (p)
- p = rhs(np->left, &aux);
- code(ASRET, NULL, p, NULL);
- break;
- case OBSWITCH:
- swtch(rhs(np->left, &aux));
- break;
- default:
- rhs(np, &aux);
- break;
- }
- return NULL;
-}
-
-/*
- * This is strongly influenced by
- * http://plan9.bell-labs.com/sys/doc/compiler.ps (/sys/doc/compiler.ps)
- * calculate addresability as follows
- * AUTO => 11 value+fp
- * REG => 13 reg
- * STATIC => 12 (value)
- * CONST => 20 $value
- */
-Node *
-sethi(Node *np)
-{
- Node *lp, *rp;
-
- if (!np)
- return np;
-
- np->complex = 0;
- np->address = 0;
- lp = np->left;
- rp = np->right;
- switch (np->op) {
- case OAUTO:
- np->address = 11;
- break;
- case OREG:
- np->address = 13;
- break;
- case OMEM:
- np->address = 12;
- break;
- case OCONST:
- np->address = 20;
- break;
- default:
- sethi(lp);
- sethi(rp);
- break;
- }
-
- if (np->address > 10)
- return np;
- if (lp)
- np->complex = lp->complex;
- if (rp) {
- int d = np->complex - rp->complex;
-
- if (d == 0)
- ++np->complex;
- else if (d < 0)
- np->complex = rp->complex;
- }
- if (np->complex == 0)
- ++np->complex;
- return np;
-}
--- a/src/cc2/target/z80-scc/code.c
+++ /dev/null
@@ -1,229 +1,0 @@
-static char sccsid[] = "@(#) ./cc2/arch/z80/code.c";
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <scc/cstd.h>
-#include <scc/scc.h>
-
-#include "arch.h"
-#include "../../cc2.h"
-
-enum segment {
- CODESEG,
- DATASEG,
- BSSSEG,
- NOSEG
-};
-
-static int curseg = NOSEG;
-static unsigned long offpar, offvar;
-
-static void
-segment(int seg)
-{
- static char *txt[] = {
- [CODESEG] = "\tCSEG\n",
- [DATASEG] = "\tDSEG\n",
- [BSSSEG] = "\tASEG\n",
- };
-
- if (seg == curseg)
- return;
- fputs(txt[seg], stdout);
- curseg = seg;
-}
-
-static char *
-symname(Symbol *sym)
-{
- static char name[INTIDENTSIZ+1];
-
- if (sym->name) {
- switch (sym->kind) {
- case SGLOB:
- case SEXTRN:
- snprintf(name, sizeof(name), "_%s", sym->name);
- return name;
- case SPRIV:
- return sym->name;
- }
- }
-
- sprintf(name, ".%d", sym->numid);
-
- return name;
-}
-
-static void
-label(Symbol *sym)
-{
- int seg;
- char *name = symname(sym);
-
- if (sym->type.flags & FUNF)
- seg = CODESEG;
- else if (sym->type.flags & INITF)
- seg = DATASEG;
- else
- seg = BSSSEG;
- segment(seg);
-
- switch (sym->kind) {
- case SEXTRN:
- printf("\tEXTRN\t%s\n", name);
- return;
- case SGLOB:
- printf("\tPUBLIC\t%s\n", name);
- break;
- }
-
- printf("%s:\n", name);
-}
-
-static void
-emitconst(Node *np)
-{
- switch (np->type.size) {
- case 1:
- printf("%d", (int) np->u.i & 0xFF);
- break;
- case 2:
- printf("%d", (int) np->u.i & 0xFFFF);
- break;
- case 4:
- printf("%ld", (long) np->u.i & 0xFFFFFFFF);
- break;
- default:
- abort();
- }
-}
-
-static void
-emittree(Node *np)
-{
- if (!np)
- return;
-
- switch (np->op) {
- case OSTRING:
- printf("\"%s\"", np->u.s);
- free(np->u.s);
- np->u.s = NULL;
- break;
- case OCONST:
- emitconst(np);
- break;
- case OADDR:
- emittree(np->left);
- break;
- case OMEM:
- fputs(symname(np->u.sym), stdout);
- break;
- default:
- emittree(np->left);
- printf(" %c ", np->op);
- emittree(np->right);
- break;
- }
-}
-
-static void
-size2asm(Type *tp)
-{
- char *s;
-
- /*
- * In z80 we can ignore the alignment
- */
- if (tp->flags & STRF) {
- s = "\tDB\t";
- } else {
- switch (tp->size) {
- case 1:
- s = "\tDB\t";
- break;
- case 2:
- s = "\tDW\t";
- break;
- case 4:
- s = "\tDD\t";
- break;
- default:
- s = "\tDS\t%lu,";
- break;
- }
- }
- printf(s, tp->size);
-}
-
-void
-newfun()
-{
- offpar = offvar = 0;
-}
-
-void
-defpar(Symbol *sym)
-{
- unsigned long align, size;
-
- if (sym->kind != SREG && sym->kind != SAUTO)
- return;
- align = sym->type.align;
- size = sym->type.size;
-
- offpar -= align-1 & ~align;
- sym->u.off = offpar;
- offpar -= size;
- sym->kind = SAUTO;
-}
-
-void
-defvar(Symbol *sym)
-{
- unsigned long align, size;
-
- if (sym->kind != SREG && sym->kind != SAUTO)
- return;
- align = sym->type.align;
- size = sym->type.size;
-
- offvar += align-1 & ~align;
- sym->u.off = offvar;
- offvar += size;
- sym->kind = SAUTO;
-}
-
-void
-defglobal(Symbol *sym)
-{
- label(sym);
- if (sym->kind == SEXTRN || (sym->type.flags & INITF))
- return;
- size2asm(&sym->type);
- puts("0");
-}
-
-void
-data(Node *np)
-{
- size2asm(&np->type);
- emittree(np);
- putchar('\n');
-}
-
-void
-writeout(void)
-{
-}
-
-void
-endinit(void)
-{
-}
-
-void
-getbblocks(void)
-{
-}
--- a/src/cc2/target/z80-scc/optm.c
+++ /dev/null
@@ -1,11 +1,0 @@
-static char sccsid[] = "@(#) ./cc2/arch/z80/optm.c";
-
-#include <scc/scc.h>
-
-#include "../../cc2.h"
-
-Node *
-optm_dep(Node *np)
-{
- return np;
-}
--- a/src/cc2/target/z80-scc/target.mk
+++ /dev/null
@@ -1,8 +1,0 @@
-OBJ-z80-scc = $(OBJS) \
- target/z80-scc/cgen.o \
- target/z80-scc/optm.o \
- target/z80-scc/code.o \
- target/z80-scc/types.o \
-
-$(LIBEXEC)/cc2-z80-scc: $(OBJ-z80-scc)
- $(CC) $(SCC_LDFLAGS) $(OBJ-z80-scc) -lscc -o $@
--- a/src/cc2/target/z80-scc/types.c
+++ /dev/null
@@ -1,95 +1,0 @@
-static char sccsid[] = "@(#) ./cc2/arch/z80/types.c";
-
-#include <scc/scc.h>
-
-#include "../../cc2.h"
-
-
-Type int8type = {
- .flags = SIGNF | INTF,
- .size = 1,
- .align = 1
-};
-
-Type int16type = {
- .flags = SIGNF | INTF,
- .size = 2,
- .align = 1
-};
-
-Type int32type = {
- .flags = SIGNF | INTF,
- .size = 4,
- .align = 1
-};
-
-Type int64type = {
- .flags = SIGNF | INTF,
- .size = 8,
- .align = 1
-};
-
-Type uint8type = {
- .flags = INTF,
- .size = 1,
- .align = 1
-};
-
-Type uint16type = {
- .flags = INTF,
- .size = 2,
- .align = 1
-};
-
-Type uint32type = {
- .flags = INTF,
- .size = 4,
- .align = 1
-};
-
-Type uint64type = {
- .flags = INTF,
- .size = 8,
- .align = 1
-};
-
-Type ptrtype = {
- .flags = INTF,
- .size = 2,
- .align = 1
-};
-
-Type booltype = {
- .flags = INTF,
- .size = 1,
- .align = 1
-};
-
-Type float32type = {
- .flags = FLOATF,
- .size = 4,
- .align = 1
-};
-
-Type float64type = {
- .flags = FLOATF,
- .size = 4,
- .align = 1
-};
-
-Type float80type = {
- .flags = FLOATF,
- .size = 4,
- .align = 1
-};
-
-Type voidtype = {
- .size = 0,
- .align = 0
-};
-
-/* this types is not going to be used in this arch */
-Type arg_type = {
- .size = 0,
- .align = 0
-};
--- a/src/cmd/Makefile
+++ b/src/cmd/Makefile
@@ -14,7 +14,7 @@
LIBS = -lmach
-all: $(TARGET)
+all: $(TARGET) as ld cc1 cc2
$(TARGET): $(LIBDIR)/libmach.a
--- /dev/null
+++ b/src/cmd/as/Makefile
@@ -1,0 +1,32 @@
+.POSIX:
+
+PROJECTDIR = ../../..
+include $(PROJECTDIR)/scripts/rules.mk
+
+MORECFLAGS = -I$(INCDIR)/$(STD)
+
+OBJS = main.o \
+ symbol.o \
+ ins.o \
+ parser.o \
+ expr.o \
+
+TARGET = $(LIBEXEC)/as-amd64 \
+ $(LIBEXEC)/as-i386 \
+ $(LIBEXEC)/as-i286 \
+ $(LIBEXEC)/as-z80 \
+
+all: $(TARGET)
+
+$(TARGET): $(LIBDIR)/libscc.a
+
+dep: inc-dep
+
+clean:
+ rm -f target/*/*.o target/*/*tbl.c
+
+include target/amd64.mk
+include target/i386.mk
+include target/i286.mk
+include target/z80.mk
+include deps.mk
--- /dev/null
+++ b/src/cmd/as/as.h
@@ -1,0 +1,207 @@
+/*
+ * First 3 bits of flags in segments and symbols are for the
+ * type of segment
+ */
+enum symflags {
+ FREG = 1 << 0,
+ FSECT = 1 << 1,
+ FSYM = 1 << 2,
+ FCOMMON = 1 << 3,
+ FEXTERN = 1 << 4,
+ FDEF = 1 << 5,
+ FGLOBAL = 1 << 6,
+ FABS = 1 << 7,
+};
+
+enum secflags {
+ SREAD = 1 << 0,
+ SWRITE = 1 << 1,
+ SEXEC = 1 << 2,
+ SLOAD = 1 << 3,
+ SFILE = 1 << 4,
+ SABS = 1 << 5,
+};
+
+enum endianess {
+ BIG_ENDIAN = -1,
+ LITTLE_ENDIAN = 1
+};
+
+enum common_args {
+ AIMM = 1,
+ ASTR,
+ AREG,
+ ANUMBER,
+ AIMM8,
+ AIMM16,
+ AIMM32,
+ AIMM64,
+ AINDIR,
+ AINDEX,
+ ADIRECT,
+ AREG_OFF,
+ ASYM,
+ AOPT,
+ AREP,
+ AMAX,
+};
+
+enum tokens {
+ EOS = -1,
+ IDEN = 1,
+ NUMBER,
+ REG,
+ STRING,
+ MINUS,
+ SHL,
+ SHR,
+ GE,
+ LE,
+};
+
+#define MAXSYM 63
+
+typedef struct reloc Reloc;
+typedef struct ins Ins;
+typedef struct op Op;
+typedef struct section Section;
+typedef struct symbol Symbol;
+typedef struct node Node;
+typedef struct string String;
+typedef void Format(Op *, Node **);
+
+struct string {
+ char *buf;
+ size_t offset;
+};
+
+struct line {
+ char *label;
+ char *op;
+ char *args;
+};
+
+struct ins {
+ int begin, end;
+ char *str;
+};
+
+struct reloc {
+ size_t offset;
+ Symbol *sym;
+ unsigned char flags;
+ unsigned char size;
+ unsigned char nbits;
+ unsigned char shift;
+};
+
+struct op {
+ unsigned char flags;
+ unsigned char size;
+ void (*format)(Op *, Node **);
+ unsigned char *bytes;
+ unsigned char *args;
+};
+
+struct section {
+ Symbol *sym;
+ char *mem;
+ unsigned char flags;
+ unsigned char fill;
+ unsigned char aligment;
+ unsigned id;
+ TUINT base;
+ TUINT max;
+ TUINT curpc;
+ TUINT pc;
+ struct section *next;
+};
+
+struct symbol {
+ String name;
+ String type;
+ unsigned char flags;
+ unsigned char pass;
+ TUINT value;
+ TUINT size;
+ Section *section;
+ struct symbol *next;
+ struct symbol *hash;
+};
+
+struct node {
+ unsigned char op;
+ unsigned char addr;
+ struct symbol *sym;
+ struct node *left;
+ struct node *right;
+};
+
+union yylval {
+ TUINT val;
+ Symbol *sym;
+};
+
+
+/* symbol.c */
+extern void cleansecs(void);
+extern void isecs(void);
+extern void emit(char *bytes, int nbytes);
+extern Section *setsec(char *name, char *attr);
+extern Symbol *tmpsym(TUINT val);
+extern void killtmp(void);
+extern int toobig(Node *np, int type);
+extern void dumpstab(char *msg);
+extern String newstring(char *s);
+
+/* main.c */
+extern Symbol *lookup(char *name);
+extern Symbol *deflabel(char *name);
+
+/* parser.c */
+extern Node **getargs(char *s);
+extern void error(char *msg, ...);
+/* Avoid errors in files where stdio is not included */
+#ifdef stdin
+extern int nextline(FILE *fp, struct line *linep);
+#endif
+extern void unexpected(void);
+extern void expect(int token);
+int next(void);
+#define accept(t) (yytoken == (t) ? next() : 0)
+extern void regctx(int mode);
+extern Node *getreg(void);
+extern Node *operand(char **s);
+extern void addinput(char *fname);
+extern int delinput(void);
+
+/* expr.c */
+extern Node *expr(void);
+extern void deltree(Node *np);
+extern Node *node(int op, Node *l, Node *r);
+
+/* proc.c */
+extern void iarch(void);
+extern int match(Op *op, Node **args);
+extern Node *moperand(void);
+
+/* ins.c */
+extern char *tobytes(TUINT v, int n, int inc);
+
+/*
+ * Definition of global variables
+ */
+extern Section *cursec, *seclist;
+extern int nr_ins;
+extern Ins instab[];
+extern Op optab[];
+extern int pass;
+extern TUINT maxaddr;
+extern int endian;
+extern Symbol *linesym, *symlist;
+extern char *infile;
+extern int endpass;
+extern int yytoken;
+extern size_t yylen;
+extern union yylval yylval;
+extern char yytext[];
--- /dev/null
+++ b/src/cmd/as/deps.mk
@@ -1,0 +1,30 @@
+#deps
+expr.o: $(INCDIR)/scc/scc/scc.h
+expr.o: as.h
+ins.o: $(INCDIR)/scc/scc/scc.h
+ins.o: as.h
+main.o: $(INCDIR)/scc/scc/arg.h
+main.o: $(INCDIR)/scc/scc/scc.h
+main.o: as.h
+parser.o: $(INCDIR)/scc/scc/cstd.h
+parser.o: $(INCDIR)/scc/scc/scc.h
+parser.o: as.h
+symbol.o: $(INCDIR)/scc/scc/scc.h
+symbol.o: as.h
+target/x80/ins.o: $(INCDIR)/scc/scc/scc.h
+target/x80/ins.o: target/x80/../../as.h
+target/x80/ins.o: target/x80/proc.h
+target/x80/z80.o: $(INCDIR)/scc/scc/scc.h
+target/x80/z80.o: target/x80/../../as.h
+target/x80/z80.o: target/x80/../x80/proc.h
+target/x86/amd64.o: $(INCDIR)/scc/scc/scc.h
+target/x86/amd64.o: target/x86/../../as.h
+target/x86/i286.o: $(INCDIR)/scc/scc/scc.h
+target/x86/i286.o: target/x86/../../as.h
+target/x86/i286.o: target/x86/../x86/proc.h
+target/x86/i386.o: $(INCDIR)/scc/scc/scc.h
+target/x86/i386.o: target/x86/../../as.h
+target/x86/i386.o: target/x86/../x86/proc.h
+target/x86/ins.o: $(INCDIR)/scc/scc/scc.h
+target/x86/ins.o: target/x86/../../as.h
+target/x86/ins.o: target/x86/proc.h
--- /dev/null
+++ b/src/cmd/as/expr.c
@@ -1,0 +1,303 @@
+static char sccsid[] = "@(#) ./as/expr.c";
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <scc/scc.h>
+#include "as.h"
+
+#define NNODES 10
+
+static Alloc *arena;
+
+Node *
+node(int op, Node *l, Node *r)
+{
+ struct arena *ap;
+ Node *np;
+
+ if (!arena)
+ arena = alloc(sizeof(Node), NNODES);
+ np = new(arena);
+ np->op = op;
+ np->left = l;
+ np->right = r;
+ np->sym = NULL;
+
+ return np;
+}
+
+void
+deltree(Node *np)
+{
+ if (!np)
+ return;
+ deltree(np->left);
+ deltree(np->right);
+ delete(arena, np);
+}
+
+static Node *
+fold(int op, Node *l, Node *r)
+{
+ Node *np;
+ TUINT val, lv, rv;
+
+ lv = l->sym->value;
+ rv = r->sym->value;
+
+ /* TODO: check overflow */
+
+ switch (op) {
+ case '*':
+ val = lv - rv;
+ break;
+ case '/':
+ if (rv == 0)
+ goto division_by_zero;
+ val = lv / rv;
+ break;
+ case '%':
+ if (rv == 0)
+ goto division_by_zero;
+ val = lv % rv;
+ break;
+ case SHL:
+ val = lv << rv;
+ break;
+ case SHR:
+ val = lv >> rv;
+ break;
+ case '+':
+ val = lv + rv;
+ break;
+ case '-':
+ val = lv - rv;
+ break;
+ case '<':
+ val = lv < rv;
+ break;
+ case '>':
+ val = lv > rv;
+ break;
+ case '=':
+ val = lv == rv;
+ break;
+ case GE:
+ val = lv >= rv;
+ break;
+ case LE:
+ val = lv <= rv;
+ break;
+ case '|':
+ val = lv | rv;
+ break;
+ case '^':
+ val = lv ^ rv;
+ break;
+ default:
+ abort();
+ }
+ deltree(l);
+ deltree(r);
+
+ np = node(NUMBER, NULL, NULL);
+ np->sym = tmpsym(val);
+ np->addr = ANUMBER;
+ return np;
+
+division_by_zero:
+ error("division by 0");
+}
+
+static Node *
+binary(int op, Node *l, Node *r)
+{
+ int addr;
+ Node *np;
+
+ if (l->op == NUMBER && r->op == NUMBER)
+ return fold(op, l, r);
+ else
+ abort();
+ np = node(op, l, r);
+ np->addr = addr;
+
+ return np;
+}
+
+static Node *
+unaryop(int op, Node *np)
+{
+ TUINT val;
+
+ if (np->addr != ANUMBER)
+ error("invalid argument for unary operator");
+ if (np->op != NUMBER) {
+ np = node(op, np, NULL);
+ np->addr = ANUMBER;
+ return np;
+ }
+
+ val = np->sym->value;
+ switch (op) {
+ case '!':
+ val = !val;
+ case '+':
+ break;
+ case '-':
+ val = -val;
+ break;
+ default:
+ abort();
+ }
+ np->sym->value = val;
+
+ return np;
+}
+
+/*************************************************************************/
+/* grammar functions */
+/*************************************************************************/
+
+static Node *
+primary(void)
+{
+ Node *np;
+
+ switch (yytoken) {
+ case IDEN:
+ case NUMBER:
+ np = node(yytoken, NULL, NULL);
+ np->sym = yylval.sym;
+ np->addr = ANUMBER;
+ next();
+ break;
+ case '(':
+ np = expr();
+ expect(')');
+ break;
+ default:
+ unexpected();
+ }
+
+ return np;
+}
+
+static Node *
+unary(void)
+{
+ int op, tok;
+ Node *np;
+
+ switch (tok = yytoken) {
+ case '!':
+ case '-':
+ case '+':
+ next();
+ return unaryop(tok, primary());
+ default:
+ return primary();
+ }
+}
+
+static Node *
+mul(void)
+{
+ int op;
+ Node *np;
+
+ np = unary();
+ for (;;) {
+ switch (op = yytoken) {
+ case '*':
+ case '/':
+ case '%':
+ case SHL:
+ case SHR:
+ next();
+ binary(op, np, primary());
+ break;
+ default:
+ return np;
+ }
+ }
+}
+
+static Node *
+add(void)
+{
+ int op;
+ Node *np;
+
+ np = mul();
+ for (;;) {
+ switch (op = yytoken) {
+ case '+':
+ case '-':
+ next();
+ np = binary(op, np, mul());
+ break;
+ default:
+ return np;
+ }
+ }
+}
+
+static Node *
+relational(void)
+{
+ int op;
+ Node *np;
+
+ np = add();
+ for (;;) {
+ switch (op = yytoken) {
+ case '<':
+ case '>':
+ case '=':
+ case GE:
+ case LE:
+ next();
+ np = binary(op, np, add());
+ break;
+ default:
+ return np;
+ }
+ }
+}
+
+static Node *
+and(void)
+{
+ int op;
+ Node *np;
+
+ np = relational();
+ while (accept('&'))
+ np = binary('&', np, relational());
+ return np;
+}
+
+Node *
+expr(void)
+{
+ int op;
+ Node *np;
+
+ regctx(0);
+ np = and();
+ for (;;) {
+ switch (op = yytoken) {
+ case '|':
+ case '^':
+ next();
+ np = binary(op, np, and());
+ break;
+ default:
+ regctx(1);
+ return np;
+ }
+ }
+}
--- /dev/null
+++ b/src/cmd/as/ins.c
@@ -1,0 +1,258 @@
+static char sccsid[] = "@(#) ./as/ins.c";
+
+#include <string.h>
+
+#include <scc/scc.h>
+#include "as.h"
+
+extern Section *sabs, *sbss, *sdata, *stext;
+
+enum {
+ EQU,
+ COMMON,
+ SIZE,
+ XSTRING,
+ ASCII,
+ TYPE,
+};
+
+static void
+reloc(Symbol *sym,
+ unsigned flags,
+ unsigned size,
+ unsigned nbits,
+ unsigned shift)
+{
+}
+
+char *
+tobytes(TUINT v, int nbytes, int inc)
+{
+ static char buf[sizeof(TUINT)];
+ int idx;
+
+ idx = (inc < 0) ? nbytes-1 : 0;
+ while (nbytes--) {
+ buf[idx] = v;
+ idx += inc;
+ v >>= 8;
+ }
+
+ if (v)
+ error("overflow in immediate value");
+ return buf;
+}
+
+void
+noargs(Op *op, Node **args)
+{
+ emit(op->bytes, op->size);
+}
+
+static void
+xstring(int which, Node **args)
+{
+ Node *np;
+ char *s;
+ size_t len;
+
+ while (np = *args++) {
+ s = np->sym->name.buf;
+ len = strlen(s);
+ len += which == XSTRING;
+ emit(s, len);
+ }
+}
+
+void
+string(Op *op, Node **args)
+{
+ xstring(STRING, args);
+}
+
+void
+ascii(Op *op, Node **args)
+{
+ xstring(STRING, args);
+}
+
+void
+def(Node **args, int siz)
+{
+ Node *np;
+
+ while (np = *args++) {
+ Symbol *sym = np->sym;
+
+ if ((sym->flags & FABS) == 0)
+ reloc(sym, 0, siz, siz * 8, 0);
+ emit(tobytes(sym->value, siz, endian), siz);
+ }
+}
+
+void
+defb(Op *op, Node **args)
+{
+ def(args, 1);
+}
+
+void
+defw(Op *op, Node **args)
+{
+ def(args, 2);
+}
+
+void
+defd(Op *op, Node **args)
+{
+ def(args, 4);
+}
+
+void
+defq(Op *op, Node **args)
+{
+ def(args, 8);
+}
+
+static void
+symexp(int which, Op *op, Node **args)
+{
+ Symbol *sym, *exp;
+ static char *cmds[] = {
+ [EQU] = "equ",
+ [COMMON] = "common",
+ [SIZE] = "size",
+ };
+ char *cmd = cmds[which];
+
+ if (args[1]) {
+ sym = args[0]->sym;
+ exp = args[1]->sym;
+ } else if (linesym) {
+ sym = linesym;
+ exp = args[0]->sym;
+ } else {
+ error("%s pseudo instruction lacks a label", cmd);
+ }
+
+ if ((exp->flags & FABS) == 0)
+ error("%s expression is not an absolute expression", cmd);
+
+ switch (which) {
+ case EQU:
+ if (pass == 1 && (sym->flags & FDEF))
+ error("redefinition of symbol '%s'", sym->name.buf);
+ sym->value = exp->value;
+ sym->flags |= FDEF;
+ break;
+ case COMMON:
+ sym->flags |= FCOMMON;
+ case SIZE:
+ sym->size = exp->value;
+ break;
+ case TYPE:
+ sym->type.buf = xstrdup(exp->name.buf);
+ break;
+ }
+}
+
+void
+equ(Op *op, Node **args)
+{
+ symexp(EQU, op, args);
+}
+
+void
+common(Op *op, Node **args)
+{
+ symexp(COMMON, op, args);
+}
+
+void
+size(Op *op, Node **args)
+{
+ symexp(SIZE, op, args);
+}
+
+void
+type(Op *op, Node **args)
+{
+ symexp(TYPE, op, args);
+}
+
+void
+section(Op *op, Node **args)
+{
+ Symbol *sym = args[0]->sym;
+ char *attr = NULL;
+
+ if (args[1])
+ attr = args[1]->sym->name.buf;
+
+ setsec(sym->name.buf, attr);
+}
+
+void
+text(Op *op, Node **args)
+{
+ cursec = stext;
+}
+
+void
+data(Op *op, Node **args)
+{
+ cursec = sdata;
+}
+
+void
+bss(Op *op, Node **args)
+{
+ cursec = sbss;
+}
+
+void
+extrn(Op *op, Node **args)
+{
+ Symbol *sym = args[0]->sym;
+
+ sym->flags |= FEXTERN;
+}
+
+void
+global(Op *op, Node **args)
+{
+ Symbol *sym = args[0]->sym;
+
+ sym->flags |= FGLOBAL;
+}
+
+void
+align(Op *op, Node **args)
+{
+ Symbol *sym = args[0]->sym;
+ TUINT curpc, pc, al;
+
+ if ((sym->flags & FABS) == 0)
+ error("align expression is not an absolute expression");
+ if ((al = sym->value) == 0)
+ return;
+
+ al--;
+ curpc = cursec->curpc;
+ pc = curpc+al & ~al;
+
+ for (al = pc - curpc; al > 0; --al)
+ emit((char []) {0}, 1);
+}
+
+void
+end(Op *op, Node **args)
+{
+ endpass = 1;
+}
+
+void
+include(Op *op, Node **args)
+{
+ addinput(args[0]->sym->name.buf);
+}
--- /dev/null
+++ b/src/cmd/as/main.c
@@ -1,0 +1,162 @@
+static char sccsid[] = "@(#) ./as/main.c";
+
+#include <errno.h>
+#include <ctype.h>
+#include <setjmp.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <scc/scc.h>
+#include <scc/arg.h>
+#include "as.h"
+
+char *argv0;
+char *outfile, *infile;
+int endpass;
+
+static void
+writeout(char *fname)
+{
+ Section *sp;
+ FILE *fp;
+
+ if ((fp = fopen(fname, "wb")) == NULL)
+ goto error;
+
+ for (sp = seclist; sp; sp = sp->next) {
+ if (!sp->mem)
+ continue;
+ fwrite(sp->mem, sp->max - sp->base, 1, fp);
+ }
+
+ if (fclose(fp))
+ goto error;
+ return;
+
+error:
+ fprintf(stderr, "as: %s: %s\n", fname, strerror(errno));
+ exit(EXIT_FAILURE);
+}
+
+static void
+cleanup(void)
+{
+ if (outfile)
+ remove(outfile);
+}
+
+static int
+cmp(const void *f1, const void *f2)
+{
+ const Ins *ins = f2;
+ const char *s = f1;
+ int d;
+
+ if ((d = *s - *ins->str) != 0)
+ return d;
+
+ return strcmp(s, ins->str);
+}
+
+static void
+as(char *text, char *xargs)
+{
+ int c;
+ char *p;
+ Ins *ins;
+ Op *op, *lim;
+ Node **args;
+
+ for (p = text; c = *p; ++p)
+ *p = toupper(c);
+
+ ins = bsearch(text, instab, nr_ins, sizeof(Ins), cmp);
+ if (!ins) {
+ error("invalid instruction '%s'", text);
+ return;
+ }
+
+ args = getargs(xargs);
+ lim = &optab[ins->end];
+ for (op = &optab[ins->begin]; op < lim; ++op) {
+ if (match(op, args))
+ break;
+ }
+ if (op == lim) {
+ error("invalid operands for '%s'", text);
+ return;
+ }
+ (*op->format)(op, args);
+}
+
+static int
+dopass(char *fname)
+{
+ struct line line;
+ FILE *fp;
+ extern int nerrors;
+ extern jmp_buf recover;
+
+ addinput(fname);
+ cleansecs();
+
+ endpass = 0;
+ setjmp(recover);
+ while (!endpass && nextline(fp, &line)) {
+ linesym = NULL;
+
+ if (line.label)
+ linesym = deflabel(line.label);
+
+ if (line.op)
+ as(line.op, line.args);
+ else if (line.args)
+ error("arguments without an opcode");
+ }
+
+ return nerrors == 0;
+}
+
+static void
+usage(void)
+{
+ fputs("usage: as [-o outfile] filename ...\n", stderr);
+ exit(1);
+}
+
+int
+main(int argc, char *argv[])
+{
+ char **p;
+
+ outfile = "a.out";
+
+ ARGBEGIN {
+ case 'o':
+ outfile = EARGF(usage());
+ break;
+ default:
+ usage();
+ } ARGEND
+
+ if (argc == 0)
+ usage();
+
+ atexit(cleanup);
+ iarch();
+ isecs();
+
+ for (pass = 1; pass <= 2; pass++) {
+ for (p = argv; infile = *p; ++p) {
+ if (!dopass(infile))
+ return EXIT_FAILURE;
+ }
+ if (pass == 1)
+ killtmp();
+ }
+ writeout(outfile);
+ outfile = NULL;
+
+ return 0;
+}
--- /dev/null
+++ b/src/cmd/as/mktbl
@@ -1,0 +1,34 @@
+#!/bin/sh
+
+
+unset LC_ALL
+LC_COLLATE=C
+set -e
+
+for i
+do
+ case $i in
+ -c)
+ cpu=$2
+ shift 2
+ ;;
+ -f)
+ family=$2
+ shift 2
+ ;;
+ -*)
+ echo mktbl: incorrect parameter:$i >&2
+ exit 1
+ ;;
+ esac
+done
+
+echo cpu=${cpu:=z80} family=${family:=x80}
+
+rm -f $$.c target/$family/${cpu}tbl.c
+trap "rm -f $$.c" 0 2 3
+
+awk '!/^$/ {print $1,NR,$2,$3,$4,$5,$6}' target/$family/$family.dat |
+sort -k1 -k2n |
+awk -v cpu=`echo $cpu | tr a-z A-Z` -v family=$family -f mktbl.awk > $$.c &&
+mv $$.c target/$family/${cpu}tbl.c
--- /dev/null
+++ b/src/cmd/as/mktbl.awk
@@ -1,0 +1,112 @@
+
+BEGIN {
+ printf "#include <scc/scc.h>\n"\
+ "#include \"../../as.h\"\n"\
+ "#include \"../" family "/proc.h\"\n"
+
+ rules = "target/" family "/rules.dat"
+ while (getline < rules > 0) {
+ regex[++nregs] = $1
+ value[nregs] = $2
+ }
+ close(rules)
+}
+ {sub(/#.*/,"")}
+
+$7 !~ cpu {next}
+
+/^$/ {next}
+
+ {
+ if (opstart[$1] == 0) {
+ opstart[$1] = nvar
+ opnames[nop++] = $1
+ }
+ opcount[$1]++
+ opargs[nvar] = $3
+ opsize[nvar] = $4
+ opbytes[nvar] = ($5 == "none") ? "" : $5
+ opformat[nvar++] = $6
+ formats[$6] = 1
+}
+
+END {
+ for (i in formats)
+ printf "Format %s;\n", i
+
+ printf "int nr_ins = %d;\n\n", nop
+ print "struct ins instab[] = {"
+ for (i = 0; i < nop; i++) {
+ n = opnames[i]
+ start = opstart[n]
+ end = start + opcount[n]
+ printf "\t{.str = \"%s\", .begin = %d, .end = %d},\n",
+ n, start, end | "sort"
+ }
+ close("sort")
+ printf "};\n\n"
+
+ print "struct op optab[] = {"
+ for (i = 0; i < nvar; i++) {
+ printf "\t/* %d */\n", i
+ printf "\t{\n" \
+ "\t\t.size = %d,\n"\
+ "\t\t.format = %s,\n",
+ opsize[i], opformat[i]
+
+ if (opbytes[i] != "")
+ printf "\t\t.bytes = (unsigned char [%d]) {%s},\n",
+ opsize[i],
+ opbytes[i]
+
+ a = str2args(opargs[i])
+ if (a != "")
+ printf "\t\t.args = (unsigned char []) {%s}\n", a
+
+ print "\t},"
+ }
+ print "};"
+}
+
+function str2args(s, args, i, j, out, n, found)
+{
+ n = split(s, args, /,/)
+ if (n == 0 || args[1] == "none")
+ return ""
+ for (i = 1; i <= n; i++) {
+ a = args[i]
+ found = 0
+
+ if (a ~ /\?$/)
+ out = out "AOPT ,"
+ else if (a ~ /\+$/)
+ out = out "AREP ,"
+
+ for (j = 1; j <= nregs; j++) {
+ if (match(a, "^" regex[j])) {
+ out = out value[j]
+ found = 1
+ break
+ }
+ }
+
+ if (!found) {
+ print FILENAME ":" NR ":" \
+ $0 ":wrong arg", a > "/dev/stderr"
+ exit 1
+ }
+
+ a = substr(a, RLENGTH+1)
+ sub(/\?$/, "", a)
+ sub(/\+$/, "", a)
+ if (a != "") {
+ print FILENAME ":" NR ":" \
+ $0 ": trailing chars: ", a > "/dev/stderr"
+ exit 1
+ }
+ out = out ","
+ }
+ out = out "0"
+
+ return out
+}
--- /dev/null
+++ b/src/cmd/as/parser.c
@@ -1,0 +1,482 @@
+static char sccsid[] = "@(#) ./as/parser.c";
+#include <assert.h>
+#include <ctype.h>
+#include <errno.h>
+#include <limits.h>
+#include <setjmp.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <scc/cstd.h>
+#include <scc/scc.h>
+#include "as.h"
+
+#define NARGS 20
+#define NR_INPUTS 10
+#define MAXLINE 100
+
+struct input {
+ char *fname;
+ unsigned lineno;
+ FILE *fp;
+};
+
+int nerrors;
+jmp_buf recover;
+char yytext[INTIDENTSIZ+1];
+int yytoken;
+size_t yylen;
+union yylval yylval;
+
+static char *textp, *endp;
+static int regmode;
+static unsigned lineno;
+static struct input inputs[NR_INPUTS], *isp = inputs;
+
+static int
+follow(int expect1, int expect2, int ifyes1, int ifyes2, int ifno)
+{
+ int c;
+
+ if ((c = *++textp) == expect1)
+ return ifyes1;
+ if (c == expect2)
+ return ifyes2;
+ --textp;
+ return ifno;
+}
+
+static void
+tok2str(void)
+{
+ if ((yylen = endp - textp) > INTIDENTSIZ) {
+ error("token too big");
+ yylen = INTIDENTSIZ;
+ }
+ memcpy(yytext, textp, yylen);
+ yytext[yylen] = '\0';
+ textp = endp;
+}
+
+static int
+iden(void)
+{
+ int c;
+ char *p;
+
+ for ( ; c = *endp; ++endp) {
+ if (isalnum(c))
+ continue;
+ switch (c) {
+ case '\'':
+ case '_':
+ case '-':
+ case '.':
+ case '$':
+ continue;
+ default:
+ goto out_loop;
+ }
+ }
+
+out_loop:
+ tok2str();
+ yylval.sym = lookup(yytext);
+
+ return (yylval.sym->flags & FREG) ? REG : IDEN;
+}
+
+static int
+number(void)
+{
+ int c, base = 10;
+ char *p;
+ TUINT n;
+
+ if (*endp == '0') {
+ base = 8;
+ ++endp;
+ if (*endp == 'x') {
+ base = 16;
+ ++endp;
+ }
+ }
+ for (n = 0; (c = *endp) && isxdigit(c); n += c) {
+ n *= base;
+ c -= '0';
+ if (n >= TUINT_MAX - c*base)
+ error("overflow in number");
+ endp++;
+ }
+ tok2str();
+ yylval.sym = tmpsym(n);
+
+ return NUMBER;
+}
+
+static int
+character(void)
+{
+ int c;
+ char *p;
+
+ while (*endp != '\'')
+ ++endp;
+ return NUMBER;
+}
+
+static int
+string(void)
+{
+ int c;
+ size_t l;
+ char *s;
+ Symbol *sym = tmpsym(0);
+
+ for (++endp; *endp != '"'; ++endp)
+ ;
+ ++endp;
+ tok2str();
+ yylval.sym = sym;
+ /* FIXME: this memory is not freed ever */
+ l = yylen-2;
+ s = memcpy(xmalloc(l+1), yytext+1, l);
+ s[l] = '\0';
+ sym->name.buf = s;
+
+ return STRING;
+}
+
+static int
+operator(void)
+{
+ int c;
+
+ ++endp;
+ if ((c = *textp) == '>')
+ c = follow('=', '>', LE, SHL, '>');
+ else if (c == '<')
+ c = follow('=', '<', GE, SHR, '>');
+ tok2str();
+
+ return c;
+}
+
+int
+next(void)
+{
+ int c;
+
+ while (isspace(*textp))
+ ++textp;
+
+ endp = textp;
+
+ switch (c = *textp) {
+ case '\0':
+ strcpy(yytext, "EOS");
+ yylen = 3;
+ c = EOS;
+ break;
+ case '"':
+ c = string();
+ break;
+ case '\'':
+ c = character();
+ break;
+ case '%':
+ c = (regmode ? iden : operator)();
+ break;
+ case '_':
+ c = iden();
+ break;
+ default:
+ if (isdigit(c))
+ c = number();
+ else if (isalpha(c))
+ c = iden();
+ else
+ c = operator();
+ break;
+ }
+ return yytoken = c;
+}
+
+void
+expect(int token)
+{
+ if (yytoken != token)
+ unexpected();
+ next();
+}
+
+void
+unexpected(void)
+{
+ error("unexpected '%s'", yytext);
+}
+
+void
+error(char *msg, ...)
+{
+ va_list va;
+ struct input *ip;
+
+ assert(isp > inputs);
+ ip = &isp[-1];
+
+ va_start(va, msg);
+ fprintf(stderr, "as:%s:%u: ", ip->fname, ip->lineno);
+ vfprintf(stderr, msg, va);
+ putc('\n', stderr);
+ nerrors++;
+ va_end(va);
+
+ if (nerrors == 10)
+ die("as: too many errors");
+ longjmp(recover, 1);
+}
+
+Node *
+getreg(void)
+{
+ Node *np;
+
+ np = node(REG, NULL, NULL);
+ np->sym = yylval.sym;
+ np->addr = AREG;
+ expect(REG);
+ return np;
+}
+
+void
+regctx(int mode)
+{
+ regmode = mode;
+}
+
+Node *
+operand(char **strp)
+{
+ int imm = 0;
+ Node *np;
+
+ textp = *strp;
+ regctx(1);
+ switch (next()) {
+ case EOS:
+ np = NULL;
+ break;
+ case REG:
+ np = getreg();
+ break;
+ case STRING:
+ np = node(yytoken, NULL, NULL);
+ np->sym = yylval.sym;
+ np->addr = ASTR;
+ next();
+ break;
+ case '$':
+ next();
+ imm = 1;
+ default:
+ if (!imm) {
+ np = moperand();
+ } else {
+ np = expr();
+ np->addr = AIMM;
+ }
+ }
+ if (yytoken != ',' && yytoken != EOS)
+ error("trailing characters in expression '%s'", textp);
+ *strp = endp;
+
+ return np;
+}
+
+Node **
+getargs(char *s)
+{
+ Node **ap;
+ static Node *args[NARGS];
+
+ if (!s)
+ return NULL;
+
+ for (ap = args; ap < &args[NARGS-1]; ++ap) {
+ if ((*ap = operand(&s)) == NULL)
+ return args;
+ }
+ error("too many arguments in one instruction");
+}
+
+static char *
+field(char **oldp, size_t *siz)
+{
+ char *s, *t, *begin;
+ size_t n;
+
+ if ((begin = *oldp) == NULL)
+ return NULL;
+
+ for (s = begin; isspace(*s) && *s != '\t'; ++s)
+ ;
+ if (*s == '\0' || *s == '/' || *s == ';') {
+ *s = '\0';
+ return *oldp = NULL;
+ }
+
+ for (t = s; *t && *t != '\t'; ++t)
+ ;
+ if (*t == '\t')
+ *t++ = '\0';
+ *siz -= begin - t;
+ *oldp = t;
+
+ while (t >= s && isspace(*t))
+ *t-- = '\0';
+ return (*s != '\0') ? s : NULL;
+}
+
+static int
+validlabel(char *name)
+{
+ int c;
+
+ while ((c = *name++) != '\0') {
+ if (isalnum(c))
+ continue;
+ switch (c) {
+ case '_':
+ case '-':
+ case '.':
+ case '$':
+ continue;
+ case ':':
+ if (*name != '\0')
+ return 0;
+ *--name = '\0';
+ continue;
+ default:
+ return 0;
+ }
+ }
+ return 1;
+}
+
+static int
+extract(char *s, size_t len, struct line *lp)
+{
+ int r = 0;
+
+ if (lp->label = field(&s, &len))
+ r++;
+ if (lp->op = field(&s, &len))
+ r++;
+ if (lp->args = field(&s, &len))
+ r++;
+
+ if (s && *s && *s != '/')
+ error("trailing characters at the end of the line");
+ if (lp->label && !validlabel(lp->label))
+ error("incorrect label name '%s'", lp->label);
+
+ return r;
+}
+
+static void
+comment(FILE *fp)
+{
+ int c;
+
+ while ((c = getc(fp)) != EOF) {
+ if (c != '*')
+ continue;
+ if ((c = getc(fp)) == '/')
+ return;
+ ungetc(c, fp);
+ }
+}
+
+static size_t
+getline(FILE *fp, char buff[MAXLINE])
+{
+ int c;
+ char *bp;
+
+ for (bp = buff; (c = getc(fp)) != EOF; *bp++ = c) {
+ if (c == '\n')
+ break;
+ if (c == '/') {
+ if ((c = getc(fp)) != '*') {
+ ungetc(c, fp);
+ c = '/';
+ } else {
+ comment(fp);
+ c = ' ';
+ }
+ } else if (c > UCHAR_MAX) {
+ error("invalid character '%x'", c);
+ }
+ if (bp == &buff[MAXLINE-1])
+ error("line too long");
+ }
+ *bp = '\0';
+
+ return bp - buff;
+}
+
+int
+nextline(FILE *fp, struct line *lp)
+{
+ struct input *ip;
+ size_t n;
+ static char buff[MAXLINE];
+
+ assert(isp > inputs);
+repeat:
+ if (isp == inputs)
+ return 0;
+ ip = &isp[-1];
+ if (feof(ip->fp)) {
+ delinput();
+ goto repeat;
+ }
+ n = getline(ip->fp, buff);
+ if (++ip->lineno == 0)
+ die("as: %s: file too long", infile);
+ if (n == 0)
+ goto repeat;
+ if (extract(buff, n, lp) == 0)
+ goto repeat;
+ return 1;
+}
+
+void
+addinput(char *fname)
+{
+ FILE *fp;
+
+ if (isp == &inputs[NR_INPUTS])
+ die("as: too many included files");
+ if ((fp = fopen(fname, "r")) == NULL)
+ die("as: %s: %s", fname, strerror(errno));
+ isp->fname = xstrdup(fname);
+ isp->fp = fp;
+ isp->lineno = 0;
+ ++isp;
+}
+
+int
+delinput(void)
+{
+ if (isp == inputs)
+ return EOF;
+ --isp;
+ if (fclose(isp->fp) == EOF)
+ die("as: %s: %s", isp->fname, strerror(errno));
+ free(isp->fname);
+ return 0;
+}
--- /dev/null
+++ b/src/cmd/as/symbol.c
@@ -1,0 +1,291 @@
+static char sccsid[] = "@(#) ./as/symbol.c";
+
+#include <ctype.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <string.h>
+
+#include <scc/scc.h>
+#include "as.h"
+
+#define HASHSIZ 64
+#define NALLOC 10
+
+Section *cursec, *seclist;
+Section *sabs, *sbss, *sdata, *stext;
+Symbol *linesym, *symlist;
+int pass;
+
+static Symbol *hashtbl[HASHSIZ], *symlast;
+static Alloc *tmpalloc;
+
+
+#ifndef NDEBUG
+void
+dumpstab(char *msg)
+{
+ Symbol **bp, *sym;
+
+ fprintf(stderr, "%s\n", msg);
+ for (bp = hashtbl; bp < &hashtbl[HASHSIZ]; ++bp) {
+ if (*bp == NULL)
+ continue;
+
+ fprintf(stderr, "[%d]", (int) (bp - hashtbl));
+ for (sym = *bp; sym; sym = sym->hash) {
+ fprintf(stderr, " -> %s:%0X:%0X",
+ sym->name.buf, sym->flags, sym->value);
+ }
+ putc('\n', stderr);
+ }
+}
+#endif
+
+Symbol *
+lookup(char *name)
+{
+ unsigned h;
+ Symbol *sym, **list;
+ int c, symtype;
+ char *t, *s;
+
+ h = 0;
+ for (s = name; c = *s; ++s)
+ h = h*33 ^ c;
+ h &= HASHSIZ-1;
+
+ c = toupper(*name);
+ list = &hashtbl[h];
+ for (sym = *list; sym; sym = sym->hash) {
+ t = sym->name.buf;
+ if (c == toupper(*t) && !casecmp(t, name))
+ return sym;
+ }
+
+ sym = xmalloc(sizeof(*sym));
+ sym->name = newstring(name);
+ sym->flags = 0;
+ sym->size = sym->value = 0;
+ sym->section = cursec;
+ sym->hash = *list;
+ sym->next = NULL;
+
+ *list = sym;
+ if (symlast)
+ symlast->next = sym;
+ symlast = sym;
+ if (!symlist)
+ symlist = sym;
+
+ return sym;
+}
+
+Symbol *
+deflabel(char *name)
+{
+ static Symbol *cursym;
+ Symbol *sym;
+ char label[MAXSYM+1];
+
+ if (*name == '.') {
+ int r;
+
+ if (!cursym) {
+ error("local label '%s' without global label", name);
+ return NULL;
+ }
+ r = snprintf(label, sizeof(label),
+ "%s%s",
+ cursym->name.buf, name);
+ if (r == sizeof(label)) {
+ error("local label '%s' in '%s' produces too long symbol",
+ name, cursym->name.buf);
+ return NULL;
+ }
+ name = label;
+ }
+
+ sym = lookup(name);
+ if (pass == 1 && (sym->flags & FDEF))
+ error("redefinition of label '%s'", name);
+ if (cursec->flags & SABS)
+ sym->flags |= FABS;
+ sym->flags |= FDEF;
+ sym->value = cursec->curpc;
+ sym->section = cursec;
+
+ if (*name != '.')
+ cursym = sym;
+ return sym;
+}
+
+int
+toobig(Node *np, int type)
+{
+ /* TODO */
+ return 0;
+}
+
+static void
+incpc(int siz)
+{
+ TUINT pc, curpc;
+
+ pc = cursec->pc;
+ curpc = cursec->curpc;
+
+ cursec->curpc += siz;
+ cursec->pc += siz;
+
+ if (pass == 2)
+ return;
+
+ if (cursec->pc > cursec->max)
+ cursec->max = cursec->pc;
+
+ if (pc > cursec->pc ||
+ curpc > cursec->curpc ||
+ cursec->curpc > maxaddr ||
+ cursec->pc > maxaddr) {
+ die("as: address overflow in section '%s'");
+ }
+}
+
+static int
+secflags(char *attr)
+{
+ int c, flags;
+
+ if (!attr)
+ return 0;
+
+ for (flags = 0; c = *attr++; ) {
+ switch (c) {
+ case 'w':
+ flags |= SWRITE;
+ break;
+ case 'r':
+ flags |= SREAD;
+ break;
+ case 'x':
+ flags |= SEXEC;
+ break;
+ case 'f':
+ flags |= SFILE;
+ break;
+ case 'l':
+ flags |= SLOAD;
+ break;
+ case 'a':
+ flags |= SABS;
+ break;
+ }
+ }
+
+ return flags;
+}
+
+Section *
+setsec(char *name, char *attr)
+{
+ Section *sec;
+ Symbol *sym;
+
+ cursec = NULL;
+ sym = lookup(name);
+ if (sym->flags & ~FSECT)
+ error("invalid section name '%s'", name);
+
+ if ((sec = sym->section) == NULL) {
+ sec = xmalloc(sizeof(*sec));
+ sec->mem = NULL;
+ sec->sym = sym;
+ sec->base = sec->max = sec->pc = sec->curpc = 0;
+ sec->next = seclist;
+ sec->flags = 0;
+ sec->fill = 0;
+ sec->aligment = 0;
+ sec->next = seclist;
+ seclist = sec;
+
+ sym->section = sec;
+ sym->flags = FSECT;
+ }
+ sec->flags |= secflags(attr);
+
+ return cursec = sec;
+}
+
+void
+isecs(void)
+{
+ sabs = setsec(".abs", "rwx");
+ sbss = setsec(".bss", "rwf");
+ sdata = setsec(".data", "rw");
+ stext = setsec(".text", "rx");
+}
+
+void
+cleansecs(void)
+{
+ Section *sec;
+ TUINT siz;
+
+ for (sec = seclist; sec; sec = sec->next) {
+ sec->curpc = sec->pc = sec->base;
+ if (pass == 1 || sec->flags & SFILE)
+ continue;
+
+ siz = sec->max - sec->base;
+ if (siz > SIZE_MAX)
+ die("as: out of memory");
+ sec->mem = xmalloc(sec->max - sec->base);
+ }
+ cursec = stext;
+}
+
+void
+emit(char *bytes, int n)
+{
+ if (cursec->mem) {
+ size_t len = cursec->pc - cursec->base;
+ memcpy(&cursec->mem[len], bytes, n);
+ }
+ incpc(n);
+}
+
+Symbol *
+tmpsym(TUINT val)
+{
+ Symbol *sym;
+
+ if (!tmpalloc)
+ tmpalloc = alloc(sizeof(*sym), NALLOC);
+ sym = new(tmpalloc);
+ sym->value = val;
+ sym->section = NULL;
+ sym->flags = FABS;
+
+ return sym;
+}
+
+void
+killtmp(void)
+{
+ if (!tmpalloc)
+ return;
+ dealloc(tmpalloc);
+ tmpalloc = NULL;
+}
+
+String
+newstring(char *s)
+{
+ size_t len = strlen(s) + 1;
+ String str;
+
+ str.offset = 0;
+ str.buf = xmalloc(len);
+ memcpy(str.buf, s, len);
+ return str;
+}
--- /dev/null
+++ b/src/cmd/as/target/amd64.mk
@@ -1,0 +1,10 @@
+AMD64_OBJ = $(OBJS) \
+ target/x86/amd64tbl.o \
+ target/x86/amd64.o \
+ target/x86/ins.o \
+
+target/x86/amd64tbl.c: target/x86/x86.dat target/x86/rules.dat
+ ./mktbl -f x86 -c amd64
+
+$(LIBEXEC)/as-amd64: $(AMD64_OBJ)
+ $(CC) $(SCC_LDFLAGS) $(AMD64_OBJ) -lscc -o $@
--- /dev/null
+++ b/src/cmd/as/target/i286.mk
@@ -1,0 +1,10 @@
+I286_OBJ = $(OBJS) \
+ target/x86/i286tbl.o \
+ target/x86/i286.o \
+ target/x86/ins.o \
+
+target/x86/i286tbl.c: target/x86/x86.dat target/x86/rules.dat
+ ./mktbl -f x86 -c i286
+
+$(LIBEXEC)/as-i286: $(I286_OBJ)
+ $(CC) $(SCC_LDFLAGS) $(I286_OBJ) -lscc -o $@
--- /dev/null
+++ b/src/cmd/as/target/i386.mk
@@ -1,0 +1,10 @@
+I386_OBJ = $(OBJS) \
+ target/x86/i386tbl.o \
+ target/x86/i386.o \
+ target/x86/ins.o \
+
+target/x86/i386tbl.c: target/x86/x86.dat target/x86/rules.dat
+ ./mktbl -f x86 -c i386
+
+$(LIBEXEC)/as-i386: $(I386_OBJ)
+ $(CC) $(SCC_LDFLAGS) $(I386_OBJ) -lscc -o $@
--- /dev/null
+++ b/src/cmd/as/target/x80/.gitignore
@@ -1,0 +1,1 @@
+z80tbl.c
--- /dev/null
+++ b/src/cmd/as/target/x80/ins.c
@@ -1,0 +1,601 @@
+static char sccsid[] = "@(#) ./as/target/x80/ins.c";
+
+#include <stdlib.h>
+#include <string.h>
+
+#include <scc/scc.h>
+
+#include "../../as.h"
+#include "proc.h"
+
+/*
+ * This implementation is based in:
+ * - Zilog Z80 CPU Specifications by Sean Young
+ * - Decoding Z80 opcodes - of use to disassembler and emulator
+ * writers - by Cristian Dinu.
+ */
+
+static int
+getclass(Node *np)
+{
+ if (np->addr != AREG)
+ return 0;
+
+ switch (np->sym->value) {
+ case AREG_C:
+ return RCLASS | PCLASS | QCLASS | CCCLASS | SSCLASS;
+ case AREG_A:
+ case AREG_B:
+ case AREG_D:
+ case AREG_E:
+ return RCLASS | PCLASS | QCLASS;
+ case AREG_H:
+ case AREG_L:
+ return RCLASS;
+ case AREG_IXL:
+ case AREG_IXH:
+ return PCLASS;
+ case AREG_IYL:
+ case AREG_IYH:
+ return QCLASS;
+ case AREG_HL:
+ return DDCLASS | QQCLASS;
+ case AREG_BC:
+ case AREG_DE:
+ return DDCLASS | QQCLASS | PPCLASS | RRCLASS;
+ case AREG_SP:
+ return DDCLASS | PPCLASS | RRCLASS;
+ case AREG_AF:
+ return QQCLASS;
+ case AREG_IX:
+ return PPCLASS;
+ case AREG_IY:
+ return RRCLASS;
+ case AREG_PO:
+ case AREG_PE:
+ case AREG_P:
+ case AREG_M:
+ return CCCLASS;
+ case AREG_NZ:
+ case AREG_Z:
+ case AREG_NC:
+ return CCCLASS | SSCLASS;
+ default:
+ return 0;
+ }
+}
+
+int
+match(Op *op, Node **args)
+{
+ unsigned char *p;
+ int arg, class, rep, opt;
+ Node *np;
+
+ if (!op->args)
+ return args == NULL;
+
+ opt = rep = 0;
+ for (p = op->args; arg = *p; ++p) {
+ if (rep)
+ --p;
+ if ((np = *args++) == NULL)
+ return (rep|opt) != 0;
+
+ switch (arg) {
+ case AOPT:
+ opt = 1;
+ break;
+ case AREP:
+ rep = 1;
+ break;
+ case AINDER_C:
+ arg = AREG_C;
+ goto indirect;
+ case AINDER_HL:
+ arg = AREG_HL;
+ goto indirect;
+ case AINDER_DE:
+ arg = AREG_DE;
+ goto indirect;
+ case AINDER_BC:
+ arg = AREG_BC;
+ goto indirect;
+ case AINDER_IX:
+ arg = AREG_IX;
+ goto indirect;
+ case AINDER_IY:
+ arg = AREG_IY;
+ goto indirect;
+ case AINDER_SP:
+ arg = AREG_SP;
+ indirect:
+ if (np->addr != AINDIR)
+ return 0;
+ np = np->left;
+ case AREG_A:
+ case AREG_I:
+ case AREG_R:
+ case AREG_F:
+ case AREG_HL:
+ case AREG_BC:
+ case AREG_DE:
+ case AREG_IY:
+ case AREG_IX:
+ case AREG_SP:
+ case AREG_AF:
+ case AREG_AF_:
+ if (np->addr != AREG || np->sym->value != arg)
+ return 0;
+ break;
+ case AREG_RCLASS:
+ class = RCLASS;
+ goto check_class;
+ case AREG_PCLASS:
+ class = PCLASS;
+ goto check_class;
+ case AREG_QCLASS:
+ class = QCLASS;
+ goto check_class;
+ case AREG_QQCLASS:
+ class = QQCLASS;
+ goto check_class;
+ case AREG_PPCLASS:
+ class = PPCLASS;
+ goto check_class;
+ case AREG_RRCLASS:
+ class = RRCLASS;
+ goto check_class;
+ case AREG_CCCLASS:
+ class = CCCLASS;
+ goto check_class;
+ case AREG_SSCLASS:
+ class = SSCLASS;
+ goto check_class;
+ case AREG_DDCLASS:
+ class = DDCLASS;
+ check_class:
+ if ((getclass(np) & class) == 0)
+ return 0;
+ break;
+ case AINDEX_IY:
+ arg = AREG_IY;
+ goto index_address;
+ case AINDEX_IX:
+ arg = AREG_IX;
+ index_address:
+ if (np->addr != AINDEX)
+ return 0;
+ if (np->left->left->sym->value != arg)
+ return 0;
+ if (toobig(np, arg))
+ error("overflow in index");
+ break;
+ case ARST:
+ if (np->addr != AIMM)
+ return 0;
+ if ((np->sym->value & ~0x38) != 0)
+ return 0;
+ break;
+ case AZERO:
+ case AIMM3:
+ case AIMM8:
+ case AIMM16:
+ case AIMM32:
+ case AIMM64:
+ if (np->addr != AIMM)
+ return 0;
+ if (toobig(np, arg))
+ error("overflow in immediate operand");
+ break;
+ case ASYM:
+ if (np->addr != AIMM || np->op != IDEN)
+ return 0;
+ break;
+ case ADIRECT:
+ case ASTR:
+ if (np->addr != arg)
+ return 0;
+ break;
+ default:
+ abort();
+ }
+ }
+
+ return *args == NULL;
+}
+
+/*
+ * (expr) -> ADIRECT
+ * (REG) -> AINDIR
+ * (REG + expr) -> AINDEX
+ * (REG - expr) -> AINDEX
+ * expr (REG) -> AINDEX
+ */
+Node *
+moperand(void)
+{
+ int op;
+ Node *np, *dir, *off, *reg;
+
+ dir = off = reg = NULL;
+ if (accept('(')) {
+ if (yytoken != REG) {
+ dir = expr();
+ } else {
+ reg = getreg();
+ switch (yytoken) {
+ case '+':
+ case '-':
+ off = expr();
+ case ')':
+ break;
+ default:
+ unexpected();
+ }
+ }
+ } else {
+ off = expr();
+ expect('(');
+ reg = getreg();
+ }
+ expect(')');
+
+ if (dir) {
+ op = ADIRECT;
+ np = dir;
+ } else if (off) {
+ np = node(AREG_OFF, reg, off);
+ op = AINDEX;
+ } else {
+ np = reg;
+ op = AINDIR;
+ }
+ np = node(op, np, NULL);
+ np->addr = op;
+ return np;
+}
+
+static int
+reg2int(Node *np)
+{
+ switch (np->sym->value) {
+ case AREG_F:
+ case AREG_B: return 0;
+ case AREG_C: return 1;
+ case AREG_D: return 2;
+ case AREG_E: return 3;
+ case AREG_IXH:
+ case AREG_IYH:
+ case AREG_H: return 4;
+ case AREG_IXL:
+ case AREG_IYL:
+ case AREG_L: return 5;
+ case AREG_A: return 7;
+ case AREG_BC: return 0;
+ case AREG_DE: return 1;
+ case AREG_HL:
+ case AREG_IX:
+ case AREG_IY: return 2;
+ case AREG_AF:
+ case AREG_SP: return 3;
+ default: abort();
+ }
+}
+
+static int
+cc2int(Node *np)
+{
+ switch (np->sym->value) {
+ case AREG_NZ: return 0;
+ case AREG_Z: return 1;
+ case AREG_NC: return 2;
+ case AREG_C: return 3;
+ case AREG_PO: return 4;
+ case AREG_PE: return 5;
+ case AREG_P: return 6;
+ case AREG_M: return 7;
+ default: abort();
+ }
+}
+
+static int
+ss2int(Node *np)
+{
+ switch (np->sym->value) {
+ case AREG_NZ: return 4;
+ case AREG_Z: return 5;
+ case AREG_NC: return 6;
+ case AREG_C: return 7;
+ default: abort();
+ }
+}
+
+void
+dir(Op *op, Node **args)
+{
+ Node *imm;
+ unsigned char buf[4];
+ unsigned val;
+ int n = op->size;
+
+ imm = (args[1]->addr == ADIRECT) ? args[1] : args[0];
+ imm = imm->left;
+ memcpy(buf, op->bytes, n);
+ val = imm->sym->value;
+ buf[n-1] = val >> 8;
+ buf[n-2] = val;
+ emit(buf, n);
+}
+
+void
+ld8(Op *op, Node **args)
+{
+ Node *par1 = args[0], *par2 = args[1];
+ int n = op->size, i = n;;
+ unsigned regval = 0;
+ unsigned char buf[4];
+
+ memcpy(buf, op->bytes, n);
+
+ if (par1->addr == AREG)
+ regval |= reg2int(par1) << 3;
+ if (par2->addr == AREG)
+ regval |= reg2int(par2);
+ else if (par2->addr == AIMM)
+ buf[--i] = par2->sym->value;
+
+ buf[--i] |= regval;
+ emit(buf, n);
+}
+
+void
+alu16(Op *op, Node **args)
+{
+ Node *par;
+ int n = op->size;
+ unsigned val;
+ unsigned char buf[4];
+
+ par = (args[1]) ? args[1] : args[0];
+ val = reg2int(par);
+ memcpy(buf, op->bytes, n);
+ buf[n-1] |= val << 4;
+ emit(buf, n);
+}
+
+void
+ld16(Op *op, Node **args)
+{
+ Node *dst, *src, *tmp;
+ int n = op->size;
+ unsigned val;
+ unsigned char buf[4];
+
+ dst = args[0];
+ src = args[1];
+ if (!src) {
+ alu16(op, args);
+ return;
+ }
+
+ if (dst->addr != AREG) {
+ tmp = src;
+ src = dst;
+ dst = tmp;
+ }
+
+ memcpy(buf, op->bytes, n);
+ if (src->addr == ADIRECT)
+ src = src->left;
+ val = src->sym->value;
+ buf[n-1] = val >> 8;
+ buf[n-2] = val;
+ buf[n-3] |= reg2int(dst) << 4;
+ emit(buf, n);
+}
+
+void
+alu8(Op *op, Node **args)
+{
+ Node *par = args[1];
+ unsigned char buf[4];
+ int n = op->size, shift;
+ unsigned val;
+
+ if (args[1]) {
+ shift = 0;
+ par = args[1];
+ } else {
+ shift = 3;
+ par = args[0];
+ }
+
+ switch (par->addr) {
+ case AIMM:
+ val = par->sym->value;
+ break;
+ case AREG:
+ val = reg2int(par) << shift;
+ break;
+ case AINDEX:
+ val = par->left->right->sym->value;
+ break;
+ case AINDIR:
+ val = 0;
+ break;
+ default:
+ abort();
+ }
+
+ memcpy(buf, op->bytes, n);
+ buf[n-1] |= val;
+ emit(buf, n);
+}
+
+void
+idx(Op *op, Node **args)
+{
+ Node *tmp, *idx, *imm, *reg;
+ unsigned char buf[4];
+ int n = op->size, i = n, shift = 0;
+
+ imm = reg = NULL;
+ if (args[0]->addr != AINDEX) {
+ shift = 3;
+ tmp = args[0];
+ args[0] = args[1];
+ args[1] = tmp;
+ }
+ idx = args[0]->left->right;
+
+ if (args[1]->addr == AREG)
+ reg = args[1];
+ else
+ imm = args[1];
+
+ memcpy(buf, op->bytes, n);
+
+ if (imm)
+ buf[--i] = imm->sym->value;
+ buf[--i] = idx->sym->value;
+ if (reg)
+ buf[--i] |= reg2int(reg) << shift;
+
+ emit(buf, n);
+}
+
+void
+inout(Op *op, Node **args)
+{
+ Node *port, *value;
+ unsigned val;
+ int n = op->size;
+ unsigned char buf[5];
+
+ port = args[0];
+ value = args[1];
+ if (port->addr != ADIRECT && port->addr != AINDIR) {
+ value = port;
+ port = args[1];
+ }
+
+ if (port->addr == ADIRECT)
+ val = port->left->sym->value;
+ else if (value->addr == AREG)
+ val = reg2int(value) << 3;
+ else
+ val = 0;
+
+ memcpy(buf, op->bytes, n);
+ buf[n-1] |= val;
+ emit(buf, n);
+}
+
+void
+rot_bit(Op *op, Node **args)
+{
+ Node *par = args[0];
+ unsigned char buf[5];
+ int n = op->size;
+ unsigned val, npar = 0;
+
+ memcpy(buf, op->bytes, n);
+
+ par = args[0];
+ if (par->addr == AIMM) {
+ buf[n-1] |= par->sym->value << 3;
+ par = args[npar = 1];
+ }
+
+ switch (par->addr) {
+ case AINDEX:
+ val = par->left->right->sym->value;
+ buf[n-2] = val;
+ par = args[npar+1];
+ if (!par)
+ break;
+ case AREG:
+ val = reg2int(par);
+ buf[n-1] |= val;
+ case AINDIR:
+ break;
+ default:
+ abort();
+ }
+
+ emit(buf, n);
+}
+
+void
+im(Op *op, Node **args)
+{
+ unsigned val = args[0]->sym->value;
+ unsigned char buf[4];
+ int n = op->size;
+
+ if (val > 0)
+ ++val;
+
+ memcpy(buf, op->bytes, n);
+ buf[n-1] |= val << 3;
+ emit(buf, n);
+}
+
+void
+branch(int relative, Op *op, Node **args)
+{
+ unsigned char buf[4];
+ Node *flag, *imm;
+ int n = op->size, i = n;
+ unsigned val;
+ int (*fun)(Node *);
+
+ flag = imm = NULL;
+ if (args[0]->addr == AREG) {
+ flag = args[0];
+ imm = args[1];
+ } else if (args[0]->addr == AIMM) {
+ imm = args[0];
+ }
+ memcpy(buf, op->bytes, n);
+
+ if (imm) {
+ val = imm->sym->value;
+ if (!relative)
+ buf[--i] = val >> 8;
+ else
+ val -= cursec->curpc - 2;
+ buf[--i] = val;
+
+ }
+ if (flag) {
+ fun = (relative) ? ss2int : cc2int;
+ buf[--i] |= (*fun)(flag) << 3;
+ }
+
+
+ emit(buf, n);
+}
+
+void
+jp(Op *op, Node **args)
+{
+ branch(0, op, args);
+}
+
+void
+jr(Op *op, Node **args)
+{
+ branch(1, op, args);
+}
+
+void
+rst(Op *op, Node **args)
+{
+ unsigned char buf[1];
+
+ buf[0] = op->bytes[0];
+ buf[0] |= args[0]->sym->value;
+ emit(buf, 1);
+}
--- /dev/null
+++ b/src/cmd/as/target/x80/proc.h
@@ -1,0 +1,75 @@
+enum args {
+ AREG_AF = AMAX,
+ AREG_A,
+ AREG_F,
+
+ AREG_BC,
+ AREG_B,
+ AREG_C,
+
+ AREG_HL,
+ AREG_H,
+ AREG_L,
+
+ AREG_DE,
+ AREG_D,
+ AREG_E,
+
+ AREG_IX,
+ AREG_IXL,
+ AREG_IXH,
+
+ AREG_IY,
+ AREG_IYL,
+ AREG_IYH,
+
+ AREG_R,
+ AREG_I,
+ AREG_AF_,
+ AREG_SP,
+
+ AREG_NZ,
+ AREG_Z,
+ AREG_NC,
+ AREG_PO,
+ AREG_PE,
+ AREG_P,
+ AREG_M,
+
+ AREG_RCLASS, /* register class for B, C, D, E, H, L and A */
+ AREG_PCLASS, /* register class for B, C, D, E, IXH, IXL and A */
+ AREG_QCLASS, /* register class for B, C, D, E, IYH, IYL and A */
+ AREG_DDCLASS, /* register class for BC, DE, HL and SP */
+ AREG_QQCLASS, /* register class for BC, DE, HL and AF */
+ AREG_PPCLASS, /* register class for BC, DE, IX and SP */
+ AREG_RRCLASS, /* register class for BC, DE, IY and SP */
+ AREG_SSCLASS, /* flag class for C, NC, Z, NZ */
+ AREG_CCCLASS, /* flag class for NZ, Z, NC, C, PO, PE, P, M */
+
+ AINDEX_IX, /* (IX+d) */
+ AINDEX_IY, /* (IX+d) */
+
+ AINDER_HL, /* (HL) */
+ AINDER_DE, /* (DE) */
+ AINDER_BC, /* (BC) */
+ AINDER_SP, /* (SP) */
+ AINDER_C, /* (C) */
+ AINDER_IX, /* (IX) */
+ AINDER_IY, /* (IY) */
+
+ AIMM3, /* 3 bit immediate */
+ AZERO, /* a literal 0 */
+ ARST, /* 0h, 08h, 10h, 18h, 20h, 28h, 30h, 38h */
+};
+
+enum class {
+ RCLASS = 1 << 0,
+ PCLASS = 1 << 1,
+ QCLASS = 1 << 2,
+ DDCLASS = 1 << 3,
+ QQCLASS = 1 << 4,
+ PPCLASS = 1 << 5,
+ RRCLASS = 1 << 6,
+ CCCLASS = 1 << 7,
+ SSCLASS = 1 << 8,
+};
--- /dev/null
+++ b/src/cmd/as/target/x80/rules.dat
@@ -1,0 +1,39 @@
+imm8 AIMM8
+imm16 AIMM16
+imm32 AIMM32
+imm64 AIMM64
+imm3 AIMM3
+rst ARST
+\(IY\+n\) AINDEX_IY
+\(IX\+n\) AINDEX_IX
+ss AREG_SSCLASS
+cc AREG_CCCLASS
+dd AREG_DDCLASS
+qq AREG_QQCLASS
+rr AREG_RRCLASS
+pp AREG_PPCLASS
+p AREG_PCLASS
+q AREG_QCLASS
+r AREG_RCLASS
+R AREG_R
+\(DE\) AINDER_DE
+\(BC\) AINDER_BC
+\(HL\) AINDER_HL
+\(SP\) AINDER_SP
+\(C\) AINDER_C
+\(IX\) AINDER_IX
+\(IY\) AINDER_IY
+SP AREG_SP
+HL AREG_HL
+DE AREG_DE
+IX AREG_IX
+IY AREG_IY
+AF' AREG_AF_
+AF AREG_AF
+A AREG_A
+F AREG_F
+\(n\) ADIRECT
+I AREG_I
+0 AZERO
+sym ASYM
+string ASTR
--- /dev/null
+++ b/src/cmd/as/target/x80/x80.dat
@@ -1,0 +1,374 @@
+# Tab 18, tabs 18, :set ts=18
+# op args size bytes format cpu
+.SECTION sym,string? 0 none section Z80,R800,GB80
+.TEXT none 0 none text Z80,R800,GB80
+.DATA none 0 none data Z80,R800,GB80
+.BSS none 0 none bss Z80,R800,GB80
+.DB imm8+ 0 none defb Z80,R800,GB80
+.DEFB imm8+ 0 none defb Z80,R800,GB80
+.BYTE imm8+ 0 none defb Z80,R800,GB80
+.DW imm16+ 0 none defw Z80,R800,GB80
+.DEFW imm16+ 0 none defw Z80,R800,GB80
+.SHORT imm16+ 0 none defw Z80,R800,GB80
+.WORD imm16+ 0 none defw Z80,R800,GB80
+.DD imm32+ 0 none defd Z80,R800,GB80
+.DEFD imm32+ 0 none defd Z80,R800,GB80
+.LONG imm32+ 0 none defd Z80,R800,GB80
+.INT imm16+ 0 none defd Z80,R800,GB80
+.DQ imm64+ 0 none defq Z80,R800,GB80
+.DEFQ imm64+ 0 none defq Z80,R800,GB80
+.EQU sym,imm16 0 none equ Z80,R800,GB80
+.EQU imm16 0 none equ Z80,R800,GB80
+= imm16 0 none equ Z80,R800,GB80
+.SIZE sym,imm16 0 none size Z80,R800,GB80
+.SIZE imm16 0 none size Z80,R800,GB80
+.COMM sym,imm16 0 none common Z80,R800,GB80
+.COMM imm16 0 none common Z80,R800,GB80
+.TYPE sym,imm16 0 none type Z80,R800,GB80
+.TYPE imm16 0 none type Z80,R800,GB80
+.GLOBL sym+ 0 none global Z80,R800,GB80
+.PUBLIC sym+ 0 none global Z80,R800,GB80
+.EXTERN sym+ 0 none extrn Z80,R800,GB80
+.EXTRN sym+ 0 none extrn Z80,R800,GB80
+.STRING string+ 0 none string Z80,R800,GB80
+.ASCII string+ 0 none ascii Z80,R800,GB80
+.ALIGN imm16+ 0 none align Z80,R800,GB80
+.END none 0 none end Z80,R800,GB80
+.INCLUDE string 0 none include Z80,R800,GB80
+
+
+
+# p is any register from B, C, D, E, IXL, IXH, A
+# q is any register from B, C, D, E, IYL, IYH, A
+# r is any register from B, C, D, E, L, H, A
+# dd is any register from BC, DE, HL, SP
+# qq is any register from BC, DE, HL, AF
+# pp is any register from BC, DE, IX, SP
+# rr is any register from BC, DE, IY, SP
+# cc is any flag from NZ, Z, NC, C, PO, PE, P, M
+# ss is any flag from C, NC, Z, NZ
+
+# 8 bit load group
+LD r,imm8 2 0x06 ld8 Z80,R800,GB80
+LD p,imm8 3 0xdd,0x06 ld8 Z80,R800
+LD q,imm8 3 0xfd,0x06 ld8 Z80,R800
+LD (HL),imm8 2 0x36 ld8 Z80,R800,GB80
+
+LD r,r 1 0x40 ld8 Z80,R800,GB80
+LD p,p 2 0xdd,0x40 ld8 Z80,R800
+LD q,q 2 0xfd,0x40 ld8 Z80,R800
+LD (HL),r 1 0x70 ld8 Z80,R800,GB80
+LD r,(HL) 1 0x46 ld8 Z80,R800,GB80
+
+LD r,(IX+n) 3 0xdd,0x46 idx Z80,R800
+LD r,(IY+n) 3 0xfd,0x46 idx Z80,R800
+LD (IX+n),r 3 0xdd,0x70 idx Z80,R800
+LD (IY+n),r 3 0xfd,0x70 idx Z80,R800
+
+LD (HL),imm8 2 0x36 ld8 Z80,R800,GB80
+LD (IX+n),imm8 4 0xdd,0x36 idx Z80,R800
+LD (IY+n),imm8 4 0xfd,0x36 idx Z80,R800
+
+LD A,(BC) 1 0x0a noargs Z80,R800,GB80
+LD A,(DE) 1 0x1a noargs Z80,R800,GB80
+LD A,(n) 3 0x3a dir Z80,R800
+
+LD (BC),A 1 0x2 noargs Z80,R800,GB80
+LD (DE),A 1 0x12 noargs Z80,R800,GB80
+LD (n),A 3 0x32 dir Z80,R800
+
+LD A,(n) 3 0xfa dir GB80
+LD A,(HL+) 1 0x2a ld8 GB80 #TODO
+LD A,(HL-) 1 0x3a ld8 GB80 #TODO
+LD A,($FF00+n) 2 0xf0 dir GB80 #TODO
+LD A,($FF00+C) 2 0xf2 dir GB80 #TODO
+
+LD (n),A 3 0xea dir GB80
+LD (HL+),A 1 0x22 ld8 GB80 #TODO
+LD (HL-),A 1 0x32 ld8 GB80 #TODO
+LD ($FF00+n),A 2 0xe0 dir GB80 #TODO
+LD ($FF00+C),A 2 0xe2 dir GB80 #TODO
+
+LD A,I 2 0xed,0x57 noargs Z80,R800
+LD A,R 2 0xed,0x5f noargs Z80,R800
+LD I,A 2 0xed,0x47 noargs Z80,R800
+LD R,A 2 0xed,0x4f noargs Z80,R800
+
+# 16 bit load group
+LD dd,imm16 3 0x01 ld16 Z80,R800,GB80
+LD IX,imm16 4 0xdd,0x21 ld16 Z80,R800
+LD IY,imm16 4 0xfd,0x21 ld16 Z80,R800
+
+LD HL,(n) 3 0x2a ld16 Z80,R800,GB80
+LD dd,(n) 4 0xed,0x4b ld16 Z80,R800
+LD IX,(n) 4 0xdd,0x2a ld16 Z80,R800
+LD IY,(n) 4 0xfd,0x2a ld16 Z80,R800
+
+LD (n),HL 3 0x22 ld16 Z80,R800,GB80
+LD (n),dd 4 0xed,0x43 ld16 Z80,R800
+LD (n),IX 4 0xdd,0x22 ld16 Z80,R800
+LD (n),IY 4 0xfd,0x22 ld16 Z80,R800
+
+LD SP,HL 1 0xf9 noargs Z80,R800,GB80
+LD SP,IX 2 0xdd,0xf9 noargs Z80,R800
+LD SP,IY 2 0xfd,0xf9 noargs Z80,R800
+
+PUSH qq 1 0xc5 ld16 Z80,R800,GB80
+PUSH IX 2 0xdd,0xe5 ld16 Z80,R800
+PUSH IY 2 0xfd,0xe5 ld16 Z80,R800
+POP qq 1 0xc1 ld16 Z80,R800,GB80
+POP IX 2 0xdd,0xe1 ld16 Z80,R800
+POP IY 2 0xfd,0xe1 ld16 Z80,R800
+
+# 8 bit ALU group
+ADD A,r 1 0x80 alu8 Z80,R800,GB80
+ADD A,p 2 0xdd,0x80 alu8 Z80,R800
+ADD A,q 2 0xfd,0x80 alu8 Z80,R800
+ADD A,imm8 2 0xc6 alu8 Z80,R800,GB80
+ADD A,(HL) 1 0x86 alu8 Z80,R800,GB80
+ADD A,(IX+n) 3 0xdd,0x86 alu8 Z80,R800
+ADD A,(IY+n) 3 0xfd,0x86 alu8 Z80,R800
+
+ADC A,r 1 0x88 alu8 Z80,R800,GB80
+ADC A,p 2 0xdd,0x88 alu8 Z80,R800
+ADC A,q 2 0xfd,0x88 alu8 Z80,R800
+ADC A,imm8 2 0xce alu8 Z80,R800,GB80
+ADC A,(HL) 1 0x8e alu8 Z80,R800,GB80
+ADC A,(IX+n) 3 0xdd,0x8e alu8 Z80,R800
+ADC A,(IY+n) 3 0xfd,0x8e alu8 Z80,R800
+
+SUB A,r 1 0x90 alu8 Z80,R800,GB80
+SUB A,p 2 0xdd,0x90 alu8 Z80,R800
+SUB A,q 2 0xfd,0x90 alu8 Z80,R800
+SUB A,imm8 2 0xd6 alu8 Z80,R800,GB80
+SUB A,(HL) 1 0x96 alu8 Z80,R800,GB80
+SUB A,(IX+n) 3 0xdd,0x96 alu8 Z80,R800
+SUB A,(IY+n) 3 0xfd,0x96 alu8 Z80,R800
+
+SBC A,r 1 0x98 alu8 Z80,R800,GB80
+SBC A,p 2 0xdd,0x98 alu8 Z80,R800
+SBC A,q 2 0xfd,0x98 alu8 Z80,R800
+SBC A,imm8 2 0xde alu8 Z80,R800,GB80
+SBC A,(HL) 1 0x9e alu8 Z80,R800,GB80
+SBC A,(IX+n) 3 0xdd,0x9e alu8 Z80,R800
+SBC A,(IY+n) 3 0xfd,0x9e alu8 Z80,R800
+
+AND A,r 1 0xa0 alu8 Z80,R800,GB80
+AND A,p 2 0xdd,0xa0 alu8 Z80,R800
+AND A,q 2 0xfd,0xa0 alu8 Z80,R800
+AND A,imm8 2 0xe6 alu8 Z80,R800,GB80
+AND A,(HL) 1 0xa6 alu8 Z80,R800,GB80
+AND A,(IX+n) 3 0xdd,0xa6 alu8 Z80,R800
+AND A,(IY+n) 3 0xfd,0xa6 alu8 Z80,R800
+
+OR A,r 1 0xb0 alu8 Z80,R800,GB80
+OR A,p 2 0xdd,0xb0 alu8 Z80,R800
+OR A,q 2 0xfd,0xb0 alu8 Z80,R800
+OR A,imm8 2 0xf6 alu8 Z80,R800,GB80
+OR A,(HL) 1 0xb6 alu8 Z80,R800,GB80
+OR A,(IX+n) 3 0xdd,0xb6 alu8 Z80,R800
+OR A,(IY+n) 3 0xfd,0xb6 alu8 Z80,R800
+
+XOR A,r 1 0xa8 alu8 Z80,R800,GB80
+XOR A,p 2 0xdd,0xa8 alu8 Z80,R800
+XOR A,q 2 0xfd,0xa8 alu8 Z80,R800
+XOR A,imm8 2 0xee alu8 Z80,R800,GB80
+XOR A,(HL) 1 0xae alu8 Z80,R800,GB80
+XOR A,(IX+n) 3 0xdd,0xae alu8 Z80,R800
+XOR A,(IY+n) 3 0xfd,0xae alu8 Z80,R800
+
+CP A,r 1 0xb8 alu8 Z80,R800,GB80
+CP A,p 2 0xdd,0xb8 alu8 Z80,R800
+CP A,q 2 0xfd,0xb8 alu8 Z80,R800
+CP A,imm8 2 0xfe alu8 Z80,R800,GB80
+CP A,(HL) 1 0xbe alu8 Z80,R800,GB80
+CP A,(IX+n) 3 0xdd,0xbe alu8 Z80,R800
+CP A,(IY+n) 3 0xfd,0xbe alu8 Z80,R800
+
+INC r 1 0x04 alu8 Z80,R800,GB80
+INC p 2 0xdd,0x04 alu8 Z80,R800
+INC q 2 0xfd,0x04 alu8 Z80,R800
+INC (HL) 1 0x34 alu8 Z80,R800,GB80
+INC (IX+n) 3 0xdd,0x34 alu8 Z80,R800
+INC (IY+n) 3 0xfd,0x34 alu8 Z80,R800
+
+DEC r 1 0x05 alu8 Z80,R800,GB80
+DEC p 2 0xdd,0x05 alu8 Z80,R800
+DEC q 2 0xfd,0x05 alu8 Z80,R800
+DEC (HL) 1 0x35 alu8 Z80,R800,GB80
+DEC (IX+n) 3 0xdd,0x35 alu8 Z80,R800
+DEC (IY+n) 3 0xfd,0x35 alu8 Z80,R800
+
+ADD SP,dd 2 0xE8 alu8 GB80
+LD HL,SP+imm8 2 0xF8 alu8 GB80
+
+# 16 bit ALU group
+ADD HL,dd 1 0x09 alu16 Z80,R800,GB80
+ADC HL,dd 2 0xed,0x4a alu16 Z80,R800
+SBC HL,dd 2 0xed,0x42 alu16 Z80,R800
+ADD IX,pp 2 0xdd,0x09 alu16 Z80,R800
+ADD IY,rr 2 0xfd,0x09 alu16 Z80,R800
+
+INC dd 1 0x03 alu16 Z80,R800,GB80
+INC IX 2 0xdd,0x23 alu16 Z80,R800
+INC IY 2 0xfd,0x23 alu16 Z80,R800
+
+DEC dd 1 0x0b alu16 Z80,R800,GB80
+DEC IX 2 0xdd,0x2b alu16 Z80,R800
+DEC IY 2 0xfd,0x2b alu16 Z80,R800
+
+# General purpose arithmetic and CPU control group
+DAA none 1 0x27 noargs Z80,R800,GB80
+CPL none 1 0x2f noargs Z80,R800,GB80
+NEG none 2 0xed,0x44 noargs Z80,R800
+CCF none 1 0x3f noargs Z80,R800,GB80
+SCF none 1 0x37 noargs Z80,R800,GB80
+NOP none 1 0x00 noargs Z80,R800,GB80
+HALT none 1 0x76 noargs Z80,R800,GB80
+STOP none 2 0x10,0x00 noargs GB80
+DI none 1 0xf3 noargs Z80,R800,GB80
+EI none 1 0xfb noargs Z80,R800,GB80
+IM imm8 2 0xed,0x46 im Z80,R800
+
+# Exchange, block transfer and search groups
+EX DE,HL 1 0xeb noargs Z80,R800
+EX AF,AF' 1 0x08 noargs Z80,R800
+EXX none 1 0xd9 noargs Z80,R800
+EX (SP),HL 1 0xe3 noargs Z80,R800
+EX (SP),IX 2 0xdd,0xe3 noargs Z80,R800
+EX (SP),IY 2 0xfd,0xe3 noargs Z80,R800
+
+LDI none 2 0xed,0xa0 noargs Z80,R800
+LDIR none 2 0xed,0xb0 noargs Z80,R800
+LDD none 2 0xed,0xa8 noargs Z80,R800
+LDDR none 2 0xed,0xb8 noargs Z80,R800
+
+CPI none 2 0xed,0xa1 noargs Z80,R800
+CPIR none 2 0xed,0xb1 noargs Z80,R800
+CPD none 2 0xed,0xa9 noargs Z80,R800
+CPDR none 2 0xed,0xb9 noargs Z80,R800
+
+# Rotate and shift group
+RLCA none 1 0x07 noargs Z80,R800,GB80
+RLA none 1 0x17 noargs Z80,R800,GB80
+RRCA none 1 0x0f noargs Z80,R800,GB80
+RRA none 1 0x1f noargs Z80,R800,GB80
+
+RLD none 2 0xed,0x6f noargs Z80,R800
+RRD none 2 0xed,0x67 noargs Z80,R800
+
+RLC r 2 0xcb,0x00 rot_bit Z80,R800,GB80
+RLC (HL) 2 0xcb,0x06 rot_bit Z80,R800,GB80
+RLC (IX+n) 4 0xdd,0xcb,0,0x06 rot_bit Z80,R800
+RLC (IY+n) 4 0xfd,0xcb,0,0x06 rot_bit Z80,R800
+RLC (IX+n),r 4 0xdd,0xcb,0,0x00 rot_bit Z80,R800
+RLC (IY+n),r 4 0xfd,0xcb,0,0x00 rot_bit Z80,R800
+
+RL r 2 0xcb,0x10 rot_bit Z80,R800,GB80
+RL (HL) 2 0xcb,0x16 rot_bit Z80,R800,GB80
+RL (IX+n) 4 0xdd,0xcb,0,0x16 rot_bit Z80,R800
+RL (IY+n) 4 0xfd,0xcb,0,0x16 rot_bit Z80,R800
+RL (IX+n),r 4 0xdd,0xcb,0,0x10 rot_bit Z80,R800
+RL (IY+n),r 4 0xfd,0xcb,0,0x10 rot_bit Z80,R800
+
+RRC r 2 0xcb,0x08 rot_bit Z80,R800,GB80
+RRC (HL) 2 0xcb,0x0e rot_bit Z80,R800,GB80
+RRC (IX+n) 4 0xdd,0xcb,0,0x0e rot_bit Z80,R800
+RRC (IY+n) 4 0xfd,0xcb,0,0x0e rot_bit Z80,R800
+RRC (IX+n),r 4 0xdd,0xcb,0,0x08 rot_bit Z80,R800
+RRC (IY+n),r 4 0xfd,0xcb,0,0x08 rot_bit Z80,R800
+
+RR r 2 0xcb,0x18 rot_bit Z80,R800,GB80
+RR (HL) 2 0xcb,0x1e rot_bit Z80,R800,GB80
+RR (IX+n) 4 0xdd,0xcb,0,0x1e rot_bit Z80,R800
+RR (IY+n) 4 0xfd,0xcb,0,0x1e rot_bit Z80,R800
+RR (IX+n),r 4 0xdd,0xcb,0,0x18 rot_bit Z80,R800
+RR (IY+n),r 4 0xfd,0xcb,0,0x18 rot_bit Z80,R800
+
+SLA r 2 0xcb,0x20 rot_bit Z80,R800,GB80
+SLA (HL) 2 0xcb,0x26 rot_bit Z80,R800,GB80
+SLA (IX+n) 4 0xdd,0xcb,0,0x26 rot_bit Z80,R800
+SLA (IY+n) 4 0xfd,0xcb,0,0x26 rot_bit Z80,R800
+SLA (IX+n),r 4 0xdd,0xcb,0,0x20 rot_bit Z80,R800
+SLA (IY+n),r 4 0xfd,0xcb,0,0x20 rot_bit Z80,R800
+
+SWAP r 2 0xcb,0x30 rot_bit GB80
+SWAP (HL) 2 0xcb,0x36 rot_bit GB80
+
+SLL r 2 0xcb,0x30 rot_bit Z80
+SLL (HL) 2 0xcb,0x36 rot_bit Z80
+SLL (IX+n) 4 0xdd,0xcb,0,0x36 rot_bit Z80
+SLL (IY+n) 4 0xfd,0xcb,0,0x36 rot_bit Z80
+SLL (IX+n),r 4 0xdd,0xcb,0,0x30 rot_bit Z80
+SLL (IY+n),r 4 0xfd,0xcb,0,0x30 rot_bit Z80
+
+SRA r 2 0xcb,0x28 rot_bit Z80,R800,GB80
+SRA (HL) 2 0xcb,0x2e rot_bit Z80,R800,GB80
+SRA (IX+n) 4 0xdd,0xcb,0,0x2e rot_bit Z80,R800
+SRA (IY+n) 4 0xfd,0xcb,0,0x2e rot_bit Z80,R800
+SRA (IX+n),r 4 0xdd,0xcb,0,0x28 rot_bit Z80,R800
+SRA (IY+n),r 4 0xfd,0xcb,0,0x28 rot_bit Z80,R800
+
+SRL r 2 0xcb,0x38 rot_bit Z80,R800,GB80
+SRL (HL) 2 0xcb,0x3e rot_bit Z80,R800,GB80
+SRL (IX+n) 4 0xdd,0xcb,0,0x3e rot_bit Z80,R800
+SRL (IY+n) 4 0xfd,0xcb,0,0x3e rot_bit Z80,R800
+SRL (IX+n),r 4 0xdd,0xcb,0,0x38 rot_bit Z80,R800
+SRL (IY+n),r 4 0xfd,0xcb,0,0x38 rot_bit Z80,R800
+
+# Bit manipulation group
+BIT imm3,r 2 0xcb,0x40 rot_bit Z80,R800,GB80
+BIT imm3,(HL) 2 0xcb,0x46 rot_bit Z80,R800
+BIT imm3,(IX+n) 4 0xdd,0xcb,0,0x46 rot_bit Z80,R800
+BIT imm3,(IY+n) 4 0xfd,0xcb,0,0x46 rot_bit Z80,R800
+
+SET imm3,r 2 0xcb,0xc0 rot_bit Z80,R800,GB80
+SET imm3,(HL) 2 0xcb,0xc6 rot_bit Z80,R800,GB80
+SET imm3,(IX+n) 4 0xdd,0xcb,0,0xc6 rot_bit Z80,R800
+SET imm3,(IY+n) 4 0xfd,0xcb,0,0xc6 rot_bit Z80,R800
+SET imm3,(IX+n),r 4 0xdd,0xcb,0,0xc0 rot_bit Z80,R800
+SET imm3,(IY+n),r 4 0xfd,0xcb,0,0xc0 rot_bit Z80,R800
+
+RES imm3,r 2 0xcb,0x80 rot_bit Z80,R800,GB80
+RES imm3,(HL) 2 0xcb,0x86 rot_bit Z80,R800,GB80
+RES imm3,(IX+n) 4 0xdd,0xcb,0,0x86 rot_bit Z80,R800
+RES imm3,(IY+n) 4 0xfd,0xcb,0,0x86 rot_bit Z80,R800
+RES imm3,(IX+n),r 4 0xdd,0xcb,0,0x80 rot_bit Z80,R800
+RES imm3,(IY+n),r 4 0xfd,0xcb,0,0x80 rot_bit Z80,R800
+
+# Input and output group
+IN A,(n) 2 0xdb inout Z80,R800
+IN r,(C) 2 0xed,0x40 inout Z80,R800
+IN F,(C) 2 0xed,0x70 inout Z80,R800
+INI none 2 0xed,0xa2 noargs Z80,R800
+INIR none 2 0xed,0xb2 noargs Z80,R800
+IND none 2 0xed,0xaa noargs Z80,R800
+INDR none 2 0xed,0xba noargs Z80,R800
+
+OUT (n),A 2 0xd3 inout Z80,R800
+OUT (C),r 2 0xed,0x41 inout Z80,R800
+OUT (C),0 2 0xed,0x71 inout Z80,R800
+OUTI none 2 0xed,0xa3 noargs Z80,R800
+OTIR none 2 0xed,0xb3 noargs Z80,R800
+OUTD none 2 0xed,0xab noargs Z80,R800
+OTDR none 2 0xed,0xbb noargs Z80,R800
+
+# Jump group
+JP imm16 3 0xc3 jp Z80,R800,GB80
+JP cc,imm16 3 0xc2 jp Z80,R800,GB80
+JR imm16 2 0x18 jr Z80,R800,GB80
+JR ss,imm16 2 0x00 jr Z80,R800,GB80
+JP HL 1 0xe9 noargs Z80,R800,GB80
+JP IX 2 0xdd,0xe9 noargs Z80,R800
+JP IY 2 0xfd,0xe9 noargs Z80,R800
+DJNZ imm16 2 0x10 jr Z80,R800
+
+# Call and return group
+CALL imm16 3 0xcd jp Z80,R800,GB80
+CALL cc,imm16 3 0xc4 jp Z80,R800,GB80
+RET none 1 0xc9 noargs Z80,R800,GB80
+RET cc 1 0xc0 jp Z80,R800,GB80
+RETI none 2 0xed,0x4d noargs Z80,R800
+RETI none 1 0xd9 noargs GB80
+RETN none 2 0xed,0x45 noargs Z80,R800
+RST rst 1 0xc7 rst Z80,R800,GB80
--- /dev/null
+++ b/src/cmd/as/target/x80/z80.c
@@ -1,0 +1,65 @@
+static char sccsid[] = "@(#) ./as/target/x80/z80.c";
+
+#include <stdlib.h>
+
+#include <scc/scc.h>
+
+#include "../../as.h"
+#include "../x80/proc.h"
+
+TUINT maxaddr = 0xFFFFFFFF;
+int endian = LITTLE_ENDIAN;
+
+void
+iarch(void)
+{
+ static struct {
+ char *name;
+ char type;
+ } regs[] = {
+ "AF", AREG_AF,
+ "A", AREG_A,
+ "F", AREG_F,
+
+ "BC", AREG_BC,
+ "B", AREG_B,
+ "C", AREG_C,
+
+ "HL", AREG_HL,
+ "H", AREG_H,
+ "L", AREG_L,
+
+ "DE", AREG_DE,
+ "D", AREG_D,
+ "E", AREG_E,
+
+ "IX", AREG_IX,
+ "IXL", AREG_IXL,
+ "IXH", AREG_IXH,
+
+ "IY", AREG_IY,
+ "IYL", AREG_IYL,
+ "IYH", AREG_IYH,
+
+ "R", AREG_R,
+ "I", AREG_I,
+ "AF'", AREG_AF_,
+ "SP", AREG_SP,
+
+ "NZ", AREG_NZ,
+ "Z", AREG_Z,
+ "NC", AREG_NC,
+ "PO", AREG_PO,
+ "PE", AREG_PE,
+ "P", AREG_P,
+ "M", AREG_M,
+
+ NULL,
+ }, *bp;
+
+ for (bp = regs; bp->name; ++bp) {
+ Symbol *sym = lookup(bp->name);
+ sym->flags = FREG;
+ sym->value = bp->type;
+ }
+}
--- /dev/null
+++ b/src/cmd/as/target/x86/.gitignore
@@ -1,0 +1,3 @@
+amd64tbl.c
+i286tbl.c
+i386tbl.c
--- /dev/null
+++ b/src/cmd/as/target/x86/amd64.c
@@ -1,0 +1,13 @@
+static char sccsid[] = "@(#) ./as/target/x86/amd64.c";
+
+#include <scc/scc.h>
+
+#include "../../as.h"
+
+TUINT maxaddr = 0xFFFFFFFFFFFFFFFF;
+int endian = LITTLE_ENDIAN;
+
+void
+iarch(void)
+{
+}
--- /dev/null
+++ b/src/cmd/as/target/x86/i286.c
@@ -1,0 +1,54 @@
+static char sccsid[] = "@(#) ./as/target/x86/i286.c";
+
+#include <scc/scc.h>
+
+#include "../../as.h"
+#include "../x86/proc.h"
+
+TUINT maxaddr = 0xFFFF;
+int endian = LITTLE_ENDIAN;
+int left2right = 0;
+
+void
+iarch(void)
+{
+ static struct {
+ char *name;
+ char type;
+ } regs[] = {
+ "CS", AREG_CS,
+ "DS", AREG_DS,
+ "SS", AREG_SS,
+ "ES", AREG_ES,
+
+ "AX", AREG_AX,
+ "AL", AREG_AL,
+ "AH", AREG_AH,
+
+ "BX", AREG_BX,
+ "BL", AREG_BL,
+ "BH", AREG_BH,
+
+ "CX", AREG_CX,
+ "CL", AREG_CL,
+ "CH", AREG_CH,
+
+ "DX", AREG_DX,
+ "DL", AREG_DL,
+ "DH", AREG_DH,
+
+ "SI", AREG_SI,
+ "DI", AREG_DI,
+
+ "SP", AREG_SP,
+ "BP", AREG_BP,
+
+ NULL
+ }, *bp;
+
+ for (bp = regs; bp->name; ++bp) {
+ Symbol *sym = lookup(bp->name);
+ sym->flags = FREG;
+ sym->value = bp->type;
+ }
+}
--- /dev/null
+++ b/src/cmd/as/target/x86/i386.c
@@ -1,0 +1,101 @@
+static char sccsid[] = "@(#) ./as/target/x86/i386.c";
+
+#include <scc/scc.h>
+
+#include "../../as.h"
+#include "../x86/proc.h"
+
+TUINT maxaddr = 0xFFFFFFFF;
+int endian = LITTLE_ENDIAN;
+
+void
+iarch(void)
+{
+ static struct {
+ char *name;
+ char type;
+ } regs[] = {
+ "CS", AREG_CS,
+ "DS", AREG_DS,
+ "SS", AREG_SS,
+ "ES", AREG_ES,
+ "FS", AREG_FS,
+ "GS", AREG_GS,
+
+ "AX", AREG_AX,
+ "AL", AREG_AL,
+ "AH", AREG_AH,
+ "EAX", AREG_EAX,
+
+ "BC", AREG_BX,
+ "BL", AREG_BL,
+ "BH", AREG_BH,
+ "EBX", AREG_EBX,
+
+ "CX", AREG_CX,
+ "CL", AREG_CL,
+ "CH", AREG_CH,
+ "ECX", AREG_ECX,
+
+ "DX", AREG_DX,
+ "DL", AREG_DL,
+ "DH", AREG_DH,
+ "EDX", AREG_EDX,
+
+ "SI", AREG_SI,
+ "ESI", AREG_ESI,
+ "DI", AREG_DI,
+ "EDI", AREG_EDI,
+
+ "SP", AREG_SP,
+ "ESP", AREG_ESP,
+
+ "BP", AREG_BP,
+ "EBP", AREG_EBP,
+
+ "R0", AREG_R0,
+ "MM0", AREG_MM0,
+ "R1", AREG_R1,
+ "MM1", AREG_MM1,
+ "R2", AREG_R2,
+ "MM2", AREG_MM2,
+ "R3", AREG_R3,
+ "MM3", AREG_MM3,
+ "R4", AREG_R4,
+ "MM4", AREG_MM4,
+ "R5", AREG_R5,
+ "MM5", AREG_MM5,
+ "R6", AREG_R6,
+ "MM6", AREG_MM6,
+ "R7", AREG_R7,
+ "MM7", AREG_MM7,
+
+ "XMM0", AREG_XMM0,
+ "XMM1", AREG_XMM1,
+ "XMM2", AREG_XMM2,
+ "XMM3", AREG_XMM3,
+ "XMM4", AREG_XMM4,
+ "XMM5", AREG_XMM5,
+ "XMM6", AREG_XMM6,
+ "XMM7", AREG_XMM7,
+
+ "YMM0", AREG_YMM0,
+ "YMM1", AREG_YMM1,
+ "YMM2", AREG_YMM2,
+ "YMM3", AREG_YMM3,
+ "YMM4", AREG_YMM4,
+ "YMM5", AREG_YMM5,
+ "YMM6", AREG_YMM6,
+ "YMM7", AREG_YMM7,
+
+ "MXCSR", AREG_MXCSR,
+
+ NULL
+ }, *bp;
+
+ for (bp = regs; bp->name; ++bp) {
+ Symbol *sym = lookup(bp->name);
+ sym->flags = FREG;
+ sym->value = bp->type;
+ }
+}
--- /dev/null
+++ b/src/cmd/as/target/x86/ins.c
@@ -1,0 +1,348 @@
+static char sccsid[] = "@(#) ./as/target/x86/ins.c";
+
+#include <stdlib.h>
+#include <string.h>
+
+#include <scc/scc.h>
+
+#include "../../as.h"
+#include "proc.h"
+
+#define addrbyte(mod, reg, rm) ((mod) << 6 | (reg) << 3 | (rm))
+
+enum addr_mode {
+ MEM_MODE = 0,
+ MEM8_MODE = 1,
+ MEM16_MODE = 2,
+ REG_MODE = 3,
+};
+
+static int
+getclass(Node *np)
+{
+ if (np->addr != AREG)
+ return 0;
+
+ switch (np->sym->value) {
+ case AREG_AL:
+ case AREG_AH:
+ case AREG_BL:
+ case AREG_BH:
+ case AREG_CL:
+ case AREG_CH:
+ case AREG_DL:
+ case AREG_DH:
+ return R8CLASS;
+
+ case AREG_AX:
+ case AREG_BX:
+ case AREG_CX:
+ case AREG_DX:
+ case AREG_DI:
+ case AREG_SI:
+ case AREG_SP:
+ case AREG_BP:
+ return R16CLASS;
+
+ case AREG_CS:
+ case AREG_DS:
+ case AREG_SS:
+ case AREG_ES:
+ case AREG_FS:
+ case AREG_GS:
+
+ case AREG_EFLAGS:
+ case AREG_CF:
+ case AREG_PF:
+ case AREG_AF:
+ case AREG_ZF:
+ case AREG_SF:
+ case AREG_TF:
+ case AREG_IF:
+ case AREG_DF:
+ case AREG_OF:
+ case AREG_IOPL:
+ case AREG_NT:
+ case AREG_RF:
+ case AREG_VM:
+ case AREG_AC:
+ case AREG_VIF:
+ case AREG_VIP:
+ case AREG_ID:
+
+ case AREG_EAX:
+ case AREG_RAX:
+
+ case AREG_EBX:
+ case AREG_RBX:
+
+ case AREG_ECX:
+ case AREG_RCX:
+
+ case AREG_EDX:
+ case AREG_RDX:
+
+ case AREG_SIL:
+ case AREG_ESI:
+ case AREG_RSI:
+ case AREG_DIL:
+ case AREG_EDI:
+ case AREG_RDI:
+
+ case AREG_SPL:
+ case AREG_ESP:
+ case AREG_RSP:
+
+ case AREG_BPL:
+ case AREG_EBP:
+ case AREG_RBP:
+
+ case AREG_R0:
+ case AREG_MM0:
+ case AREG_R1:
+ case AREG_MM1:
+ case AREG_R2:
+ case AREG_MM2:
+ case AREG_R3:
+ case AREG_MM3:
+ case AREG_R4:
+ case AREG_MM4:
+ case AREG_R5:
+ case AREG_MM5:
+ case AREG_R6:
+ case AREG_MM6:
+ case AREG_R7:
+ case AREG_MM7:
+
+ case AREG_R8:
+ case AREG_R8L:
+ case AREG_R8W:
+ case AREG_R9:
+ case AREG_R9L:
+ case AREG_R9W:
+ case AREG_R10:
+ case AREG_R10L:
+ case AREG_R10W:
+ case AREG_R11:
+ case AREG_R11L:
+ case AREG_R11W:
+ case AREG_R12:
+ case AREG_R12L:
+ case AREG_R12W:
+ case AREG_R13:
+ case AREG_R13L:
+ case AREG_R13W:
+ case AREG_R14:
+ case AREG_R14L:
+ case AREG_R14W:
+ case AREG_R15:
+ case AREG_R15L:
+ case AREG_R15W:
+
+ case AREG_XMM0:
+ case AREG_XMM1:
+ case AREG_XMM2:
+ case AREG_XMM3:
+ case AREG_XMM4:
+ case AREG_XMM5:
+ case AREG_XMM6:
+ case AREG_XMM7:
+ case AREG_XMM8:
+ case AREG_XMM9:
+ case AREG_XMM10:
+ case AREG_XMM11:
+ case AREG_XMM12:
+ case AREG_XMM13:
+ case AREG_XMM14:
+ case AREG_XMM15:
+
+ case AREG_YMM0:
+ case AREG_YMM1:
+ case AREG_YMM2:
+ case AREG_YMM3:
+ case AREG_YMM4:
+ case AREG_YMM5:
+ case AREG_YMM6:
+ case AREG_YMM7:
+ case AREG_YMM8:
+ case AREG_YMM9:
+ case AREG_YMM10:
+ case AREG_YMM11:
+ case AREG_YMM12:
+ case AREG_YMM13:
+ case AREG_YMM14:
+ case AREG_YMM15:
+
+ case AREG_MXCSR:
+ return 0;
+ default:
+ abort();
+ }
+}
+
+int
+match(Op *op, Node **args)
+{
+ unsigned char *p;
+ int arg, class, rep, opt;
+ Node *np;
+
+ if (!op->args)
+ return args == NULL;
+
+ opt = rep = 0;
+ for (p = op->args; arg = *p; ++p) {
+ if (rep)
+ --p;
+ if ((np = *args++) == NULL)
+ return (rep|opt) != 0;
+
+ switch (arg) {
+ case AOPT:
+ opt = 1;
+ break;
+ case AREP:
+ rep = 1;
+ break;
+ case AREG_R8CLASS:
+ class = R8CLASS;
+ goto check_class;
+ case AREG_R16CLASS:
+ class = R16CLASS;
+ check_class:
+ if ((getclass(np) & class) == 0)
+ return 0;
+ break;
+ case AIMM8:
+ case AIMM16:
+ case AIMM32:
+ case AIMM64:
+ if (np->addr != AIMM)
+ return 0;
+ if (toobig(np, arg))
+ error("overflow in immediate operand");
+ break;
+ case ASYM:
+ if (np->addr != AIMM || np->op != IDEN)
+ return 0;
+ break;
+ case ADIRECT:
+ case ASTR:
+ if (np->addr != arg)
+ return 0;
+ break;
+ default:
+ abort();
+ }
+ }
+
+ return *args == NULL;
+}
+
+Node *
+moperand(void)
+{
+}
+
+static int
+reg8toint(Node *np)
+{
+ switch (np->sym->value) {
+ case AREG_AL: return 0;
+ case AREG_CL: return 1;
+ case AREG_DL: return 2;
+ case AREG_BL: return 3;
+ case AREG_AH: return 4;
+ case AREG_CH: return 5;
+ case AREG_DH: return 6;
+ case AREG_BH: return 7;
+ default: abort();
+ }
+}
+
+static int
+reg16toint(Node *np)
+{
+ switch (np->sym->value) {
+ case AREG_AX: return 0;
+ case AREG_CX: return 1;
+ case AREG_DX: return 2;
+ case AREG_BX: return 3;
+ case AREG_SP: return 4;
+ case AREG_BP: return 5;
+ case AREG_SI: return 6;
+ case AREG_DI: return 7;
+ default: abort();
+ }
+}
+
+static int
+reg32toint(Node *np)
+{
+ switch (np->sym->value) {
+ case AREG_EAX: return 0;
+ case AREG_ECX: return 1;
+ case AREG_EDX: return 2;
+ case AREG_EBX: return 3;
+ case AREG_ESP: return 4;
+ case AREG_EBP: return 5;
+ case AREG_ESI: return 6;
+ case AREG_EDI: return 7;
+ default: abort();
+ }
+}
+
+void
+reg8_reg8(Op *op, Node **args)
+{
+ int src, dst;
+ char buf[op->size];
+
+ src = reg8toint(args[0]);
+ dst = reg8toint(args[1]);
+ memcpy(buf, op->bytes, op->size - 1);
+ buf[op->size - 1] = addrbyte(REG_MODE, src, dst);
+ emit(buf, op->size);
+}
+
+void
+imm8_reg8(Op *op, Node **args)
+{
+ int src, dst;
+ char buf[op->size];
+
+ src = (*args)->sym->value;
+ dst = reg8toint(args[1]);
+ memcpy(buf, op->bytes, op->size - 2);
+ buf[op->size - 2] = addrbyte(REG_MODE, 0, dst);
+ buf[op->size - 1] = src;
+ emit(buf, op->size);
+}
+
+
+void
+reg16_reg16(Op *op, Node **args)
+{
+ int src, dst;
+ char buf[op->size];
+
+ src = reg16toint(args[0]);
+ dst = reg16toint(args[1]);
+ memcpy(buf, op->bytes, op->size - 1);
+ buf[op->size - 1] = addrbyte(REG_MODE, src, dst);
+ emit(buf, op->size);
+}
+
+
+void
+reg32_reg32(Op *op, Node **args)
+{
+ int src, dst;
+ char buf[op->size];
+
+ src = reg32toint(args[0]);
+ dst = reg32toint(args[1]);
+ memcpy(buf, op->bytes, op->size - 1);
+ buf[op->size - 1] = addrbyte(REG_MODE, src, dst);
+ emit(buf, op->size);
+}
--- /dev/null
+++ b/src/cmd/as/target/x86/nasm.dat
@@ -1,0 +1,5313 @@
+;; --------------------------------------------------------------------------
+;;
+;; Copyright 1996-2017 The NASM Authors - All Rights Reserved
+;; See the file AUTHORS included with the NASM distribution for
+;; the specific copyright holders.
+;;
+;; Redistribution and use in source and binary forms, with or without
+;; modification, are permitted provided that the following
+;; conditions are met:
+;;
+;; * Redistributions of source code must retain the above copyright
+;; notice, this list of conditions and the following disclaimer.
+;; * Redistributions in binary form must reproduce the above
+;; copyright notice, this list of conditions and the following
+;; disclaimer in the documentation and/or other materials provided
+;; with the distribution.
+;;
+;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+;; CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+;; INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+;; MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+;; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+;; CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+;; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+;; NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+;; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+;; HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+;; CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+;; OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+;; EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+;;
+;; --------------------------------------------------------------------------
+
+;
+; insns.dat table of instructions for the Netwide Assembler
+;
+; Format of file: All four fields must be present on every functional
+; line. Hence `void' for no-operand instructions, and `\0' for such
+; as EQU. If the last three fields are all `ignore', no action is
+; taken except to register the opcode as being present.
+;
+; For a detailed description of the code string (third field), please
+; see insns.pl and the comment at the top of assemble.c. For a detailed
+; description of the flags (fourth field), please see insns-iflags.ph.
+;
+; Comments with a pound sign after the semicolon generate section
+; subheaders in the NASM documentation.
+;
+
+;# Special instructions (pseudo-ops)
+; These MUST be first in this file and must maintain the pattern of
+; Dx by size, RESx by size, and INCBIN in that order.
+DT ignore ignore ignore
+DO ignore ignore ignore
+DY ignore ignore ignore
+DZ ignore ignore ignore
+RESB imm [ resb] 8086
+RESW ignore ignore ignore
+RESD ignore ignore ignore
+RESQ ignore ignore ignore
+REST ignore ignore ignore
+RESO ignore ignore ignore
+RESY ignore ignore ignore
+RESZ ignore ignore ignore
+INCBIN ignore ignore ignore
+
+;# Conventional instructions
+AAA void [ 37] 8086,NOLONG
+AAD void [ d5 0a] 8086,NOLONG
+AAD imm [i: d5 ib,u] 8086,SB,NOLONG
+AAM void [ d4 0a] 8086,NOLONG
+AAM imm [i: d4 ib,u] 8086,SB,NOLONG
+AAS void [ 3f] 8086,NOLONG
+ADC mem,reg8 [mr: hle 10 /r] 8086,SM,LOCK
+ADC reg8,reg8 [mr: 10 /r] 8086
+ADC mem,reg16 [mr: hle o16 11 /r] 8086,SM,LOCK
+ADC reg16,reg16 [mr: o16 11 /r] 8086
+ADC mem,reg32 [mr: hle o32 11 /r] 386,SM,LOCK
+ADC reg32,reg32 [mr: o32 11 /r] 386
+ADC mem,reg64 [mr: hle o64 11 /r] X64,SM,LOCK
+ADC reg64,reg64 [mr: o64 11 /r] X64
+ADC reg8,mem [rm: 12 /r] 8086,SM
+ADC reg8,reg8 [rm: 12 /r] 8086
+ADC reg16,mem [rm: o16 13 /r] 8086,SM
+ADC reg16,reg16 [rm: o16 13 /r] 8086
+ADC reg32,mem [rm: o32 13 /r] 386,SM
+ADC reg32,reg32 [rm: o32 13 /r] 386
+ADC reg64,mem [rm: o64 13 /r] X64,SM
+ADC reg64,reg64 [rm: o64 13 /r] X64
+ADC rm16,imm8 [mi: hle o16 83 /2 ib,s] 8086,LOCK
+ADC rm32,imm8 [mi: hle o32 83 /2 ib,s] 386,LOCK
+ADC rm64,imm8 [mi: hle o64 83 /2 ib,s] X64,LOCK
+ADC reg_al,imm [-i: 14 ib] 8086,SM
+ADC reg_ax,sbyteword [mi: o16 83 /2 ib,s] 8086,SM,ND
+ADC reg_ax,imm [-i: o16 15 iw] 8086,SM
+ADC reg_eax,sbytedword [mi: o32 83 /2 ib,s] 386,SM,ND
+ADC reg_eax,imm [-i: o32 15 id] 386,SM
+ADC reg_rax,sbytedword [mi: o64 83 /2 ib,s] X64,SM,ND
+ADC reg_rax,imm [-i: o64 15 id,s] X64,SM
+ADC rm8,imm [mi: hle 80 /2 ib] 8086,SM,LOCK
+ADC rm16,sbyteword [mi: hle o16 83 /2 ib,s] 8086,SM,LOCK,ND
+ADC rm16,imm [mi: hle o16 81 /2 iw] 8086,SM,LOCK
+ADC rm32,sbytedword [mi: hle o32 83 /2 ib,s] 386,SM,LOCK,ND
+ADC rm32,imm [mi: hle o32 81 /2 id] 386,SM,LOCK
+ADC rm64,sbytedword [mi: hle o64 83 /2 ib,s] X64,SM,LOCK,ND
+ADC rm64,imm [mi: hle o64 81 /2 id,s] X64,SM,LOCK
+ADC mem,imm8 [mi: hle 80 /2 ib] 8086,SM,LOCK,ND
+ADC mem,sbyteword16 [mi: hle o16 83 /2 ib,s] 8086,SM,LOCK,ND
+ADC mem,imm16 [mi: hle o16 81 /2 iw] 8086,SM,LOCK
+ADC mem,sbytedword32 [mi: hle o32 83 /2 ib,s] 386,SM,LOCK,ND
+ADC mem,imm32 [mi: hle o32 81 /2 id] 386,SM,LOCK
+ADC rm8,imm [mi: hle 82 /2 ib] 8086,SM,LOCK,ND,NOLONG
+ADD mem,reg8 [mr: hle 00 /r] 8086,SM,LOCK
+ADD reg8,reg8 [mr: 00 /r] 8086
+ADD mem,reg16 [mr: hle o16 01 /r] 8086,SM,LOCK
+ADD reg16,reg16 [mr: o16 01 /r] 8086
+ADD mem,reg32 [mr: hle o32 01 /r] 386,SM,LOCK
+ADD reg32,reg32 [mr: o32 01 /r] 386
+ADD mem,reg64 [mr: hle o64 01 /r] X64,SM,LOCK
+ADD reg64,reg64 [mr: o64 01 /r] X64
+ADD reg8,mem [rm: 02 /r] 8086,SM
+ADD reg8,reg8 [rm: 02 /r] 8086
+ADD reg16,mem [rm: o16 03 /r] 8086,SM
+ADD reg16,reg16 [rm: o16 03 /r] 8086
+ADD reg32,mem [rm: o32 03 /r] 386,SM
+ADD reg32,reg32 [rm: o32 03 /r] 386
+ADD reg64,mem [rm: o64 03 /r] X64,SM
+ADD reg64,reg64 [rm: o64 03 /r] X64
+ADD rm16,imm8 [mi: hle o16 83 /0 ib,s] 8086,LOCK
+ADD rm32,imm8 [mi: hle o32 83 /0 ib,s] 386,LOCK
+ADD rm64,imm8 [mi: hle o64 83 /0 ib,s] X64,LOCK
+ADD reg_al,imm [-i: 04 ib] 8086,SM
+ADD reg_ax,sbyteword [mi: o16 83 /0 ib,s] 8086,SM,ND
+ADD reg_ax,imm [-i: o16 05 iw] 8086,SM
+ADD reg_eax,sbytedword [mi: o32 83 /0 ib,s] 386,SM,ND
+ADD reg_eax,imm [-i: o32 05 id] 386,SM
+ADD reg_rax,sbytedword [mi: o64 83 /0 ib,s] X64,SM,ND
+ADD reg_rax,imm [-i: o64 05 id,s] X64,SM
+ADD rm8,imm [mi: hle 80 /0 ib] 8086,SM,LOCK
+ADD rm16,sbyteword [mi: hle o16 83 /0 ib,s] 8086,SM,LOCK,ND
+ADD rm16,imm [mi: hle o16 81 /0 iw] 8086,SM,LOCK
+ADD rm32,sbytedword [mi: hle o32 83 /0 ib,s] 386,SM,LOCK,ND
+ADD rm32,imm [mi: hle o32 81 /0 id] 386,SM,LOCK
+ADD rm64,sbytedword [mi: hle o64 83 /0 ib,s] X64,SM,LOCK,ND
+ADD rm64,imm [mi: hle o64 81 /0 id,s] X64,SM,LOCK
+ADD mem,imm8 [mi: hle 80 /0 ib] 8086,SM,LOCK
+ADD mem,sbyteword16 [mi: hle o16 83 /0 ib,s] 8086,SM,LOCK,ND
+ADD mem,imm16 [mi: hle o16 81 /0 iw] 8086,SM,LOCK
+ADD mem,sbytedword32 [mi: hle o32 83 /0 ib,s] 386,SM,LOCK,ND
+ADD mem,imm32 [mi: hle o32 81 /0 id] 386,SM,LOCK
+ADD rm8,imm [mi: hle 82 /0 ib] 8086,SM,LOCK,ND,NOLONG
+AND mem,reg8 [mr: hle 20 /r] 8086,SM,LOCK
+AND reg8,reg8 [mr: 20 /r] 8086
+AND mem,reg16 [mr: hle o16 21 /r] 8086,SM,LOCK
+AND reg16,reg16 [mr: o16 21 /r] 8086
+AND mem,reg32 [mr: hle o32 21 /r] 386,SM,LOCK
+AND reg32,reg32 [mr: o32 21 /r] 386
+AND mem,reg64 [mr: hle o64 21 /r] X64,SM,LOCK
+AND reg64,reg64 [mr: o64 21 /r] X64
+AND reg8,mem [rm: 22 /r] 8086,SM
+AND reg8,reg8 [rm: 22 /r] 8086
+AND reg16,mem [rm: o16 23 /r] 8086,SM
+AND reg16,reg16 [rm: o16 23 /r] 8086
+AND reg32,mem [rm: o32 23 /r] 386,SM
+AND reg32,reg32 [rm: o32 23 /r] 386
+AND reg64,mem [rm: o64 23 /r] X64,SM
+AND reg64,reg64 [rm: o64 23 /r] X64
+AND rm16,imm8 [mi: hle o16 83 /4 ib,s] 8086,LOCK
+AND rm32,imm8 [mi: hle o32 83 /4 ib,s] 386,LOCK
+AND rm64,imm8 [mi: hle o64 83 /4 ib,s] X64,LOCK
+AND reg_al,imm [-i: 24 ib] 8086,SM
+AND reg_ax,sbyteword [mi: o16 83 /4 ib,s] 8086,SM,ND
+AND reg_ax,imm [-i: o16 25 iw] 8086,SM
+AND reg_eax,sbytedword [mi: o32 83 /4 ib,s] 386,SM,ND
+AND reg_eax,imm [-i: o32 25 id] 386,SM
+AND reg_rax,sbytedword [mi: o64 83 /4 ib,s] X64,SM,ND
+AND reg_rax,imm [-i: o64 25 id,s] X64,SM
+AND rm8,imm [mi: hle 80 /4 ib] 8086,SM,LOCK
+AND rm16,sbyteword [mi: hle o16 83 /4 ib,s] 8086,SM,LOCK,ND
+AND rm16,imm [mi: hle o16 81 /4 iw] 8086,SM,LOCK
+AND rm32,sbytedword [mi: hle o32 83 /4 ib,s] 386,SM,LOCK,ND
+AND rm32,imm [mi: hle o32 81 /4 id] 386,SM,LOCK
+AND rm64,sbytedword [mi: hle o64 83 /4 ib,s] X64,SM,LOCK,ND
+AND rm64,imm [mi: hle o64 81 /4 id,s] X64,SM,LOCK
+AND mem,imm8 [mi: hle 80 /4 ib] 8086,SM,LOCK
+AND mem,sbyteword16 [mi: hle o16 83 /4 ib,s] 8086,SM,LOCK,ND
+AND mem,imm16 [mi: hle o16 81 /4 iw] 8086,SM,LOCK
+AND mem,sbytedword32 [mi: hle o32 83 /4 ib,s] 386,SM,LOCK,ND
+AND mem,imm32 [mi: hle o32 81 /4 id] 386,SM,LOCK
+AND rm8,imm [mi: hle 82 /4 ib] 8086,SM,LOCK,ND,NOLONG
+ARPL mem,reg16 [mr: 63 /r] 286,PROT,SM,NOLONG
+ARPL reg16,reg16 [mr: 63 /r] 286,PROT,NOLONG
+BB0_RESET void [ 0f 3a] PENT,CYRIX,ND,OBSOLETE
+BB1_RESET void [ 0f 3b] PENT,CYRIX,ND,OBSOLETE
+BOUND reg16,mem [rm: o16 62 /r] 186,NOLONG
+BOUND reg32,mem [rm: o32 62 /r] 386,NOLONG
+BSF reg16,mem [rm: o16 nof3 0f bc /r] 386,SM
+BSF reg16,reg16 [rm: o16 nof3 0f bc /r] 386
+BSF reg32,mem [rm: o32 nof3 0f bc /r] 386,SM
+BSF reg32,reg32 [rm: o32 nof3 0f bc /r] 386
+BSF reg64,mem [rm: o64 nof3 0f bc /r] X64,SM
+BSF reg64,reg64 [rm: o64 nof3 0f bc /r] X64
+BSR reg16,mem [rm: o16 nof3 0f bd /r] 386,SM
+BSR reg16,reg16 [rm: o16 nof3 0f bd /r] 386
+BSR reg32,mem [rm: o32 nof3 0f bd /r] 386,SM
+BSR reg32,reg32 [rm: o32 nof3 0f bd /r] 386
+BSR reg64,mem [rm: o64 nof3 0f bd /r] X64,SM
+BSR reg64,reg64 [rm: o64 nof3 0f bd /r] X64
+BSWAP reg32 [r: o32 0f c8+r] 486
+BSWAP reg64 [r: o64 0f c8+r] X64
+BT mem,reg16 [mr: o16 0f a3 /r] 386,SM
+BT reg16,reg16 [mr: o16 0f a3 /r] 386
+BT mem,reg32 [mr: o32 0f a3 /r] 386,SM
+BT reg32,reg32 [mr: o32 0f a3 /r] 386
+BT mem,reg64 [mr: o64 0f a3 /r] X64,SM
+BT reg64,reg64 [mr: o64 0f a3 /r] X64
+BT rm16,imm [mi: o16 0f ba /4 ib,u] 386,SB
+BT rm32,imm [mi: o32 0f ba /4 ib,u] 386,SB
+BT rm64,imm [mi: o64 0f ba /4 ib,u] X64,SB
+BTC mem,reg16 [mr: hle o16 0f bb /r] 386,SM,LOCK
+BTC reg16,reg16 [mr: o16 0f bb /r] 386
+BTC mem,reg32 [mr: hle o32 0f bb /r] 386,SM,LOCK
+BTC reg32,reg32 [mr: o32 0f bb /r] 386
+BTC mem,reg64 [mr: hle o64 0f bb /r] X64,SM,LOCK
+BTC reg64,reg64 [mr: o64 0f bb /r] X64
+BTC rm16,imm [mi: hle o16 0f ba /7 ib,u] 386,SB,LOCK
+BTC rm32,imm [mi: hle o32 0f ba /7 ib,u] 386,SB,LOCK
+BTC rm64,imm [mi: hle o64 0f ba /7 ib,u] X64,SB,LOCK
+BTR mem,reg16 [mr: hle o16 0f b3 /r] 386,SM,LOCK
+BTR reg16,reg16 [mr: o16 0f b3 /r] 386
+BTR mem,reg32 [mr: hle o32 0f b3 /r] 386,SM,LOCK
+BTR reg32,reg32 [mr: o32 0f b3 /r] 386
+BTR mem,reg64 [mr: hle o64 0f b3 /r] X64,SM,LOCK
+BTR reg64,reg64 [mr: o64 0f b3 /r] X64
+BTR rm16,imm [mi: hle o16 0f ba /6 ib,u] 386,SB,LOCK
+BTR rm32,imm [mi: hle o32 0f ba /6 ib,u] 386,SB,LOCK
+BTR rm64,imm [mi: hle o64 0f ba /6 ib,u] X64,SB,LOCK
+BTS mem,reg16 [mr: hle o16 0f ab /r] 386,SM,LOCK
+BTS reg16,reg16 [mr: o16 0f ab /r] 386
+BTS mem,reg32 [mr: hle o32 0f ab /r] 386,SM,LOCK
+BTS reg32,reg32 [mr: o32 0f ab /r] 386
+BTS mem,reg64 [mr: hle o64 0f ab /r] X64,SM,LOCK
+BTS reg64,reg64 [mr: o64 0f ab /r] X64
+BTS rm16,imm [mi: hle o16 0f ba /5 ib,u] 386,SB,LOCK
+BTS rm32,imm [mi: hle o32 0f ba /5 ib,u] 386,SB,LOCK
+BTS rm64,imm [mi: hle o64 0f ba /5 ib,u] X64,SB,LOCK
+CALL imm [i: odf e8 rel] 8086,BND
+CALL imm|near [i: odf e8 rel] 8086,ND,BND
+CALL imm|far [i: odf 9a iwd seg] 8086,ND,NOLONG
+; Call/jmp near imm/reg/mem is always 64-bit in long mode.
+CALL imm16 [i: o16 e8 rel] 8086,NOLONG,BND
+CALL imm16|near [i: o16 e8 rel] 8086,ND,NOLONG,BND
+CALL imm16|far [i: o16 9a iwd seg] 8086,ND,NOLONG
+CALL imm32 [i: o32 e8 rel] 386,NOLONG,BND
+CALL imm32|near [i: o32 e8 rel] 386,ND,NOLONG,BND
+CALL imm32|far [i: o32 9a iwd seg] 386,ND,NOLONG
+CALL imm64 [i: o64nw e8 rel] X64,BND
+CALL imm64|near [i: o64nw e8 rel] X64,ND,BND
+CALL imm:imm [ji: odf 9a iwd iw] 8086,NOLONG
+CALL imm16:imm [ji: o16 9a iw iw] 8086,NOLONG
+CALL imm:imm16 [ji: o16 9a iw iw] 8086,NOLONG
+CALL imm32:imm [ji: o32 9a id iw] 386,NOLONG
+CALL imm:imm32 [ji: o32 9a id iw] 386,NOLONG
+CALL mem|far [m: odf ff /3] 8086,NOLONG
+CALL mem|far [m: o64 ff /3] X64
+CALL mem16|far [m: o16 ff /3] 8086
+CALL mem32|far [m: o32 ff /3] 386
+CALL mem64|far [m: o64 ff /3] X64
+CALL mem|near [m: odf ff /2] 8086,ND,BND
+CALL rm16|near [m: o16 ff /2] 8086,NOLONG,ND,BND
+CALL rm32|near [m: o32 ff /2] 386,NOLONG,ND,BND
+CALL rm64|near [m: o64nw ff /2] X64,ND,BND
+CALL mem [m: odf ff /2] 8086,BND
+CALL rm16 [m: o16 ff /2] 8086,NOLONG,BND
+CALL rm32 [m: o32 ff /2] 386,NOLONG,BND
+CALL rm64 [m: o64nw ff /2] X64,BND
+
+CBW void [ o16 98] 8086
+CDQ void [ o32 99] 386
+CDQE void [ o64 98] X64
+CLC void [ f8] 8086
+CLD void [ fc] 8086
+CLI void [ fa] 8086
+CLTS void [ 0f 06] 286,PRIV
+CMC void [ f5] 8086
+CMP mem,reg8 [mr: 38 /r] 8086,SM
+CMP reg8,reg8 [mr: 38 /r] 8086
+CMP mem,reg16 [mr: o16 39 /r] 8086,SM
+CMP reg16,reg16 [mr: o16 39 /r] 8086
+CMP mem,reg32 [mr: o32 39 /r] 386,SM
+CMP reg32,reg32 [mr: o32 39 /r] 386
+CMP mem,reg64 [mr: o64 39 /r] X64,SM
+CMP reg64,reg64 [mr: o64 39 /r] X64
+CMP reg8,mem [rm: 3a /r] 8086,SM
+CMP reg8,reg8 [rm: 3a /r] 8086
+CMP reg16,mem [rm: o16 3b /r] 8086,SM
+CMP reg16,reg16 [rm: o16 3b /r] 8086
+CMP reg32,mem [rm: o32 3b /r] 386,SM
+CMP reg32,reg32 [rm: o32 3b /r] 386
+CMP reg64,mem [rm: o64 3b /r] X64,SM
+CMP reg64,reg64 [rm: o64 3b /r] X64
+CMP rm16,imm8 [mi: o16 83 /7 ib,s] 8086
+CMP rm32,imm8 [mi: o32 83 /7 ib,s] 386
+CMP rm64,imm8 [mi: o64 83 /7 ib,s] X64
+CMP reg_al,imm [-i: 3c ib] 8086,SM
+CMP reg_ax,sbyteword [mi: o16 83 /7 ib,s] 8086,SM,ND
+CMP reg_ax,imm [-i: o16 3d iw] 8086,SM
+CMP reg_eax,sbytedword [mi: o32 83 /7 ib,s] 386,SM,ND
+CMP reg_eax,imm [-i: o32 3d id] 386,SM
+CMP reg_rax,sbytedword [mi: o64 83 /7 ib,s] X64,SM,ND
+CMP reg_rax,imm [-i: o64 3d id,s] X64,SM
+CMP rm8,imm [mi: 80 /7 ib] 8086,SM
+CMP rm16,sbyteword [mi: o16 83 /7 ib,s] 8086,SM,ND
+CMP rm16,imm [mi: o16 81 /7 iw] 8086,SM
+CMP rm32,sbytedword [mi: o32 83 /7 ib,s] 386,SM,ND
+CMP rm32,imm [mi: o32 81 /7 id] 386,SM
+CMP rm64,sbytedword [mi: o64 83 /7 ib,s] X64,SM,ND
+CMP rm64,imm [mi: o64 81 /7 id,s] X64,SM
+CMP mem,imm8 [mi: 80 /7 ib] 8086,SM
+CMP mem,sbyteword16 [mi: o16 83 /7 ib,s] 8086,SM,ND
+CMP mem,imm16 [mi: o16 81 /7 iw] 8086,SM
+CMP mem,sbytedword32 [mi: o32 83 /7 ib,s] 386,SM,ND
+CMP mem,imm32 [mi: o32 81 /7 id] 386,SM
+CMP rm8,imm [mi: 82 /7 ib] 8086,SM,ND,NOLONG
+CMPSB void [ repe a6] 8086
+CMPSD void [ repe o32 a7] 386
+CMPSQ void [ repe o64 a7] X64
+CMPSW void [ repe o16 a7] 8086
+CMPXCHG mem,reg8 [mr: hle 0f b0 /r] PENT,SM,LOCK
+CMPXCHG reg8,reg8 [mr: 0f b0 /r] PENT
+CMPXCHG mem,reg16 [mr: hle o16 0f b1 /r] PENT,SM,LOCK
+CMPXCHG reg16,reg16 [mr: o16 0f b1 /r] PENT
+CMPXCHG mem,reg32 [mr: hle o32 0f b1 /r] PENT,SM,LOCK
+CMPXCHG reg32,reg32 [mr: o32 0f b1 /r] PENT
+CMPXCHG mem,reg64 [mr: hle o64 0f b1 /r] X64,SM,LOCK
+CMPXCHG reg64,reg64 [mr: o64 0f b1 /r] X64
+CMPXCHG486 mem,reg8 [mr: 0f a6 /r] 486,SM,UNDOC,ND,LOCK,OBSOLETE
+CMPXCHG486 reg8,reg8 [mr: 0f a6 /r] 486,UNDOC,ND,OBSOLETE
+CMPXCHG486 mem,reg16 [mr: o16 0f a7 /r] 486,SM,UNDOC,ND,LOCK,OBSOLETE
+CMPXCHG486 reg16,reg16 [mr: o16 0f a7 /r] 486,UNDOC,ND,OBSOLETE
+CMPXCHG486 mem,reg32 [mr: o32 0f a7 /r] 486,SM,UNDOC,ND,LOCK,OBSOLETE
+CMPXCHG486 reg32,reg32 [mr: o32 0f a7 /r] 486,UNDOC,ND,OBSOLETE
+CMPXCHG8B mem [m: hle norexw 0f c7 /1] PENT,LOCK
+CMPXCHG16B mem [m: o64 0f c7 /1] X64,LOCK
+CPUID void [ 0f a2] PENT
+CPU_READ void [ 0f 3d] PENT,CYRIX
+CPU_WRITE void [ 0f 3c] PENT,CYRIX
+CQO void [ o64 99] X64
+CWD void [ o16 99] 8086
+CWDE void [ o32 98] 386
+DAA void [ 27] 8086,NOLONG
+DAS void [ 2f] 8086,NOLONG
+DEC reg16 [r: o16 48+r] 8086,NOLONG
+DEC reg32 [r: o32 48+r] 386,NOLONG
+DEC rm8 [m: hle fe /1] 8086,LOCK
+DEC rm16 [m: hle o16 ff /1] 8086,LOCK
+DEC rm32 [m: hle o32 ff /1] 386,LOCK
+DEC rm64 [m: hle o64 ff /1] X64,LOCK
+DIV rm8 [m: f6 /6] 8086
+DIV rm16 [m: o16 f7 /6] 8086
+DIV rm32 [m: o32 f7 /6] 386
+DIV rm64 [m: o64 f7 /6] X64
+DMINT void [ 0f 39] P6,CYRIX
+EMMS void [ 0f 77] PENT,MMX
+ENTER imm,imm [ij: c8 iw ib,u] 186
+EQU imm ignore 8086
+EQU imm:imm ignore 8086
+F2XM1 void [ d9 f0] 8086,FPU
+FABS void [ d9 e1] 8086,FPU
+FADD mem32 [m: d8 /0] 8086,FPU
+FADD mem64 [m: dc /0] 8086,FPU
+FADD fpureg|to [r: dc c0+r] 8086,FPU
+FADD fpureg [r: d8 c0+r] 8086,FPU
+FADD fpureg,fpu0 [r-: dc c0+r] 8086,FPU
+FADD fpu0,fpureg [-r: d8 c0+r] 8086,FPU
+FADD void [ de c1] 8086,FPU,ND
+FADDP fpureg [r: de c0+r] 8086,FPU
+FADDP fpureg,fpu0 [r-: de c0+r] 8086,FPU
+FADDP void [ de c1] 8086,FPU,ND
+FBLD mem80 [m: df /4] 8086,FPU
+FBLD mem [m: df /4] 8086,FPU
+FBSTP mem80 [m: df /6] 8086,FPU
+FBSTP mem [m: df /6] 8086,FPU
+FCHS void [ d9 e0] 8086,FPU
+FCLEX void [ wait db e2] 8086,FPU
+FCMOVB fpureg [r: da c0+r] P6,FPU
+FCMOVB fpu0,fpureg [-r: da c0+r] P6,FPU
+FCMOVB void [ da c1] P6,FPU,ND
+FCMOVBE fpureg [r: da d0+r] P6,FPU
+FCMOVBE fpu0,fpureg [-r: da d0+r] P6,FPU
+FCMOVBE void [ da d1] P6,FPU,ND
+FCMOVE fpureg [r: da c8+r] P6,FPU
+FCMOVE fpu0,fpureg [-r: da c8+r] P6,FPU
+FCMOVE void [ da c9] P6,FPU,ND
+FCMOVNB fpureg [r: db c0+r] P6,FPU
+FCMOVNB fpu0,fpureg [-r: db c0+r] P6,FPU
+FCMOVNB void [ db c1] P6,FPU,ND
+FCMOVNBE fpureg [r: db d0+r] P6,FPU
+FCMOVNBE fpu0,fpureg [-r: db d0+r] P6,FPU
+FCMOVNBE void [ db d1] P6,FPU,ND
+FCMOVNE fpureg [r: db c8+r] P6,FPU
+FCMOVNE fpu0,fpureg [-r: db c8+r] P6,FPU
+FCMOVNE void [ db c9] P6,FPU,ND
+FCMOVNU fpureg [r: db d8+r] P6,FPU
+FCMOVNU fpu0,fpureg [-r: db d8+r] P6,FPU
+FCMOVNU void [ db d9] P6,FPU,ND
+FCMOVU fpureg [r: da d8+r] P6,FPU
+FCMOVU fpu0,fpureg [-r: da d8+r] P6,FPU
+FCMOVU void [ da d9] P6,FPU,ND
+FCOM mem32 [m: d8 /2] 8086,FPU
+FCOM mem64 [m: dc /2] 8086,FPU
+FCOM fpureg [r: d8 d0+r] 8086,FPU
+FCOM fpu0,fpureg [-r: d8 d0+r] 8086,FPU
+FCOM void [ d8 d1] 8086,FPU,ND
+FCOMI fpureg [r: db f0+r] P6,FPU
+FCOMI fpu0,fpureg [-r: db f0+r] P6,FPU
+FCOMI void [ db f1] P6,FPU,ND
+FCOMIP fpureg [r: df f0+r] P6,FPU
+FCOMIP fpu0,fpureg [-r: df f0+r] P6,FPU
+FCOMIP void [ df f1] P6,FPU,ND
+FCOMP mem32 [m: d8 /3] 8086,FPU
+FCOMP mem64 [m: dc /3] 8086,FPU
+FCOMP fpureg [r: d8 d8+r] 8086,FPU
+FCOMP fpu0,fpureg [-r: d8 d8+r] 8086,FPU
+FCOMP void [ d8 d9] 8086,FPU,ND
+FCOMPP void [ de d9] 8086,FPU
+FCOS void [ d9 ff] 386,FPU
+FDECSTP void [ d9 f6] 8086,FPU
+FDISI void [ wait db e1] 8086,FPU
+FDIV mem32 [m: d8 /6] 8086,FPU
+FDIV mem64 [m: dc /6] 8086,FPU
+FDIV fpureg|to [r: dc f8+r] 8086,FPU
+FDIV fpureg [r: d8 f0+r] 8086,FPU
+FDIV fpureg,fpu0 [r-: dc f8+r] 8086,FPU
+FDIV fpu0,fpureg [-r: d8 f0+r] 8086,FPU
+FDIV void [ de f9] 8086,FPU,ND
+FDIVP fpureg [r: de f8+r] 8086,FPU
+FDIVP fpureg,fpu0 [r-: de f8+r] 8086,FPU
+FDIVP void [ de f9] 8086,FPU,ND
+FDIVR mem32 [m: d8 /7] 8086,FPU
+FDIVR mem64 [m: dc /7] 8086,FPU
+FDIVR fpureg|to [r: dc f0+r] 8086,FPU
+FDIVR fpureg,fpu0 [r-: dc f0+r] 8086,FPU
+FDIVR fpureg [r: d8 f8+r] 8086,FPU
+FDIVR fpu0,fpureg [-r: d8 f8+r] 8086,FPU
+FDIVR void [ de f1] 8086,FPU,ND
+FDIVRP fpureg [r: de f0+r] 8086,FPU
+FDIVRP fpureg,fpu0 [r-: de f0+r] 8086,FPU
+FDIVRP void [ de f1] 8086,FPU,ND
+FEMMS void [ 0f 0e] PENT,3DNOW
+FENI void [ wait db e0] 8086,FPU
+FFREE fpureg [r: dd c0+r] 8086,FPU
+FFREE void [ dd c1] 8086,FPU
+FFREEP fpureg [r: df c0+r] 286,FPU,UNDOC
+FFREEP void [ df c1] 286,FPU,UNDOC
+FIADD mem32 [m: da /0] 8086,FPU
+FIADD mem16 [m: de /0] 8086,FPU
+FICOM mem32 [m: da /2] 8086,FPU
+FICOM mem16 [m: de /2] 8086,FPU
+FICOMP mem32 [m: da /3] 8086,FPU
+FICOMP mem16 [m: de /3] 8086,FPU
+FIDIV mem32 [m: da /6] 8086,FPU
+FIDIV mem16 [m: de /6] 8086,FPU
+FIDIVR mem32 [m: da /7] 8086,FPU
+FIDIVR mem16 [m: de /7] 8086,FPU
+FILD mem32 [m: db /0] 8086,FPU
+FILD mem16 [m: df /0] 8086,FPU
+FILD mem64 [m: df /5] 8086,FPU
+FIMUL mem32 [m: da /1] 8086,FPU
+FIMUL mem16 [m: de /1] 8086,FPU
+FINCSTP void [ d9 f7] 8086,FPU
+FINIT void [ wait db e3] 8086,FPU
+FIST mem32 [m: db /2] 8086,FPU
+FIST mem16 [m: df /2] 8086,FPU
+FISTP mem32 [m: db /3] 8086,FPU
+FISTP mem16 [m: df /3] 8086,FPU
+FISTP mem64 [m: df /7] 8086,FPU
+FISTTP mem16 [m: df /1] PRESCOTT,FPU
+FISTTP mem32 [m: db /1] PRESCOTT,FPU
+FISTTP mem64 [m: dd /1] PRESCOTT,FPU
+FISUB mem32 [m: da /4] 8086,FPU
+FISUB mem16 [m: de /4] 8086,FPU
+FISUBR mem32 [m: da /5] 8086,FPU
+FISUBR mem16 [m: de /5] 8086,FPU
+FLD mem32 [m: d9 /0] 8086,FPU
+FLD mem64 [m: dd /0] 8086,FPU
+FLD mem80 [m: db /5] 8086,FPU
+FLD fpureg [r: d9 c0+r] 8086,FPU
+FLD void [ d9 c1] 8086,FPU,ND
+FLD1 void [ d9 e8] 8086,FPU
+FLDCW mem [m: d9 /5] 8086,FPU,SW
+FLDENV mem [m: d9 /4] 8086,FPU
+FLDL2E void [ d9 ea] 8086,FPU
+FLDL2T void [ d9 e9] 8086,FPU
+FLDLG2 void [ d9 ec] 8086,FPU
+FLDLN2 void [ d9 ed] 8086,FPU
+FLDPI void [ d9 eb] 8086,FPU
+FLDZ void [ d9 ee] 8086,FPU
+FMUL mem32 [m: d8 /1] 8086,FPU
+FMUL mem64 [m: dc /1] 8086,FPU
+FMUL fpureg|to [r: dc c8+r] 8086,FPU
+FMUL fpureg,fpu0 [r-: dc c8+r] 8086,FPU
+FMUL fpureg [r: d8 c8+r] 8086,FPU
+FMUL fpu0,fpureg [-r: d8 c8+r] 8086,FPU
+FMUL void [ de c9] 8086,FPU,ND
+FMULP fpureg [r: de c8+r] 8086,FPU
+FMULP fpureg,fpu0 [r-: de c8+r] 8086,FPU
+FMULP void [ de c9] 8086,FPU,ND
+FNCLEX void [ db e2] 8086,FPU
+FNDISI void [ db e1] 8086,FPU
+FNENI void [ db e0] 8086,FPU
+FNINIT void [ db e3] 8086,FPU
+FNOP void [ d9 d0] 8086,FPU
+FNSAVE mem [m: dd /6] 8086,FPU
+FNSTCW mem [m: d9 /7] 8086,FPU,SW
+FNSTENV mem [m: d9 /6] 8086,FPU
+FNSTSW mem [m: dd /7] 8086,FPU,SW
+FNSTSW reg_ax [-: df e0] 286,FPU
+FPATAN void [ d9 f3] 8086,FPU
+FPREM void [ d9 f8] 8086,FPU
+FPREM1 void [ d9 f5] 386,FPU
+FPTAN void [ d9 f2] 8086,FPU
+FRNDINT void [ d9 fc] 8086,FPU
+FRSTOR mem [m: dd /4] 8086,FPU
+FSAVE mem [m: wait dd /6] 8086,FPU
+FSCALE void [ d9 fd] 8086,FPU
+FSETPM void [ db e4] 286,FPU
+FSIN void [ d9 fe] 386,FPU
+FSINCOS void [ d9 fb] 386,FPU
+FSQRT void [ d9 fa] 8086,FPU
+FST mem32 [m: d9 /2] 8086,FPU
+FST mem64 [m: dd /2] 8086,FPU
+FST fpureg [r: dd d0+r] 8086,FPU
+FST void [ dd d1] 8086,FPU,ND
+FSTCW mem [m: wait d9 /7] 8086,FPU,SW
+FSTENV mem [m: wait d9 /6] 8086,FPU
+FSTP mem32 [m: d9 /3] 8086,FPU
+FSTP mem64 [m: dd /3] 8086,FPU
+FSTP mem80 [m: db /7] 8086,FPU
+FSTP fpureg [r: dd d8+r] 8086,FPU
+FSTP void [ dd d9] 8086,FPU,ND
+FSTSW mem [m: wait dd /7] 8086,FPU,SW
+FSTSW reg_ax [-: wait df e0] 286,FPU
+FSUB mem32 [m: d8 /4] 8086,FPU
+FSUB mem64 [m: dc /4] 8086,FPU
+FSUB fpureg|to [r: dc e8+r] 8086,FPU
+FSUB fpureg,fpu0 [r-: dc e8+r] 8086,FPU
+FSUB fpureg [r: d8 e0+r] 8086,FPU
+FSUB fpu0,fpureg [-r: d8 e0+r] 8086,FPU
+FSUB void [ de e9] 8086,FPU,ND
+FSUBP fpureg [r: de e8+r] 8086,FPU
+FSUBP fpureg,fpu0 [r-: de e8+r] 8086,FPU
+FSUBP void [ de e9] 8086,FPU,ND
+FSUBR mem32 [m: d8 /5] 8086,FPU
+FSUBR mem64 [m: dc /5] 8086,FPU
+FSUBR fpureg|to [r: dc e0+r] 8086,FPU
+FSUBR fpureg,fpu0 [r-: dc e0+r] 8086,FPU
+FSUBR fpureg [r: d8 e8+r] 8086,FPU
+FSUBR fpu0,fpureg [-r: d8 e8+r] 8086,FPU
+FSUBR void [ de e1] 8086,FPU,ND
+FSUBRP fpureg [r: de e0+r] 8086,FPU
+FSUBRP fpureg,fpu0 [r-: de e0+r] 8086,FPU
+FSUBRP void [ de e1] 8086,FPU,ND
+FTST void [ d9 e4] 8086,FPU
+FUCOM fpureg [r: dd e0+r] 386,FPU
+FUCOM fpu0,fpureg [-r: dd e0+r] 386,FPU
+FUCOM void [ dd e1] 386,FPU,ND
+FUCOMI fpureg [r: db e8+r] P6,FPU
+FUCOMI fpu0,fpureg [-r: db e8+r] P6,FPU
+FUCOMI void [ db e9] P6,FPU,ND
+FUCOMIP fpureg [r: df e8+r] P6,FPU
+FUCOMIP fpu0,fpureg [-r: df e8+r] P6,FPU
+FUCOMIP void [ df e9] P6,FPU,ND
+FUCOMP fpureg [r: dd e8+r] 386,FPU
+FUCOMP fpu0,fpureg [-r: dd e8+r] 386,FPU
+FUCOMP void [ dd e9] 386,FPU,ND
+FUCOMPP void [ da e9] 386,FPU
+FXAM void [ d9 e5] 8086,FPU
+FXCH fpureg [r: d9 c8+r] 8086,FPU
+FXCH fpureg,fpu0 [r-: d9 c8+r] 8086,FPU
+FXCH fpu0,fpureg [-r: d9 c8+r] 8086,FPU
+FXCH void [ d9 c9] 8086,FPU,ND
+FXTRACT void [ d9 f4] 8086,FPU
+FYL2X void [ d9 f1] 8086,FPU
+FYL2XP1 void [ d9 f9] 8086,FPU
+HLT void [ f4] 8086,PRIV
+IBTS mem,reg16 [mr: o16 0f a7 /r] 386,SW,UNDOC,ND,OBSOLETE
+IBTS reg16,reg16 [mr: o16 0f a7 /r] 386,UNDOC,ND,OBSOLETE
+IBTS mem,reg32 [mr: o32 0f a7 /r] 386,SD,UNDOC,ND,OBSOLETE
+IBTS reg32,reg32 [mr: o32 0f a7 /r] 386,UNDOC,ND,OBSOLETE
+ICEBP void [ f1] 386,ND
+IDIV rm8 [m: f6 /7] 8086
+IDIV rm16 [m: o16 f7 /7] 8086
+IDIV rm32 [m: o32 f7 /7] 386
+IDIV rm64 [m: o64 f7 /7] X64
+IMUL rm8 [m: f6 /5] 8086
+IMUL rm16 [m: o16 f7 /5] 8086
+IMUL rm32 [m: o32 f7 /5] 386
+IMUL rm64 [m: o64 f7 /5] X64
+IMUL reg16,mem [rm: o16 0f af /r] 386,SM
+IMUL reg16,reg16 [rm: o16 0f af /r] 386
+IMUL reg32,mem [rm: o32 0f af /r] 386,SM
+IMUL reg32,reg32 [rm: o32 0f af /r] 386
+IMUL reg64,mem [rm: o64 0f af /r] X64,SM
+IMUL reg64,reg64 [rm: o64 0f af /r] X64
+IMUL reg16,mem,imm8 [rmi: o16 6b /r ib,s] 186,SM
+IMUL reg16,mem,sbyteword [rmi: o16 6b /r ib,s] 186,SM,ND
+IMUL reg16,mem,imm16 [rmi: o16 69 /r iw] 186,SM
+IMUL reg16,mem,imm [rmi: o16 69 /r iw] 186,SM,ND
+IMUL reg16,reg16,imm8 [rmi: o16 6b /r ib,s] 186
+IMUL reg16,reg16,sbyteword [rmi: o16 6b /r ib,s] 186,SM,ND
+IMUL reg16,reg16,imm16 [rmi: o16 69 /r iw] 186
+IMUL reg16,reg16,imm [rmi: o16 69 /r iw] 186,SM,ND
+IMUL reg32,mem,imm8 [rmi: o32 6b /r ib,s] 386,SM
+IMUL reg32,mem,sbytedword [rmi: o32 6b /r ib,s] 386,SM,ND
+IMUL reg32,mem,imm32 [rmi: o32 69 /r id] 386,SM
+IMUL reg32,mem,imm [rmi: o32 69 /r id] 386,SM,ND
+IMUL reg32,reg32,imm8 [rmi: o32 6b /r ib,s] 386
+IMUL reg32,reg32,sbytedword [rmi: o32 6b /r ib,s] 386,SM,ND
+IMUL reg32,reg32,imm32 [rmi: o32 69 /r id] 386
+IMUL reg32,reg32,imm [rmi: o32 69 /r id] 386,SM,ND
+IMUL reg64,mem,imm8 [rmi: o64 6b /r ib,s] X64,SM
+IMUL reg64,mem,sbytedword [rmi: o64 6b /r ib,s] X64,SM,ND
+IMUL reg64,mem,imm32 [rmi: o64 69 /r id] X64,SM
+IMUL reg64,mem,imm [rmi: o64 69 /r id,s] X64,SM,ND
+IMUL reg64,reg64,imm8 [rmi: o64 6b /r ib,s] X64
+IMUL reg64,reg64,sbytedword [rmi: o64 6b /r ib,s] X64,SM,ND
+IMUL reg64,reg64,imm32 [rmi: o64 69 /r id] X64
+IMUL reg64,reg64,imm [rmi: o64 69 /r id,s] X64,SM,ND
+IMUL reg16,imm8 [r+mi: o16 6b /r ib,s] 186
+IMUL reg16,sbyteword [r+mi: o16 6b /r ib,s] 186,SM,ND
+IMUL reg16,imm16 [r+mi: o16 69 /r iw] 186
+IMUL reg16,imm [r+mi: o16 69 /r iw] 186,SM,ND
+IMUL reg32,imm8 [r+mi: o32 6b /r ib,s] 386
+IMUL reg32,sbytedword [r+mi: o32 6b /r ib,s] 386,SM,ND
+IMUL reg32,imm32 [r+mi: o32 69 /r id] 386
+IMUL reg32,imm [r+mi: o32 69 /r id] 386,SM,ND
+IMUL reg64,imm8 [r+mi: o64 6b /r ib,s] X64
+IMUL reg64,sbytedword [r+mi: o64 6b /r ib,s] X64,SM,ND
+IMUL reg64,imm32 [r+mi: o64 69 /r id,s] X64
+IMUL reg64,imm [r+mi: o64 69 /r id,s] X64,SM,ND
+IN reg_al,imm [-i: e4 ib,u] 8086,SB
+IN reg_ax,imm [-i: o16 e5 ib,u] 8086,SB
+IN reg_eax,imm [-i: o32 e5 ib,u] 386,SB
+IN reg_al,reg_dx [--: ec] 8086
+IN reg_ax,reg_dx [--: o16 ed] 8086
+IN reg_eax,reg_dx [--: o32 ed] 386
+INC reg16 [r: o16 40+r] 8086,NOLONG
+INC reg32 [r: o32 40+r] 386,NOLONG
+INC rm8 [m: hle fe /0] 8086,LOCK
+INC rm16 [m: hle o16 ff /0] 8086,LOCK
+INC rm32 [m: hle o32 ff /0] 386,LOCK
+INC rm64 [m: hle o64 ff /0] X64,LOCK
+INSB void [ 6c] 186
+INSD void [ o32 6d] 386
+INSW void [ o16 6d] 186
+INT imm [i: cd ib,u] 8086,SB
+INT01 void [ f1] 386,ND
+INT1 void [ f1] 386
+INT03 void [ cc] 8086,ND
+INT3 void [ cc] 8086
+INTO void [ ce] 8086,NOLONG
+INVD void [ 0f 08] 486,PRIV
+INVPCID reg32,mem128 [rm: 66 0f 38 82 /r] FUTURE,INVPCID,PRIV,NOLONG
+INVPCID reg64,mem128 [rm: 66 0f 38 82 /r] FUTURE,INVPCID,PRIV,LONG
+INVLPG mem [m: 0f 01 /7] 486,PRIV
+INVLPGA reg_ax,reg_ecx [--: a16 0f 01 df] X86_64,AMD,NOLONG
+INVLPGA reg_eax,reg_ecx [--: a32 0f 01 df] X86_64,AMD
+INVLPGA reg_rax,reg_ecx [--: o64nw a64 0f 01 df] X64,AMD
+INVLPGA void [ 0f 01 df] X86_64,AMD
+IRET void [ odf cf] 8086
+IRETD void [ o32 cf] 386
+IRETQ void [ o64 cf] X64
+IRETW void [ o16 cf] 8086
+JCXZ imm [i: a16 e3 rel8] 8086,NOLONG
+JECXZ imm [i: a32 e3 rel8] 386
+JRCXZ imm [i: a64 e3 rel8] X64
+JMP imm|short [i: eb rel8] 8086
+JMP imm [i: jmp8 eb rel8] 8086,ND
+JMP imm [i: odf e9 rel] 8086,BND
+JMP imm|near [i: odf e9 rel] 8086,ND,BND
+JMP imm|far [i: odf ea iwd seg] 8086,ND,NOLONG
+; Call/jmp near imm/reg/mem is always 64-bit in long mode.
+JMP imm16 [i: o16 e9 rel] 8086,NOLONG,BND
+JMP imm16|near [i: o16 e9 rel] 8086,ND,NOLONG,BND
+JMP imm16|far [i: o16 ea iwd seg] 8086,ND,NOLONG
+JMP imm32 [i: o32 e9 rel] 386,NOLONG,BND
+JMP imm32|near [i: o32 e9 rel] 386,ND,NOLONG,BND
+JMP imm32|far [i: o32 ea iwd seg] 386,ND,NOLONG
+JMP imm64 [i: o64nw e9 rel] X64,BND
+JMP imm64|near [i: o64nw e9 rel] X64,ND,BND
+JMP imm:imm [ji: odf ea iwd iw] 8086,NOLONG
+JMP imm16:imm [ji: o16 ea iw iw] 8086,NOLONG
+JMP imm:imm16 [ji: o16 ea iw iw] 8086,NOLONG
+JMP imm32:imm [ji: o32 ea id iw] 386,NOLONG
+JMP imm:imm32 [ji: o32 ea id iw] 386,NOLONG
+JMP mem|far [m: odf ff /5] 8086,NOLONG
+JMP mem|far [m: o64 ff /5] X64
+JMP mem16|far [m: o16 ff /5] 8086
+JMP mem32|far [m: o32 ff /5] 386
+JMP mem64|far [m: o64 ff /5] X64
+JMP mem|near [m: odf ff /4] 8086,ND,BND
+JMP rm16|near [m: o16 ff /4] 8086,NOLONG,ND,BND
+JMP rm32|near [m: o32 ff /4] 386,NOLONG,ND,BND
+JMP rm64|near [m: o64nw ff /4] X64,ND,BND
+JMP mem [m: odf ff /4] 8086,BND
+JMP rm16 [m: o16 ff /4] 8086,NOLONG,BND
+JMP rm32 [m: o32 ff /4] 386,NOLONG,BND
+JMP rm64 [m: o64nw ff /4] X64,BND
+
+JMPE imm [i: odf 0f b8 rel] IA64
+JMPE imm16 [i: o16 0f b8 rel] IA64
+JMPE imm32 [i: o32 0f b8 rel] IA64
+JMPE rm16 [m: o16 0f 00 /6] IA64
+JMPE rm32 [m: o32 0f 00 /6] IA64
+LAHF void [ 9f] 8086
+LAR reg16,mem [rm: o16 0f 02 /r] 286,PROT,SW
+LAR reg16,reg16 [rm: o16 0f 02 /r] 286,PROT
+LAR reg16,reg32 [rm: o16 0f 02 /r] 386,PROT
+LAR reg16,reg64 [rm: o16 o64nw 0f 02 /r] X64,PROT,ND
+LAR reg32,mem [rm: o32 0f 02 /r] 386,PROT,SW
+LAR reg32,reg16 [rm: o32 0f 02 /r] 386,PROT
+LAR reg32,reg32 [rm: o32 0f 02 /r] 386,PROT
+LAR reg32,reg64 [rm: o32 o64nw 0f 02 /r] X64,PROT,ND
+LAR reg64,mem [rm: o64 0f 02 /r] X64,PROT,SW
+LAR reg64,reg16 [rm: o64 0f 02 /r] X64,PROT
+LAR reg64,reg32 [rm: o64 0f 02 /r] X64,PROT
+LAR reg64,reg64 [rm: o64 0f 02 /r] X64,PROT
+LDS reg16,mem [rm: o16 c5 /r] 8086,NOLONG
+LDS reg32,mem [rm: o32 c5 /r] 386,NOLONG
+LEA reg16,mem [rm: o16 8d /r] 8086
+LEA reg32,mem [rm: o32 8d /r] 386
+LEA reg64,mem [rm: o64 8d /r] X64
+LEAVE void [ c9] 186
+LES reg16,mem [rm: o16 c4 /r] 8086,NOLONG
+LES reg32,mem [rm: o32 c4 /r] 386,NOLONG
+LFENCE void [ np 0f ae e8] X64,AMD
+LFS reg16,mem [rm: o16 0f b4 /r] 386
+LFS reg32,mem [rm: o32 0f b4 /r] 386
+LFS reg64,mem [rm: o64 0f b4 /r] X64
+LGDT mem [m: 0f 01 /2] 286,PRIV
+LGS reg16,mem [rm: o16 0f b5 /r] 386
+LGS reg32,mem [rm: o32 0f b5 /r] 386
+LGS reg64,mem [rm: o64 0f b5 /r] X64
+LIDT mem [m: 0f 01 /3] 286,PRIV
+LLDT mem [m: 0f 00 /2] 286,PROT,PRIV
+LLDT mem16 [m: 0f 00 /2] 286,PROT,PRIV
+LLDT reg16 [m: 0f 00 /2] 286,PROT,PRIV
+LMSW mem [m: 0f 01 /6] 286,PRIV
+LMSW mem16 [m: 0f 01 /6] 286,PRIV
+LMSW reg16 [m: 0f 01 /6] 286,PRIV
+LOADALL void [ 0f 07] 386,UNDOC,ND,OBSOLETE
+LOADALL286 void [ 0f 05] 286,UNDOC,ND,OBSOLETE
+LODSB void [ ac] 8086
+LODSD void [ o32 ad] 386
+LODSQ void [ o64 ad] X64
+LODSW void [ o16 ad] 8086
+LOOP imm [i: adf e2 rel8] 8086
+LOOP imm,reg_cx [i-: a16 e2 rel8] 8086,NOLONG
+LOOP imm,reg_ecx [i-: a32 e2 rel8] 386
+LOOP imm,reg_rcx [i-: a64 e2 rel8] X64
+LOOPE imm [i: adf e1 rel8] 8086
+LOOPE imm,reg_cx [i-: a16 e1 rel8] 8086,NOLONG
+LOOPE imm,reg_ecx [i-: a32 e1 rel8] 386
+LOOPE imm,reg_rcx [i-: a64 e1 rel8] X64
+LOOPNE imm [i: adf e0 rel8] 8086
+LOOPNE imm,reg_cx [i-: a16 e0 rel8] 8086,NOLONG
+LOOPNE imm,reg_ecx [i-: a32 e0 rel8] 386
+LOOPNE imm,reg_rcx [i-: a64 e0 rel8] X64
+LOOPNZ imm [i: adf e0 rel8] 8086
+LOOPNZ imm,reg_cx [i-: a16 e0 rel8] 8086,NOLONG
+LOOPNZ imm,reg_ecx [i-: a32 e0 rel8] 386
+LOOPNZ imm,reg_rcx [i-: a64 e0 rel8] X64
+LOOPZ imm [i: adf e1 rel8] 8086
+LOOPZ imm,reg_cx [i-: a16 e1 rel8] 8086,NOLONG
+LOOPZ imm,reg_ecx [i-: a32 e1 rel8] 386
+LOOPZ imm,reg_rcx [i-: a64 e1 rel8] X64
+LSL reg16,mem [rm: o16 0f 03 /r] 286,PROT,SW
+LSL reg16,reg16 [rm: o16 0f 03 /r] 286,PROT
+LSL reg16,reg32 [rm: o16 0f 03 /r] 386,PROT
+LSL reg16,reg64 [rm: o16 o64nw 0f 03 /r] X64,PROT,ND
+LSL reg32,mem [rm: o32 0f 03 /r] 386,PROT,SW
+LSL reg32,reg16 [rm: o32 0f 03 /r] 386,PROT
+LSL reg32,reg32 [rm: o32 0f 03 /r] 386,PROT
+LSL reg32,reg64 [rm: o32 o64nw 0f 03 /r] X64,PROT,ND
+LSL reg64,mem [rm: o64 0f 03 /r] X64,PROT,SW
+LSL reg64,reg16 [rm: o64 0f 03 /r] X64,PROT
+LSL reg64,reg32 [rm: o64 0f 03 /r] X64,PROT
+LSL reg64,reg64 [rm: o64 0f 03 /r] X64,PROT
+LSS reg16,mem [rm: o16 0f b2 /r] 386
+LSS reg32,mem [rm: o32 0f b2 /r] 386
+LSS reg64,mem [rm: o64 0f b2 /r] X64
+LTR mem [m: 0f 00 /3] 286,PROT,PRIV
+LTR mem16 [m: 0f 00 /3] 286,PROT,PRIV
+LTR reg16 [m: 0f 00 /3] 286,PROT,PRIV
+MFENCE void [ np 0f ae f0] X64,AMD
+MONITOR void [ 0f 01 c8] PRESCOTT
+MONITOR reg_eax,reg_ecx,reg_edx [---: 0f 01 c8] PRESCOTT,NOLONG,ND
+MONITOR reg_rax,reg_ecx,reg_edx [---: 0f 01 c8] X64,ND
+MONITORX void [ 0f 01 fa] AMD
+MONITORX reg_rax,reg_ecx,reg_edx [---: 0f 01 fa] X64,AMD,ND
+MONITORX reg_eax,reg_ecx,reg_edx [---: 0f 01 fa] AMD,ND
+MONITORX reg_ax,reg_ecx,reg_edx [---: 0f 01 fa] AMD,ND
+MOV mem,reg_sreg [mr: 8c /r] 8086,SW
+MOV reg16,reg_sreg [mr: o16 8c /r] 8086
+MOV reg32,reg_sreg [mr: o32 8c /r] 386
+MOV reg64,reg_sreg [mr: o64nw 8c /r] X64,OPT,ND
+MOV rm64,reg_sreg [mr: o64 8c /r] X64
+MOV reg_sreg,mem [rm: 8e /r] 8086,SW
+MOV reg_sreg,reg16 [rm: 8e /r] 8086,OPT,ND
+MOV reg_sreg,reg32 [rm: 8e /r] 386,OPT,ND
+MOV reg_sreg,reg64 [rm: o64nw 8e /r] X64,OPT,ND
+MOV reg_sreg,reg16 [rm: o16 8e /r] 8086
+MOV reg_sreg,reg32 [rm: o32 8e /r] 386
+MOV reg_sreg,rm64 [rm: o64 8e /r] X64
+MOV reg_al,mem_offs [-i: a0 iwdq] 8086,SM
+MOV reg_ax,mem_offs [-i: o16 a1 iwdq] 8086,SM
+MOV reg_eax,mem_offs [-i: o32 a1 iwdq] 386,SM
+MOV reg_rax,mem_offs [-i: o64 a1 iwdq] X64,SM
+MOV mem_offs,reg_al [i-: a2 iwdq] 8086,SM,NOHLE
+MOV mem_offs,reg_ax [i-: o16 a3 iwdq] 8086,SM,NOHLE
+MOV mem_offs,reg_eax [i-: o32 a3 iwdq] 386,SM,NOHLE
+MOV mem_offs,reg_rax [i-: o64 a3 iwdq] X64,SM,NOHLE
+MOV reg32,reg_creg [mr: rex.l 0f 20 /r] 386,PRIV,NOLONG
+MOV reg64,reg_creg [mr: o64nw 0f 20 /r] X64,PRIV
+MOV reg_creg,reg32 [rm: rex.l 0f 22 /r] 386,PRIV,NOLONG
+MOV reg_creg,reg64 [rm: o64nw 0f 22 /r] X64,PRIV
+MOV reg32,reg_dreg [mr: 0f 21 /r] 386,PRIV,NOLONG
+MOV reg64,reg_dreg [mr: o64nw 0f 21 /r] X64,PRIV
+MOV reg_dreg,reg32 [rm: 0f 23 /r] 386,PRIV,NOLONG
+MOV reg_dreg,reg64 [rm: o64nw 0f 23 /r] X64,PRIV
+MOV reg32,reg_treg [mr: 0f 24 /r] 386,NOLONG,ND
+MOV reg_treg,reg32 [rm: 0f 26 /r] 386,NOLONG,ND
+MOV mem,reg8 [mr: hlexr 88 /r] 8086,SM
+MOV reg8,reg8 [mr: 88 /r] 8086
+MOV mem,reg16 [mr: hlexr o16 89 /r] 8086,SM
+MOV reg16,reg16 [mr: o16 89 /r] 8086
+MOV mem,reg32 [mr: hlexr o32 89 /r] 386,SM
+MOV reg32,reg32 [mr: o32 89 /r] 386
+MOV mem,reg64 [mr: hlexr o64 89 /r] X64,SM
+MOV reg64,reg64 [mr: o64 89 /r] X64
+MOV reg8,mem [rm: 8a /r] 8086,SM
+MOV reg8,reg8 [rm: 8a /r] 8086
+MOV reg16,mem [rm: o16 8b /r] 8086,SM
+MOV reg16,reg16 [rm: o16 8b /r] 8086
+MOV reg32,mem [rm: o32 8b /r] 386,SM
+MOV reg32,reg32 [rm: o32 8b /r] 386
+MOV reg64,mem [rm: o64 8b /r] X64,SM
+MOV reg64,reg64 [rm: o64 8b /r] X64
+MOV reg8,imm [ri: b0+r ib] 8086,SM
+MOV reg16,imm [ri: o16 b8+r iw] 8086,SM
+MOV reg32,imm [ri: o32 b8+r id] 386,SM
+MOV reg64,udword [ri: o64nw b8+r id] X64,SM,OPT,ND
+MOV reg64,sdword [mi: o64 c7 /0 id,s] X64,SM,OPT,ND
+MOV reg64,imm [ri: o64 b8+r iq] X64,SM
+MOV rm8,imm [mi: hlexr c6 /0 ib] 8086,SM
+MOV rm16,imm [mi: hlexr o16 c7 /0 iw] 8086,SM
+MOV rm32,imm [mi: hlexr o32 c7 /0 id] 386,SM
+MOV rm64,imm [mi: hlexr o64 c7 /0 id,s] X64,SM
+MOV rm64,imm32 [mi: hlexr o64 c7 /0 id,s] X64
+MOV mem,imm8 [mi: hlexr c6 /0 ib] 8086,SM
+MOV mem,imm16 [mi: hlexr o16 c7 /0 iw] 8086,SM
+MOV mem,imm32 [mi: hlexr o32 c7 /0 id] 386,SM
+MOVD mmxreg,rm32 [rm: np 0f 6e /r] PENT,MMX,SD
+MOVD rm32,mmxreg [mr: np 0f 7e /r] PENT,MMX,SD
+MOVD mmxreg,rm64 [rm: np o64 0f 6e /r] X64,MMX,SX,ND
+MOVD rm64,mmxreg [mr: np o64 0f 7e /r] X64,MMX,SX,ND
+MOVQ mmxreg,mmxrm [rm: np 0f 6f /r] PENT,MMX,SQ
+MOVQ mmxrm,mmxreg [mr: np 0f 7f /r] PENT,MMX,SQ
+MOVQ mmxreg,rm64 [rm: np o64 0f 6e /r] X64,MMX
+MOVQ rm64,mmxreg [mr: np o64 0f 7e /r] X64,MMX
+MOVSB void [ a4] 8086
+MOVSD void [ o32 a5] 386
+MOVSQ void [ o64 a5] X64
+MOVSW void [ o16 a5] 8086
+MOVSX reg16,mem [rm: o16 0f be /r] 386,SB
+MOVSX reg16,reg8 [rm: o16 0f be /r] 386
+MOVSX reg32,rm8 [rm: o32 0f be /r] 386
+MOVSX reg32,rm16 [rm: o32 0f bf /r] 386
+MOVSX reg64,rm8 [rm: o64 0f be /r] X64
+MOVSX reg64,rm16 [rm: o64 0f bf /r] X64
+MOVSXD reg64,rm32 [rm: o64 63 /r] X64
+MOVSX reg64,rm32 [rm: o64 63 /r] X64,ND
+MOVZX reg16,mem [rm: o16 0f b6 /r] 386,SB
+MOVZX reg16,reg8 [rm: o16 0f b6 /r] 386
+MOVZX reg32,rm8 [rm: o32 0f b6 /r] 386
+MOVZX reg32,rm16 [rm: o32 0f b7 /r] 386
+MOVZX reg64,rm8 [rm: o64 0f b6 /r] X64
+MOVZX reg64,rm16 [rm: o64 0f b7 /r] X64
+MUL rm8 [m: f6 /4] 8086
+MUL rm16 [m: o16 f7 /4] 8086
+MUL rm32 [m: o32 f7 /4] 386
+MUL rm64 [m: o64 f7 /4] X64
+MWAIT void [ 0f 01 c9] PRESCOTT
+MWAIT reg_eax,reg_ecx [--: 0f 01 c9] PRESCOTT,ND
+MWAITX void [ 0f 01 fb] AMD
+MWAITX reg_eax,reg_ecx [--: 0f 01 fb] AMD,ND
+NEG rm8 [m: hle f6 /3] 8086,LOCK
+NEG rm16 [m: hle o16 f7 /3] 8086,LOCK
+NEG rm32 [m: hle o32 f7 /3] 386,LOCK
+NEG rm64 [m: hle o64 f7 /3] X64,LOCK
+NOP rm16 [m: o16 0f 1f /0] P6
+NOP rm32 [m: o32 0f 1f /0] P6
+NOP rm64 [m: o64 0f 1f /0] X64
+NOT rm8 [m: hle f6 /2] 8086,LOCK
+NOT rm16 [m: hle o16 f7 /2] 8086,LOCK
+NOT rm32 [m: hle o32 f7 /2] 386,LOCK
+NOT rm64 [m: hle o64 f7 /2] X64,LOCK
+OR mem,reg8 [mr: hle 08 /r] 8086,SM,LOCK
+OR reg8,reg8 [mr: 08 /r] 8086
+OR mem,reg16 [mr: hle o16 09 /r] 8086,SM,LOCK
+OR reg16,reg16 [mr: o16 09 /r] 8086
+OR mem,reg32 [mr: hle o32 09 /r] 386,SM,LOCK
+OR reg32,reg32 [mr: o32 09 /r] 386
+OR mem,reg64 [mr: hle o64 09 /r] X64,SM,LOCK
+OR reg64,reg64 [mr: o64 09 /r] X64
+OR reg8,mem [rm: 0a /r] 8086,SM
+OR reg8,reg8 [rm: 0a /r] 8086
+OR reg16,mem [rm: o16 0b /r] 8086,SM
+OR reg16,reg16 [rm: o16 0b /r] 8086
+OR reg32,mem [rm: o32 0b /r] 386,SM
+OR reg32,reg32 [rm: o32 0b /r] 386
+OR reg64,mem [rm: o64 0b /r] X64,SM
+OR reg64,reg64 [rm: o64 0b /r] X64
+OR rm16,imm8 [mi: hle o16 83 /1 ib,s] 8086,LOCK
+OR rm32,imm8 [mi: hle o32 83 /1 ib,s] 386,LOCK
+OR rm64,imm8 [mi: hle o64 83 /1 ib,s] X64,LOCK
+OR reg_al,imm [-i: 0c ib] 8086,SM
+OR reg_ax,sbyteword [mi: o16 83 /1 ib,s] 8086,SM,ND
+OR reg_ax,imm [-i: o16 0d iw] 8086,SM
+OR reg_eax,sbytedword [mi: o32 83 /1 ib,s] 386,SM,ND
+OR reg_eax,imm [-i: o32 0d id] 386,SM
+OR reg_rax,sbytedword [mi: o64 83 /1 ib,s] X64,SM,ND
+OR reg_rax,imm [-i: o64 0d id,s] X64,SM
+OR rm8,imm [mi: hle 80 /1 ib] 8086,SM,LOCK
+OR rm16,sbyteword [mi: hle o16 83 /1 ib,s] 8086,SM,LOCK,ND
+OR rm16,imm [mi: hle o16 81 /1 iw] 8086,SM,LOCK
+OR rm32,sbytedword [mi: hle o32 83 /1 ib,s] 386,SM,LOCK,ND
+OR rm32,imm [mi: hle o32 81 /1 id] 386,SM,LOCK
+OR rm64,sbytedword [mi: hle o64 83 /1 ib,s] X64,SM,LOCK,ND
+OR rm64,imm [mi: hle o64 81 /1 id,s] X64,SM,LOCK
+OR mem,imm8 [mi: hle 80 /1 ib] 8086,SM,LOCK
+OR mem,sbyteword16 [mi: hle o16 83 /1 ib,s] 8086,SM,LOCK,ND
+OR mem,imm16 [mi: hle o16 81 /1 iw] 8086,SM,LOCK
+OR mem,sbytedword32 [mi: hle o32 83 /1 ib,s] 386,SM,LOCK,ND
+OR mem,imm32 [mi: hle o32 81 /1 id] 386,SM,LOCK
+OR rm8,imm [mi: hle 82 /1 ib] 8086,SM,LOCK,ND,NOLONG
+OUT imm,reg_al [i-: e6 ib,u] 8086,SB
+OUT imm,reg_ax [i-: o16 e7 ib,u] 8086,SB
+OUT imm,reg_eax [i-: o32 e7 ib,u] 386,SB
+OUT reg_dx,reg_al [--: ee] 8086
+OUT reg_dx,reg_ax [--: o16 ef] 8086
+OUT reg_dx,reg_eax [--: o32 ef] 386
+OUTSB void [ 6e] 186
+OUTSD void [ o32 6f] 386
+OUTSW void [ o16 6f] 186
+PACKSSDW mmxreg,mmxrm [rm: np o64nw 0f 6b /r] PENT,MMX,SQ
+PACKSSWB mmxreg,mmxrm [rm: np o64nw 0f 63 /r] PENT,MMX,SQ
+PACKUSWB mmxreg,mmxrm [rm: np o64nw 0f 67 /r] PENT,MMX,SQ
+PADDB mmxreg,mmxrm [rm: np o64nw 0f fc /r] PENT,MMX,SQ
+PADDD mmxreg,mmxrm [rm: np o64nw 0f fe /r] PENT,MMX,SQ
+PADDSB mmxreg,mmxrm [rm: np o64nw 0f ec /r] PENT,MMX,SQ
+PADDSIW mmxreg,mmxrm [rm: o64nw 0f 51 /r] PENT,MMX,SQ,CYRIX
+PADDSW mmxreg,mmxrm [rm: np o64nw 0f ed /r] PENT,MMX,SQ
+PADDUSB mmxreg,mmxrm [rm: np o64nw 0f dc /r] PENT,MMX,SQ
+PADDUSW mmxreg,mmxrm [rm: np o64nw 0f dd /r] PENT,MMX,SQ
+PADDW mmxreg,mmxrm [rm: np o64nw 0f fd /r] PENT,MMX,SQ
+PAND mmxreg,mmxrm [rm: np o64nw 0f db /r] PENT,MMX,SQ
+PANDN mmxreg,mmxrm [rm: np o64nw 0f df /r] PENT,MMX,SQ
+PAUSE void [ f3i 90] 8086
+PAVEB mmxreg,mmxrm [rm: o64nw 0f 50 /r] PENT,MMX,SQ,CYRIX
+PAVGUSB mmxreg,mmxrm [rm: o64nw 0f 0f /r bf] PENT,3DNOW,SQ
+PCMPEQB mmxreg,mmxrm [rm: np o64nw 0f 74 /r] PENT,MMX,SQ
+PCMPEQD mmxreg,mmxrm [rm: np o64nw 0f 76 /r] PENT,MMX,SQ
+PCMPEQW mmxreg,mmxrm [rm: np o64nw 0f 75 /r] PENT,MMX,SQ
+PCMPGTB mmxreg,mmxrm [rm: np o64nw 0f 64 /r] PENT,MMX,SQ
+PCMPGTD mmxreg,mmxrm [rm: np o64nw 0f 66 /r] PENT,MMX,SQ
+PCMPGTW mmxreg,mmxrm [rm: np o64nw 0f 65 /r] PENT,MMX,SQ
+PDISTIB mmxreg,mem [rm: 0f 54 /r] PENT,MMX,SM,CYRIX
+PF2ID mmxreg,mmxrm [rm: o64nw 0f 0f /r 1d] PENT,3DNOW,SQ
+PFACC mmxreg,mmxrm [rm: o64nw 0f 0f /r ae] PENT,3DNOW,SQ
+PFADD mmxreg,mmxrm [rm: o64nw 0f 0f /r 9e] PENT,3DNOW,SQ
+PFCMPEQ mmxreg,mmxrm [rm: o64nw 0f 0f /r b0] PENT,3DNOW,SQ
+PFCMPGE mmxreg,mmxrm [rm: o64nw 0f 0f /r 90] PENT,3DNOW,SQ
+PFCMPGT mmxreg,mmxrm [rm: o64nw 0f 0f /r a0] PENT,3DNOW,SQ
+PFMAX mmxreg,mmxrm [rm: o64nw 0f 0f /r a4] PENT,3DNOW,SQ
+PFMIN mmxreg,mmxrm [rm: o64nw 0f 0f /r 94] PENT,3DNOW,SQ
+PFMUL mmxreg,mmxrm [rm: o64nw 0f 0f /r b4] PENT,3DNOW,SQ
+PFRCP mmxreg,mmxrm [rm: o64nw 0f 0f /r 96] PENT,3DNOW,SQ
+PFRCPIT1 mmxreg,mmxrm [rm: o64nw 0f 0f /r a6] PENT,3DNOW,SQ
+PFRCPIT2 mmxreg,mmxrm [rm: o64nw 0f 0f /r b6] PENT,3DNOW,SQ
+PFRSQIT1 mmxreg,mmxrm [rm: o64nw 0f 0f /r a7] PENT,3DNOW,SQ
+PFRSQRT mmxreg,mmxrm [rm: o64nw 0f 0f /r 97] PENT,3DNOW,SQ
+PFSUB mmxreg,mmxrm [rm: o64nw 0f 0f /r 9a] PENT,3DNOW,SQ
+PFSUBR mmxreg,mmxrm [rm: o64nw 0f 0f /r aa] PENT,3DNOW,SQ
+PI2FD mmxreg,mmxrm [rm: o64nw 0f 0f /r 0d] PENT,3DNOW,SQ
+PMACHRIW mmxreg,mem [rm: 0f 5e /r] PENT,MMX,SM,CYRIX
+PMADDWD mmxreg,mmxrm [rm: np o64nw 0f f5 /r] PENT,MMX,SQ
+PMAGW mmxreg,mmxrm [rm: o64nw 0f 52 /r] PENT,MMX,SQ,CYRIX
+PMULHRIW mmxreg,mmxrm [rm: o64nw 0f 5d /r] PENT,MMX,SQ,CYRIX
+PMULHRWA mmxreg,mmxrm [rm: o64nw 0f 0f /r b7] PENT,3DNOW,SQ
+PMULHRWC mmxreg,mmxrm [rm: o64nw 0f 59 /r] PENT,MMX,SQ,CYRIX
+PMULHW mmxreg,mmxrm [rm: np o64nw 0f e5 /r] PENT,MMX,SQ
+PMULLW mmxreg,mmxrm [rm: np o64nw 0f d5 /r] PENT,MMX,SQ
+PMVGEZB mmxreg,mem [rm: 0f 5c /r] PENT,MMX,SQ,CYRIX
+PMVLZB mmxreg,mem [rm: 0f 5b /r] PENT,MMX,SQ,CYRIX
+PMVNZB mmxreg,mem [rm: 0f 5a /r] PENT,MMX,SQ,CYRIX
+PMVZB mmxreg,mem [rm: 0f 58 /r] PENT,MMX,SQ,CYRIX
+POP reg16 [r: o16 58+r] 8086
+POP reg32 [r: o32 58+r] 386,NOLONG
+POP reg64 [r: o64nw 58+r] X64
+POP rm16 [m: o16 8f /0] 8086
+POP rm32 [m: o32 8f /0] 386,NOLONG
+POP rm64 [m: o64nw 8f /0] X64
+POP reg_es [-: 07] 8086,NOLONG
+POP reg_cs [-: 0f] 8086,UNDOC,ND,OBSOLETE
+POP reg_ss [-: 17] 8086,NOLONG
+POP reg_ds [-: 1f] 8086,NOLONG
+POP reg_fs [-: 0f a1] 386
+POP reg_gs [-: 0f a9] 386
+POPA void [ odf 61] 186,NOLONG
+POPAD void [ o32 61] 386,NOLONG
+POPAW void [ o16 61] 186,NOLONG
+POPF void [ odf 9d] 8086
+POPFD void [ o32 9d] 386,NOLONG
+POPFQ void [ o32 9d] X64
+POPFW void [ o16 9d] 8086
+POR mmxreg,mmxrm [rm: np o64nw 0f eb /r] PENT,MMX,SQ
+PREFETCH mem [m: 0f 0d /0] PENT,3DNOW,SQ
+PREFETCHW mem [m: 0f 0d /1] PENT,3DNOW,SQ
+PSLLD mmxreg,mmxrm [rm: np o64nw 0f f2 /r] PENT,MMX,SQ
+PSLLD mmxreg,imm [mi: np 0f 72 /6 ib,u] PENT,MMX
+PSLLQ mmxreg,mmxrm [rm: np o64nw 0f f3 /r] PENT,MMX,SQ
+PSLLQ mmxreg,imm [mi: np 0f 73 /6 ib,u] PENT,MMX
+PSLLW mmxreg,mmxrm [rm: np o64nw 0f f1 /r] PENT,MMX,SQ
+PSLLW mmxreg,imm [mi: np 0f 71 /6 ib,u] PENT,MMX
+PSRAD mmxreg,mmxrm [rm: np o64nw 0f e2 /r] PENT,MMX,SQ
+PSRAD mmxreg,imm [mi: np 0f 72 /4 ib,u] PENT,MMX
+PSRAW mmxreg,mmxrm [rm: np o64nw 0f e1 /r] PENT,MMX,SQ
+PSRAW mmxreg,imm [mi: np 0f 71 /4 ib,u] PENT,MMX
+PSRLD mmxreg,mmxrm [rm: np o64nw 0f d2 /r] PENT,MMX,SQ
+PSRLD mmxreg,imm [mi: np 0f 72 /2 ib,u] PENT,MMX
+PSRLQ mmxreg,mmxrm [rm: np o64nw 0f d3 /r] PENT,MMX,SQ
+PSRLQ mmxreg,imm [mi: np 0f 73 /2 ib,u] PENT,MMX
+PSRLW mmxreg,mmxrm [rm: np o64nw 0f d1 /r] PENT,MMX,SQ
+PSRLW mmxreg,imm [mi: np 0f 71 /2 ib,u] PENT,MMX
+PSUBB mmxreg,mmxrm [rm: np o64nw 0f f8 /r] PENT,MMX,SQ
+PSUBD mmxreg,mmxrm [rm: np o64nw 0f fa /r] PENT,MMX,SQ
+PSUBSB mmxreg,mmxrm [rm: np o64nw 0f e8 /r] PENT,MMX,SQ
+PSUBSIW mmxreg,mmxrm [rm: o64nw 0f 55 /r] PENT,MMX,SQ,CYRIX
+PSUBSW mmxreg,mmxrm [rm: np o64nw 0f e9 /r] PENT,MMX,SQ
+PSUBUSB mmxreg,mmxrm [rm: np o64nw 0f d8 /r] PENT,MMX,SQ
+PSUBUSW mmxreg,mmxrm [rm: np o64nw 0f d9 /r] PENT,MMX,SQ
+PSUBW mmxreg,mmxrm [rm: np o64nw 0f f9 /r] PENT,MMX,SQ
+PUNPCKHBW mmxreg,mmxrm [rm: np o64nw 0f 68 /r] PENT,MMX,SQ
+PUNPCKHDQ mmxreg,mmxrm [rm: np o64nw 0f 6a /r] PENT,MMX,SQ
+PUNPCKHWD mmxreg,mmxrm [rm: np o64nw 0f 69 /r] PENT,MMX,SQ
+PUNPCKLBW mmxreg,mmxrm [rm: np o64nw 0f 60 /r] PENT,MMX,SQ
+PUNPCKLDQ mmxreg,mmxrm [rm: np o64nw 0f 62 /r] PENT,MMX,SQ
+PUNPCKLWD mmxreg,mmxrm [rm: np o64nw 0f 61 /r] PENT,MMX,SQ
+PUSH reg16 [r: o16 50+r] 8086
+PUSH reg32 [r: o32 50+r] 386,NOLONG
+PUSH reg64 [r: o64nw 50+r] X64
+PUSH rm16 [m: o16 ff /6] 8086
+PUSH rm32 [m: o32 ff /6] 386,NOLONG
+PUSH rm64 [m: o64nw ff /6] X64
+PUSH reg_es [-: 06] 8086,NOLONG
+PUSH reg_cs [-: 0e] 8086,NOLONG
+PUSH reg_ss [-: 16] 8086,NOLONG
+PUSH reg_ds [-: 1e] 8086,NOLONG
+PUSH reg_fs [-: 0f a0] 386
+PUSH reg_gs [-: 0f a8] 386
+PUSH imm8 [i: 6a ib,s] 186
+PUSH sbyteword16 [i: o16 6a ib,s] 186,AR0,SIZE,ND
+PUSH imm16 [i: o16 68 iw] 186,AR0,SIZE
+PUSH sbytedword32 [i: o32 6a ib,s] 386,NOLONG,AR0,SIZE,ND
+PUSH imm32 [i: o32 68 id] 386,NOLONG,AR0,SIZE
+PUSH sbytedword32 [i: o32 6a ib,s] 386,NOLONG,SD,ND
+PUSH imm32 [i: o32 68 id] 386,NOLONG,SD
+PUSH sbytedword64 [i: o64nw 6a ib,s] X64,AR0,SIZE,ND
+PUSH imm64 [i: o64nw 68 id,s] X64,AR0,SIZE
+PUSH sbytedword32 [i: o64nw 6a ib,s] X64,AR0,SIZE,ND
+PUSH imm32 [i: o64nw 68 id,s] X64,AR0,SIZE
+PUSHA void [ odf 60] 186,NOLONG
+PUSHAD void [ o32 60] 386,NOLONG
+PUSHAW void [ o16 60] 186,NOLONG
+PUSHF void [ odf 9c] 8086
+PUSHFD void [ o32 9c] 386,NOLONG
+PUSHFQ void [ o32 9c] X64
+PUSHFW void [ o16 9c] 8086
+PXOR mmxreg,mmxrm [rm: np o64nw 0f ef /r] PENT,MMX,SQ
+RCL rm8,unity [m-: d0 /2] 8086
+RCL rm8,reg_cl [m-: d2 /2] 8086
+RCL rm8,imm8 [mi: c0 /2 ib,u] 186
+RCL rm16,unity [m-: o16 d1 /2] 8086
+RCL rm16,reg_cl [m-: o16 d3 /2] 8086
+RCL rm16,imm8 [mi: o16 c1 /2 ib,u] 186
+RCL rm32,unity [m-: o32 d1 /2] 386
+RCL rm32,reg_cl [m-: o32 d3 /2] 386
+RCL rm32,imm8 [mi: o32 c1 /2 ib,u] 386
+RCL rm64,unity [m-: o64 d1 /2] X64
+RCL rm64,reg_cl [m-: o64 d3 /2] X64
+RCL rm64,imm8 [mi: o64 c1 /2 ib,u] X64
+RCR rm8,unity [m-: d0 /3] 8086
+RCR rm8,reg_cl [m-: d2 /3] 8086
+RCR rm8,imm8 [mi: c0 /3 ib,u] 186
+RCR rm16,unity [m-: o16 d1 /3] 8086
+RCR rm16,reg_cl [m-: o16 d3 /3] 8086
+RCR rm16,imm8 [mi: o16 c1 /3 ib,u] 186
+RCR rm32,unity [m-: o32 d1 /3] 386
+RCR rm32,reg_cl [m-: o32 d3 /3] 386
+RCR rm32,imm8 [mi: o32 c1 /3 ib,u] 386
+RCR rm64,unity [m-: o64 d1 /3] X64
+RCR rm64,reg_cl [m-: o64 d3 /3] X64
+RCR rm64,imm8 [mi: o64 c1 /3 ib,u] X64
+RDSHR rm32 [m: o32 0f 36 /0] P6,CYRIX,SMM
+RDMSR void [ 0f 32] PENT,PRIV
+RDPMC void [ 0f 33] P6
+RDTSC void [ 0f 31] PENT
+RDTSCP void [ 0f 01 f9] X86_64
+RET imm [i: c2 iw] 8086,SW,BND
+RETF void [ cb] 8086
+RETF imm [i: ca iw] 8086,SW
+RETN void [ c3] 8086,BND
+RETN imm [i: c2 iw] 8086,SW,BND
+
+ROL rm8,unity [m-: d0 /0] 8086
+ROL rm8,reg_cl [m-: d2 /0] 8086
+ROL rm8,imm8 [mi: c0 /0 ib,u] 186
+ROL rm16,unity [m-: o16 d1 /0] 8086
+ROL rm16,reg_cl [m-: o16 d3 /0] 8086
+ROL rm16,imm8 [mi: o16 c1 /0 ib,u] 186
+ROL rm32,unity [m-: o32 d1 /0] 386
+ROL rm32,reg_cl [m-: o32 d3 /0] 386
+ROL rm32,imm8 [mi: o32 c1 /0 ib,u] 386
+ROL rm64,unity [m-: o64 d1 /0] X64
+ROL rm64,reg_cl [m-: o64 d3 /0] X64
+ROL rm64,imm8 [mi: o64 c1 /0 ib,u] X64
+ROR rm8,unity [m-: d0 /1] 8086
+ROR rm8,reg_cl [m-: d2 /1] 8086
+ROR rm8,imm8 [mi: c0 /1 ib,u] 186
+ROR rm16,unity [m-: o16 d1 /1] 8086
+ROR rm16,reg_cl [m-: o16 d3 /1] 8086
+ROR rm16,imm8 [mi: o16 c1 /1 ib,u] 186
+ROR rm32,unity [m-: o32 d1 /1] 386
+ROR rm32,reg_cl [m-: o32 d3 /1] 386
+ROR rm32,imm8 [mi: o32 c1 /1 ib,u] 386
+ROR rm64,unity [m-: o64 d1 /1] X64
+ROR rm64,reg_cl [m-: o64 d3 /1] X64
+ROR rm64,imm8 [mi: o64 c1 /1 ib,u] X64
+RDM void [ 0f 3a] P6,CYRIX,ND
+RSDC reg_sreg,mem80 [rm: 0f 79 /r] 486,CYRIX,SMM
+RSLDT mem80 [m: 0f 7b /0] 486,CYRIX,SMM
+RSM void [ 0f aa] PENT,SMM
+RSTS mem80 [m: 0f 7d /0] 486,CYRIX,SMM
+SAHF void [ 9e] 8086
+SAL rm8,unity [m-: d0 /4] 8086,ND
+SAL rm8,reg_cl [m-: d2 /4] 8086,ND
+SAL rm8,imm8 [mi: c0 /4 ib,u] 186,ND
+SAL rm16,unity [m-: o16 d1 /4] 8086,ND
+SAL rm16,reg_cl [m-: o16 d3 /4] 8086,ND
+SAL rm16,imm8 [mi: o16 c1 /4 ib,u] 186,ND
+SAL rm32,unity [m-: o32 d1 /4] 386,ND
+SAL rm32,reg_cl [m-: o32 d3 /4] 386,ND
+SAL rm32,imm8 [mi: o32 c1 /4 ib,u] 386,ND
+SAL rm64,unity [m-: o64 d1 /4] X64,ND
+SAL rm64,reg_cl [m-: o64 d3 /4] X64,ND
+SAL rm64,imm8 [mi: o64 c1 /4 ib,u] X64,ND
+SALC void [ d6] 8086,UNDOC
+SAR rm8,unity [m-: d0 /7] 8086
+SAR rm8,reg_cl [m-: d2 /7] 8086
+SAR rm8,imm8 [mi: c0 /7 ib,u] 186
+SAR rm16,unity [m-: o16 d1 /7] 8086
+SAR rm16,reg_cl [m-: o16 d3 /7] 8086
+SAR rm16,imm8 [mi: o16 c1 /7 ib,u] 186
+SAR rm32,unity [m-: o32 d1 /7] 386
+SAR rm32,reg_cl [m-: o32 d3 /7] 386
+SAR rm32,imm8 [mi: o32 c1 /7 ib,u] 386
+SAR rm64,unity [m-: o64 d1 /7] X64
+SAR rm64,reg_cl [m-: o64 d3 /7] X64
+SAR rm64,imm8 [mi: o64 c1 /7 ib,u] X64
+SBB mem,reg8 [mr: hle 18 /r] 8086,SM,LOCK
+SBB reg8,reg8 [mr: 18 /r] 8086
+SBB mem,reg16 [mr: hle o16 19 /r] 8086,SM,LOCK
+SBB reg16,reg16 [mr: o16 19 /r] 8086
+SBB mem,reg32 [mr: hle o32 19 /r] 386,SM,LOCK
+SBB reg32,reg32 [mr: o32 19 /r] 386
+SBB mem,reg64 [mr: hle o64 19 /r] X64,SM,LOCK
+SBB reg64,reg64 [mr: o64 19 /r] X64
+SBB reg8,mem [rm: 1a /r] 8086,SM
+SBB reg8,reg8 [rm: 1a /r] 8086
+SBB reg16,mem [rm: o16 1b /r] 8086,SM
+SBB reg16,reg16 [rm: o16 1b /r] 8086
+SBB reg32,mem [rm: o32 1b /r] 386,SM
+SBB reg32,reg32 [rm: o32 1b /r] 386
+SBB reg64,mem [rm: o64 1b /r] X64,SM
+SBB reg64,reg64 [rm: o64 1b /r] X64
+SBB rm16,imm8 [mi: hle o16 83 /3 ib,s] 8086,LOCK
+SBB rm32,imm8 [mi: hle o32 83 /3 ib,s] 386,LOCK
+SBB rm64,imm8 [mi: hle o64 83 /3 ib,s] X64,LOCK
+SBB reg_al,imm [-i: 1c ib] 8086,SM
+SBB reg_ax,sbyteword [mi: o16 83 /3 ib,s] 8086,SM,ND
+SBB reg_ax,imm [-i: o16 1d iw] 8086,SM
+SBB reg_eax,sbytedword [mi: o32 83 /3 ib,s] 386,SM,ND
+SBB reg_eax,imm [-i: o32 1d id] 386,SM
+SBB reg_rax,sbytedword [mi: o64 83 /3 ib,s] X64,SM,ND
+SBB reg_rax,imm [-i: o64 1d id,s] X64,SM
+SBB rm8,imm [mi: hle 80 /3 ib] 8086,SM,LOCK
+SBB rm16,sbyteword [mi: hle o16 83 /3 ib,s] 8086,SM,LOCK,ND
+SBB rm16,imm [mi: hle o16 81 /3 iw] 8086,SM,LOCK
+SBB rm32,sbytedword [mi: hle o32 83 /3 ib,s] 386,SM,LOCK,ND
+SBB rm32,imm [mi: hle o32 81 /3 id] 386,SM,LOCK
+SBB rm64,sbytedword [mi: hle o64 83 /3 ib,s] X64,SM,LOCK,ND
+SBB rm64,imm [mi: hle o64 81 /3 id,s] X64,SM,LOCK
+SBB mem,imm8 [mi: hle 80 /3 ib] 8086,SM,LOCK
+SBB mem,sbyteword16 [mi: hle o16 83 /3 ib,s] 8086,SM,LOCK,ND
+SBB mem,imm16 [mi: hle o16 81 /3 iw] 8086,SM,LOCK
+SBB mem,sbytedword32 [mi: hle o32 83 /3 ib,s] 386,SM,LOCK,ND
+SBB mem,imm32 [mi: hle o32 81 /3 id] 386,SM,LOCK
+SBB rm8,imm [mi: hle 82 /3 ib] 8086,SM,LOCK,ND,NOLONG
+SCASB void [ repe ae] 8086
+SCASD void [ repe o32 af] 386
+SCASQ void [ repe o64 af] X64
+SCASW void [ repe o16 af] 8086
+SFENCE void [ np 0f ae f8] X64,AMD
+SGDT mem [m: 0f 01 /0] 286
+SHL rm8,unity [m-: d0 /4] 8086
+SHL rm8,reg_cl [m-: d2 /4] 8086
+SHL rm8,imm8 [mi: c0 /4 ib,u] 186
+SHL rm16,unity [m-: o16 d1 /4] 8086
+SHL rm16,reg_cl [m-: o16 d3 /4] 8086
+SHL rm16,imm8 [mi: o16 c1 /4 ib,u] 186
+SHL rm32,unity [m-: o32 d1 /4] 386
+SHL rm32,reg_cl [m-: o32 d3 /4] 386
+SHL rm32,imm8 [mi: o32 c1 /4 ib,u] 386
+SHL rm64,unity [m-: o64 d1 /4] X64
+SHL rm64,reg_cl [m-: o64 d3 /4] X64
+SHL rm64,imm8 [mi: o64 c1 /4 ib,u] X64
+SHLD mem,reg16,imm [mri: o16 0f a4 /r ib,u] 386,SM2,SB,AR2
+SHLD reg16,reg16,imm [mri: o16 0f a4 /r ib,u] 386,SM2,SB,AR2
+SHLD mem,reg32,imm [mri: o32 0f a4 /r ib,u] 386,SM2,SB,AR2
+SHLD reg32,reg32,imm [mri: o32 0f a4 /r ib,u] 386,SM2,SB,AR2
+SHLD mem,reg64,imm [mri: o64 0f a4 /r ib,u] X64,SM2,SB,AR2
+SHLD reg64,reg64,imm [mri: o64 0f a4 /r ib,u] X64,SM2,SB,AR2
+SHLD mem,reg16,reg_cl [mr-: o16 0f a5 /r] 386,SM
+SHLD reg16,reg16,reg_cl [mr-: o16 0f a5 /r] 386
+SHLD mem,reg32,reg_cl [mr-: o32 0f a5 /r] 386,SM
+SHLD reg32,reg32,reg_cl [mr-: o32 0f a5 /r] 386
+SHLD mem,reg64,reg_cl [mr-: o64 0f a5 /r] X64,SM
+SHLD reg64,reg64,reg_cl [mr-: o64 0f a5 /r] X64
+SHR rm8,unity [m-: d0 /5] 8086
+SHR rm8,reg_cl [m-: d2 /5] 8086
+SHR rm8,imm8 [mi: c0 /5 ib,u] 186
+SHR rm16,unity [m-: o16 d1 /5] 8086
+SHR rm16,reg_cl [m-: o16 d3 /5] 8086
+SHR rm16,imm8 [mi: o16 c1 /5 ib,u] 186
+SHR rm32,unity [m-: o32 d1 /5] 386
+SHR rm32,reg_cl [m-: o32 d3 /5] 386
+SHR rm32,imm8 [mi: o32 c1 /5 ib,u] 386
+SHR rm64,unity [m-: o64 d1 /5] X64
+SHR rm64,reg_cl [m-: o64 d3 /5] X64
+SHR rm64,imm8 [mi: o64 c1 /5 ib,u] X64
+SHRD mem,reg16,imm [mri: o16 0f ac /r ib,u] 386,SM2,SB,AR2
+SHRD reg16,reg16,imm [mri: o16 0f ac /r ib,u] 386,SM2,SB,AR2
+SHRD mem,reg32,imm [mri: o32 0f ac /r ib,u] 386,SM2,SB,AR2
+SHRD reg32,reg32,imm [mri: o32 0f ac /r ib,u] 386,SM2,SB,AR2
+SHRD mem,reg64,imm [mri: o64 0f ac /r ib,u] X64,SM2,SB,AR2
+SHRD reg64,reg64,imm [mri: o64 0f ac /r ib,u] X64,SM2,SB,AR2
+SHRD mem,reg16,reg_cl [mr-: o16 0f ad /r] 386,SM
+SHRD reg16,reg16,reg_cl [mr-: o16 0f ad /r] 386
+SHRD mem,reg32,reg_cl [mr-: o32 0f ad /r] 386,SM
+SHRD reg32,reg32,reg_cl [mr-: o32 0f ad /r] 386
+SHRD mem,reg64,reg_cl [mr-: o64 0f ad /r] X64,SM
+SHRD reg64,reg64,reg_cl [mr-: o64 0f ad /r] X64
+SIDT mem [m: 0f 01 /1] 286
+SLDT mem [m: 0f 00 /0] 286
+SLDT mem16 [m: 0f 00 /0] 286
+SLDT reg16 [m: o16 0f 00 /0] 286
+SLDT reg32 [m: o32 0f 00 /0] 386
+SLDT reg64 [m: o64nw 0f 00 /0] X64,ND
+SLDT reg64 [m: o64 0f 00 /0] X64
+SKINIT void [ 0f 01 de] X64
+SMI void [ f1] 386,UNDOC
+SMINT void [ 0f 38] P6,CYRIX,ND
+; Older Cyrix chips had this; they had to move due to conflict with MMX
+SMINTOLD void [ 0f 7e] 486,CYRIX,ND,OBSOLETE
+SMSW mem [m: 0f 01 /4] 286
+SMSW mem16 [m: 0f 01 /4] 286
+SMSW reg16 [m: o16 0f 01 /4] 286
+SMSW reg32 [m: o32 0f 01 /4] 386
+SMSW reg64 [m: o64 0f 01 /4] X64
+STC void [ f9] 8086
+STD void [ fd] 8086
+STI void [ fb] 8086
+STOSB void [ aa] 8086
+STOSD void [ o32 ab] 386
+STOSQ void [ o64 ab] X64
+STOSW void [ o16 ab] 8086
+STR mem [m: 0f 00 /1] 286,PROT
+STR mem16 [m: 0f 00 /1] 286,PROT
+STR reg16 [m: o16 0f 00 /1] 286,PROT
+STR reg32 [m: o32 0f 00 /1] 386,PROT
+STR reg64 [m: o64 0f 00 /1] X64
+SUB mem,reg8 [mr: hle 28 /r] 8086,SM,LOCK
+SUB reg8,reg8 [mr: 28 /r] 8086
+SUB mem,reg16 [mr: hle o16 29 /r] 8086,SM,LOCK
+SUB reg16,reg16 [mr: o16 29 /r] 8086
+SUB mem,reg32 [mr: hle o32 29 /r] 386,SM,LOCK
+SUB reg32,reg32 [mr: o32 29 /r] 386
+SUB mem,reg64 [mr: hle o64 29 /r] X64,SM,LOCK
+SUB reg64,reg64 [mr: o64 29 /r] X64
+SUB reg8,mem [rm: 2a /r] 8086,SM
+SUB reg8,reg8 [rm: 2a /r] 8086
+SUB reg16,mem [rm: o16 2b /r] 8086,SM
+SUB reg16,reg16 [rm: o16 2b /r] 8086
+SUB reg32,mem [rm: o32 2b /r] 386,SM
+SUB reg32,reg32 [rm: o32 2b /r] 386
+SUB reg64,mem [rm: o64 2b /r] X64,SM
+SUB reg64,reg64 [rm: o64 2b /r] X64
+SUB rm16,imm8 [mi: hle o16 83 /5 ib,s] 8086,LOCK
+SUB rm32,imm8 [mi: hle o32 83 /5 ib,s] 386,LOCK
+SUB rm64,imm8 [mi: hle o64 83 /5 ib,s] X64,LOCK
+SUB reg_al,imm [-i: 2c ib] 8086,SM
+SUB reg_ax,sbyteword [mi: o16 83 /5 ib,s] 8086,SM,ND
+SUB reg_ax,imm [-i: o16 2d iw] 8086,SM
+SUB reg_eax,sbytedword [mi: o32 83 /5 ib,s] 386,SM,ND
+SUB reg_eax,imm [-i: o32 2d id] 386,SM
+SUB reg_rax,sbytedword [mi: o64 83 /5 ib,s] X64,SM,ND
+SUB reg_rax,imm [-i: o64 2d id,s] X64,SM
+SUB rm8,imm [mi: hle 80 /5 ib] 8086,SM,LOCK
+SUB rm16,sbyteword [mi: hle o16 83 /5 ib,s] 8086,SM,LOCK,ND
+SUB rm16,imm [mi: hle o16 81 /5 iw] 8086,SM,LOCK
+SUB rm32,sbytedword [mi: hle o32 83 /5 ib,s] 386,SM,LOCK,ND
+SUB rm32,imm [mi: hle o32 81 /5 id] 386,SM,LOCK
+SUB rm64,sbytedword [mi: hle o64 83 /5 ib,s] X64,SM,LOCK,ND
+SUB rm64,imm [mi: hle o64 81 /5 id,s] X64,SM,LOCK
+SUB mem,imm8 [mi: hle 80 /5 ib] 8086,SM,LOCK
+SUB mem,sbyteword16 [mi: hle o16 83 /5 ib,s] 8086,SM,LOCK,ND
+SUB mem,imm16 [mi: hle o16 81 /5 iw] 8086,SM,LOCK
+SUB mem,sbytedword32 [mi: hle o32 83 /5 ib,s] 386,SM,LOCK,ND
+SUB mem,imm32 [mi: hle o32 81 /5 id] 386,SM,LOCK
+SUB rm8,imm [mi: hle 82 /5 ib] 8086,SM,LOCK,ND,NOLONG
+SVDC mem80,reg_sreg [mr: 0f 78 /r] 486,CYRIX,SMM
+SVLDT mem80 [m: 0f 7a /0] 486,CYRIX,SMM,ND
+SVTS mem80 [m: 0f 7c /0] 486,CYRIX,SMM
+SWAPGS void [ 0f 01 f8] X64
+SYSCALL void [ 0f 05] P6,AMD
+SYSENTER void [ 0f 34] P6
+SYSEXIT void [ 0f 35] P6,PRIV
+SYSRET void [ 0f 07] P6,PRIV,AMD
+TEST mem,reg8 [mr: 84 /r] 8086,SM
+TEST reg8,reg8 [mr: 84 /r] 8086
+TEST mem,reg16 [mr: o16 85 /r] 8086,SM
+TEST reg16,reg16 [mr: o16 85 /r] 8086
+TEST mem,reg32 [mr: o32 85 /r] 386,SM
+TEST reg32,reg32 [mr: o32 85 /r] 386
+TEST mem,reg64 [mr: o64 85 /r] X64,SM
+TEST reg64,reg64 [mr: o64 85 /r] X64
+TEST reg8,mem [rm: 84 /r] 8086,SM
+TEST reg16,mem [rm: o16 85 /r] 8086,SM
+TEST reg32,mem [rm: o32 85 /r] 386,SM
+TEST reg64,mem [rm: o64 85 /r] X64,SM
+TEST reg_al,imm [-i: a8 ib] 8086,SM
+TEST reg_ax,imm [-i: o16 a9 iw] 8086,SM
+TEST reg_eax,imm [-i: o32 a9 id] 386,SM
+TEST reg_rax,imm [-i: o64 a9 id,s] X64,SM
+TEST rm8,imm [mi: f6 /0 ib] 8086,SM
+TEST rm16,imm [mi: o16 f7 /0 iw] 8086,SM
+TEST rm32,imm [mi: o32 f7 /0 id] 386,SM
+TEST rm64,imm [mi: o64 f7 /0 id,s] X64,SM
+TEST mem,imm8 [mi: f6 /0 ib] 8086,SM
+TEST mem,imm16 [mi: o16 f7 /0 iw] 8086,SM
+TEST mem,imm32 [mi: o32 f7 /0 id] 386,SM
+UD0 void [ 0f ff] 186
+UD1 reg,rm16 [rm: o16 0f b9 /r] 186
+UD1 reg,rm32 [rm: o32 0f b9 /r] 186
+UD1 reg,rm64 [rm: o64 0f b9 /r] 186
+UD1 void [ 0f b9] 186,ND
+UD2B void [ 0f b9] 186,ND
+UD2B reg,rm16 [rm: o16 0f b9 /r] 186,ND
+UD2B reg,rm32 [rm: o32 0f b9 /r] 186,ND
+UD2B reg,rm64 [rm: o64 0f b9 /r] 186,ND
+UD2 void [ 0f 0b] 186
+UD2A void [ 0f 0b] 186,ND
+UMOV mem,reg8 [mr: np 0f 10 /r] 386,UNDOC,SM,ND
+UMOV reg8,reg8 [mr: np 0f 10 /r] 386,UNDOC,ND
+UMOV mem,reg16 [mr: np o16 0f 11 /r] 386,UNDOC,SM,ND
+UMOV reg16,reg16 [mr: np o16 0f 11 /r] 386,UNDOC,ND
+UMOV mem,reg32 [mr: np o32 0f 11 /r] 386,UNDOC,SM,ND
+UMOV reg32,reg32 [mr: np o32 0f 11 /r] 386,UNDOC,ND
+UMOV reg8,mem [rm: np 0f 12 /r] 386,UNDOC,SM,ND
+UMOV reg8,reg8 [rm: np 0f 12 /r] 386,UNDOC,ND
+UMOV reg16,mem [rm: np o16 0f 13 /r] 386,UNDOC,SM,ND
+UMOV reg16,reg16 [rm: np o16 0f 13 /r] 386,UNDOC,ND
+UMOV reg32,mem [rm: np o32 0f 13 /r] 386,UNDOC,SM,ND
+UMOV reg32,reg32 [rm: np o32 0f 13 /r] 386,UNDOC,ND
+VERR mem [m: 0f 00 /4] 286,PROT
+VERR mem16 [m: 0f 00 /4] 286,PROT
+VERR reg16 [m: 0f 00 /4] 286,PROT
+VERW mem [m: 0f 00 /5] 286,PROT
+VERW mem16 [m: 0f 00 /5] 286,PROT
+VERW reg16 [m: 0f 00 /5] 286,PROT
+FWAIT void [ wait] 8086
+WBINVD void [ 0f 09] 486,PRIV
+WRSHR rm32 [m: o32 0f 37 /0] P6,CYRIX,SMM
+WRMSR void [ 0f 30] PENT,PRIV
+XADD mem,reg8 [mr: hle 0f c0 /r] 486,SM,LOCK
+XADD reg8,reg8 [mr: 0f c0 /r] 486
+XADD mem,reg16 [mr: hle o16 0f c1 /r] 486,SM,LOCK
+XADD reg16,reg16 [mr: o16 0f c1 /r] 486
+XADD mem,reg32 [mr: hle o32 0f c1 /r] 486,SM,LOCK
+XADD reg32,reg32 [mr: o32 0f c1 /r] 486
+XADD mem,reg64 [mr: hle o64 0f c1 /r] X64,SM,LOCK
+XADD reg64,reg64 [mr: o64 0f c1 /r] X64
+XBTS reg16,mem [rm: o16 0f a6 /r] 386,SW,UNDOC,ND
+XBTS reg16,reg16 [rm: o16 0f a6 /r] 386,UNDOC,ND
+XBTS reg32,mem [rm: o32 0f a6 /r] 386,SD,UNDOC,ND
+XBTS reg32,reg32 [rm: o32 0f a6 /r] 386,UNDOC,ND
+XCHG reg_ax,reg16 [-r: o16 90+r] 8086
+XCHG reg_eax,reg32na [-r: o32 90+r] 386
+XCHG reg_rax,reg64 [-r: o64 90+r] X64
+XCHG reg16,reg_ax [r-: o16 90+r] 8086
+XCHG reg32na,reg_eax [r-: o32 90+r] 386
+XCHG reg64,reg_rax [r-: o64 90+r] X64
+; This must be NOLONG since opcode 90 is NOP, and in 64-bit mode
+; "xchg eax,eax" is *not* a NOP.
+XCHG reg_eax,reg_eax [--: o32 90] 386,NOLONG
+XCHG reg8,mem [rm: hlenl 86 /r] 8086,SM,LOCK
+XCHG reg8,reg8 [rm: 86 /r] 8086
+XCHG reg16,mem [rm: hlenl o16 87 /r] 8086,SM,LOCK
+XCHG reg16,reg16 [rm: o16 87 /r] 8086
+XCHG reg32,mem [rm: hlenl o32 87 /r] 386,SM,LOCK
+XCHG reg32,reg32 [rm: o32 87 /r] 386
+XCHG reg64,mem [rm: hlenl o64 87 /r] X64,SM,LOCK
+XCHG reg64,reg64 [rm: o64 87 /r] X64
+XCHG mem,reg8 [mr: hlenl 86 /r] 8086,SM,LOCK
+XCHG reg8,reg8 [mr: 86 /r] 8086
+XCHG mem,reg16 [mr: hlenl o16 87 /r] 8086,SM,LOCK
+XCHG reg16,reg16 [mr: o16 87 /r] 8086
+XCHG mem,reg32 [mr: hlenl o32 87 /r] 386,SM,LOCK
+XCHG reg32,reg32 [mr: o32 87 /r] 386
+XCHG mem,reg64 [mr: hlenl o64 87 /r] X64,SM,LOCK
+XCHG reg64,reg64 [mr: o64 87 /r] X64
+XLATB void [ d7] 8086
+XLAT void [ d7] 8086
+XOR mem,reg8 [mr: hle 30 /r] 8086,SM,LOCK
+XOR reg8,reg8 [mr: 30 /r] 8086
+XOR mem,reg16 [mr: hle o16 31 /r] 8086,SM,LOCK
+XOR reg16,reg16 [mr: o16 31 /r] 8086
+XOR mem,reg32 [mr: hle o32 31 /r] 386,SM,LOCK
+XOR reg32,reg32 [mr: o32 31 /r] 386
+XOR mem,reg64 [mr: hle o64 31 /r] X64,SM,LOCK
+XOR reg64,reg64 [mr: o64 31 /r] X64
+XOR reg8,mem [rm: 32 /r] 8086,SM
+XOR reg8,reg8 [rm: 32 /r] 8086
+XOR reg16,mem [rm: o16 33 /r] 8086,SM
+XOR reg16,reg16 [rm: o16 33 /r] 8086
+XOR reg32,mem [rm: o32 33 /r] 386,SM
+XOR reg32,reg32 [rm: o32 33 /r] 386
+XOR reg64,mem [rm: o64 33 /r] X64,SM
+XOR reg64,reg64 [rm: o64 33 /r] X64
+XOR rm16,imm8 [mi: hle o16 83 /6 ib,s] 8086,LOCK
+XOR rm32,imm8 [mi: hle o32 83 /6 ib,s] 386,LOCK
+XOR rm64,imm8 [mi: hle o64 83 /6 ib,s] X64,LOCK
+XOR reg_al,imm [-i: 34 ib] 8086,SM
+XOR reg_ax,sbyteword [mi: o16 83 /6 ib,s] 8086,SM,ND
+XOR reg_ax,imm [-i: o16 35 iw] 8086,SM
+XOR reg_eax,sbytedword [mi: o32 83 /6 ib,s] 386,SM,ND
+XOR reg_eax,imm [-i: o32 35 id] 386,SM
+XOR reg_rax,sbytedword [mi: o64 83 /6 ib,s] X64,SM,ND
+XOR reg_rax,imm [-i: o64 35 id,s] X64,SM
+XOR rm8,imm [mi: hle 80 /6 ib] 8086,SM,LOCK
+XOR rm16,sbyteword [mi: hle o16 83 /6 ib,s] 8086,SM,LOCK,ND
+XOR rm16,imm [mi: hle o16 81 /6 iw] 8086,SM,LOCK
+XOR rm32,sbytedword [mi: hle o32 83 /6 ib,s] 386,SM,LOCK,ND
+XOR rm32,imm [mi: hle o32 81 /6 id] 386,SM,LOCK
+XOR rm64,sbytedword [mi: hle o64 83 /6 ib,s] X64,SM,LOCK,ND
+XOR rm64,imm [mi: hle o64 81 /6 id,s] X64,SM,LOCK
+XOR mem,imm8 [mi: hle 80 /6 ib] 8086,SM,LOCK
+XOR mem,sbyteword16 [mi: hle o16 83 /6 ib,s] 8086,SM,LOCK,ND
+XOR mem,imm16 [mi: hle o16 81 /6 iw] 8086,SM,LOCK
+XOR mem,sbytedword32 [mi: hle o32 83 /6 ib,s] 386,SM,LOCK,ND
+XOR mem,imm32 [mi: hle o32 81 /6 id] 386,SM,LOCK
+XOR rm8,imm [mi: hle 82 /6 ib] 8086,SM,LOCK,ND,NOLONG
+CMOVcc reg16,mem [rm: o16 0f 40+c /r] P6,SM
+CMOVcc reg16,reg16 [rm: o16 0f 40+c /r] P6
+CMOVcc reg32,mem [rm: o32 0f 40+c /r] P6,SM
+CMOVcc reg32,reg32 [rm: o32 0f 40+c /r] P6
+CMOVcc reg64,mem [rm: o64 0f 40+c /r] X64,SM
+CMOVcc reg64,reg64 [rm: o64 0f 40+c /r] X64
+Jcc imm|near [i: odf 0f 80+c rel] 386,BND
+Jcc imm16|near [i: o16 0f 80+c rel] 386,NOLONG,BND
+Jcc imm32|near [i: o32 0f 80+c rel] 386,NOLONG,BND
+Jcc imm64|near [i: o64nw 0f 80+c rel] X64,BND
+Jcc imm|short [i: 70+c rel8] 8086,ND,BND
+Jcc imm [i: jcc8 70+c rel8] 8086,ND,BND
+Jcc imm [i: 0f 80+c rel] 386,ND,BND
+Jcc imm [i: 71+c jlen e9 rel] 8086,ND,BND
+Jcc imm [i: 70+c rel8] 8086,BND
+
+SETcc mem [m: 0f 90+c /0] 386,SB
+SETcc reg8 [m: 0f 90+c /0] 386
+
+;# Katmai Streaming SIMD instructions (SSE -- a.k.a. KNI, XMM, MMX2)
+ADDPS xmmreg,xmmrm128 [rm: np 0f 58 /r] KATMAI,SSE
+ADDSS xmmreg,xmmrm32 [rm: f3 0f 58 /r] KATMAI,SSE
+ANDNPS xmmreg,xmmrm128 [rm: np 0f 55 /r] KATMAI,SSE
+ANDPS xmmreg,xmmrm128 [rm: np 0f 54 /r] KATMAI,SSE
+CMPEQPS xmmreg,xmmrm128 [rm: np 0f c2 /r 00] KATMAI,SSE
+CMPEQSS xmmreg,xmmrm32 [rm: f3 0f c2 /r 00] KATMAI,SSE
+CMPLEPS xmmreg,xmmrm128 [rm: np 0f c2 /r 02] KATMAI,SSE
+CMPLESS xmmreg,xmmrm32 [rm: f3 0f c2 /r 02] KATMAI,SSE
+CMPLTPS xmmreg,xmmrm128 [rm: np 0f c2 /r 01] KATMAI,SSE
+CMPLTSS xmmreg,xmmrm32 [rm: f3 0f c2 /r 01] KATMAI,SSE
+CMPNEQPS xmmreg,xmmrm128 [rm: np 0f c2 /r 04] KATMAI,SSE
+CMPNEQSS xmmreg,xmmrm32 [rm: f3 0f c2 /r 04] KATMAI,SSE
+CMPNLEPS xmmreg,xmmrm128 [rm: np 0f c2 /r 06] KATMAI,SSE
+CMPNLESS xmmreg,xmmrm32 [rm: f3 0f c2 /r 06] KATMAI,SSE
+CMPNLTPS xmmreg,xmmrm128 [rm: np 0f c2 /r 05] KATMAI,SSE
+CMPNLTSS xmmreg,xmmrm32 [rm: f3 0f c2 /r 05] KATMAI,SSE
+CMPORDPS xmmreg,xmmrm128 [rm: np 0f c2 /r 07] KATMAI,SSE
+CMPORDSS xmmreg,xmmrm32 [rm: f3 0f c2 /r 07] KATMAI,SSE
+CMPUNORDPS xmmreg,xmmrm128 [rm: np 0f c2 /r 03] KATMAI,SSE
+CMPUNORDSS xmmreg,xmmrm32 [rm: f3 0f c2 /r 03] KATMAI,SSE
+; CMPPS/CMPSS must come after the specific ops; that way the disassembler will find the
+; specific ops first and only disassemble illegal ones as cmpps/cmpss.
+CMPPS xmmreg,mem,imm [rmi: np 0f c2 /r ib,u] KATMAI,SSE,SB,AR2
+CMPPS xmmreg,xmmreg,imm [rmi: np 0f c2 /r ib,u] KATMAI,SSE,SB,AR2
+CMPSS xmmreg,mem,imm [rmi: f3 0f c2 /r ib,u] KATMAI,SSE,SB,AR2
+CMPSS xmmreg,xmmreg,imm [rmi: f3 0f c2 /r ib,u] KATMAI,SSE,SB,AR2
+COMISS xmmreg,xmmrm32 [rm: np 0f 2f /r] KATMAI,SSE
+CVTPI2PS xmmreg,mmxrm64 [rm: np 0f 2a /r] KATMAI,SSE,MMX
+CVTPS2PI mmxreg,xmmrm64 [rm: np 0f 2d /r] KATMAI,SSE,MMX
+CVTSI2SS xmmreg,mem [rm: f3 0f 2a /r] KATMAI,SSE,SD,AR1,ND
+CVTSI2SS xmmreg,rm32 [rm: f3 0f 2a /r] KATMAI,SSE,SD,AR1
+CVTSI2SS xmmreg,rm64 [rm: o64 f3 0f 2a /r] X64,SSE,SQ,AR1
+CVTSS2SI reg32,xmmreg [rm: f3 0f 2d /r] KATMAI,SSE,SD,AR1
+CVTSS2SI reg32,mem [rm: f3 0f 2d /r] KATMAI,SSE,SD,AR1
+CVTSS2SI reg64,xmmreg [rm: o64 f3 0f 2d /r] X64,SSE,SD,AR1
+CVTSS2SI reg64,mem [rm: o64 f3 0f 2d /r] X64,SSE,SD,AR1
+CVTTPS2PI mmxreg,xmmrm [rm: np 0f 2c /r] KATMAI,SSE,MMX,SQ
+CVTTSS2SI reg32,xmmrm [rm: f3 0f 2c /r] KATMAI,SSE,SD,AR1
+CVTTSS2SI reg64,xmmrm [rm: o64 f3 0f 2c /r] X64,SSE,SD,AR1
+DIVPS xmmreg,xmmrm128 [rm: np 0f 5e /r] KATMAI,SSE
+DIVSS xmmreg,xmmrm32 [rm: f3 0f 5e /r] KATMAI,SSE
+LDMXCSR mem32 [m: np 0f ae /2] KATMAI,SSE
+MAXPS xmmreg,xmmrm128 [rm: np 0f 5f /r] KATMAI,SSE
+MAXSS xmmreg,xmmrm32 [rm: f3 0f 5f /r] KATMAI,SSE
+MINPS xmmreg,xmmrm128 [rm: np 0f 5d /r] KATMAI,SSE
+MINSS xmmreg,xmmrm32 [rm: f3 0f 5d /r] KATMAI,SSE
+MOVAPS xmmreg,xmmrm128 [rm: np 0f 28 /r] KATMAI,SSE
+MOVAPS xmmrm128,xmmreg [mr: np 0f 29 /r] KATMAI,SSE
+MOVHPS xmmreg,mem64 [rm: np 0f 16 /r] KATMAI,SSE
+MOVHPS mem64,xmmreg [mr: np 0f 17 /r] KATMAI,SSE
+MOVLHPS xmmreg,xmmreg [rm: np 0f 16 /r] KATMAI,SSE
+MOVLPS xmmreg,mem64 [rm: np 0f 12 /r] KATMAI,SSE
+MOVLPS mem64,xmmreg [mr: np 0f 13 /r] KATMAI,SSE
+MOVHLPS xmmreg,xmmreg [rm: np 0f 12 /r] KATMAI,SSE
+MOVMSKPS reg32,xmmreg [rm: np 0f 50 /r] KATMAI,SSE
+MOVMSKPS reg64,xmmreg [rm: np o64 0f 50 /r] X64,SSE
+MOVNTPS mem128,xmmreg [mr: np 0f 2b /r] KATMAI,SSE
+MOVSS xmmreg,xmmrm32 [rm: f3 0f 10 /r] KATMAI,SSE
+MOVSS mem32,xmmreg [mr: f3 0f 11 /r] KATMAI,SSE
+MOVSS xmmreg,xmmreg [rm: f3 0f 10 /r] KATMAI,SSE
+MOVUPS xmmreg,xmmrm128 [rm: np 0f 10 /r] KATMAI,SSE
+MOVUPS xmmrm128,xmmreg [mr: np 0f 11 /r] KATMAI,SSE
+MULPS xmmreg,xmmrm128 [rm: np 0f 59 /r] KATMAI,SSE
+MULSS xmmreg,xmmrm32 [rm: f3 0f 59 /r] KATMAI,SSE
+ORPS xmmreg,xmmrm128 [rm: np 0f 56 /r] KATMAI,SSE
+RCPPS xmmreg,xmmrm128 [rm: np 0f 53 /r] KATMAI,SSE
+RCPSS xmmreg,xmmrm32 [rm: f3 0f 53 /r] KATMAI,SSE
+RSQRTPS xmmreg,xmmrm128 [rm: np 0f 52 /r] KATMAI,SSE
+RSQRTSS xmmreg,xmmrm32 [rm: f3 0f 52 /r] KATMAI,SSE
+SHUFPS xmmreg,xmmrm128,imm8 [rmi: np 0f c6 /r ib,u] KATMAI,SSE
+SQRTPS xmmreg,xmmrm128 [rm: np 0f 51 /r] KATMAI,SSE
+SQRTSS xmmreg,xmmrm32 [rm: f3 0f 51 /r] KATMAI,SSE
+STMXCSR mem32 [m: np 0f ae /3] KATMAI,SSE
+SUBPS xmmreg,xmmrm128 [rm: np 0f 5c /r] KATMAI,SSE
+SUBSS xmmreg,xmmrm32 [rm: f3 0f 5c /r] KATMAI,SSE
+UCOMISS xmmreg,xmmrm32 [rm: np 0f 2e /r] KATMAI,SSE
+UNPCKHPS xmmreg,xmmrm128 [rm: np 0f 15 /r] KATMAI,SSE
+UNPCKLPS xmmreg,xmmrm128 [rm: np 0f 14 /r] KATMAI,SSE
+XORPS xmmreg,xmmrm128 [rm: np 0f 57 /r] KATMAI,SSE
+
+;# Introduced in Deschutes but necessary for SSE support
+FXRSTOR mem [m: np 0f ae /1] P6,SSE,FPU
+FXRSTOR64 mem [m: o64 np 0f ae /1] X64,SSE,FPU
+FXSAVE mem [m: np 0f ae /0] P6,SSE,FPU
+FXSAVE64 mem [m: o64 np 0f ae /0] X64,SSE,FPU
+
+;# XSAVE group (AVX and extended state)
+; Introduced in late Penryn ... we really need to clean up the handling
+; of CPU feature bits.
+XGETBV void [ 0f 01 d0] NEHALEM
+XSETBV void [ 0f 01 d1] NEHALEM,PRIV
+XSAVE mem [m: np 0f ae /4] NEHALEM
+XSAVE64 mem [m: o64 np 0f ae /4] LONG,NEHALEM
+XSAVEC mem [m: np 0f c7 /4] FUTURE
+XSAVEC64 mem [m: o64 np 0f c7 /4] LONG,FUTURE
+XSAVEOPT mem [m: np 0f ae /6] FUTURE
+XSAVEOPT64 mem [m: o64 np 0f ae /6] LONG,FUTURE
+XSAVES mem [m: np 0f c7 /5] FUTURE
+XSAVES64 mem [m: o64 np 0f c7 /5] LONG,FUTURE
+XRSTOR mem [m: np 0f ae /5] NEHALEM
+XRSTOR64 mem [m: o64 np 0f ae /5] LONG,NEHALEM
+XRSTORS mem [m: np 0f c7 /3] FUTURE
+XRSTORS64 mem [m: o64 np 0f c7 /3] LONG,FUTURE
+
+; These instructions are not SSE-specific; they are
+;# Generic memory operations
+; and work even if CR4.OSFXFR == 0
+PREFETCHNTA mem8 [m: 0f 18 /0] KATMAI
+PREFETCHT0 mem8 [m: 0f 18 /1] KATMAI
+PREFETCHT1 mem8 [m: 0f 18 /2] KATMAI
+PREFETCHT2 mem8 [m: 0f 18 /3] KATMAI
+SFENCE void [ np 0f ae f8] KATMAI
+
+;# New MMX instructions introduced in Katmai
+MASKMOVQ mmxreg,mmxreg [rm: np 0f f7 /r] KATMAI,MMX
+MOVNTQ mem,mmxreg [mr: np 0f e7 /r] KATMAI,MMX,SQ
+PAVGB mmxreg,mmxrm [rm: np o64nw 0f e0 /r] KATMAI,MMX,SQ
+PAVGW mmxreg,mmxrm [rm: np o64nw 0f e3 /r] KATMAI,MMX,SQ
+PEXTRW reg32,mmxreg,imm [rmi: np 0f c5 /r ib,u] KATMAI,MMX,SB,AR2
+; PINSRW is documented as using a reg32, but it's really using only 16 bit
+; -- accept either, but be truthful in disassembly
+PINSRW mmxreg,mem,imm [rmi: np 0f c4 /r ib,u] KATMAI,MMX,SB,AR2
+PINSRW mmxreg,rm16,imm [rmi: np 0f c4 /r ib,u] KATMAI,MMX,SB,AR2
+PINSRW mmxreg,reg32,imm [rmi: np 0f c4 /r ib,u] KATMAI,MMX,SB,AR2
+PMAXSW mmxreg,mmxrm [rm: np o64nw 0f ee /r] KATMAI,MMX,SQ
+PMAXUB mmxreg,mmxrm [rm: np o64nw 0f de /r] KATMAI,MMX,SQ
+PMINSW mmxreg,mmxrm [rm: np o64nw 0f ea /r] KATMAI,MMX,SQ
+PMINUB mmxreg,mmxrm [rm: np o64nw 0f da /r] KATMAI,MMX,SQ
+PMOVMSKB reg32,mmxreg [rm: np 0f d7 /r] KATMAI,MMX
+PMULHUW mmxreg,mmxrm [rm: np o64nw 0f e4 /r] KATMAI,MMX,SQ
+PSADBW mmxreg,mmxrm [rm: np o64nw 0f f6 /r] KATMAI,MMX,SQ
+PSHUFW mmxreg,mmxrm,imm [rmi: np o64nw 0f 70 /r ib] KATMAI,MMX,SM2,SB,AR2
+
+;# AMD Enhanced 3DNow! (Athlon) instructions
+PF2IW mmxreg,mmxrm [rm: o64nw 0f 0f /r 1c] PENT,3DNOW,SQ
+PFNACC mmxreg,mmxrm [rm: o64nw 0f 0f /r 8a] PENT,3DNOW,SQ
+PFPNACC mmxreg,mmxrm [rm: o64nw 0f 0f /r 8e] PENT,3DNOW,SQ
+PI2FW mmxreg,mmxrm [rm: o64nw 0f 0f /r 0c] PENT,3DNOW,SQ
+PSWAPD mmxreg,mmxrm [rm: o64nw 0f 0f /r bb] PENT,3DNOW,SQ
+
+;# Willamette SSE2 Cacheability Instructions
+MASKMOVDQU xmmreg,xmmreg [rm: 66 0f f7 /r] WILLAMETTE,SSE2
+; CLFLUSH needs its own feature flag implemented one day
+CLFLUSH mem [m: np 0f ae /7] WILLAMETTE,SSE2
+MOVNTDQ mem,xmmreg [mr: 66 0f e7 /r] WILLAMETTE,SSE2,SO
+MOVNTI mem,reg32 [mr: np 0f c3 /r] WILLAMETTE,SD
+MOVNTI mem,reg64 [mr: o64 np 0f c3 /r] X64,SQ
+MOVNTPD mem,xmmreg [mr: 66 0f 2b /r] WILLAMETTE,SSE2,SO
+LFENCE void [ np 0f ae e8] WILLAMETTE,SSE2
+MFENCE void [ np 0f ae f0] WILLAMETTE,SSE2
+
+;# Willamette MMX instructions (SSE2 SIMD Integer Instructions)
+MOVD mem,xmmreg [mr: 66 norexw 0f 7e /r] WILLAMETTE,SSE2,SD
+MOVD xmmreg,mem [rm: 66 norexw 0f 6e /r] WILLAMETTE,SSE2,SD
+MOVD xmmreg,rm32 [rm: 66 norexw 0f 6e /r] WILLAMETTE,SSE2
+MOVD rm32,xmmreg [mr: 66 norexw 0f 7e /r] WILLAMETTE,SSE2
+MOVDQA xmmreg,xmmreg [rm: 66 0f 6f /r] WILLAMETTE,SSE2
+MOVDQA mem,xmmreg [mr: 66 0f 7f /r] WILLAMETTE,SSE2,SO
+MOVDQA xmmreg,mem [rm: 66 0f 6f /r] WILLAMETTE,SSE2,SO
+MOVDQA xmmreg,xmmreg [mr: 66 0f 7f /r] WILLAMETTE,SSE2
+MOVDQU xmmreg,xmmreg [rm: f3 0f 6f /r] WILLAMETTE,SSE2
+MOVDQU mem,xmmreg [mr: f3 0f 7f /r] WILLAMETTE,SSE2,SO
+MOVDQU xmmreg,mem [rm: f3 0f 6f /r] WILLAMETTE,SSE2,SO
+MOVDQU xmmreg,xmmreg [mr: f3 0f 7f /r] WILLAMETTE,SSE2
+MOVDQ2Q mmxreg,xmmreg [rm: f2 0f d6 /r] WILLAMETTE,SSE2
+MOVQ xmmreg,xmmreg [rm: f3 0f 7e /r] WILLAMETTE,SSE2
+MOVQ xmmreg,xmmreg [mr: 66 0f d6 /r] WILLAMETTE,SSE2
+MOVQ mem,xmmreg [mr: 66 0f d6 /r] WILLAMETTE,SSE2,SQ
+MOVQ xmmreg,mem [rm: f3 0f 7e /r] WILLAMETTE,SSE2,SQ
+MOVQ xmmreg,rm64 [rm: 66 o64 0f 6e /r] X64,SSE2
+MOVQ rm64,xmmreg [mr: 66 o64 0f 7e /r] X64,SSE2
+MOVQ2DQ xmmreg,mmxreg [rm: f3 0f d6 /r] WILLAMETTE,SSE2
+PACKSSWB xmmreg,xmmrm [rm: 66 0f 63 /r] WILLAMETTE,SSE2,SO
+PACKSSDW xmmreg,xmmrm [rm: 66 0f 6b /r] WILLAMETTE,SSE2,SO
+PACKUSWB xmmreg,xmmrm [rm: 66 0f 67 /r] WILLAMETTE,SSE2,SO
+PADDB xmmreg,xmmrm [rm: 66 0f fc /r] WILLAMETTE,SSE2,SO
+PADDW xmmreg,xmmrm [rm: 66 0f fd /r] WILLAMETTE,SSE2,SO
+PADDD xmmreg,xmmrm [rm: 66 0f fe /r] WILLAMETTE,SSE2,SO
+PADDQ mmxreg,mmxrm [rm: np 0f d4 /r] WILLAMETTE,MMX,SQ
+PADDQ xmmreg,xmmrm [rm: 66 0f d4 /r] WILLAMETTE,SSE2,SO
+PADDSB xmmreg,xmmrm [rm: 66 0f ec /r] WILLAMETTE,SSE2,SO
+PADDSW xmmreg,xmmrm [rm: 66 0f ed /r] WILLAMETTE,SSE2,SO
+PADDUSB xmmreg,xmmrm [rm: 66 0f dc /r] WILLAMETTE,SSE2,SO
+PADDUSW xmmreg,xmmrm [rm: 66 0f dd /r] WILLAMETTE,SSE2,SO
+PAND xmmreg,xmmrm [rm: 66 0f db /r] WILLAMETTE,SSE2,SO
+PANDN xmmreg,xmmrm [rm: 66 0f df /r] WILLAMETTE,SSE2,SO
+PAVGB xmmreg,xmmrm [rm: 66 0f e0 /r] WILLAMETTE,SSE2,SO
+PAVGW xmmreg,xmmrm [rm: 66 0f e3 /r] WILLAMETTE,SSE2,SO
+PCMPEQB xmmreg,xmmrm [rm: 66 0f 74 /r] WILLAMETTE,SSE2,SO
+PCMPEQW xmmreg,xmmrm [rm: 66 0f 75 /r] WILLAMETTE,SSE2,SO
+PCMPEQD xmmreg,xmmrm [rm: 66 0f 76 /r] WILLAMETTE,SSE2,SO
+PCMPGTB xmmreg,xmmrm [rm: 66 0f 64 /r] WILLAMETTE,SSE2,SO
+PCMPGTW xmmreg,xmmrm [rm: 66 0f 65 /r] WILLAMETTE,SSE2,SO
+PCMPGTD xmmreg,xmmrm [rm: 66 0f 66 /r] WILLAMETTE,SSE2,SO
+PEXTRW reg32,xmmreg,imm [rmi: 66 0f c5 /r ib,u] WILLAMETTE,SSE2,SB,AR2
+PINSRW xmmreg,reg16,imm [rmi: 66 0f c4 /r ib,u] WILLAMETTE,SSE2,SB,AR2
+PINSRW xmmreg,reg32,imm [rmi: 66 0f c4 /r ib,u] WILLAMETTE,SSE2,SB,AR2,ND
+PINSRW xmmreg,mem,imm [rmi: 66 0f c4 /r ib,u] WILLAMETTE,SSE2,SB,AR2
+PINSRW xmmreg,mem16,imm [rmi: 66 0f c4 /r ib,u] WILLAMETTE,SSE2,SB,AR2
+PMADDWD xmmreg,xmmrm [rm: 66 0f f5 /r] WILLAMETTE,SSE2,SO
+PMAXSW xmmreg,xmmrm [rm: 66 0f ee /r] WILLAMETTE,SSE2,SO
+PMAXUB xmmreg,xmmrm [rm: 66 0f de /r] WILLAMETTE,SSE2,SO
+PMINSW xmmreg,xmmrm [rm: 66 0f ea /r] WILLAMETTE,SSE2,SO
+PMINUB xmmreg,xmmrm [rm: 66 0f da /r] WILLAMETTE,SSE2,SO
+PMOVMSKB reg32,xmmreg [rm: 66 0f d7 /r] WILLAMETTE,SSE2
+PMULHUW xmmreg,xmmrm [rm: 66 0f e4 /r] WILLAMETTE,SSE2,SO
+PMULHW xmmreg,xmmrm [rm: 66 0f e5 /r] WILLAMETTE,SSE2,SO
+PMULLW xmmreg,xmmrm [rm: 66 0f d5 /r] WILLAMETTE,SSE2,SO
+PMULUDQ mmxreg,mmxrm [rm: np o64nw 0f f4 /r] WILLAMETTE,SSE2,SO
+PMULUDQ xmmreg,xmmrm [rm: 66 0f f4 /r] WILLAMETTE,SSE2,SO
+POR xmmreg,xmmrm [rm: 66 0f eb /r] WILLAMETTE,SSE2,SO
+PSADBW xmmreg,xmmrm [rm: 66 0f f6 /r] WILLAMETTE,SSE2,SO
+PSHUFD xmmreg,xmmreg,imm [rmi: 66 0f 70 /r ib] WILLAMETTE,SSE2,SB,AR2
+PSHUFD xmmreg,mem,imm [rmi: 66 0f 70 /r ib] WILLAMETTE,SSE2,SM2,SB,AR2
+PSHUFHW xmmreg,xmmreg,imm [rmi: f3 0f 70 /r ib] WILLAMETTE,SSE2,SB,AR2
+PSHUFHW xmmreg,mem,imm [rmi: f3 0f 70 /r ib] WILLAMETTE,SSE2,SM2,SB,AR2
+PSHUFLW xmmreg,xmmreg,imm [rmi: f2 0f 70 /r ib] WILLAMETTE,SSE2,SB,AR2
+PSHUFLW xmmreg,mem,imm [rmi: f2 0f 70 /r ib] WILLAMETTE,SSE2,SM2,SB,AR2
+PSLLDQ xmmreg,imm [mi: 66 0f 73 /7 ib,u] WILLAMETTE,SSE2,SB,AR1
+PSLLW xmmreg,xmmrm [rm: 66 0f f1 /r] WILLAMETTE,SSE2,SO
+PSLLW xmmreg,imm [mi: 66 0f 71 /6 ib,u] WILLAMETTE,SSE2,SB,AR1
+PSLLD xmmreg,xmmrm [rm: 66 0f f2 /r] WILLAMETTE,SSE2,SO
+PSLLD xmmreg,imm [mi: 66 0f 72 /6 ib,u] WILLAMETTE,SSE2,SB,AR1
+PSLLQ xmmreg,xmmrm [rm: 66 0f f3 /r] WILLAMETTE,SSE2,SO
+PSLLQ xmmreg,imm [mi: 66 0f 73 /6 ib,u] WILLAMETTE,SSE2,SB,AR1
+PSRAW xmmreg,xmmrm [rm: 66 0f e1 /r] WILLAMETTE,SSE2,SO
+PSRAW xmmreg,imm [mi: 66 0f 71 /4 ib,u] WILLAMETTE,SSE2,SB,AR1
+PSRAD xmmreg,xmmrm [rm: 66 0f e2 /r] WILLAMETTE,SSE2,SO
+PSRAD xmmreg,imm [mi: 66 0f 72 /4 ib,u] WILLAMETTE,SSE2,SB,AR1
+PSRLDQ xmmreg,imm [mi: 66 0f 73 /3 ib,u] WILLAMETTE,SSE2,SB,AR1
+PSRLW xmmreg,xmmrm [rm: 66 0f d1 /r] WILLAMETTE,SSE2,SO
+PSRLW xmmreg,imm [mi: 66 0f 71 /2 ib,u] WILLAMETTE,SSE2,SB,AR1
+PSRLD xmmreg,xmmrm [rm: 66 0f d2 /r] WILLAMETTE,SSE2,SO
+PSRLD xmmreg,imm [mi: 66 0f 72 /2 ib,u] WILLAMETTE,SSE2,SB,AR1
+PSRLQ xmmreg,xmmrm [rm: 66 0f d3 /r] WILLAMETTE,SSE2,SO
+PSRLQ xmmreg,imm [mi: 66 0f 73 /2 ib,u] WILLAMETTE,SSE2,SB,AR1
+PSUBB xmmreg,xmmrm [rm: 66 0f f8 /r] WILLAMETTE,SSE2,SO
+PSUBW xmmreg,xmmrm [rm: 66 0f f9 /r] WILLAMETTE,SSE2,SO
+PSUBD xmmreg,xmmrm [rm: 66 0f fa /r] WILLAMETTE,SSE2,SO
+PSUBQ mmxreg,mmxrm [rm: np o64nw 0f fb /r] WILLAMETTE,SSE2,SO
+PSUBQ xmmreg,xmmrm [rm: 66 0f fb /r] WILLAMETTE,SSE2,SO
+PSUBSB xmmreg,xmmrm [rm: 66 0f e8 /r] WILLAMETTE,SSE2,SO
+PSUBSW xmmreg,xmmrm [rm: 66 0f e9 /r] WILLAMETTE,SSE2,SO
+PSUBUSB xmmreg,xmmrm [rm: 66 0f d8 /r] WILLAMETTE,SSE2,SO
+PSUBUSW xmmreg,xmmrm [rm: 66 0f d9 /r] WILLAMETTE,SSE2,SO
+PUNPCKHBW xmmreg,xmmrm [rm: 66 0f 68 /r] WILLAMETTE,SSE2,SO
+PUNPCKHWD xmmreg,xmmrm [rm: 66 0f 69 /r] WILLAMETTE,SSE2,SO
+PUNPCKHDQ xmmreg,xmmrm [rm: 66 0f 6a /r] WILLAMETTE,SSE2,SO
+PUNPCKHQDQ xmmreg,xmmrm [rm: 66 0f 6d /r] WILLAMETTE,SSE2,SO
+PUNPCKLBW xmmreg,xmmrm [rm: 66 0f 60 /r] WILLAMETTE,SSE2,SO
+PUNPCKLWD xmmreg,xmmrm [rm: 66 0f 61 /r] WILLAMETTE,SSE2,SO
+PUNPCKLDQ xmmreg,xmmrm [rm: 66 0f 62 /r] WILLAMETTE,SSE2,SO
+PUNPCKLQDQ xmmreg,xmmrm [rm: 66 0f 6c /r] WILLAMETTE,SSE2,SO
+PXOR xmmreg,xmmrm [rm: 66 0f ef /r] WILLAMETTE,SSE2,SO
+
+;# Willamette Streaming SIMD instructions (SSE2)
+ADDPD xmmreg,xmmrm [rm: 66 0f 58 /r] WILLAMETTE,SSE2,SO
+ADDSD xmmreg,xmmrm [rm: f2 0f 58 /r] WILLAMETTE,SSE2,SQ
+ANDNPD xmmreg,xmmrm [rm: 66 0f 55 /r] WILLAMETTE,SSE2,SO
+ANDPD xmmreg,xmmrm [rm: 66 0f 54 /r] WILLAMETTE,SSE2,SO
+CMPEQPD xmmreg,xmmrm [rm: 66 0f c2 /r 00] WILLAMETTE,SSE2,SO
+CMPEQSD xmmreg,xmmrm [rm: f2 0f c2 /r 00] WILLAMETTE,SSE2
+CMPLEPD xmmreg,xmmrm [rm: 66 0f c2 /r 02] WILLAMETTE,SSE2,SO
+CMPLESD xmmreg,xmmrm [rm: f2 0f c2 /r 02] WILLAMETTE,SSE2
+CMPLTPD xmmreg,xmmrm [rm: 66 0f c2 /r 01] WILLAMETTE,SSE2,SO
+CMPLTSD xmmreg,xmmrm [rm: f2 0f c2 /r 01] WILLAMETTE,SSE2
+CMPNEQPD xmmreg,xmmrm [rm: 66 0f c2 /r 04] WILLAMETTE,SSE2,SO
+CMPNEQSD xmmreg,xmmrm [rm: f2 0f c2 /r 04] WILLAMETTE,SSE2
+CMPNLEPD xmmreg,xmmrm [rm: 66 0f c2 /r 06] WILLAMETTE,SSE2,SO
+CMPNLESD xmmreg,xmmrm [rm: f2 0f c2 /r 06] WILLAMETTE,SSE2
+CMPNLTPD xmmreg,xmmrm [rm: 66 0f c2 /r 05] WILLAMETTE,SSE2,SO
+CMPNLTSD xmmreg,xmmrm [rm: f2 0f c2 /r 05] WILLAMETTE,SSE2
+CMPORDPD xmmreg,xmmrm [rm: 66 0f c2 /r 07] WILLAMETTE,SSE2,SO
+CMPORDSD xmmreg,xmmrm [rm: f2 0f c2 /r 07] WILLAMETTE,SSE2
+CMPUNORDPD xmmreg,xmmrm [rm: 66 0f c2 /r 03] WILLAMETTE,SSE2,SO
+CMPUNORDSD xmmreg,xmmrm [rm: f2 0f c2 /r 03] WILLAMETTE,SSE2
+; CMPPD/CMPSD must come after the specific ops; that way the disassembler will find the
+; specific ops first and only disassemble illegal ones as cmppd/cmpsd.
+CMPPD xmmreg,xmmrm128,imm8 [rmi: 66 0f c2 /r ib,u] WILLAMETTE,SSE2
+CMPSD xmmreg,xmmrm128,imm8 [rmi: f2 0f c2 /r ib,u] WILLAMETTE,SSE2
+COMISD xmmreg,xmmrm [rm: 66 0f 2f /r] WILLAMETTE,SSE2
+CVTDQ2PD xmmreg,xmmrm [rm: f3 0f e6 /r] WILLAMETTE,SSE2,SQ
+CVTDQ2PS xmmreg,xmmrm [rm: np 0f 5b /r] WILLAMETTE,SSE2,SO
+CVTPD2DQ xmmreg,xmmrm [rm: f2 0f e6 /r] WILLAMETTE,SSE2,SO
+CVTPD2PI mmxreg,xmmrm [rm: 66 0f 2d /r] WILLAMETTE,SSE2,SO
+CVTPD2PS xmmreg,xmmrm [rm: 66 0f 5a /r] WILLAMETTE,SSE2,SO
+CVTPI2PD xmmreg,mmxrm [rm: 66 0f 2a /r] WILLAMETTE,SSE2,SQ
+CVTPS2DQ xmmreg,xmmrm [rm: 66 0f 5b /r] WILLAMETTE,SSE2,SO
+CVTPS2PD xmmreg,xmmrm [rm: np 0f 5a /r] WILLAMETTE,SSE2,SQ
+CVTSD2SI reg32,xmmreg [rm: norexw f2 0f 2d /r] WILLAMETTE,SSE2,SQ,AR1
+CVTSD2SI reg32,mem [rm: norexw f2 0f 2d /r] WILLAMETTE,SSE2,SQ,AR1
+CVTSD2SI reg64,xmmreg [rm: o64 f2 0f 2d /r] X64,SSE2,SQ,AR1
+CVTSD2SI reg64,mem [rm: o64 f2 0f 2d /r] X64,SSE2,SQ,AR1
+CVTSD2SS xmmreg,xmmrm [rm: f2 0f 5a /r] WILLAMETTE,SSE2,SQ
+CVTSI2SD xmmreg,mem [rm: f2 0f 2a /r] WILLAMETTE,SSE2,SD,AR1,ND
+CVTSI2SD xmmreg,rm32 [rm: norexw f2 0f 2a /r] WILLAMETTE,SSE2,SD,AR1
+CVTSI2SD xmmreg,rm64 [rm: o64 f2 0f 2a /r] X64,SSE2,SQ,AR1
+CVTSS2SD xmmreg,xmmrm [rm: f3 0f 5a /r] WILLAMETTE,SSE2,SD
+CVTTPD2PI mmxreg,xmmrm [rm: 66 0f 2c /r] WILLAMETTE,SSE2,SO
+CVTTPD2DQ xmmreg,xmmrm [rm: 66 0f e6 /r] WILLAMETTE,SSE2,SO
+CVTTPS2DQ xmmreg,xmmrm [rm: f3 0f 5b /r] WILLAMETTE,SSE2,SO
+CVTTSD2SI reg32,xmmreg [rm: norexw f2 0f 2c /r] WILLAMETTE,SSE2,SQ,AR1
+CVTTSD2SI reg32,mem [rm: norexw f2 0f 2c /r] WILLAMETTE,SSE2,SQ,AR1
+CVTTSD2SI reg64,xmmreg [rm: o64 f2 0f 2c /r] X64,SSE2,SQ,AR1
+CVTTSD2SI reg64,mem [rm: o64 f2 0f 2c /r] X64,SSE2,SQ,AR1
+DIVPD xmmreg,xmmrm [rm: 66 0f 5e /r] WILLAMETTE,SSE2,SO
+DIVSD xmmreg,xmmrm [rm: f2 0f 5e /r] WILLAMETTE,SSE2
+MAXPD xmmreg,xmmrm [rm: 66 0f 5f /r] WILLAMETTE,SSE2,SO
+MAXSD xmmreg,xmmrm [rm: f2 0f 5f /r] WILLAMETTE,SSE2
+MINPD xmmreg,xmmrm [rm: 66 0f 5d /r] WILLAMETTE,SSE2,SO
+MINSD xmmreg,xmmrm [rm: f2 0f 5d /r] WILLAMETTE,SSE2
+MOVAPD xmmreg,xmmreg [rm: 66 0f 28 /r] WILLAMETTE,SSE2
+MOVAPD xmmreg,xmmreg [mr: 66 0f 29 /r] WILLAMETTE,SSE2
+MOVAPD mem,xmmreg [mr: 66 0f 29 /r] WILLAMETTE,SSE2,SO
+MOVAPD xmmreg,mem [rm: 66 0f 28 /r] WILLAMETTE,SSE2,SO
+MOVHPD mem,xmmreg [mr: 66 0f 17 /r] WILLAMETTE,SSE2
+MOVHPD xmmreg,mem [rm: 66 0f 16 /r] WILLAMETTE,SSE2
+MOVLPD mem64,xmmreg [mr: 66 0f 13 /r] WILLAMETTE,SSE2
+MOVLPD xmmreg,mem64 [rm: 66 0f 12 /r] WILLAMETTE,SSE2
+MOVMSKPD reg32,xmmreg [rm: 66 0f 50 /r] WILLAMETTE,SSE2
+MOVMSKPD reg64,xmmreg [rm: 66 o64 0f 50 /r] X64,SSE2
+MOVSD xmmreg,xmmreg [rm: f2 0f 10 /r] WILLAMETTE,SSE2
+MOVSD xmmreg,xmmreg [mr: f2 0f 11 /r] WILLAMETTE,SSE2
+MOVSD mem64,xmmreg [mr: f2 0f 11 /r] WILLAMETTE,SSE2
+MOVSD xmmreg,mem64 [rm: f2 0f 10 /r] WILLAMETTE,SSE2
+MOVUPD xmmreg,xmmreg [rm: 66 0f 10 /r] WILLAMETTE,SSE2
+MOVUPD xmmreg,xmmreg [mr: 66 0f 11 /r] WILLAMETTE,SSE2
+MOVUPD mem,xmmreg [mr: 66 0f 11 /r] WILLAMETTE,SSE2,SO
+MOVUPD xmmreg,mem [rm: 66 0f 10 /r] WILLAMETTE,SSE2,SO
+MULPD xmmreg,xmmrm [rm: 66 0f 59 /r] WILLAMETTE,SSE2,SO
+MULSD xmmreg,xmmrm [rm: f2 0f 59 /r] WILLAMETTE,SSE2
+ORPD xmmreg,xmmrm [rm: 66 0f 56 /r] WILLAMETTE,SSE2,SO
+SHUFPD xmmreg,xmmreg,imm [rmi: 66 0f c6 /r ib,u] WILLAMETTE,SSE2,SB,AR2
+SHUFPD xmmreg,mem,imm [rmi: 66 0f c6 /r ib,u] WILLAMETTE,SSE2,SM,SB,AR2
+SQRTPD xmmreg,xmmrm [rm: 66 0f 51 /r] WILLAMETTE,SSE2,SO
+SQRTSD xmmreg,xmmrm [rm: f2 0f 51 /r] WILLAMETTE,SSE2
+SUBPD xmmreg,xmmrm [rm: 66 0f 5c /r] WILLAMETTE,SSE2,SO
+SUBSD xmmreg,xmmrm [rm: f2 0f 5c /r] WILLAMETTE,SSE2
+UCOMISD xmmreg,xmmrm [rm: 66 0f 2e /r] WILLAMETTE,SSE2
+UNPCKHPD xmmreg,xmmrm128 [rm: 66 0f 15 /r] WILLAMETTE,SSE2
+UNPCKLPD xmmreg,xmmrm128 [rm: 66 0f 14 /r] WILLAMETTE,SSE2
+XORPD xmmreg,xmmrm128 [rm: 66 0f 57 /r] WILLAMETTE,SSE2
+
+;# Prescott New Instructions (SSE3)
+ADDSUBPD xmmreg,xmmrm [rm: 66 0f d0 /r] PRESCOTT,SSE3,SO
+ADDSUBPS xmmreg,xmmrm [rm: f2 0f d0 /r] PRESCOTT,SSE3,SO
+HADDPD xmmreg,xmmrm [rm: 66 0f 7c /r] PRESCOTT,SSE3,SO
+HADDPS xmmreg,xmmrm [rm: f2 0f 7c /r] PRESCOTT,SSE3,SO
+HSUBPD xmmreg,xmmrm [rm: 66 0f 7d /r] PRESCOTT,SSE3,SO
+HSUBPS xmmreg,xmmrm [rm: f2 0f 7d /r] PRESCOTT,SSE3,SO
+LDDQU xmmreg,mem [rm: f2 0f f0 /r] PRESCOTT,SSE3,SO
+MOVDDUP xmmreg,xmmrm [rm: f2 0f 12 /r] PRESCOTT,SSE3
+MOVSHDUP xmmreg,xmmrm [rm: f3 0f 16 /r] PRESCOTT,SSE3
+MOVSLDUP xmmreg,xmmrm [rm: f3 0f 12 /r] PRESCOTT,SSE3
+
+;# VMX/SVM Instructions
+CLGI void [ 0f 01 dd] VMX,AMD
+STGI void [ 0f 01 dc] VMX,AMD
+VMCALL void [ 0f 01 c1] VMX
+VMCLEAR mem [m: 66 0f c7 /6] VMX
+VMFUNC void [ 0f 01 d4] VMX
+VMLAUNCH void [ 0f 01 c2] VMX
+VMLOAD void [ 0f 01 da] VMX,AMD
+VMMCALL void [ 0f 01 d9] VMX,AMD
+VMPTRLD mem [m: np 0f c7 /6] VMX
+VMPTRST mem [m: np 0f c7 /7] VMX
+VMREAD rm32,reg32 [mr: np 0f 78 /r] VMX,NOLONG,SD
+VMREAD rm64,reg64 [mr: o64nw np 0f 78 /r] X64,VMX,SQ
+VMRESUME void [ 0f 01 c3] VMX
+VMRUN void [ 0f 01 d8] VMX,AMD
+VMSAVE void [ 0f 01 db] VMX,AMD
+VMWRITE reg32,rm32 [rm: np 0f 79 /r] VMX,NOLONG,SD
+VMWRITE reg64,rm64 [rm: o64nw np 0f 79 /r] X64,VMX,SQ
+VMXOFF void [ 0f 01 c4] VMX
+VMXON mem [m: f3 0f c7 /6] VMX
+;# Extended Page Tables VMX instructions
+INVEPT reg32,mem [rm: 66 0f 38 80 /r] VMX,SO,NOLONG
+INVEPT reg64,mem [rm: o64nw 66 0f 38 80 /r] VMX,SO,LONG
+INVVPID reg32,mem [rm: 66 0f 38 81 /r] VMX,SO,NOLONG
+INVVPID reg64,mem [rm: o64nw 66 0f 38 81 /r] VMX,SO,LONG
+
+;# Tejas New Instructions (SSSE3)
+PABSB mmxreg,mmxrm [rm: np 0f 38 1c /r] SSSE3,MMX,SQ
+PABSB xmmreg,xmmrm [rm: 66 0f 38 1c /r] SSSE3
+PABSW mmxreg,mmxrm [rm: np 0f 38 1d /r] SSSE3,MMX,SQ
+PABSW xmmreg,xmmrm [rm: 66 0f 38 1d /r] SSSE3
+PABSD mmxreg,mmxrm [rm: np 0f 38 1e /r] SSSE3,MMX,SQ
+PABSD xmmreg,xmmrm [rm: 66 0f 38 1e /r] SSSE3
+PALIGNR mmxreg,mmxrm,imm [rmi: np 0f 3a 0f /r ib,u] SSSE3,MMX,SQ
+PALIGNR xmmreg,xmmrm,imm [rmi: 66 0f 3a 0f /r ib,u] SSSE3
+PHADDW mmxreg,mmxrm [rm: np 0f 38 01 /r] SSSE3,MMX,SQ
+PHADDW xmmreg,xmmrm [rm: 66 0f 38 01 /r] SSSE3
+PHADDD mmxreg,mmxrm [rm: np 0f 38 02 /r] SSSE3,MMX,SQ
+PHADDD xmmreg,xmmrm [rm: 66 0f 38 02 /r] SSSE3
+PHADDSW mmxreg,mmxrm [rm: np 0f 38 03 /r] SSSE3,MMX,SQ
+PHADDSW xmmreg,xmmrm [rm: 66 0f 38 03 /r] SSSE3
+PHSUBW mmxreg,mmxrm [rm: np 0f 38 05 /r] SSSE3,MMX,SQ
+PHSUBW xmmreg,xmmrm [rm: 66 0f 38 05 /r] SSSE3
+PHSUBD mmxreg,mmxrm [rm: np 0f 38 06 /r] SSSE3,MMX,SQ
+PHSUBD xmmreg,xmmrm [rm: 66 0f 38 06 /r] SSSE3
+PHSUBSW mmxreg,mmxrm [rm: np 0f 38 07 /r] SSSE3,MMX,SQ
+PHSUBSW xmmreg,xmmrm [rm: 66 0f 38 07 /r] SSSE3
+PMADDUBSW mmxreg,mmxrm [rm: np 0f 38 04 /r] SSSE3,MMX,SQ
+PMADDUBSW xmmreg,xmmrm [rm: 66 0f 38 04 /r] SSSE3
+PMULHRSW mmxreg,mmxrm [rm: np 0f 38 0b /r] SSSE3,MMX,SQ
+PMULHRSW xmmreg,xmmrm [rm: 66 0f 38 0b /r] SSSE3
+PSHUFB mmxreg,mmxrm [rm: np 0f 38 00 /r] SSSE3,MMX,SQ
+PSHUFB xmmreg,xmmrm [rm: 66 0f 38 00 /r] SSSE3
+PSIGNB mmxreg,mmxrm [rm: np 0f 38 08 /r] SSSE3,MMX,SQ
+PSIGNB xmmreg,xmmrm [rm: 66 0f 38 08 /r] SSSE3
+PSIGNW mmxreg,mmxrm [rm: np 0f 38 09 /r] SSSE3,MMX,SQ
+PSIGNW xmmreg,xmmrm [rm: 66 0f 38 09 /r] SSSE3
+PSIGND mmxreg,mmxrm [rm: np 0f 38 0a /r] SSSE3,MMX,SQ
+PSIGND xmmreg,xmmrm [rm: 66 0f 38 0a /r] SSSE3
+
+;# AMD SSE4A
+EXTRQ xmmreg,imm,imm [mij: 66 0f 78 /0 ib,u ib,u] SSE4A,AMD
+EXTRQ xmmreg,xmmreg [rm: 66 0f 79 /r] SSE4A,AMD
+INSERTQ xmmreg,xmmreg,imm,imm [rmij: f2 0f 78 /r ib,u ib,u] SSE4A,AMD
+INSERTQ xmmreg,xmmreg [rm: f2 0f 79 /r] SSE4A,AMD
+MOVNTSD mem,xmmreg [mr: f2 0f 2b /r] SSE4A,AMD,SQ
+MOVNTSS mem,xmmreg [mr: f3 0f 2b /r] SSE4A,AMD,SD
+
+;# New instructions in Barcelona
+LZCNT reg16,rm16 [rm: o16 f3i 0f bd /r] P6,AMD
+LZCNT reg32,rm32 [rm: o32 f3i 0f bd /r] P6,AMD
+LZCNT reg64,rm64 [rm: o64 f3i 0f bd /r] X64,AMD
+
+;# Penryn New Instructions (SSE4.1)
+BLENDPD xmmreg,xmmrm,imm [rmi: 66 0f 3a 0d /r ib,u] SSE41
+BLENDPS xmmreg,xmmrm,imm [rmi: 66 0f 3a 0c /r ib,u] SSE41
+BLENDVPD xmmreg,xmmrm,xmm0 [rm-: 66 0f 38 15 /r] SSE41
+BLENDVPD xmmreg,xmmrm [rm: 66 0f 38 15 /r] SSE41
+BLENDVPS xmmreg,xmmrm,xmm0 [rm-: 66 0f 38 14 /r] SSE41
+BLENDVPS xmmreg,xmmrm [rm: 66 0f 38 14 /r] SSE41
+DPPD xmmreg,xmmrm,imm [rmi: 66 0f 3a 41 /r ib,u] SSE41
+DPPS xmmreg,xmmrm,imm [rmi: 66 0f 3a 40 /r ib,u] SSE41
+EXTRACTPS rm32,xmmreg,imm [mri: 66 0f 3a 17 /r ib,u] SSE41
+EXTRACTPS reg64,xmmreg,imm [mri: o64 66 0f 3a 17 /r ib,u] SSE41,X64
+INSERTPS xmmreg,xmmrm,imm [rmi: 66 0f 3a 21 /r ib,u] SSE41,SD
+MOVNTDQA xmmreg,mem128 [rm: 66 0f 38 2a /r] SSE41
+MPSADBW xmmreg,xmmrm,imm [rmi: 66 0f 3a 42 /r ib,u] SSE41
+PACKUSDW xmmreg,xmmrm [rm: 66 0f 38 2b /r] SSE41
+PBLENDVB xmmreg,xmmrm,xmm0 [rm-: 66 0f 38 10 /r] SSE41
+PBLENDVB xmmreg,xmmrm [rm: 66 0f 38 10 /r] SSE41
+PBLENDW xmmreg,xmmrm,imm [rmi: 66 0f 3a 0e /r ib,u] SSE41
+PCMPEQQ xmmreg,xmmrm [rm: 66 0f 38 29 /r] SSE41
+PEXTRB reg32,xmmreg,imm [mri: 66 0f 3a 14 /r ib,u] SSE41
+PEXTRB mem8,xmmreg,imm [mri: 66 0f 3a 14 /r ib,u] SSE41
+PEXTRB reg64,xmmreg,imm [mri: o64 66 0f 3a 14 /r ib,u] SSE41,X64
+PEXTRD rm32,xmmreg,imm [mri: norexw 66 0f 3a 16 /r ib,u] SSE41
+PEXTRQ rm64,xmmreg,imm [mri: o64 66 0f 3a 16 /r ib,u] SSE41,X64
+PEXTRW reg32,xmmreg,imm [mri: 66 0f 3a 15 /r ib,u] SSE41
+PEXTRW mem16,xmmreg,imm [mri: 66 0f 3a 15 /r ib,u] SSE41
+PEXTRW reg64,xmmreg,imm [mri: o64 66 0f 3a 15 /r ib,u] SSE41,X64
+PHMINPOSUW xmmreg,xmmrm [rm: 66 0f 38 41 /r] SSE41
+PINSRB xmmreg,mem,imm [rmi: 66 0f 3a 20 /r ib,u] SSE41,SB,AR2
+PINSRB xmmreg,rm8,imm [rmi: nohi 66 0f 3a 20 /r ib,u] SSE41,SB,AR2
+PINSRB xmmreg,reg32,imm [rmi: 66 0f 3a 20 /r ib,u] SSE41,SB,AR2
+PINSRD xmmreg,mem,imm [rmi: norexw 66 0f 3a 22 /r ib,u] SSE41,SB,AR2
+PINSRD xmmreg,rm32,imm [rmi: norexw 66 0f 3a 22 /r ib,u] SSE41,SB,AR2
+PINSRQ xmmreg,mem,imm [rmi: o64 66 0f 3a 22 /r ib,u] SSE41,X64,SB,AR2
+PINSRQ xmmreg,rm64,imm [rmi: o64 66 0f 3a 22 /r ib,u] SSE41,X64,SB,AR2
+PMAXSB xmmreg,xmmrm [rm: 66 0f 38 3c /r] SSE41
+PMAXSD xmmreg,xmmrm [rm: 66 0f 38 3d /r] SSE41
+PMAXUD xmmreg,xmmrm [rm: 66 0f 38 3f /r] SSE41
+PMAXUW xmmreg,xmmrm [rm: 66 0f 38 3e /r] SSE41
+PMINSB xmmreg,xmmrm [rm: 66 0f 38 38 /r] SSE41
+PMINSD xmmreg,xmmrm [rm: 66 0f 38 39 /r] SSE41
+PMINUD xmmreg,xmmrm [rm: 66 0f 38 3b /r] SSE41
+PMINUW xmmreg,xmmrm [rm: 66 0f 38 3a /r] SSE41
+PMOVSXBW xmmreg,xmmrm [rm: 66 0f 38 20 /r] SSE41,SQ
+PMOVSXBD xmmreg,xmmrm [rm: 66 0f 38 21 /r] SSE41,SD
+PMOVSXBQ xmmreg,xmmrm [rm: 66 0f 38 22 /r] SSE41,SW
+PMOVSXWD xmmreg,xmmrm [rm: 66 0f 38 23 /r] SSE41,SQ
+PMOVSXWQ xmmreg,xmmrm [rm: 66 0f 38 24 /r] SSE41,SD
+PMOVSXDQ xmmreg,xmmrm [rm: 66 0f 38 25 /r] SSE41,SQ
+PMOVZXBW xmmreg,xmmrm [rm: 66 0f 38 30 /r] SSE41,SQ
+PMOVZXBD xmmreg,xmmrm [rm: 66 0f 38 31 /r] SSE41,SD
+PMOVZXBQ xmmreg,xmmrm [rm: 66 0f 38 32 /r] SSE41,SW
+PMOVZXWD xmmreg,xmmrm [rm: 66 0f 38 33 /r] SSE41,SQ
+PMOVZXWQ xmmreg,xmmrm [rm: 66 0f 38 34 /r] SSE41,SD
+PMOVZXDQ xmmreg,xmmrm [rm: 66 0f 38 35 /r] SSE41,SQ
+PMULDQ xmmreg,xmmrm [rm: 66 0f 38 28 /r] SSE41
+PMULLD xmmreg,xmmrm [rm: 66 0f 38 40 /r] SSE41
+PTEST xmmreg,xmmrm [rm: 66 0f 38 17 /r] SSE41
+ROUNDPD xmmreg,xmmrm,imm [rmi: 66 0f 3a 09 /r ib,u] SSE41
+ROUNDPS xmmreg,xmmrm,imm [rmi: 66 0f 3a 08 /r ib,u] SSE41
+ROUNDSD xmmreg,xmmrm,imm [rmi: 66 0f 3a 0b /r ib,u] SSE41
+ROUNDSS xmmreg,xmmrm,imm [rmi: 66 0f 3a 0a /r ib,u] SSE41
+
+;# Nehalem New Instructions (SSE4.2)
+CRC32 reg32,rm8 [rm: f2i 0f 38 f0 /r] SSE42
+CRC32 reg32,rm16 [rm: o16 f2i 0f 38 f1 /r] SSE42
+CRC32 reg32,rm32 [rm: o32 f2i 0f 38 f1 /r] SSE42
+CRC32 reg64,rm8 [rm: o64 f2i 0f 38 f0 /r] SSE42,X64
+CRC32 reg64,rm64 [rm: o64 f2i 0f 38 f1 /r] SSE42,X64
+PCMPESTRI xmmreg,xmmrm,imm [rmi: 66 0f 3a 61 /r ib,u] SSE42
+PCMPESTRM xmmreg,xmmrm,imm [rmi: 66 0f 3a 60 /r ib,u] SSE42
+PCMPISTRI xmmreg,xmmrm,imm [rmi: 66 0f 3a 63 /r ib,u] SSE42
+PCMPISTRM xmmreg,xmmrm,imm [rmi: 66 0f 3a 62 /r ib,u] SSE42
+PCMPGTQ xmmreg,xmmrm [rm: 66 0f 38 37 /r] SSE42
+POPCNT reg16,rm16 [rm: o16 f3i 0f b8 /r] NEHALEM,SW
+POPCNT reg32,rm32 [rm: o32 f3i 0f b8 /r] NEHALEM,SD
+POPCNT reg64,rm64 [rm: o64 f3i 0f b8 /r] NEHALEM,SQ,X64
+
+;# Intel SMX
+GETSEC void [ 0f 37] KATMAI
+
+;# Geode (Cyrix) 3DNow! additions
+PFRCPV mmxreg,mmxrm [rm: o64nw 0f 0f /r 86] PENT,3DNOW,SQ,CYRIX
+PFRSQRTV mmxreg,mmxrm [rm: o64nw 0f 0f /r 87] PENT,3DNOW,SQ,CYRIX
+
+;# Intel new instructions in ???
+; Is NEHALEM right here?
+MOVBE reg16,mem16 [rm: o16 norep 0f 38 f0 /r] NEHALEM,SM
+MOVBE reg32,mem32 [rm: o32 norep 0f 38 f0 /r] NEHALEM,SM
+MOVBE reg64,mem64 [rm: o64 norep 0f 38 f0 /r] NEHALEM,SM
+MOVBE mem16,reg16 [mr: o16 norep 0f 38 f1 /r] NEHALEM,SM
+MOVBE mem32,reg32 [mr: o32 norep 0f 38 f1 /r] NEHALEM,SM
+MOVBE mem64,reg64 [mr: o64 norep 0f 38 f1 /r] NEHALEM,SM
+
+;# Intel AES instructions
+AESENC xmmreg,xmmrm128 [rm: 66 0f 38 dc /r] SSE,WESTMERE
+AESENCLAST xmmreg,xmmrm128 [rm: 66 0f 38 dd /r] SSE,WESTMERE
+AESDEC xmmreg,xmmrm128 [rm: 66 0f 38 de /r] SSE,WESTMERE
+AESDECLAST xmmreg,xmmrm128 [rm: 66 0f 38 df /r] SSE,WESTMERE
+AESIMC xmmreg,xmmrm128 [rm: 66 0f 38 db /r] SSE,WESTMERE
+AESKEYGENASSIST xmmreg,xmmrm128,imm8 [rmi: 66 0f 3a df /r ib] SSE,WESTMERE
+
+;# Intel AVX AES instructions
+VAESENC xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 dc /r] AVX,SANDYBRIDGE
+VAESENCLAST xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 dd /r] AVX,SANDYBRIDGE
+VAESDEC xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 de /r] AVX,SANDYBRIDGE
+VAESDECLAST xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 df /r] AVX,SANDYBRIDGE
+VAESIMC xmmreg,xmmrm128 [rm: vex.128.66.0f38 db /r] AVX,SANDYBRIDGE
+VAESKEYGENASSIST xmmreg,xmmrm128,imm8 [rmi: vex.128.66.0f3a df /r ib] AVX,SANDYBRIDGE
+
+;# Intel AVX instructions
+VADDPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 58 /r] AVX,SANDYBRIDGE
+VADDPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 58 /r] AVX,SANDYBRIDGE
+VADDPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f 58 /r] AVX,SANDYBRIDGE
+VADDPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f 58 /r] AVX,SANDYBRIDGE
+VADDSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f 58 /r] AVX,SANDYBRIDGE
+VADDSS xmmreg,xmmreg*,xmmrm32 [rvm: vex.nds.lig.f3.0f 58 /r] AVX,SANDYBRIDGE
+VADDSUBPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f d0 /r] AVX,SANDYBRIDGE
+VADDSUBPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f d0 /r] AVX,SANDYBRIDGE
+VADDSUBPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.f2.0f d0 /r] AVX,SANDYBRIDGE
+VADDSUBPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.f2.0f d0 /r] AVX,SANDYBRIDGE
+VANDPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 54 /r] AVX,SANDYBRIDGE
+VANDPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 54 /r] AVX,SANDYBRIDGE
+VANDPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f 54 /r] AVX,SANDYBRIDGE
+VANDPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f 54 /r] AVX,SANDYBRIDGE
+VANDNPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 55 /r] AVX,SANDYBRIDGE
+VANDNPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 55 /r] AVX,SANDYBRIDGE
+VANDNPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f 55 /r] AVX,SANDYBRIDGE
+VANDNPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f 55 /r] AVX,SANDYBRIDGE
+VBLENDPD xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: vex.nds.128.66.0f3a 0d /r ib] AVX,SANDYBRIDGE
+VBLENDPD ymmreg,ymmreg*,ymmrm256,imm8 [rvmi: vex.nds.256.66.0f3a 0d /r ib] AVX,SANDYBRIDGE
+VBLENDPS xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: vex.nds.128.66.0f3a 0c /r ib] AVX,SANDYBRIDGE
+VBLENDPS ymmreg,ymmreg*,ymmrm256,imm8 [rvmi: vex.nds.256.66.0f3a 0c /r ib] AVX,SANDYBRIDGE
+VBLENDVPD xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.nds.128.66.0f3a.w0 4b /r /is4] AVX,SANDYBRIDGE
+VBLENDVPD ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.nds.256.66.0f3a.w0 4b /r /is4] AVX,SANDYBRIDGE
+VBLENDVPS xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.nds.128.66.0f3a.w0 4a /r /is4] AVX,SANDYBRIDGE
+VBLENDVPS ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.nds.256.66.0f3a.w0 4a /r /is4] AVX,SANDYBRIDGE
+VBROADCASTSS xmmreg,mem32 [rm: vex.128.66.0f38.w0 18 /r] AVX,SANDYBRIDGE
+VBROADCASTSS ymmreg,mem32 [rm: vex.256.66.0f38.w0 18 /r] AVX,SANDYBRIDGE
+VBROADCASTSD ymmreg,mem64 [rm: vex.256.66.0f38.w0 19 /r] AVX,SANDYBRIDGE
+VBROADCASTF128 ymmreg,mem128 [rm: vex.256.66.0f38.w0 1a /r] AVX,SANDYBRIDGE
+; Specific aliases first, then the generic version, to keep the disassembler happy...
+VCMPEQ_OSPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 10] AVX,SANDYBRIDGE
+VCMPEQ_OSPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 10] AVX,SANDYBRIDGE
+VCMPEQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 00] AVX,SANDYBRIDGE
+VCMPEQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 00] AVX,SANDYBRIDGE
+VCMPLT_OSPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 01] AVX,SANDYBRIDGE
+VCMPLT_OSPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 01] AVX,SANDYBRIDGE
+VCMPLTPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 01] AVX,SANDYBRIDGE
+VCMPLTPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 01] AVX,SANDYBRIDGE
+VCMPLE_OSPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 02] AVX,SANDYBRIDGE
+VCMPLE_OSPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 02] AVX,SANDYBRIDGE
+VCMPLEPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 02] AVX,SANDYBRIDGE
+VCMPLEPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 02] AVX,SANDYBRIDGE
+VCMPUNORD_QPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 03] AVX,SANDYBRIDGE
+VCMPUNORD_QPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 03] AVX,SANDYBRIDGE
+VCMPUNORDPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 03] AVX,SANDYBRIDGE
+VCMPUNORDPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 03] AVX,SANDYBRIDGE
+VCMPNEQ_UQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 04] AVX,SANDYBRIDGE
+VCMPNEQ_UQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 04] AVX,SANDYBRIDGE
+VCMPNEQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 04] AVX,SANDYBRIDGE
+VCMPNEQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 04] AVX,SANDYBRIDGE
+VCMPNLT_USPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 05] AVX,SANDYBRIDGE
+VCMPNLT_USPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 05] AVX,SANDYBRIDGE
+VCMPNLTPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 05] AVX,SANDYBRIDGE
+VCMPNLTPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 05] AVX,SANDYBRIDGE
+VCMPNLE_USPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 06] AVX,SANDYBRIDGE
+VCMPNLE_USPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 06] AVX,SANDYBRIDGE
+VCMPNLEPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 06] AVX,SANDYBRIDGE
+VCMPNLEPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 06] AVX,SANDYBRIDGE
+VCMPORD_QPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 07] AVX,SANDYBRIDGE
+VCMPORD_QPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 07] AVX,SANDYBRIDGE
+VCMPORDPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 07] AVX,SANDYBRIDGE
+VCMPORDPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 07] AVX,SANDYBRIDGE
+VCMPEQ_UQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 08] AVX,SANDYBRIDGE
+VCMPEQ_UQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 08] AVX,SANDYBRIDGE
+VCMPNGE_USPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 09] AVX,SANDYBRIDGE
+VCMPNGE_USPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 09] AVX,SANDYBRIDGE
+VCMPNGEPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 09] AVX,SANDYBRIDGE
+VCMPNGEPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 09] AVX,SANDYBRIDGE
+VCMPNGT_USPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 0a] AVX,SANDYBRIDGE
+VCMPNGT_USPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 0a] AVX,SANDYBRIDGE
+VCMPNGTPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 0a] AVX,SANDYBRIDGE
+VCMPNGTPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 0a] AVX,SANDYBRIDGE
+VCMPFALSE_OQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 0b] AVX,SANDYBRIDGE
+VCMPFALSE_OQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 0b] AVX,SANDYBRIDGE
+VCMPFALSEPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 0b] AVX,SANDYBRIDGE
+VCMPFALSEPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 0b] AVX,SANDYBRIDGE
+VCMPNEQ_OQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 0c] AVX,SANDYBRIDGE
+VCMPNEQ_OQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 0c] AVX,SANDYBRIDGE
+VCMPGE_OSPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 0d] AVX,SANDYBRIDGE
+VCMPGE_OSPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 0d] AVX,SANDYBRIDGE
+VCMPGEPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 0d] AVX,SANDYBRIDGE
+VCMPGEPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 0d] AVX,SANDYBRIDGE
+VCMPGT_OSPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 0e] AVX,SANDYBRIDGE
+VCMPGT_OSPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 0e] AVX,SANDYBRIDGE
+VCMPGTPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 0e] AVX,SANDYBRIDGE
+VCMPGTPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 0e] AVX,SANDYBRIDGE
+VCMPTRUE_UQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 0f] AVX,SANDYBRIDGE
+VCMPTRUE_UQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 0f] AVX,SANDYBRIDGE
+VCMPTRUEPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 0f] AVX,SANDYBRIDGE
+VCMPTRUEPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 0f] AVX,SANDYBRIDGE
+VCMPEQ_OSPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 10] AVX,SANDYBRIDGE
+VCMPEQ_OSPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 10] AVX,SANDYBRIDGE
+VCMPLT_OQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 11] AVX,SANDYBRIDGE
+VCMPLT_OQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 11] AVX,SANDYBRIDGE
+VCMPLE_OQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 12] AVX,SANDYBRIDGE
+VCMPLE_OQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 12] AVX,SANDYBRIDGE
+VCMPUNORD_SPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 13] AVX,SANDYBRIDGE
+VCMPUNORD_SPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 13] AVX,SANDYBRIDGE
+VCMPNEQ_USPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 14] AVX,SANDYBRIDGE
+VCMPNEQ_USPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 14] AVX,SANDYBRIDGE
+VCMPNLT_UQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 15] AVX,SANDYBRIDGE
+VCMPNLT_UQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 15] AVX,SANDYBRIDGE
+VCMPNLE_UQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 16] AVX,SANDYBRIDGE
+VCMPNLE_UQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 16] AVX,SANDYBRIDGE
+VCMPORD_SPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 17] AVX,SANDYBRIDGE
+VCMPORD_SPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 17] AVX,SANDYBRIDGE
+VCMPEQ_USPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 18] AVX,SANDYBRIDGE
+VCMPEQ_USPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 18] AVX,SANDYBRIDGE
+VCMPNGE_UQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 19] AVX,SANDYBRIDGE
+VCMPNGE_UQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 19] AVX,SANDYBRIDGE
+VCMPNGT_UQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 1a] AVX,SANDYBRIDGE
+VCMPNGT_UQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 1a] AVX,SANDYBRIDGE
+VCMPFALSE_OSPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 1b] AVX,SANDYBRIDGE
+VCMPFALSE_OSPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 1b] AVX,SANDYBRIDGE
+VCMPNEQ_OSPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 1c] AVX,SANDYBRIDGE
+VCMPNEQ_OSPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 1c] AVX,SANDYBRIDGE
+VCMPGE_OQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 1d] AVX,SANDYBRIDGE
+VCMPGE_OQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 1d] AVX,SANDYBRIDGE
+VCMPGT_OQPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 1e] AVX,SANDYBRIDGE
+VCMPGT_OQPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 1e] AVX,SANDYBRIDGE
+VCMPTRUE_USPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f c2 /r 1f] AVX,SANDYBRIDGE
+VCMPTRUE_USPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f c2 /r 1f] AVX,SANDYBRIDGE
+VCMPPD xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: vex.nds.128.66.0f c2 /r ib] AVX,SANDYBRIDGE
+VCMPPD ymmreg,ymmreg*,ymmrm256,imm8 [rvmi: vex.nds.256.66.0f c2 /r ib] AVX,SANDYBRIDGE
+; Specific aliases first, then the generic version, to keep the disassembler happy...
+VCMPEQ_OSPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 10] AVX,SANDYBRIDGE
+VCMPEQ_OSPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 10] AVX,SANDYBRIDGE
+VCMPEQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 00] AVX,SANDYBRIDGE
+VCMPEQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 00] AVX,SANDYBRIDGE
+VCMPLT_OSPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 01] AVX,SANDYBRIDGE
+VCMPLT_OSPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 01] AVX,SANDYBRIDGE
+VCMPLTPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 01] AVX,SANDYBRIDGE
+VCMPLTPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 01] AVX,SANDYBRIDGE
+VCMPLE_OSPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 02] AVX,SANDYBRIDGE
+VCMPLE_OSPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 02] AVX,SANDYBRIDGE
+VCMPLEPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 02] AVX,SANDYBRIDGE
+VCMPLEPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 02] AVX,SANDYBRIDGE
+VCMPUNORD_QPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 03] AVX,SANDYBRIDGE
+VCMPUNORD_QPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 03] AVX,SANDYBRIDGE
+VCMPUNORDPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 03] AVX,SANDYBRIDGE
+VCMPUNORDPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 03] AVX,SANDYBRIDGE
+VCMPNEQ_UQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 04] AVX,SANDYBRIDGE
+VCMPNEQ_UQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 04] AVX,SANDYBRIDGE
+VCMPNEQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 04] AVX,SANDYBRIDGE
+VCMPNEQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 04] AVX,SANDYBRIDGE
+VCMPNLT_USPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 05] AVX,SANDYBRIDGE
+VCMPNLT_USPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 05] AVX,SANDYBRIDGE
+VCMPNLTPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 05] AVX,SANDYBRIDGE
+VCMPNLTPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 05] AVX,SANDYBRIDGE
+VCMPNLE_USPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 06] AVX,SANDYBRIDGE
+VCMPNLE_USPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 06] AVX,SANDYBRIDGE
+VCMPNLEPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 06] AVX,SANDYBRIDGE
+VCMPNLEPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 06] AVX,SANDYBRIDGE
+VCMPORD_QPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 07] AVX,SANDYBRIDGE
+VCMPORD_QPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 07] AVX,SANDYBRIDGE
+VCMPORDPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 07] AVX,SANDYBRIDGE
+VCMPORDPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 07] AVX,SANDYBRIDGE
+VCMPEQ_UQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 08] AVX,SANDYBRIDGE
+VCMPEQ_UQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 08] AVX,SANDYBRIDGE
+VCMPNGE_USPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 09] AVX,SANDYBRIDGE
+VCMPNGE_USPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 09] AVX,SANDYBRIDGE
+VCMPNGEPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 09] AVX,SANDYBRIDGE
+VCMPNGEPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 09] AVX,SANDYBRIDGE
+VCMPNGT_USPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 0a] AVX,SANDYBRIDGE
+VCMPNGT_USPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 0a] AVX,SANDYBRIDGE
+VCMPNGTPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 0a] AVX,SANDYBRIDGE
+VCMPNGTPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 0a] AVX,SANDYBRIDGE
+VCMPFALSE_OQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 0b] AVX,SANDYBRIDGE
+VCMPFALSE_OQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 0b] AVX,SANDYBRIDGE
+VCMPFALSEPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 0b] AVX,SANDYBRIDGE
+VCMPFALSEPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 0b] AVX,SANDYBRIDGE
+VCMPNEQ_OQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 0c] AVX,SANDYBRIDGE
+VCMPNEQ_OQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 0c] AVX,SANDYBRIDGE
+VCMPGE_OSPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 0d] AVX,SANDYBRIDGE
+VCMPGE_OSPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 0d] AVX,SANDYBRIDGE
+VCMPGEPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 0d] AVX,SANDYBRIDGE
+VCMPGEPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 0d] AVX,SANDYBRIDGE
+VCMPGT_OSPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 0e] AVX,SANDYBRIDGE
+VCMPGT_OSPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 0e] AVX,SANDYBRIDGE
+VCMPGTPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 0e] AVX,SANDYBRIDGE
+VCMPGTPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 0e] AVX,SANDYBRIDGE
+VCMPTRUE_UQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 0f] AVX,SANDYBRIDGE
+VCMPTRUE_UQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 0f] AVX,SANDYBRIDGE
+VCMPTRUEPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 0f] AVX,SANDYBRIDGE
+VCMPTRUEPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 0f] AVX,SANDYBRIDGE
+VCMPEQ_OSPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 10] AVX,SANDYBRIDGE
+VCMPEQ_OSPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 10] AVX,SANDYBRIDGE
+VCMPLT_OQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 11] AVX,SANDYBRIDGE
+VCMPLT_OQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 11] AVX,SANDYBRIDGE
+VCMPLE_OQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 12] AVX,SANDYBRIDGE
+VCMPLE_OQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 12] AVX,SANDYBRIDGE
+VCMPUNORD_SPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 13] AVX,SANDYBRIDGE
+VCMPUNORD_SPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 13] AVX,SANDYBRIDGE
+VCMPNEQ_USPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 14] AVX,SANDYBRIDGE
+VCMPNEQ_USPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 14] AVX,SANDYBRIDGE
+VCMPNLT_UQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 15] AVX,SANDYBRIDGE
+VCMPNLT_UQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 15] AVX,SANDYBRIDGE
+VCMPNLE_UQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 16] AVX,SANDYBRIDGE
+VCMPNLE_UQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 16] AVX,SANDYBRIDGE
+VCMPORD_SPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 17] AVX,SANDYBRIDGE
+VCMPORD_SPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 17] AVX,SANDYBRIDGE
+VCMPEQ_USPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 18] AVX,SANDYBRIDGE
+VCMPEQ_USPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 18] AVX,SANDYBRIDGE
+VCMPNGE_UQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 19] AVX,SANDYBRIDGE
+VCMPNGE_UQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 19] AVX,SANDYBRIDGE
+VCMPNGT_UQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 1a] AVX,SANDYBRIDGE
+VCMPNGT_UQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 1a] AVX,SANDYBRIDGE
+VCMPFALSE_OSPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 1b] AVX,SANDYBRIDGE
+VCMPFALSE_OSPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 1b] AVX,SANDYBRIDGE
+VCMPNEQ_OSPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 1c] AVX,SANDYBRIDGE
+VCMPNEQ_OSPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 1c] AVX,SANDYBRIDGE
+VCMPGE_OQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 1d] AVX,SANDYBRIDGE
+VCMPGE_OQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 1d] AVX,SANDYBRIDGE
+VCMPGT_OQPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 1e] AVX,SANDYBRIDGE
+VCMPGT_OQPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 1e] AVX,SANDYBRIDGE
+VCMPTRUE_USPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f c2 /r 1f] AVX,SANDYBRIDGE
+VCMPTRUE_USPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f c2 /r 1f] AVX,SANDYBRIDGE
+VCMPPS xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: vex.nds.128.0f c2 /r ib] AVX,SANDYBRIDGE
+VCMPPS ymmreg,ymmreg*,ymmrm256,imm8 [rvmi: vex.nds.256.0f c2 /r ib] AVX,SANDYBRIDGE
+; Specific aliases first, then the generic version, to keep the disassembler happy...
+VCMPEQ_OSSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 10] AVX,SANDYBRIDGE
+VCMPEQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 00] AVX,SANDYBRIDGE
+VCMPLT_OSSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 01] AVX,SANDYBRIDGE
+VCMPLTSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 01] AVX,SANDYBRIDGE
+VCMPLE_OSSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 02] AVX,SANDYBRIDGE
+VCMPLESD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 02] AVX,SANDYBRIDGE
+VCMPUNORD_QSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 03] AVX,SANDYBRIDGE
+VCMPUNORDSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 03] AVX,SANDYBRIDGE
+VCMPNEQ_UQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 04] AVX,SANDYBRIDGE
+VCMPNEQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 04] AVX,SANDYBRIDGE
+VCMPNLT_USSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 05] AVX,SANDYBRIDGE
+VCMPNLTSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 05] AVX,SANDYBRIDGE
+VCMPNLE_USSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 06] AVX,SANDYBRIDGE
+VCMPNLESD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 06] AVX,SANDYBRIDGE
+VCMPORD_QSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 07] AVX,SANDYBRIDGE
+VCMPORDSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 07] AVX,SANDYBRIDGE
+VCMPEQ_UQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 08] AVX,SANDYBRIDGE
+VCMPNGE_USSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 09] AVX,SANDYBRIDGE
+VCMPNGESD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 09] AVX,SANDYBRIDGE
+VCMPNGT_USSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 0a] AVX,SANDYBRIDGE
+VCMPNGTSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 0a] AVX,SANDYBRIDGE
+VCMPFALSE_OQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 0b] AVX,SANDYBRIDGE
+VCMPFALSESD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 0b] AVX,SANDYBRIDGE
+VCMPNEQ_OQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 0c] AVX,SANDYBRIDGE
+VCMPGE_OSSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 0d] AVX,SANDYBRIDGE
+VCMPGESD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 0d] AVX,SANDYBRIDGE
+VCMPGT_OSSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 0e] AVX,SANDYBRIDGE
+VCMPGTSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 0e] AVX,SANDYBRIDGE
+VCMPTRUE_UQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 0f] AVX,SANDYBRIDGE
+VCMPTRUESD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 0f] AVX,SANDYBRIDGE
+VCMPEQ_OSSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 10] AVX,SANDYBRIDGE
+VCMPLT_OQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 11] AVX,SANDYBRIDGE
+VCMPLE_OQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 12] AVX,SANDYBRIDGE
+VCMPUNORD_SSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 13] AVX,SANDYBRIDGE
+VCMPNEQ_USSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 14] AVX,SANDYBRIDGE
+VCMPNLT_UQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 15] AVX,SANDYBRIDGE
+VCMPNLE_UQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 16] AVX,SANDYBRIDGE
+VCMPORD_SSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 17] AVX,SANDYBRIDGE
+VCMPEQ_USSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 18] AVX,SANDYBRIDGE
+VCMPNGE_UQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 19] AVX,SANDYBRIDGE
+VCMPNGT_UQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 1a] AVX,SANDYBRIDGE
+VCMPFALSE_OSSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 1b] AVX,SANDYBRIDGE
+VCMPNEQ_OSSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 1c] AVX,SANDYBRIDGE
+VCMPGE_OQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 1d] AVX,SANDYBRIDGE
+VCMPGT_OQSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 1e] AVX,SANDYBRIDGE
+VCMPTRUE_USSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f c2 /r 1f] AVX,SANDYBRIDGE
+VCMPSD xmmreg,xmmreg*,xmmrm64,imm8 [rvmi: vex.nds.lig.f2.0f c2 /r ib] AVX,SANDYBRIDGE
+; Specific aliases first, then the generic version, to keep the disassembler happy...
+VCMPEQ_OSSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 10] AVX,SANDYBRIDGE
+VCMPEQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 00] AVX,SANDYBRIDGE
+VCMPLT_OSSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 01] AVX,SANDYBRIDGE
+VCMPLTSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 01] AVX,SANDYBRIDGE
+VCMPLE_OSSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 02] AVX,SANDYBRIDGE
+VCMPLESS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 02] AVX,SANDYBRIDGE
+VCMPUNORD_QSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 03] AVX,SANDYBRIDGE
+VCMPUNORDSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 03] AVX,SANDYBRIDGE
+VCMPNEQ_UQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 04] AVX,SANDYBRIDGE
+VCMPNEQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 04] AVX,SANDYBRIDGE
+VCMPNLT_USSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 05] AVX,SANDYBRIDGE
+VCMPNLTSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 05] AVX,SANDYBRIDGE
+VCMPNLE_USSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 06] AVX,SANDYBRIDGE
+VCMPNLESS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 06] AVX,SANDYBRIDGE
+VCMPORD_QSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 07] AVX,SANDYBRIDGE
+VCMPORDSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 07] AVX,SANDYBRIDGE
+VCMPEQ_UQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 08] AVX,SANDYBRIDGE
+VCMPNGE_USSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 09] AVX,SANDYBRIDGE
+VCMPNGESS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 09] AVX,SANDYBRIDGE
+VCMPNGT_USSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 0a] AVX,SANDYBRIDGE
+VCMPNGTSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 0a] AVX,SANDYBRIDGE
+VCMPFALSE_OQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 0b] AVX,SANDYBRIDGE
+VCMPFALSESS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 0b] AVX,SANDYBRIDGE
+VCMPNEQ_OQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 0c] AVX,SANDYBRIDGE
+VCMPGE_OSSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 0d] AVX,SANDYBRIDGE
+VCMPGESS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 0d] AVX,SANDYBRIDGE
+VCMPGT_OSSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 0e] AVX,SANDYBRIDGE
+VCMPGTSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 0e] AVX,SANDYBRIDGE
+VCMPTRUE_UQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 0f] AVX,SANDYBRIDGE
+VCMPTRUESS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 0f] AVX,SANDYBRIDGE
+VCMPEQ_OSSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 10] AVX,SANDYBRIDGE
+VCMPLT_OQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 11] AVX,SANDYBRIDGE
+VCMPLE_OQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 12] AVX,SANDYBRIDGE
+VCMPUNORD_SSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 13] AVX,SANDYBRIDGE
+VCMPNEQ_USSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 14] AVX,SANDYBRIDGE
+VCMPNLT_UQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 15] AVX,SANDYBRIDGE
+VCMPNLE_UQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 16] AVX,SANDYBRIDGE
+VCMPORD_SSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 17] AVX,SANDYBRIDGE
+VCMPEQ_USSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 18] AVX,SANDYBRIDGE
+VCMPNGE_UQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 19] AVX,SANDYBRIDGE
+VCMPNGT_UQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 1a] AVX,SANDYBRIDGE
+VCMPFALSE_OSSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 1b] AVX,SANDYBRIDGE
+VCMPNEQ_OSSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 1c] AVX,SANDYBRIDGE
+VCMPGE_OQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 1d] AVX,SANDYBRIDGE
+VCMPGT_OQSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 1e] AVX,SANDYBRIDGE
+VCMPTRUE_USSS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f3.0f c2 /r 1f] AVX,SANDYBRIDGE
+VCMPSS xmmreg,xmmreg*,xmmrm64,imm8 [rvmi: vex.nds.lig.f3.0f c2 /r ib] AVX,SANDYBRIDGE
+VCOMISD xmmreg,xmmrm64 [rm: vex.lig.66.0f 2f /r] AVX,SANDYBRIDGE
+VCOMISS xmmreg,xmmrm32 [rm: vex.lig.0f 2f /r] AVX,SANDYBRIDGE
+VCVTDQ2PD xmmreg,xmmrm64 [rm: vex.128.f3.0f e6 /r] AVX,SANDYBRIDGE
+VCVTDQ2PD ymmreg,xmmrm128 [rm: vex.256.f3.0f e6 /r] AVX,SANDYBRIDGE
+VCVTDQ2PS xmmreg,xmmrm128 [rm: vex.128.0f 5b /r] AVX,SANDYBRIDGE
+VCVTDQ2PS ymmreg,ymmrm256 [rm: vex.256.0f 5b /r] AVX,SANDYBRIDGE
+VCVTPD2DQ xmmreg,xmmreg [rm: vex.128.f2.0f e6 /r] AVX,SANDYBRIDGE
+VCVTPD2DQ xmmreg,mem128 [rm: vex.128.f2.0f e6 /r] AVX,SANDYBRIDGE,SO
+VCVTPD2DQ xmmreg,ymmreg [rm: vex.256.f2.0f e6 /r] AVX,SANDYBRIDGE
+VCVTPD2DQ xmmreg,mem256 [rm: vex.256.f2.0f e6 /r] AVX,SANDYBRIDGE,SY
+VCVTPD2PS xmmreg,xmmreg [rm: vex.128.66.0f 5a /r] AVX,SANDYBRIDGE
+VCVTPD2PS xmmreg,mem128 [rm: vex.128.66.0f 5a /r] AVX,SANDYBRIDGE,SO
+VCVTPD2PS xmmreg,ymmreg [rm: vex.256.66.0f 5a /r] AVX,SANDYBRIDGE
+VCVTPD2PS xmmreg,mem256 [rm: vex.256.66.0f 5a /r] AVX,SANDYBRIDGE,SY
+VCVTPS2DQ xmmreg,xmmrm128 [rm: vex.128.66.0f 5b /r] AVX,SANDYBRIDGE
+VCVTPS2DQ ymmreg,ymmrm256 [rm: vex.256.66.0f 5b /r] AVX,SANDYBRIDGE
+VCVTPS2PD xmmreg,xmmrm64 [rm: vex.128.0f 5a /r] AVX,SANDYBRIDGE
+VCVTPS2PD ymmreg,xmmrm128 [rm: vex.256.0f 5a /r] AVX,SANDYBRIDGE
+VCVTSD2SI reg32,xmmrm64 [rm: vex.lig.f2.0f.w0 2d /r] AVX,SANDYBRIDGE
+VCVTSD2SI reg64,xmmrm64 [rm: vex.lig.f2.0f.w1 2d /r] AVX,SANDYBRIDGE,LONG
+VCVTSD2SS xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f 5a /r] AVX,SANDYBRIDGE
+VCVTSI2SD xmmreg,xmmreg*,rm32 [rvm: vex.nds.lig.f2.0f.w0 2a /r] AVX,SANDYBRIDGE,SD
+VCVTSI2SD xmmreg,xmmreg*,mem32 [rvm: vex.nds.lig.f2.0f.w0 2a /r] AVX,SANDYBRIDGE,ND,SD
+VCVTSI2SD xmmreg,xmmreg*,rm64 [rvm: vex.nds.lig.f2.0f.w1 2a /r] AVX,SANDYBRIDGE,LONG,SQ
+VCVTSI2SS xmmreg,xmmreg*,rm32 [rvm: vex.nds.lig.f3.0f.w0 2a /r] AVX,SANDYBRIDGE,SD
+VCVTSI2SS xmmreg,xmmreg*,mem32 [rvm: vex.nds.lig.f3.0f.w0 2a /r] AVX,SANDYBRIDGE,ND,SD
+VCVTSI2SS xmmreg,xmmreg*,rm64 [rvm: vex.nds.lig.f3.0f.w1 2a /r] AVX,SANDYBRIDGE,LONG,SQ
+VCVTSS2SD xmmreg,xmmreg*,xmmrm32 [rvm: vex.nds.lig.f3.0f 5a /r] AVX,SANDYBRIDGE
+VCVTSS2SI reg32,xmmrm32 [rm: vex.lig.f3.0f.w0 2d /r] AVX,SANDYBRIDGE
+VCVTSS2SI reg64,xmmrm32 [rm: vex.lig.f3.0f.w1 2d /r] AVX,SANDYBRIDGE,LONG
+VCVTTPD2DQ xmmreg,xmmreg [rm: vex.128.66.0f e6 /r] AVX,SANDYBRIDGE
+VCVTTPD2DQ xmmreg,mem128 [rm: vex.128.66.0f e6 /r] AVX,SANDYBRIDGE,SO
+VCVTTPD2DQ xmmreg,ymmreg [rm: vex.256.66.0f e6 /r] AVX,SANDYBRIDGE
+VCVTTPD2DQ xmmreg,mem256 [rm: vex.256.66.0f e6 /r] AVX,SANDYBRIDGE,SY
+VCVTTPS2DQ xmmreg,xmmrm128 [rm: vex.128.f3.0f 5b /r] AVX,SANDYBRIDGE
+VCVTTPS2DQ ymmreg,ymmrm256 [rm: vex.256.f3.0f 5b /r] AVX,SANDYBRIDGE
+VCVTTSD2SI reg32,xmmrm64 [rm: vex.lig.f2.0f.w0 2c /r] AVX,SANDYBRIDGE
+VCVTTSD2SI reg64,xmmrm64 [rm: vex.lig.f2.0f.w1 2c /r] AVX,SANDYBRIDGE,LONG
+VCVTTSS2SI reg32,xmmrm32 [rm: vex.lig.f3.0f.w0 2c /r] AVX,SANDYBRIDGE
+VCVTTSS2SI reg64,xmmrm32 [rm: vex.lig.f3.0f.w1 2c /r] AVX,SANDYBRIDGE,LONG
+VDIVPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 5e /r] AVX,SANDYBRIDGE
+VDIVPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 5e /r] AVX,SANDYBRIDGE
+VDIVPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f 5e /r] AVX,SANDYBRIDGE
+VDIVPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f 5e /r] AVX,SANDYBRIDGE
+VDIVSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f 5e /r] AVX,SANDYBRIDGE
+VDIVSS xmmreg,xmmreg*,xmmrm32 [rvm: vex.nds.lig.f3.0f 5e /r] AVX,SANDYBRIDGE
+VDPPD xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: vex.nds.128.66.0f3a 41 /r ib] AVX,SANDYBRIDGE
+VDPPS xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: vex.nds.128.66.0f3a 40 /r ib] AVX,SANDYBRIDGE
+VDPPS ymmreg,ymmreg*,ymmrm256,imm8 [rvmi: vex.nds.256.66.0f3a 40 /r ib] AVX,SANDYBRIDGE
+VEXTRACTF128 xmmrm128,ymmreg,imm8 [mri: vex.256.66.0f3a.w0 19 /r ib] AVX,SANDYBRIDGE
+VEXTRACTPS rm32,xmmreg,imm8 [mri: vex.128.66.0f3a 17 /r ib] AVX,SANDYBRIDGE
+VHADDPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 7c /r] AVX,SANDYBRIDGE
+VHADDPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 7c /r] AVX,SANDYBRIDGE
+VHADDPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.f2.0f 7c /r] AVX,SANDYBRIDGE
+VHADDPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.f2.0f 7c /r] AVX,SANDYBRIDGE
+VHSUBPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 7d /r] AVX,SANDYBRIDGE
+VHSUBPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 7d /r] AVX,SANDYBRIDGE
+VHSUBPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.f2.0f 7d /r] AVX,SANDYBRIDGE
+VHSUBPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.f2.0f 7d /r] AVX,SANDYBRIDGE
+VINSERTF128 ymmreg,ymmreg*,xmmrm128,imm8 [rvmi: vex.nds.256.66.0f3a.w0 18 /r ib] AVX,SANDYBRIDGE
+VINSERTPS xmmreg,xmmreg*,xmmrm32,imm8 [rvmi: vex.nds.128.66.0f3a 21 /r ib] AVX,SANDYBRIDGE
+VLDDQU xmmreg,mem128 [rm: vex.128.f2.0f f0 /r] AVX,SANDYBRIDGE
+VLDQQU ymmreg,mem256 [rm: vex.256.f2.0f f0 /r] AVX,SANDYBRIDGE
+VLDDQU ymmreg,mem256 [rm: vex.256.f2.0f f0 /r] AVX,SANDYBRIDGE
+VLDMXCSR mem32 [m: vex.lz.0f ae /2] AVX,SANDYBRIDGE
+VMASKMOVDQU xmmreg,xmmreg [rm: vex.128.66.0f f7 /r] AVX,SANDYBRIDGE
+VMASKMOVPS xmmreg,xmmreg,mem128 [rvm: vex.nds.128.66.0f38.w0 2c /r] AVX,SANDYBRIDGE
+VMASKMOVPS ymmreg,ymmreg,mem256 [rvm: vex.nds.256.66.0f38.w0 2c /r] AVX,SANDYBRIDGE
+VMASKMOVPS mem128,xmmreg,xmmreg [mvr: vex.nds.128.66.0f38.w0 2e /r] AVX,SANDYBRIDGE,SO
+VMASKMOVPS mem256,ymmreg,ymmreg [mvr: vex.nds.256.66.0f38.w0 2e /r] AVX,SANDYBRIDGE,SY
+VMASKMOVPD xmmreg,xmmreg,mem128 [rvm: vex.nds.128.66.0f38.w0 2d /r] AVX,SANDYBRIDGE
+VMASKMOVPD ymmreg,ymmreg,mem256 [rvm: vex.nds.256.66.0f38.w0 2d /r] AVX,SANDYBRIDGE
+VMASKMOVPD mem128,xmmreg,xmmreg [mvr: vex.nds.128.66.0f38.w0 2f /r] AVX,SANDYBRIDGE
+VMASKMOVPD mem256,ymmreg,ymmreg [mvr: vex.nds.256.66.0f38.w0 2f /r] AVX,SANDYBRIDGE
+VMAXPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 5f /r] AVX,SANDYBRIDGE
+VMAXPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 5f /r] AVX,SANDYBRIDGE
+VMAXPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f 5f /r] AVX,SANDYBRIDGE
+VMAXPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f 5f /r] AVX,SANDYBRIDGE
+VMAXSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f 5f /r] AVX,SANDYBRIDGE
+VMAXSS xmmreg,xmmreg*,xmmrm32 [rvm: vex.nds.lig.f3.0f 5f /r] AVX,SANDYBRIDGE
+VMINPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 5d /r] AVX,SANDYBRIDGE
+VMINPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 5d /r] AVX,SANDYBRIDGE
+VMINPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f 5d /r] AVX,SANDYBRIDGE
+VMINPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f 5d /r] AVX,SANDYBRIDGE
+VMINSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f 5d /r] AVX,SANDYBRIDGE
+VMINSS xmmreg,xmmreg*,xmmrm32 [rvm: vex.nds.lig.f3.0f 5d /r] AVX,SANDYBRIDGE
+VMOVAPD xmmreg,xmmrm128 [rm: vex.128.66.0f 28 /r] AVX,SANDYBRIDGE
+VMOVAPD xmmrm128,xmmreg [mr: vex.128.66.0f 29 /r] AVX,SANDYBRIDGE
+VMOVAPD ymmreg,ymmrm256 [rm: vex.256.66.0f 28 /r] AVX,SANDYBRIDGE
+VMOVAPD ymmrm256,ymmreg [mr: vex.256.66.0f 29 /r] AVX,SANDYBRIDGE
+VMOVAPS xmmreg,xmmrm128 [rm: vex.128.0f 28 /r] AVX,SANDYBRIDGE
+VMOVAPS xmmrm128,xmmreg [mr: vex.128.0f 29 /r] AVX,SANDYBRIDGE
+VMOVAPS ymmreg,ymmrm256 [rm: vex.256.0f 28 /r] AVX,SANDYBRIDGE
+VMOVAPS ymmrm256,ymmreg [mr: vex.256.0f 29 /r] AVX,SANDYBRIDGE
+VMOVD xmmreg,rm32 [rm: vex.128.66.0f.w0 6e /r] AVX,SANDYBRIDGE
+VMOVD rm32,xmmreg [mr: vex.128.66.0f.w0 7e /r] AVX,SANDYBRIDGE
+VMOVQ xmmreg,xmmrm64 [rm: vex.128.f3.0f 7e /r] AVX,SANDYBRIDGE,SQ
+VMOVQ xmmrm64,xmmreg [mr: vex.128.66.0f d6 /r] AVX,SANDYBRIDGE,SQ
+VMOVQ xmmreg,rm64 [rm: vex.128.66.0f.w1 6e /r] AVX,SANDYBRIDGE,LONG,SQ
+VMOVQ rm64,xmmreg [mr: vex.128.66.0f.w1 7e /r] AVX,SANDYBRIDGE,LONG,SQ
+VMOVDDUP xmmreg,xmmrm64 [rm: vex.128.f2.0f 12 /r] AVX,SANDYBRIDGE
+VMOVDDUP ymmreg,ymmrm256 [rm: vex.256.f2.0f 12 /r] AVX,SANDYBRIDGE
+VMOVDQA xmmreg,xmmrm128 [rm: vex.128.66.0f 6f /r] AVX,SANDYBRIDGE
+VMOVDQA xmmrm128,xmmreg [mr: vex.128.66.0f 7f /r] AVX,SANDYBRIDGE
+; These are officially documented as VMOVDQA, but VMOVQQA seems more logical to me...
+VMOVQQA ymmreg,ymmrm256 [rm: vex.256.66.0f 6f /r] AVX,SANDYBRIDGE
+VMOVQQA ymmrm256,ymmreg [mr: vex.256.66.0f 7f /r] AVX,SANDYBRIDGE
+VMOVDQA ymmreg,ymmrm256 [rm: vex.256.66.0f 6f /r] AVX,SANDYBRIDGE
+VMOVDQA ymmrm256,ymmreg [mr: vex.256.66.0f 7f /r] AVX,SANDYBRIDGE
+VMOVDQU xmmreg,xmmrm128 [rm: vex.128.f3.0f 6f /r] AVX,SANDYBRIDGE
+VMOVDQU xmmrm128,xmmreg [mr: vex.128.f3.0f 7f /r] AVX,SANDYBRIDGE
+; These are officially documented as VMOVDQU, but VMOVQQU seems more logical to me...
+VMOVQQU ymmreg,ymmrm256 [rm: vex.256.f3.0f 6f /r] AVX,SANDYBRIDGE
+VMOVQQU ymmrm256,ymmreg [mr: vex.256.f3.0f 7f /r] AVX,SANDYBRIDGE
+VMOVDQU ymmreg,ymmrm256 [rm: vex.256.f3.0f 6f /r] AVX,SANDYBRIDGE
+VMOVDQU ymmrm256,ymmreg [mr: vex.256.f3.0f 7f /r] AVX,SANDYBRIDGE
+VMOVHLPS xmmreg,xmmreg*,xmmreg [rvm: vex.nds.128.0f 12 /r] AVX,SANDYBRIDGE
+VMOVHPD xmmreg,xmmreg*,mem64 [rvm: vex.nds.128.66.0f 16 /r] AVX,SANDYBRIDGE
+VMOVHPD mem64,xmmreg [mr: vex.128.66.0f 17 /r] AVX,SANDYBRIDGE
+VMOVHPS xmmreg,xmmreg*,mem64 [rvm: vex.nds.128.0f 16 /r] AVX,SANDYBRIDGE
+VMOVHPS mem64,xmmreg [mr: vex.128.0f 17 /r] AVX,SANDYBRIDGE
+VMOVLHPS xmmreg,xmmreg*,xmmreg [rvm: vex.nds.128.0f 16 /r] AVX,SANDYBRIDGE
+VMOVLPD xmmreg,xmmreg*,mem64 [rvm: vex.nds.128.66.0f 12 /r] AVX,SANDYBRIDGE
+VMOVLPD mem64,xmmreg [mr: vex.128.66.0f 13 /r] AVX,SANDYBRIDGE
+VMOVLPS xmmreg,xmmreg*,mem64 [rvm: vex.nds.128.0f 12 /r] AVX,SANDYBRIDGE
+VMOVLPS mem64,xmmreg [mr: vex.128.0f 13 /r] AVX,SANDYBRIDGE
+VMOVMSKPD reg64,xmmreg [rm: vex.128.66.0f 50 /r] AVX,SANDYBRIDGE,LONG
+VMOVMSKPD reg32,xmmreg [rm: vex.128.66.0f 50 /r] AVX,SANDYBRIDGE
+VMOVMSKPD reg64,ymmreg [rm: vex.256.66.0f 50 /r] AVX,SANDYBRIDGE,LONG
+VMOVMSKPD reg32,ymmreg [rm: vex.256.66.0f 50 /r] AVX,SANDYBRIDGE
+VMOVMSKPS reg64,xmmreg [rm: vex.128.0f 50 /r] AVX,SANDYBRIDGE,LONG
+VMOVMSKPS reg32,xmmreg [rm: vex.128.0f 50 /r] AVX,SANDYBRIDGE
+VMOVMSKPS reg64,ymmreg [rm: vex.256.0f 50 /r] AVX,SANDYBRIDGE,LONG
+VMOVMSKPS reg32,ymmreg [rm: vex.256.0f 50 /r] AVX,SANDYBRIDGE
+VMOVNTDQ mem128,xmmreg [mr: vex.128.66.0f e7 /r] AVX,SANDYBRIDGE
+; Officially VMOVNTDQ, but VMOVNTQQ seems more logical to me...
+VMOVNTQQ mem256,ymmreg [mr: vex.256.66.0f e7 /r] AVX,SANDYBRIDGE
+VMOVNTDQ mem256,ymmreg [mr: vex.256.66.0f e7 /r] AVX,SANDYBRIDGE
+VMOVNTDQA xmmreg,mem128 [rm: vex.128.66.0f38 2a /r] AVX,SANDYBRIDGE
+VMOVNTPD mem128,xmmreg [mr: vex.128.66.0f 2b /r] AVX,SANDYBRIDGE
+VMOVNTPD mem256,ymmreg [mr: vex.256.66.0f 2b /r] AVX,SANDYBRIDGE
+VMOVNTPS mem128,xmmreg [mr: vex.128.0f 2b /r] AVX,SANDYBRIDGE
+VMOVNTPS mem256,ymmreg [mr: vex.256.0f 2b /r] AVX,SANDYBRIDGE
+VMOVSD xmmreg,xmmreg*,xmmreg [rvm: vex.nds.lig.f2.0f 10 /r] AVX,SANDYBRIDGE
+VMOVSD xmmreg,mem64 [rm: vex.lig.f2.0f 10 /r] AVX,SANDYBRIDGE
+VMOVSD xmmreg,xmmreg*,xmmreg [mvr: vex.nds.lig.f2.0f 11 /r] AVX,SANDYBRIDGE
+VMOVSD mem64,xmmreg [mr: vex.lig.f2.0f 11 /r] AVX,SANDYBRIDGE
+VMOVSHDUP xmmreg,xmmrm128 [rm: vex.128.f3.0f 16 /r] AVX,SANDYBRIDGE
+VMOVSHDUP ymmreg,ymmrm256 [rm: vex.256.f3.0f 16 /r] AVX,SANDYBRIDGE
+VMOVSLDUP xmmreg,xmmrm128 [rm: vex.128.f3.0f 12 /r] AVX,SANDYBRIDGE
+VMOVSLDUP ymmreg,ymmrm256 [rm: vex.256.f3.0f 12 /r] AVX,SANDYBRIDGE
+VMOVSS xmmreg,xmmreg*,xmmreg [rvm: vex.nds.lig.f3.0f 10 /r] AVX,SANDYBRIDGE
+VMOVSS xmmreg,mem32 [rm: vex.lig.f3.0f 10 /r] AVX,SANDYBRIDGE
+VMOVSS xmmreg,xmmreg*,xmmreg [mvr: vex.nds.lig.f3.0f 11 /r] AVX,SANDYBRIDGE
+VMOVSS mem32,xmmreg [mr: vex.lig.f3.0f 11 /r] AVX,SANDYBRIDGE
+VMOVUPD xmmreg,xmmrm128 [rm: vex.128.66.0f 10 /r] AVX,SANDYBRIDGE
+VMOVUPD xmmrm128,xmmreg [mr: vex.128.66.0f 11 /r] AVX,SANDYBRIDGE
+VMOVUPD ymmreg,ymmrm256 [rm: vex.256.66.0f 10 /r] AVX,SANDYBRIDGE
+VMOVUPD ymmrm256,ymmreg [mr: vex.256.66.0f 11 /r] AVX,SANDYBRIDGE
+VMOVUPS xmmreg,xmmrm128 [rm: vex.128.0f 10 /r] AVX,SANDYBRIDGE
+VMOVUPS xmmrm128,xmmreg [mr: vex.128.0f 11 /r] AVX,SANDYBRIDGE
+VMOVUPS ymmreg,ymmrm256 [rm: vex.256.0f 10 /r] AVX,SANDYBRIDGE
+VMOVUPS ymmrm256,ymmreg [mr: vex.256.0f 11 /r] AVX,SANDYBRIDGE
+VMPSADBW xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: vex.nds.128.66.0f3a 42 /r ib] AVX,SANDYBRIDGE
+VMULPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 59 /r] AVX,SANDYBRIDGE
+VMULPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 59 /r] AVX,SANDYBRIDGE
+VMULPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f 59 /r] AVX,SANDYBRIDGE
+VMULPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f 59 /r] AVX,SANDYBRIDGE
+VMULSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f 59 /r] AVX,SANDYBRIDGE
+VMULSS xmmreg,xmmreg*,xmmrm32 [rvm: vex.nds.lig.f3.0f 59 /r] AVX,SANDYBRIDGE
+VORPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 56 /r] AVX,SANDYBRIDGE
+VORPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 56 /r] AVX,SANDYBRIDGE
+VORPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f 56 /r] AVX,SANDYBRIDGE
+VORPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f 56 /r] AVX,SANDYBRIDGE
+VPABSB xmmreg,xmmrm128 [rm: vex.128.66.0f38 1c /r] AVX,SANDYBRIDGE
+VPABSW xmmreg,xmmrm128 [rm: vex.128.66.0f38 1d /r] AVX,SANDYBRIDGE
+VPABSD xmmreg,xmmrm128 [rm: vex.128.66.0f38 1e /r] AVX,SANDYBRIDGE
+VPACKSSWB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 63 /r] AVX,SANDYBRIDGE
+VPACKSSDW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 6b /r] AVX,SANDYBRIDGE
+VPACKUSWB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 67 /r] AVX,SANDYBRIDGE
+VPACKUSDW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 2b /r] AVX,SANDYBRIDGE
+VPADDB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f fc /r] AVX,SANDYBRIDGE
+VPADDW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f fd /r] AVX,SANDYBRIDGE
+VPADDD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f fe /r] AVX,SANDYBRIDGE
+VPADDQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f d4 /r] AVX,SANDYBRIDGE
+VPADDSB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f ec /r] AVX,SANDYBRIDGE
+VPADDSW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f ed /r] AVX,SANDYBRIDGE
+VPADDUSB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f dc /r] AVX,SANDYBRIDGE
+VPADDUSW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f dd /r] AVX,SANDYBRIDGE
+VPALIGNR xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: vex.nds.128.66.0f3a 0f /r ib] AVX,SANDYBRIDGE
+VPAND xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f db /r] AVX,SANDYBRIDGE
+VPANDN xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f df /r] AVX,SANDYBRIDGE
+VPAVGB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f e0 /r] AVX,SANDYBRIDGE
+VPAVGW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f e3 /r] AVX,SANDYBRIDGE
+VPBLENDVB xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.nds.128.66.0f3a.w0 4c /r /is4] AVX,SANDYBRIDGE
+VPBLENDW xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: vex.nds.128.66.0f3a 0e /r ib] AVX,SANDYBRIDGE
+VPCMPESTRI xmmreg,xmmrm128,imm8 [rmi: vex.128.66.0f3a 61 /r ib] AVX,SANDYBRIDGE
+VPCMPESTRM xmmreg,xmmrm128,imm8 [rmi: vex.128.66.0f3a 60 /r ib] AVX,SANDYBRIDGE
+VPCMPISTRI xmmreg,xmmrm128,imm8 [rmi: vex.128.66.0f3a 63 /r ib] AVX,SANDYBRIDGE
+VPCMPISTRM xmmreg,xmmrm128,imm8 [rmi: vex.128.66.0f3a 62 /r ib] AVX,SANDYBRIDGE
+VPCMPEQB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 74 /r] AVX,SANDYBRIDGE
+VPCMPEQW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 75 /r] AVX,SANDYBRIDGE
+VPCMPEQD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 76 /r] AVX,SANDYBRIDGE
+VPCMPEQQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 29 /r] AVX,SANDYBRIDGE
+VPCMPGTB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 64 /r] AVX,SANDYBRIDGE
+VPCMPGTW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 65 /r] AVX,SANDYBRIDGE
+VPCMPGTD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 66 /r] AVX,SANDYBRIDGE
+VPCMPGTQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 37 /r] AVX,SANDYBRIDGE
+VPERMILPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38.w0 0d /r] AVX,SANDYBRIDGE
+VPERMILPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38.w0 0d /r] AVX,SANDYBRIDGE
+VPERMILPD xmmreg,xmmrm128,imm8 [rmi: vex.128.66.0f3a.w0 05 /r ib] AVX,SANDYBRIDGE
+VPERMILPD ymmreg,ymmrm256,imm8 [rmi: vex.256.66.0f3a.w0 05 /r ib] AVX,SANDYBRIDGE
+VPERMILPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38.w0 0c /r] AVX,SANDYBRIDGE
+VPERMILPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38.w0 0c /r] AVX,SANDYBRIDGE
+VPERMILPS xmmreg,xmmrm128,imm8 [rmi: vex.128.66.0f3a.w0 04 /r ib] AVX,SANDYBRIDGE
+VPERMILPS ymmreg,ymmrm256,imm8 [rmi: vex.256.66.0f3a.w0 04 /r ib] AVX,SANDYBRIDGE
+VPERM2F128 ymmreg,ymmreg*,ymmrm256,imm8 [rvmi: vex.nds.256.66.0f3a.w0 06 /r ib] AVX,SANDYBRIDGE
+VPEXTRB reg64,xmmreg,imm8 [mri: vex.128.66.0f3a.w0 14 /r ib] AVX,SANDYBRIDGE,LONG
+VPEXTRB reg32,xmmreg,imm8 [mri: vex.128.66.0f3a.w0 14 /r ib] AVX,SANDYBRIDGE
+VPEXTRB mem8,xmmreg,imm8 [mri: vex.128.66.0f3a.w0 14 /r ib] AVX,SANDYBRIDGE
+VPEXTRW reg64,xmmreg,imm8 [rmi: vex.128.66.0f.w0 c5 /r ib] AVX,SANDYBRIDGE,LONG
+VPEXTRW reg32,xmmreg,imm8 [rmi: vex.128.66.0f.w0 c5 /r ib] AVX,SANDYBRIDGE
+VPEXTRW reg64,xmmreg,imm8 [mri: vex.128.66.0f3a.w0 15 /r ib] AVX,SANDYBRIDGE,LONG
+VPEXTRW reg32,xmmreg,imm8 [mri: vex.128.66.0f3a.w0 15 /r ib] AVX,SANDYBRIDGE
+VPEXTRW mem16,xmmreg,imm8 [mri: vex.128.66.0f3a.w0 15 /r ib] AVX,SANDYBRIDGE
+VPEXTRD reg64,xmmreg,imm8 [mri: vex.128.66.0f3a.w0 16 /r ib] AVX,SANDYBRIDGE,LONG
+VPEXTRD rm32,xmmreg,imm8 [mri: vex.128.66.0f3a.w0 16 /r ib] AVX,SANDYBRIDGE
+VPEXTRQ rm64,xmmreg,imm8 [mri: vex.128.66.0f3a.w1 16 /r ib] AVX,SANDYBRIDGE,LONG
+VPHADDW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 01 /r] AVX,SANDYBRIDGE
+VPHADDD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 02 /r] AVX,SANDYBRIDGE
+VPHADDSW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 03 /r] AVX,SANDYBRIDGE
+VPHMINPOSUW xmmreg,xmmrm128 [rm: vex.128.66.0f38 41 /r] AVX,SANDYBRIDGE
+VPHSUBW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 05 /r] AVX,SANDYBRIDGE
+VPHSUBD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 06 /r] AVX,SANDYBRIDGE
+VPHSUBSW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 07 /r] AVX,SANDYBRIDGE
+VPINSRB xmmreg,xmmreg*,mem8,imm8 [rvmi: vex.nds.128.66.0f3a 20 /r ib] AVX,SANDYBRIDGE
+VPINSRB xmmreg,xmmreg*,rm8,imm8 [rvmi: vex.nds.128.66.0f3a 20 /r ib] AVX,SANDYBRIDGE
+VPINSRB xmmreg,xmmreg*,reg32,imm8 [rvmi: vex.nds.128.66.0f3a 20 /r ib] AVX,SANDYBRIDGE
+VPINSRW xmmreg,xmmreg*,mem16,imm8 [rvmi: vex.nds.128.66.0f c4 /r ib] AVX,SANDYBRIDGE
+VPINSRW xmmreg,xmmreg*,rm16,imm8 [rvmi: vex.nds.128.66.0f c4 /r ib] AVX,SANDYBRIDGE
+VPINSRW xmmreg,xmmreg*,reg32,imm8 [rvmi: vex.nds.128.66.0f c4 /r ib] AVX,SANDYBRIDGE
+VPINSRD xmmreg,xmmreg*,mem32,imm8 [rvmi: vex.nds.128.66.0f3a.w0 22 /r ib] AVX,SANDYBRIDGE
+VPINSRD xmmreg,xmmreg*,rm32,imm8 [rvmi: vex.nds.128.66.0f3a.w0 22 /r ib] AVX,SANDYBRIDGE
+VPINSRQ xmmreg,xmmreg*,mem64,imm8 [rvmi: vex.nds.128.66.0f3a.w1 22 /r ib] AVX,SANDYBRIDGE,LONG
+VPINSRQ xmmreg,xmmreg*,rm64,imm8 [rvmi: vex.nds.128.66.0f3a.w1 22 /r ib] AVX,SANDYBRIDGE,LONG
+VPMADDWD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f f5 /r] AVX,SANDYBRIDGE
+VPMADDUBSW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 04 /r] AVX,SANDYBRIDGE
+VPMAXSB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 3c /r] AVX,SANDYBRIDGE
+VPMAXSW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f ee /r] AVX,SANDYBRIDGE
+VPMAXSD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 3d /r] AVX,SANDYBRIDGE
+VPMAXUB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f de /r] AVX,SANDYBRIDGE
+VPMAXUW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 3e /r] AVX,SANDYBRIDGE
+VPMAXUD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 3f /r] AVX,SANDYBRIDGE
+VPMINSB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 38 /r] AVX,SANDYBRIDGE
+VPMINSW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f ea /r] AVX,SANDYBRIDGE
+VPMINSD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 39 /r] AVX,SANDYBRIDGE
+VPMINUB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f da /r] AVX,SANDYBRIDGE
+VPMINUW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 3a /r] AVX,SANDYBRIDGE
+VPMINUD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 3b /r] AVX,SANDYBRIDGE
+VPMOVMSKB reg64,xmmreg [rm: vex.128.66.0f d7 /r] AVX,SANDYBRIDGE,LONG
+VPMOVMSKB reg32,xmmreg [rm: vex.128.66.0f d7 /r] AVX,SANDYBRIDGE
+VPMOVSXBW xmmreg,xmmrm64 [rm: vex.128.66.0f38 20 /r] AVX,SANDYBRIDGE
+VPMOVSXBD xmmreg,xmmrm32 [rm: vex.128.66.0f38 21 /r] AVX,SANDYBRIDGE
+VPMOVSXBQ xmmreg,xmmrm16 [rm: vex.128.66.0f38 22 /r] AVX,SANDYBRIDGE
+VPMOVSXWD xmmreg,xmmrm64 [rm: vex.128.66.0f38 23 /r] AVX,SANDYBRIDGE
+VPMOVSXWQ xmmreg,xmmrm32 [rm: vex.128.66.0f38 24 /r] AVX,SANDYBRIDGE
+VPMOVSXDQ xmmreg,xmmrm64 [rm: vex.128.66.0f38 25 /r] AVX,SANDYBRIDGE
+VPMOVZXBW xmmreg,xmmrm64 [rm: vex.128.66.0f38 30 /r] AVX,SANDYBRIDGE
+VPMOVZXBD xmmreg,xmmrm32 [rm: vex.128.66.0f38 31 /r] AVX,SANDYBRIDGE
+VPMOVZXBQ xmmreg,xmmrm16 [rm: vex.128.66.0f38 32 /r] AVX,SANDYBRIDGE
+VPMOVZXWD xmmreg,xmmrm64 [rm: vex.128.66.0f38 33 /r] AVX,SANDYBRIDGE
+VPMOVZXWQ xmmreg,xmmrm32 [rm: vex.128.66.0f38 34 /r] AVX,SANDYBRIDGE
+VPMOVZXDQ xmmreg,xmmrm64 [rm: vex.128.66.0f38 35 /r] AVX,SANDYBRIDGE
+VPMULHUW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f e4 /r] AVX,SANDYBRIDGE
+VPMULHRSW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 0b /r] AVX,SANDYBRIDGE
+VPMULHW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f e5 /r] AVX,SANDYBRIDGE
+VPMULLW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f d5 /r] AVX,SANDYBRIDGE
+VPMULLD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 40 /r] AVX,SANDYBRIDGE
+VPMULUDQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f f4 /r] AVX,SANDYBRIDGE
+VPMULDQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 28 /r] AVX,SANDYBRIDGE
+VPOR xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f eb /r] AVX,SANDYBRIDGE
+VPSADBW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f f6 /r] AVX,SANDYBRIDGE
+VPSHUFB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 00 /r] AVX,SANDYBRIDGE
+VPSHUFD xmmreg,xmmrm128,imm8 [rmi: vex.128.66.0f 70 /r ib] AVX,SANDYBRIDGE
+VPSHUFHW xmmreg,xmmrm128,imm8 [rmi: vex.128.f3.0f 70 /r ib] AVX,SANDYBRIDGE
+VPSHUFLW xmmreg,xmmrm128,imm8 [rmi: vex.128.f2.0f 70 /r ib] AVX,SANDYBRIDGE
+VPSIGNB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 08 /r] AVX,SANDYBRIDGE
+VPSIGNW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 09 /r] AVX,SANDYBRIDGE
+VPSIGND xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38 0a /r] AVX,SANDYBRIDGE
+VPSLLDQ xmmreg,xmmreg*,imm8 [vmi: vex.ndd.128.66.0f 73 /7 ib] AVX,SANDYBRIDGE
+VPSRLDQ xmmreg,xmmreg*,imm8 [vmi: vex.ndd.128.66.0f 73 /3 ib] AVX,SANDYBRIDGE
+VPSLLW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f f1 /r] AVX,SANDYBRIDGE
+VPSLLW xmmreg,xmmreg*,imm8 [vmi: vex.ndd.128.66.0f 71 /6 ib] AVX,SANDYBRIDGE
+VPSLLD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f f2 /r] AVX,SANDYBRIDGE
+VPSLLD xmmreg,xmmreg*,imm8 [vmi: vex.ndd.128.66.0f 72 /6 ib] AVX,SANDYBRIDGE
+VPSLLQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f f3 /r] AVX,SANDYBRIDGE
+VPSLLQ xmmreg,xmmreg*,imm8 [vmi: vex.ndd.128.66.0f 73 /6 ib] AVX,SANDYBRIDGE
+VPSRAW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f e1 /r] AVX,SANDYBRIDGE
+VPSRAW xmmreg,xmmreg*,imm8 [vmi: vex.ndd.128.66.0f 71 /4 ib] AVX,SANDYBRIDGE
+VPSRAD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f e2 /r] AVX,SANDYBRIDGE
+VPSRAD xmmreg,xmmreg*,imm8 [vmi: vex.ndd.128.66.0f 72 /4 ib] AVX,SANDYBRIDGE
+VPSRLW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f d1 /r] AVX,SANDYBRIDGE
+VPSRLW xmmreg,xmmreg*,imm8 [vmi: vex.ndd.128.66.0f 71 /2 ib] AVX,SANDYBRIDGE
+VPSRLD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f d2 /r] AVX,SANDYBRIDGE
+VPSRLD xmmreg,xmmreg*,imm8 [vmi: vex.ndd.128.66.0f 72 /2 ib] AVX,SANDYBRIDGE
+VPSRLQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f d3 /r] AVX,SANDYBRIDGE
+VPSRLQ xmmreg,xmmreg*,imm8 [vmi: vex.ndd.128.66.0f 73 /2 ib] AVX,SANDYBRIDGE
+VPTEST xmmreg,xmmrm128 [rm: vex.128.66.0f38 17 /r] AVX,SANDYBRIDGE
+VPTEST ymmreg,ymmrm256 [rm: vex.256.66.0f38 17 /r] AVX,SANDYBRIDGE
+VPSUBB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f f8 /r] AVX,SANDYBRIDGE
+VPSUBW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f f9 /r] AVX,SANDYBRIDGE
+VPSUBD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f fa /r] AVX,SANDYBRIDGE
+VPSUBQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f fb /r] AVX,SANDYBRIDGE
+VPSUBSB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f e8 /r] AVX,SANDYBRIDGE
+VPSUBSW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f e9 /r] AVX,SANDYBRIDGE
+VPSUBUSB xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f d8 /r] AVX,SANDYBRIDGE
+VPSUBUSW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f d9 /r] AVX,SANDYBRIDGE
+VPUNPCKHBW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 68 /r] AVX,SANDYBRIDGE
+VPUNPCKHWD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 69 /r] AVX,SANDYBRIDGE
+VPUNPCKHDQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 6a /r] AVX,SANDYBRIDGE
+VPUNPCKHQDQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 6d /r] AVX,SANDYBRIDGE
+VPUNPCKLBW xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 60 /r] AVX,SANDYBRIDGE
+VPUNPCKLWD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 61 /r] AVX,SANDYBRIDGE
+VPUNPCKLDQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 62 /r] AVX,SANDYBRIDGE
+VPUNPCKLQDQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 6c /r] AVX,SANDYBRIDGE
+VPXOR xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f ef /r] AVX,SANDYBRIDGE
+VRCPPS xmmreg,xmmrm128 [rm: vex.128.0f 53 /r] AVX,SANDYBRIDGE
+VRCPPS ymmreg,ymmrm256 [rm: vex.256.0f 53 /r] AVX,SANDYBRIDGE
+VRCPSS xmmreg,xmmreg*,xmmrm32 [rvm: vex.nds.lig.f3.0f 53 /r] AVX,SANDYBRIDGE
+VRSQRTPS xmmreg,xmmrm128 [rm: vex.128.0f 52 /r] AVX,SANDYBRIDGE
+VRSQRTPS ymmreg,ymmrm256 [rm: vex.256.0f 52 /r] AVX,SANDYBRIDGE
+VRSQRTSS xmmreg,xmmreg*,xmmrm32 [rvm: vex.nds.lig.f3.0f 52 /r] AVX,SANDYBRIDGE
+VROUNDPD xmmreg,xmmrm128,imm8 [rmi: vex.128.66.0f3a 09 /r ib] AVX,SANDYBRIDGE
+VROUNDPD ymmreg,ymmrm256,imm8 [rmi: vex.256.66.0f3a 09 /r ib] AVX,SANDYBRIDGE
+VROUNDPS xmmreg,xmmrm128,imm8 [rmi: vex.128.66.0f3a 08 /r ib] AVX,SANDYBRIDGE
+VROUNDPS ymmreg,ymmrm256,imm8 [rmi: vex.256.66.0f3a 08 /r ib] AVX,SANDYBRIDGE
+VROUNDSD xmmreg,xmmreg*,xmmrm64,imm8 [rvmi: vex.nds.128.66.0f3a 0b /r ib] AVX,SANDYBRIDGE
+VROUNDSS xmmreg,xmmreg*,xmmrm32,imm8 [rvmi: vex.nds.128.66.0f3a 0a /r ib] AVX,SANDYBRIDGE
+VSHUFPD xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: vex.nds.128.66.0f c6 /r ib] AVX,SANDYBRIDGE
+VSHUFPD ymmreg,ymmreg*,ymmrm256,imm8 [rvmi: vex.nds.256.66.0f c6 /r ib] AVX,SANDYBRIDGE
+VSHUFPS xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: vex.nds.128.0f c6 /r ib] AVX,SANDYBRIDGE
+VSHUFPS ymmreg,ymmreg*,ymmrm256,imm8 [rvmi: vex.nds.256.0f c6 /r ib] AVX,SANDYBRIDGE
+VSQRTPD xmmreg,xmmrm128 [rm: vex.128.66.0f 51 /r] AVX,SANDYBRIDGE
+VSQRTPD ymmreg,ymmrm256 [rm: vex.256.66.0f 51 /r] AVX,SANDYBRIDGE
+VSQRTPS xmmreg,xmmrm128 [rm: vex.128.0f 51 /r] AVX,SANDYBRIDGE
+VSQRTPS ymmreg,ymmrm256 [rm: vex.256.0f 51 /r] AVX,SANDYBRIDGE
+VSQRTSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f 51 /r] AVX,SANDYBRIDGE
+VSQRTSS xmmreg,xmmreg*,xmmrm32 [rvm: vex.nds.lig.f3.0f 51 /r] AVX,SANDYBRIDGE
+VSTMXCSR mem32 [m: vex.128.0f ae /3] AVX,SANDYBRIDGE
+VSUBPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 5c /r] AVX,SANDYBRIDGE
+VSUBPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 5c /r] AVX,SANDYBRIDGE
+VSUBPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f 5c /r] AVX,SANDYBRIDGE
+VSUBPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f 5c /r] AVX,SANDYBRIDGE
+VSUBSD xmmreg,xmmreg*,xmmrm64 [rvm: vex.nds.lig.f2.0f 5c /r] AVX,SANDYBRIDGE
+VSUBSS xmmreg,xmmreg*,xmmrm32 [rvm: vex.nds.lig.f3.0f 5c /r] AVX,SANDYBRIDGE
+VTESTPS xmmreg,xmmrm128 [rm: vex.128.66.0f38.w0 0e /r] AVX,SANDYBRIDGE
+VTESTPS ymmreg,ymmrm256 [rm: vex.256.66.0f38.w0 0e /r] AVX,SANDYBRIDGE
+VTESTPD xmmreg,xmmrm128 [rm: vex.128.66.0f38.w0 0f /r] AVX,SANDYBRIDGE
+VTESTPD ymmreg,ymmrm256 [rm: vex.256.66.0f38.w0 0f /r] AVX,SANDYBRIDGE
+VUCOMISD xmmreg,xmmrm64 [rm: vex.lig.66.0f 2e /r] AVX,SANDYBRIDGE
+VUCOMISS xmmreg,xmmrm32 [rm: vex.lig.0f 2e /r] AVX,SANDYBRIDGE
+VUNPCKHPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 15 /r] AVX,SANDYBRIDGE
+VUNPCKHPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 15 /r] AVX,SANDYBRIDGE
+VUNPCKHPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f 15 /r] AVX,SANDYBRIDGE
+VUNPCKHPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f 15 /r] AVX,SANDYBRIDGE
+VUNPCKLPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 14 /r] AVX,SANDYBRIDGE
+VUNPCKLPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 14 /r] AVX,SANDYBRIDGE
+VUNPCKLPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f 14 /r] AVX,SANDYBRIDGE
+VUNPCKLPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f 14 /r] AVX,SANDYBRIDGE
+VXORPD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f 57 /r] AVX,SANDYBRIDGE
+VXORPD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 57 /r] AVX,SANDYBRIDGE
+VXORPS xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.0f 57 /r] AVX,SANDYBRIDGE
+VXORPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.0f 57 /r] AVX,SANDYBRIDGE
+VZEROALL void [ vex.256.0f.w0 77] AVX,SANDYBRIDGE
+VZEROUPPER void [ vex.128.0f.w0 77] AVX,SANDYBRIDGE
+
+;# Intel Carry-Less Multiplication instructions (CLMUL)
+PCLMULLQLQDQ xmmreg,xmmrm128 [rm: 66 0f 3a 44 /r 00] SSE,WESTMERE
+PCLMULHQLQDQ xmmreg,xmmrm128 [rm: 66 0f 3a 44 /r 01] SSE,WESTMERE
+PCLMULLQHQDQ xmmreg,xmmrm128 [rm: 66 0f 3a 44 /r 10] SSE,WESTMERE
+PCLMULHQHQDQ xmmreg,xmmrm128 [rm: 66 0f 3a 44 /r 11] SSE,WESTMERE
+PCLMULQDQ xmmreg,xmmrm128,imm8 [rmi: 66 0f 3a 44 /r ib] SSE,WESTMERE
+
+;# Intel AVX Carry-Less Multiplication instructions (CLMUL)
+VPCLMULLQLQDQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f3a 44 /r 00] AVX,SANDYBRIDGE
+VPCLMULHQLQDQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f3a 44 /r 01] AVX,SANDYBRIDGE
+VPCLMULLQHQDQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f3a 44 /r 10] AVX,SANDYBRIDGE
+VPCLMULHQHQDQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f3a 44 /r 11] AVX,SANDYBRIDGE
+VPCLMULQDQ xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: vex.nds.128.66.0f3a 44 /r ib] AVX,SANDYBRIDGE
+
+;# Intel Fused Multiply-Add instructions (FMA)
+VFMADD132PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 98 /r] FMA,FUTURE
+VFMADD132PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 98 /r] FMA,FUTURE
+VFMADD132PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 98 /r] FMA,FUTURE
+VFMADD132PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 98 /r] FMA,FUTURE
+VFMADD312PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 98 /r] FMA,FUTURE
+VFMADD312PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 98 /r] FMA,FUTURE
+VFMADD312PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 98 /r] FMA,FUTURE
+VFMADD312PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 98 /r] FMA,FUTURE
+VFMADD213PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 a8 /r] FMA,FUTURE
+VFMADD213PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 a8 /r] FMA,FUTURE
+VFMADD213PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 a8 /r] FMA,FUTURE
+VFMADD213PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 a8 /r] FMA,FUTURE
+VFMADD123PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 a8 /r] FMA,FUTURE
+VFMADD123PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 a8 /r] FMA,FUTURE
+VFMADD123PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 a8 /r] FMA,FUTURE
+VFMADD123PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 a8 /r] FMA,FUTURE
+VFMADD231PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 b8 /r] FMA,FUTURE
+VFMADD231PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 b8 /r] FMA,FUTURE
+VFMADD231PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 b8 /r] FMA,FUTURE
+VFMADD231PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 b8 /r] FMA,FUTURE
+VFMADD321PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 b8 /r] FMA,FUTURE
+VFMADD321PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 b8 /r] FMA,FUTURE
+VFMADD321PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 b8 /r] FMA,FUTURE
+VFMADD321PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 b8 /r] FMA,FUTURE
+VFMADDSUB132PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 96 /r] FMA,FUTURE
+VFMADDSUB132PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 96 /r] FMA,FUTURE
+VFMADDSUB132PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 96 /r] FMA,FUTURE
+VFMADDSUB132PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 96 /r] FMA,FUTURE
+VFMADDSUB312PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 96 /r] FMA,FUTURE
+VFMADDSUB312PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 96 /r] FMA,FUTURE
+VFMADDSUB312PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 96 /r] FMA,FUTURE
+VFMADDSUB312PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 96 /r] FMA,FUTURE
+VFMADDSUB213PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 a6 /r] FMA,FUTURE
+VFMADDSUB213PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 a6 /r] FMA,FUTURE
+VFMADDSUB213PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 a6 /r] FMA,FUTURE
+VFMADDSUB213PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 a6 /r] FMA,FUTURE
+VFMADDSUB123PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 a6 /r] FMA,FUTURE
+VFMADDSUB123PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 a6 /r] FMA,FUTURE
+VFMADDSUB123PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 a6 /r] FMA,FUTURE
+VFMADDSUB123PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 a6 /r] FMA,FUTURE
+VFMADDSUB231PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 b6 /r] FMA,FUTURE
+VFMADDSUB231PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 b6 /r] FMA,FUTURE
+VFMADDSUB231PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 b6 /r] FMA,FUTURE
+VFMADDSUB231PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 b6 /r] FMA,FUTURE
+VFMADDSUB321PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 b6 /r] FMA,FUTURE
+VFMADDSUB321PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 b6 /r] FMA,FUTURE
+VFMADDSUB321PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 b6 /r] FMA,FUTURE
+VFMADDSUB321PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 b6 /r] FMA,FUTURE
+VFMSUB132PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 9a /r] FMA,FUTURE
+VFMSUB132PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 9a /r] FMA,FUTURE
+VFMSUB132PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 9a /r] FMA,FUTURE
+VFMSUB132PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 9a /r] FMA,FUTURE
+VFMSUB312PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 9a /r] FMA,FUTURE
+VFMSUB312PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 9a /r] FMA,FUTURE
+VFMSUB312PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 9a /r] FMA,FUTURE
+VFMSUB312PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 9a /r] FMA,FUTURE
+VFMSUB213PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 aa /r] FMA,FUTURE
+VFMSUB213PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 aa /r] FMA,FUTURE
+VFMSUB213PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 aa /r] FMA,FUTURE
+VFMSUB213PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 aa /r] FMA,FUTURE
+VFMSUB123PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 aa /r] FMA,FUTURE
+VFMSUB123PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 aa /r] FMA,FUTURE
+VFMSUB123PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 aa /r] FMA,FUTURE
+VFMSUB123PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 aa /r] FMA,FUTURE
+VFMSUB231PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 ba /r] FMA,FUTURE
+VFMSUB231PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 ba /r] FMA,FUTURE
+VFMSUB231PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 ba /r] FMA,FUTURE
+VFMSUB231PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 ba /r] FMA,FUTURE
+VFMSUB321PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 ba /r] FMA,FUTURE
+VFMSUB321PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 ba /r] FMA,FUTURE
+VFMSUB321PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 ba /r] FMA,FUTURE
+VFMSUB321PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 ba /r] FMA,FUTURE
+VFMSUBADD132PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 97 /r] FMA,FUTURE
+VFMSUBADD132PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 97 /r] FMA,FUTURE
+VFMSUBADD132PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 97 /r] FMA,FUTURE
+VFMSUBADD132PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 97 /r] FMA,FUTURE
+VFMSUBADD312PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 97 /r] FMA,FUTURE
+VFMSUBADD312PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 97 /r] FMA,FUTURE
+VFMSUBADD312PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 97 /r] FMA,FUTURE
+VFMSUBADD312PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 97 /r] FMA,FUTURE
+VFMSUBADD213PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 a7 /r] FMA,FUTURE
+VFMSUBADD213PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 a7 /r] FMA,FUTURE
+VFMSUBADD213PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 a7 /r] FMA,FUTURE
+VFMSUBADD213PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 a7 /r] FMA,FUTURE
+VFMSUBADD123PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 a7 /r] FMA,FUTURE
+VFMSUBADD123PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 a7 /r] FMA,FUTURE
+VFMSUBADD123PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 a7 /r] FMA,FUTURE
+VFMSUBADD123PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 a7 /r] FMA,FUTURE
+VFMSUBADD231PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 b7 /r] FMA,FUTURE
+VFMSUBADD231PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 b7 /r] FMA,FUTURE
+VFMSUBADD231PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 b7 /r] FMA,FUTURE
+VFMSUBADD231PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 b7 /r] FMA,FUTURE
+VFMSUBADD321PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 b7 /r] FMA,FUTURE
+VFMSUBADD321PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 b7 /r] FMA,FUTURE
+VFMSUBADD321PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 b7 /r] FMA,FUTURE
+VFMSUBADD321PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 b7 /r] FMA,FUTURE
+VFNMADD132PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 9c /r] FMA,FUTURE
+VFNMADD132PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 9c /r] FMA,FUTURE
+VFNMADD132PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 9c /r] FMA,FUTURE
+VFNMADD132PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 9c /r] FMA,FUTURE
+VFNMADD312PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 9c /r] FMA,FUTURE
+VFNMADD312PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 9c /r] FMA,FUTURE
+VFNMADD312PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 9c /r] FMA,FUTURE
+VFNMADD312PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 9c /r] FMA,FUTURE
+VFNMADD213PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 ac /r] FMA,FUTURE
+VFNMADD213PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 ac /r] FMA,FUTURE
+VFNMADD213PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 ac /r] FMA,FUTURE
+VFNMADD213PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 ac /r] FMA,FUTURE
+VFNMADD123PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 ac /r] FMA,FUTURE
+VFNMADD123PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 ac /r] FMA,FUTURE
+VFNMADD123PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 ac /r] FMA,FUTURE
+VFNMADD123PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 ac /r] FMA,FUTURE
+VFNMADD231PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 bc /r] FMA,FUTURE
+VFNMADD231PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 bc /r] FMA,FUTURE
+VFNMADD231PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 bc /r] FMA,FUTURE
+VFNMADD231PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 bc /r] FMA,FUTURE
+VFNMADD321PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 bc /r] FMA,FUTURE
+VFNMADD321PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 bc /r] FMA,FUTURE
+VFNMADD321PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 bc /r] FMA,FUTURE
+VFNMADD321PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 bc /r] FMA,FUTURE
+VFNMSUB132PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 9e /r] FMA,FUTURE
+VFNMSUB132PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 9e /r] FMA,FUTURE
+VFNMSUB132PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 9e /r] FMA,FUTURE
+VFNMSUB132PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 9e /r] FMA,FUTURE
+VFNMSUB312PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 9e /r] FMA,FUTURE
+VFNMSUB312PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 9e /r] FMA,FUTURE
+VFNMSUB312PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 9e /r] FMA,FUTURE
+VFNMSUB312PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 9e /r] FMA,FUTURE
+VFNMSUB213PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 ae /r] FMA,FUTURE
+VFNMSUB213PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 ae /r] FMA,FUTURE
+VFNMSUB213PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 ae /r] FMA,FUTURE
+VFNMSUB213PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 ae /r] FMA,FUTURE
+VFNMSUB123PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 ae /r] FMA,FUTURE
+VFNMSUB123PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 ae /r] FMA,FUTURE
+VFNMSUB123PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 ae /r] FMA,FUTURE
+VFNMSUB123PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 ae /r] FMA,FUTURE
+VFNMSUB231PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 be /r] FMA,FUTURE
+VFNMSUB231PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 be /r] FMA,FUTURE
+VFNMSUB231PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 be /r] FMA,FUTURE
+VFNMSUB231PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 be /r] FMA,FUTURE
+VFNMSUB321PS xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w0 be /r] FMA,FUTURE
+VFNMSUB321PS ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w0 be /r] FMA,FUTURE
+VFNMSUB321PD xmmreg,xmmreg,xmmrm128 [rvm: vex.dds.128.66.0f38.w1 be /r] FMA,FUTURE
+VFNMSUB321PD ymmreg,ymmreg,ymmrm256 [rvm: vex.dds.256.66.0f38.w1 be /r] FMA,FUTURE
+VFMADD132SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 99 /r] FMA,FUTURE
+VFMADD132SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 99 /r] FMA,FUTURE
+VFMADD312SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 99 /r] FMA,FUTURE
+VFMADD312SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 99 /r] FMA,FUTURE
+VFMADD213SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 a9 /r] FMA,FUTURE
+VFMADD213SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 a9 /r] FMA,FUTURE
+VFMADD123SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 a9 /r] FMA,FUTURE
+VFMADD123SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 a9 /r] FMA,FUTURE
+VFMADD231SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 b9 /r] FMA,FUTURE
+VFMADD231SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 b9 /r] FMA,FUTURE
+VFMADD321SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 b9 /r] FMA,FUTURE
+VFMADD321SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 b9 /r] FMA,FUTURE
+VFMSUB132SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 9b /r] FMA,FUTURE
+VFMSUB132SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 9b /r] FMA,FUTURE
+VFMSUB312SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 9b /r] FMA,FUTURE
+VFMSUB312SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 9b /r] FMA,FUTURE
+VFMSUB213SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 ab /r] FMA,FUTURE
+VFMSUB213SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 ab /r] FMA,FUTURE
+VFMSUB123SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 ab /r] FMA,FUTURE
+VFMSUB123SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 ab /r] FMA,FUTURE
+VFMSUB231SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 bb /r] FMA,FUTURE
+VFMSUB231SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 bb /r] FMA,FUTURE
+VFMSUB321SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 bb /r] FMA,FUTURE
+VFMSUB321SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 bb /r] FMA,FUTURE
+VFNMADD132SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 9d /r] FMA,FUTURE
+VFNMADD132SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 9d /r] FMA,FUTURE
+VFNMADD312SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 9d /r] FMA,FUTURE
+VFNMADD312SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 9d /r] FMA,FUTURE
+VFNMADD213SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 ad /r] FMA,FUTURE
+VFNMADD213SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 ad /r] FMA,FUTURE
+VFNMADD123SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 ad /r] FMA,FUTURE
+VFNMADD123SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 ad /r] FMA,FUTURE
+VFNMADD231SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 bd /r] FMA,FUTURE
+VFNMADD231SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 bd /r] FMA,FUTURE
+VFNMADD321SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 bd /r] FMA,FUTURE
+VFNMADD321SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 bd /r] FMA,FUTURE
+VFNMSUB132SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 9f /r] FMA,FUTURE
+VFNMSUB132SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 9f /r] FMA,FUTURE
+VFNMSUB312SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 9f /r] FMA,FUTURE
+VFNMSUB312SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 9f /r] FMA,FUTURE
+VFNMSUB213SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 af /r] FMA,FUTURE
+VFNMSUB213SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 af /r] FMA,FUTURE
+VFNMSUB123SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 af /r] FMA,FUTURE
+VFNMSUB123SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 af /r] FMA,FUTURE
+VFNMSUB231SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 bf /r] FMA,FUTURE
+VFNMSUB231SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 bf /r] FMA,FUTURE
+VFNMSUB321SS xmmreg,xmmreg,xmmrm32 [rvm: vex.dds.128.66.0f38.w0 bf /r] FMA,FUTURE
+VFNMSUB321SD xmmreg,xmmreg,xmmrm64 [rvm: vex.dds.128.66.0f38.w1 bf /r] FMA,FUTURE
+
+;# Intel post-32 nm processor instructions
+;
+; Per AVX spec revision 7, document 319433-007
+RDFSBASE reg32 [m: norexw f3 0f ae /0] LONG,FUTURE
+RDFSBASE reg64 [m: o64 f3 0f ae /0] LONG,FUTURE
+RDGSBASE reg32 [m: norexw f3 0f ae /1] LONG,FUTURE
+RDGSBASE reg64 [m: o64 f3 0f ae /1] LONG,FUTURE
+RDRAND reg16 [m: o16 0f c7 /6] FUTURE
+RDRAND reg32 [m: o32 0f c7 /6] FUTURE
+RDRAND reg64 [m: o64 0f c7 /6] LONG,FUTURE
+WRFSBASE reg32 [m: norexw f3 0f ae /2] LONG,FUTURE
+WRFSBASE reg64 [m: o64 f3 0f ae /2] LONG,FUTURE
+WRGSBASE reg32 [m: norexw f3 0f ae /3] LONG,FUTURE
+WRGSBASE reg64 [m: o64 f3 0f ae /3] LONG,FUTURE
+VCVTPH2PS ymmreg,xmmrm128 [rm: vex.256.66.0f38.w0 13 /r] AVX,FUTURE
+VCVTPH2PS xmmreg,xmmrm64 [rm: vex.128.66.0f38.w0 13 /r] AVX,FUTURE
+VCVTPS2PH xmmrm128,ymmreg,imm8 [mri: vex.256.66.0f3a.w0 1d /r ib] AVX,FUTURE
+VCVTPS2PH xmmrm64,xmmreg,imm8 [mri: vex.128.66.0f3a.w0 1d /r ib] AVX,FUTURE
+
+; Per AVX spec revision 13, document 319433-013
+ADCX reg32,rm32 [rm: norexw 66 0f 38 f6 /r] FUTURE
+ADCX reg64,rm64 [rm: o64 66 0f 38 f6 /r] LONG,FUTURE
+ADOX reg32,rm32 [rm: norexw f3 0f 38 f6 /r] FUTURE
+ADOX reg64,rm64 [rm: o64 f3 0f 38 f6 /r] LONG,FUTURE
+RDSEED reg16 [m: o16 0f c7 /7] FUTURE
+RDSEED reg32 [m: o32 0f c7 /7] FUTURE
+RDSEED reg64 [m: o64 0f c7 /7] LONG,FUTURE
+
+; Per AVX spec revision 14, document 319433-014
+CLAC void [ 0f 01 ca] PRIV,FUTURE
+STAC void [ 0f 01 cb] PRIV,FUTURE
+
+;# VIA (Centaur) security instructions
+XSTORE void [ 0f a7 c0] PENT,CYRIX
+XCRYPTECB void [ mustrep 0f a7 c8] PENT,CYRIX
+XCRYPTCBC void [ mustrep 0f a7 d0] PENT,CYRIX
+XCRYPTCTR void [ mustrep 0f a7 d8] PENT,CYRIX
+XCRYPTCFB void [ mustrep 0f a7 e0] PENT,CYRIX
+XCRYPTOFB void [ mustrep 0f a7 e8] PENT,CYRIX
+MONTMUL void [ mustrep 0f a6 c0] PENT,CYRIX
+XSHA1 void [ mustrep 0f a6 c8] PENT,CYRIX
+XSHA256 void [ mustrep 0f a6 d0] PENT,CYRIX
+
+;# AMD Lightweight Profiling (LWP) instructions
+;
+; based on pub number 43724 revision 3.04 date August 2009
+;
+; updated to match draft from AMD developer (patch has been
+; sent to binutils
+; 2010-03-22 Quentin Neill <[email protected]>
+; Sebastian Pop <[email protected]>
+;
+LLWPCB reg32 [m: xop.m9.w0.l0.p0 12 /0] AMD,386
+LLWPCB reg64 [m: xop.m9.w1.l0.p0 12 /0] AMD,X64
+
+SLWPCB reg32 [m: xop.m9.w0.l0.p0 12 /1] AMD,386
+SLWPCB reg64 [m: xop.m9.w1.l0.p0 12 /1] AMD,X64
+
+LWPVAL reg32,rm32,imm32 [vmi: xop.m10.w0.ndd.l0.p0 12 /1 id] AMD,386
+LWPVAL reg64,rm32,imm32 [vmi: xop.m10.w1.ndd.l0.p0 12 /1 id] AMD,X64
+
+LWPINS reg32,rm32,imm32 [vmi: xop.m10.w0.ndd.l0.p0 12 /0 id] AMD,386
+LWPINS reg64,rm32,imm32 [vmi: xop.m10.w1.ndd.l0.p0 12 /0 id] AMD,X64
+
+;# AMD XOP and FMA4 instructions (SSE5)
+;
+; based on pub number 43479 revision 3.04 dated November 2009
+;
+VFMADDPD xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.m3.w0.nds.l0.p1 69 /r /is4] AMD,SSE5
+VFMADDPD ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.m3.w0.nds.l1.p1 69 /r /is4] AMD,SSE5
+VFMADDPD xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: vex.m3.w1.nds.l0.p1 69 /r /is4] AMD,SSE5
+VFMADDPD ymmreg,ymmreg*,ymmreg,ymmrm256 [rvsm: vex.m3.w1.nds.l1.p1 69 /r /is4] AMD,SSE5
+
+VFMADDPS xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.m3.w0.nds.l0.p1 68 /r /is4] AMD,SSE5
+VFMADDPS ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.m3.w0.nds.l1.p1 68 /r /is4] AMD,SSE5
+VFMADDPS xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: vex.m3.w1.nds.l0.p1 68 /r /is4] AMD,SSE5
+VFMADDPS ymmreg,ymmreg*,ymmreg,ymmrm256 [rvsm: vex.m3.w1.nds.l1.p1 68 /r /is4] AMD,SSE5
+
+VFMADDSD xmmreg,xmmreg*,xmmrm64,xmmreg [rvms: vex.m3.w0.nds.l0.p1 6b /r /is4] AMD,SSE5
+VFMADDSD xmmreg,xmmreg*,xmmreg,xmmrm64 [rvsm: vex.m3.w1.nds.l0.p1 6b /r /is4] AMD,SSE5
+
+VFMADDSS xmmreg,xmmreg*,xmmrm32,xmmreg [rvms: vex.m3.w0.nds.l0.p1 6a /r /is4] AMD,SSE5
+VFMADDSS xmmreg,xmmreg*,xmmreg,xmmrm32 [rvsm: vex.m3.w1.nds.l0.p1 6a /r /is4] AMD,SSE5
+
+VFMADDSUBPD xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.m3.w0.nds.l0.p1 5d /r /is4] AMD,SSE5
+VFMADDSUBPD ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.m3.w0.nds.l1.p1 5d /r /is4] AMD,SSE5
+VFMADDSUBPD xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: vex.m3.w1.nds.l0.p1 5d /r /is4] AMD,SSE5
+VFMADDSUBPD ymmreg,ymmreg*,ymmreg,ymmrm256 [rvsm: vex.m3.w1.nds.l1.p1 5d /r /is4] AMD,SSE5
+
+VFMADDSUBPS xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.m3.w0.nds.l0.p1 5c /r /is4] AMD,SSE5
+VFMADDSUBPS ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.m3.w0.nds.l1.p1 5c /r /is4] AMD,SSE5
+VFMADDSUBPS xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: vex.m3.w1.nds.l0.p1 5c /r /is4] AMD,SSE5
+VFMADDSUBPS ymmreg,ymmreg*,ymmreg,ymmrm256 [rvsm: vex.m3.w1.nds.l1.p1 5c /r /is4] AMD,SSE5
+
+VFMSUBADDPD xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.m3.w0.nds.l0.p1 5f /r /is4] AMD,SSE5
+VFMSUBADDPD ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.m3.w0.nds.l1.p1 5f /r /is4] AMD,SSE5
+VFMSUBADDPD xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: vex.m3.w1.nds.l0.p1 5f /r /is4] AMD,SSE5
+VFMSUBADDPD ymmreg,ymmreg*,ymmreg,ymmrm256 [rvsm: vex.m3.w1.nds.l1.p1 5f /r /is4] AMD,SSE5
+
+VFMSUBADDPS xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.m3.w0.nds.l0.p1 5e /r /is4] AMD,SSE5
+VFMSUBADDPS ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.m3.w0.nds.l1.p1 5e /r /is4] AMD,SSE5
+VFMSUBADDPS xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: vex.m3.w1.nds.l0.p1 5e /r /is4] AMD,SSE5
+VFMSUBADDPS ymmreg,ymmreg*,ymmreg,ymmrm256 [rvsm: vex.m3.w1.nds.l1.p1 5e /r /is4] AMD,SSE5
+
+VFMSUBPD xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.m3.w0.nds.l0.p1 6d /r /is4] AMD,SSE5
+VFMSUBPD ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.m3.w0.nds.l1.p1 6d /r /is4] AMD,SSE5
+VFMSUBPD xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: vex.m3.w1.nds.l0.p1 6d /r /is4] AMD,SSE5
+VFMSUBPD ymmreg,ymmreg*,ymmreg,ymmrm256 [rvsm: vex.m3.w1.nds.l1.p1 6d /r /is4] AMD,SSE5
+
+VFMSUBPS xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.m3.w0.nds.l0.p1 6c /r /is4] AMD,SSE5
+VFMSUBPS ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.m3.w0.nds.l1.p1 6c /r /is4] AMD,SSE5
+VFMSUBPS xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: vex.m3.w1.nds.l0.p1 6c /r /is4] AMD,SSE5
+VFMSUBPS ymmreg,ymmreg*,ymmreg,ymmrm256 [rvsm: vex.m3.w1.nds.l1.p1 6c /r /is4] AMD,SSE5
+
+VFMSUBSD xmmreg,xmmreg*,xmmrm64,xmmreg [rvms: vex.m3.w0.nds.l0.p1 6f /r /is4] AMD,SSE5
+VFMSUBSD xmmreg,xmmreg*,xmmreg,xmmrm64 [rvsm: vex.m3.w1.nds.l0.p1 6f /r /is4] AMD,SSE5
+
+VFMSUBSS xmmreg,xmmreg*,xmmrm32,xmmreg [rvms: vex.m3.w0.nds.l0.p1 6e /r /is4] AMD,SSE5
+VFMSUBSS xmmreg,xmmreg*,xmmreg,xmmrm32 [rvsm: vex.m3.w1.nds.l0.p1 6e /r /is4] AMD,SSE5
+
+VFNMADDPD xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.m3.w0.nds.l0.p1 79 /r /is4] AMD,SSE5
+VFNMADDPD ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.m3.w0.nds.l1.p1 79 /r /is4] AMD,SSE5
+VFNMADDPD xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: vex.m3.w1.nds.l0.p1 79 /r /is4] AMD,SSE5
+VFNMADDPD ymmreg,ymmreg*,ymmreg,ymmrm256 [rvsm: vex.m3.w1.nds.l1.p1 79 /r /is4] AMD,SSE5
+
+VFNMADDPS xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.m3.w0.nds.l0.p1 78 /r /is4] AMD,SSE5
+VFNMADDPS ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.m3.w0.nds.l1.p1 78 /r /is4] AMD,SSE5
+VFNMADDPS xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: vex.m3.w1.nds.l0.p1 78 /r /is4] AMD,SSE5
+VFNMADDPS ymmreg,ymmreg*,ymmreg,ymmrm256 [rvsm: vex.m3.w1.nds.l1.p1 78 /r /is4] AMD,SSE5
+
+VFNMADDSD xmmreg,xmmreg*,xmmrm64,xmmreg [rvms: vex.m3.w0.nds.l0.p1 7b /r /is4] AMD,SSE5
+VFNMADDSD xmmreg,xmmreg*,xmmreg,xmmrm64 [rvsm: vex.m3.w1.nds.l0.p1 7b /r /is4] AMD,SSE5
+
+VFNMADDSS xmmreg,xmmreg*,xmmrm32,xmmreg [rvms: vex.m3.w0.nds.l0.p1 7a /r /is4] AMD,SSE5
+VFNMADDSS xmmreg,xmmreg*,xmmreg,xmmrm32 [rvsm: vex.m3.w1.nds.l0.p1 7a /r /is4] AMD,SSE5
+
+VFNMSUBPD xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.m3.w0.nds.l0.p1 7d /r /is4] AMD,SSE5
+VFNMSUBPD ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.m3.w0.nds.l1.p1 7d /r /is4] AMD,SSE5
+VFNMSUBPD xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: vex.m3.w1.nds.l0.p1 7d /r /is4] AMD,SSE5
+VFNMSUBPD ymmreg,ymmreg*,ymmreg,ymmrm256 [rvsm: vex.m3.w1.nds.l1.p1 7d /r /is4] AMD,SSE5
+
+VFNMSUBPS xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: vex.m3.w0.nds.l0.p1 7c /r /is4] AMD,SSE5
+VFNMSUBPS ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.m3.w0.nds.l1.p1 7c /r /is4] AMD,SSE5
+VFNMSUBPS xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: vex.m3.w1.nds.l0.p1 7c /r /is4] AMD,SSE5
+VFNMSUBPS ymmreg,ymmreg*,ymmreg,ymmrm256 [rvsm: vex.m3.w1.nds.l1.p1 7c /r /is4] AMD,SSE5
+
+VFNMSUBSD xmmreg,xmmreg*,xmmrm64,xmmreg [rvms: vex.m3.w0.nds.l0.p1 7f /r /is4] AMD,SSE5
+VFNMSUBSD xmmreg,xmmreg*,xmmreg,xmmrm64 [rvsm: vex.m3.w1.nds.l0.p1 7f /r /is4] AMD,SSE5
+
+VFNMSUBSS xmmreg,xmmreg*,xmmrm32,xmmreg [rvms: vex.m3.w0.nds.l0.p1 7e /r /is4] AMD,SSE5
+VFNMSUBSS xmmreg,xmmreg*,xmmreg,xmmrm32 [rvsm: vex.m3.w1.nds.l0.p1 7e /r /is4] AMD,SSE5
+
+VFRCZPD xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 81 /r] AMD,SSE5
+VFRCZPD ymmreg,ymmrm256* [rm: xop.m9.w0.l1.p0 81 /r] AMD,SSE5
+
+VFRCZPS xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 80 /r] AMD,SSE5
+VFRCZPS ymmreg,ymmrm256* [rm: xop.m9.w0.l1.p0 80 /r] AMD,SSE5
+
+VFRCZSD xmmreg,xmmrm64* [rm: xop.m9.w0.l0.p0 83 /r] AMD,SSE5
+
+VFRCZSS xmmreg,xmmrm32* [rm: xop.m9.w0.l0.p0 82 /r] AMD,SSE5
+;
+; fixed: spec mention imm[7:4] though it should be /is4 even in spec
+VPCMOV xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 a2 /r /is4] AMD,SSE5
+VPCMOV ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: xop.m8.w0.nds.l1.p0 a2 /r /is4] AMD,SSE5
+VPCMOV xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: xop.m8.w1.nds.l0.p0 a2 /r /is4] AMD,SSE5
+VPCMOV ymmreg,ymmreg*,ymmreg,ymmrm256 [rvsm: xop.m8.w1.nds.l1.p0 a2 /r /is4] AMD,SSE5
+
+VPCOMB xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: xop.m8.w0.nds.l0.p0 cc /r ib] AMD,SSE5
+VPCOMD xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: xop.m8.w0.nds.l0.p0 ce /r ib] AMD,SSE5
+VPCOMQ xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: xop.m8.w0.nds.l0.p0 cf /r ib] AMD,SSE5
+;
+; fixed: spec mention only 3 operands in mnemonics
+VPCOMUB xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: xop.m8.w0.nds.l0.p0 ec /r ib] AMD,SSE5
+VPCOMUD xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: xop.m8.w0.nds.l0.p0 ee /r ib] AMD,SSE5
+VPCOMUQ xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: xop.m8.w0.nds.l0.p0 ef /r ib] AMD,SSE5
+;
+; fixed: spec point wrong VPCOMB in mnemonic
+VPCOMUW xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: xop.m8.w0.nds.l0.p0 ed /r ib] AMD,SSE5
+VPCOMW xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: xop.m8.w0.nds.l0.p0 cd /r ib] AMD,SSE5
+
+VPHADDBD xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 c2 /r] AMD,SSE5
+VPHADDBQ xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 c3 /r] AMD,SSE5
+VPHADDBW xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 c1 /r] AMD,SSE5
+VPHADDDQ xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 cb /r] AMD,SSE5
+;
+; fixed: spec has ymmreg for l0
+VPHADDUBD xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 d2 /r] AMD,SSE5
+VPHADDUBQ xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 d3 /r] AMD,SSE5
+;
+; fixed: spec has VPHADDUBWD
+VPHADDUBW xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 d1 /r] AMD,SSE5
+;
+; fixed: opcode db
+VPHADDUDQ xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 db /r] AMD,SSE5
+VPHADDUWD xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 d6 /r] AMD,SSE5
+VPHADDUWQ xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 d7 /r] AMD,SSE5
+;
+; fixed: spec has ymmreg for l0
+VPHADDWD xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 c6 /r] AMD,SSE5
+;
+; fixed: spec has d7 opcode
+VPHADDWQ xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 c7 /r] AMD,SSE5
+
+VPHSUBBW xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 e1 /r] AMD,SSE5
+VPHSUBDQ xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 e3 /r] AMD,SSE5
+VPHSUBWD xmmreg,xmmrm128* [rm: xop.m9.w0.l0.p0 e2 /r] AMD,SSE5
+
+VPMACSDD xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 9e /r /is4] AMD,SSE5
+;
+; fixed: spec has 97,9f opcodes here
+VPMACSDQH xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 9f /r /is4] AMD,SSE5
+VPMACSDQL xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 97 /r /is4] AMD,SSE5
+VPMACSSDD xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 8e /r /is4] AMD,SSE5
+VPMACSSDQH xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 8f /r /is4] AMD,SSE5
+VPMACSSDQL xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 87 /r /is4] AMD,SSE5
+VPMACSSWD xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 86 /r /is4] AMD,SSE5
+VPMACSSWW xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 85 /r /is4] AMD,SSE5
+VPMACSWD xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 96 /r /is4] AMD,SSE5
+VPMACSWW xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 95 /r /is4] AMD,SSE5
+VPMADCSSWD xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 a6 /r /is4] AMD,SSE5
+VPMADCSWD xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 b6 /r /is4] AMD,SSE5
+
+VPPERM xmmreg,xmmreg*,xmmreg,xmmrm128 [rvsm: xop.m8.w1.nds.l0.p0 a3 /r /is4] AMD,SSE5
+VPPERM xmmreg,xmmreg*,xmmrm128,xmmreg [rvms: xop.m8.w0.nds.l0.p0 a3 /r /is4] AMD,SSE5
+
+VPROTB xmmreg,xmmrm128*,xmmreg [rmv: xop.m9.w0.nds.l0.p0 90 /r] AMD,SSE5
+VPROTB xmmreg,xmmreg*,xmmrm128 [rvm: xop.m9.w1.nds.l0.p0 90 /r] AMD,SSE5
+;
+; fixed: spec point xmmreg instead of reg/mem
+VPROTB xmmreg,xmmrm128*,imm8 [rmi: xop.m8.w0.l0.p0 c0 /r ib] AMD,SSE5
+
+VPROTD xmmreg,xmmrm128*,xmmreg [rmv: xop.m9.w0.nds.l0.p0 92 /r] AMD,SSE5
+VPROTD xmmreg,xmmreg*,xmmrm128 [rvm: xop.m9.w1.nds.l0.p0 92 /r] AMD,SSE5
+;
+; fixed: spec error /r is needed
+VPROTD xmmreg,xmmrm128*,imm8 [rmi: xop.m8.w0.l0.p0 c2 /r ib] AMD,SSE5
+VPROTQ xmmreg,xmmrm128*,xmmreg [rmv: xop.m9.w0.nds.l0.p0 93 /r] AMD,SSE5
+VPROTQ xmmreg,xmmreg*,xmmrm128 [rvm: xop.m9.w1.nds.l0.p0 93 /r] AMD,SSE5
+;
+; fixed: spec error /r is needed
+VPROTQ xmmreg,xmmrm128*,imm8 [rmi: xop.m8.w0.l0.p0 c3 /r ib] AMD,SSE5
+VPROTW xmmreg,xmmrm128*,xmmreg [rmv: xop.m9.w0.nds.l0.p0 91 /r] AMD,SSE5
+VPROTW xmmreg,xmmreg*,xmmrm128 [rvm: xop.m9.w1.nds.l0.p0 91 /r] AMD,SSE5
+VPROTW xmmreg,xmmrm128*,imm8 [rmi: xop.m8.w0.l0.p0 c1 /r ib] AMD,SSE5
+
+VPSHAB xmmreg,xmmrm128*,xmmreg [rmv: xop.m9.w0.nds.l0.p0 98 /r] AMD,SSE5
+VPSHAB xmmreg,xmmreg*,xmmrm128 [rvm: xop.m9.w1.nds.l0.p0 98 /r] AMD,SSE5
+
+VPSHAD xmmreg,xmmrm128*,xmmreg [rmv: xop.m9.w0.nds.l0.p0 9a /r] AMD,SSE5
+VPSHAD xmmreg,xmmreg*,xmmrm128 [rvm: xop.m9.w1.nds.l0.p0 9a /r] AMD,SSE5
+
+VPSHAQ xmmreg,xmmrm128*,xmmreg [rmv: xop.m9.w0.nds.l0.p0 9b /r] AMD,SSE5
+VPSHAQ xmmreg,xmmreg*,xmmrm128 [rvm: xop.m9.w1.nds.l0.p0 9b /r] AMD,SSE5
+
+VPSHAW xmmreg,xmmrm128*,xmmreg [rmv: xop.m9.w0.nds.l0.p0 99 /r] AMD,SSE5
+VPSHAW xmmreg,xmmreg*,xmmrm128 [rvm: xop.m9.w1.nds.l0.p0 99 /r] AMD,SSE5
+
+VPSHLB xmmreg,xmmrm128*,xmmreg [rmv: xop.m9.w0.nds.l0.p0 94 /r] AMD,SSE5
+VPSHLB xmmreg,xmmreg*,xmmrm128 [rvm: xop.m9.w1.nds.l0.p0 94 /r] AMD,SSE5
+
+;
+; fixed: spec has ymmreg for l0
+VPSHLD xmmreg,xmmrm128*,xmmreg [rmv: xop.m9.w0.nds.l0.p0 96 /r] AMD,SSE5
+VPSHLD xmmreg,xmmreg*,xmmrm128 [rvm: xop.m9.w1.nds.l0.p0 96 /r] AMD,SSE5
+
+VPSHLQ xmmreg,xmmrm128*,xmmreg [rmv: xop.m9.w0.nds.l0.p0 97 /r] AMD,SSE5
+VPSHLQ xmmreg,xmmreg*,xmmrm128 [rvm: xop.m9.w1.nds.l0.p0 97 /r] AMD,SSE5
+
+VPSHLW xmmreg,xmmrm128*,xmmreg [rmv: xop.m9.w0.nds.l0.p0 95 /r] AMD,SSE5
+VPSHLW xmmreg,xmmreg*,xmmrm128 [rvm: xop.m9.w1.nds.l0.p0 95 /r] AMD,SSE5
+
+;# Intel AVX2 instructions
+;
+; based on pub number 319433-011 dated July 2011
+;
+VMPSADBW ymmreg,ymmreg*,ymmrm256,imm8 [rvmi: vex.nds.256.66.0f3a 42 /r ib] FUTURE,AVX2
+VPABSB ymmreg,ymmrm256 [rm: vex.256.66.0f38 1c /r] FUTURE,AVX2
+VPABSW ymmreg,ymmrm256 [rm: vex.256.66.0f38 1d /r] FUTURE,AVX2
+VPABSD ymmreg,ymmrm256 [rm: vex.256.66.0f38 1e /r] FUTURE,AVX2
+VPACKSSWB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 63 /r] FUTURE,AVX2
+VPACKSSDW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 6b /r] FUTURE,AVX2
+VPACKUSDW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 2b /r] FUTURE,AVX2
+VPACKUSWB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 67 /r] FUTURE,AVX2
+VPADDB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f fc /r] FUTURE,AVX2
+VPADDW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f fd /r] FUTURE,AVX2
+VPADDD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f fe /r] FUTURE,AVX2
+VPADDQ ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f d4 /r] FUTURE,AVX2
+VPADDSB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f ec /r] FUTURE,AVX2
+VPADDSW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f ed /r] FUTURE,AVX2
+VPADDUSB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f dc /r] FUTURE,AVX2
+VPADDUSW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f dd /r] FUTURE,AVX2
+VPALIGNR ymmreg,ymmreg*,ymmrm256,imm8 [rvmi: vex.nds.256.66.0f3a 0f /r ib] FUTURE,AVX2
+VPAND ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f db /r] FUTURE,AVX2
+VPANDN ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f df /r] FUTURE,AVX2
+VPAVGB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f e0 /r] FUTURE,AVX2
+VPAVGW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f e3 /r] FUTURE,AVX2
+VPBLENDVB ymmreg,ymmreg*,ymmrm256,ymmreg [rvms: vex.nds.256.66.0f3a 4c /r /is4] FUTURE,AVX2
+VPBLENDW ymmreg,ymmreg*,ymmrm256,imm8 [rvmi: vex.nds.256.66.0f3a 0e /r ib] FUTURE,AVX2
+VPCMPEQB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 74 /r] FUTURE,AVX2
+VPCMPEQW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 75 /r] FUTURE,AVX2
+VPCMPEQD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 76 /r] FUTURE,AVX2
+VPCMPEQQ ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 29 /r] FUTURE,AVX2
+VPCMPGTB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 64 /r] FUTURE,AVX2
+VPCMPGTW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 65 /r] FUTURE,AVX2
+VPCMPGTD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 66 /r] FUTURE,AVX2
+VPCMPGTQ ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 37 /r] FUTURE,AVX2
+VPHADDW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 01 /r] FUTURE,AVX2
+VPHADDD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 02 /r] FUTURE,AVX2
+VPHADDSW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 03 /r] FUTURE,AVX2
+VPHSUBW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 05 /r] FUTURE,AVX2
+VPHSUBD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 06 /r] FUTURE,AVX2
+VPHSUBSW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 07 /r] FUTURE,AVX2
+VPMADDUBSW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 04 /r] FUTURE,AVX2
+VPMADDWD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f f5 /r] FUTURE,AVX2
+VPMAXSB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 3c /r] FUTURE,AVX2
+VPMAXSW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f ee /r] FUTURE,AVX2
+VPMAXSD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 3d /r] FUTURE,AVX2
+VPMAXUB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f de /r] FUTURE,AVX2
+VPMAXUW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 3e /r] FUTURE,AVX2
+VPMAXUD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 3f /r] FUTURE,AVX2
+VPMINSB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 38 /r] FUTURE,AVX2
+VPMINSW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f ea /r] FUTURE,AVX2
+VPMINSD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 39 /r] FUTURE,AVX2
+VPMINUB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f da /r] FUTURE,AVX2
+VPMINUW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 3a /r] FUTURE,AVX2
+VPMINUD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 3b /r] FUTURE,AVX2
+VPMOVMSKB reg32,ymmreg [rm: vex.256.66.0f d7 /r] FUTURE,AVX2
+VPMOVMSKB reg64,ymmreg [rm: vex.256.66.0f d7 /r] FUTURE,AVX2
+VPMOVSXBW ymmreg,xmmrm128 [rm: vex.256.66.0f38 20 /r] FUTURE,AVX2
+VPMOVSXBD ymmreg,mem64 [rm: vex.256.66.0f38 21 /r] FUTURE,AVX2
+VPMOVSXBD ymmreg,xmmreg [rm: vex.256.66.0f38 21 /r] FUTURE,AVX2
+VPMOVSXBQ ymmreg,mem32 [rm: vex.256.66.0f38 22 /r] FUTURE,AVX2
+VPMOVSXBQ ymmreg,xmmreg [rm: vex.256.66.0f38 22 /r] FUTURE,AVX2
+VPMOVSXWD ymmreg,xmmrm128 [rm: vex.256.66.0f38 23 /r] FUTURE,AVX2
+VPMOVSXWQ ymmreg,mem64 [rm: vex.256.66.0f38 24 /r] FUTURE,AVX2
+VPMOVSXWQ ymmreg,xmmreg [rm: vex.256.66.0f38 24 /r] FUTURE,AVX2
+VPMOVSXDQ ymmreg,xmmrm128 [rm: vex.256.66.0f38 25 /r] FUTURE,AVX2
+VPMOVZXBW ymmreg,xmmrm128 [rm: vex.256.66.0f38 30 /r] FUTURE,AVX2
+VPMOVZXBD ymmreg,mem64 [rm: vex.256.66.0f38 31 /r] FUTURE,AVX2
+VPMOVZXBD ymmreg,xmmreg [rm: vex.256.66.0f38 31 /r] FUTURE,AVX2
+VPMOVZXBQ ymmreg,mem32 [rm: vex.256.66.0f38 32 /r] FUTURE,AVX2
+VPMOVZXBQ ymmreg,xmmreg [rm: vex.256.66.0f38 32 /r] FUTURE,AVX2
+VPMOVZXWD ymmreg,xmmrm128 [rm: vex.256.66.0f38 33 /r] FUTURE,AVX2
+VPMOVZXWQ ymmreg,mem64 [rm: vex.256.66.0f38 34 /r] FUTURE,AVX2
+VPMOVZXWQ ymmreg,xmmreg [rm: vex.256.66.0f38 34 /r] FUTURE,AVX2
+VPMOVZXDQ ymmreg,xmmrm128 [rm: vex.256.66.0f38 35 /r] FUTURE,AVX2
+VPMULDQ ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 28 /r] FUTURE,AVX2
+VPMULHRSW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 0b /r] FUTURE,AVX2
+VPMULHUW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f e4 /r] FUTURE,AVX2
+VPMULHW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f e5 /r] FUTURE,AVX2
+VPMULLW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f d5 /r] FUTURE,AVX2
+VPMULLD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 40 /r] FUTURE,AVX2
+VPMULUDQ ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f f4 /r] FUTURE,AVX2
+VPOR ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f eb /r] FUTURE,AVX2
+VPSADBW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f f6 /r] FUTURE,AVX2
+VPSHUFB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 00 /r] FUTURE,AVX2
+VPSHUFD ymmreg,ymmrm256,imm8 [rmi: vex.256.66.0f 70 /r ib] FUTURE,AVX2
+VPSHUFHW ymmreg,ymmrm256,imm8 [rmi: vex.256.f3.0f 70 /r ib] FUTURE,AVX2
+VPSHUFLW ymmreg,ymmrm256,imm8 [rmi: vex.256.f2.0f 70 /r ib] FUTURE,AVX2
+VPSIGNB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 08 /r] FUTURE,AVX2
+VPSIGNW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 09 /r] FUTURE,AVX2
+VPSIGND ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38 0a /r] FUTURE,AVX2
+VPSLLDQ ymmreg,ymmreg*,imm8 [vmi: vex.ndd.256.66.0f 73 /7 ib] FUTURE,AVX2
+VPSLLW ymmreg,ymmreg*,xmmrm128 [rvm: vex.nds.256.66.0f f1 /r] FUTURE,AVX2
+VPSLLW ymmreg,ymmreg*,imm8 [vmi: vex.ndd.256.66.0f 71 /6 ib] FUTURE,AVX2
+VPSLLD ymmreg,ymmreg*,xmmrm128 [rvm: vex.nds.256.66.0f f2 /r] FUTURE,AVX2
+VPSLLD ymmreg,ymmreg*,imm8 [vmi: vex.ndd.256.66.0f 72 /6 ib] FUTURE,AVX2
+VPSLLQ ymmreg,ymmreg*,xmmrm128 [rvm: vex.nds.256.66.0f f3 /r] FUTURE,AVX2
+VPSLLQ ymmreg,ymmreg*,imm8 [vmi: vex.ndd.256.66.0f 73 /6 ib] FUTURE,AVX2
+VPSRAW ymmreg,ymmreg*,xmmrm128 [rvm: vex.nds.256.66.0f e1 /r] FUTURE,AVX2
+VPSRAW ymmreg,ymmreg*,imm8 [vmi: vex.ndd.256.66.0f 71 /4 ib] FUTURE,AVX2
+VPSRAD ymmreg,ymmreg*,xmmrm128 [rvm: vex.nds.256.66.0f e2 /r] FUTURE,AVX2
+VPSRAD ymmreg,ymmreg*,imm8 [vmi: vex.ndd.256.66.0f 72 /4 ib] FUTURE,AVX2
+VPSRLDQ ymmreg,ymmreg*,imm8 [vmi: vex.ndd.256.66.0f 73 /3 ib] FUTURE,AVX2
+VPSRLW ymmreg,ymmreg*,xmmrm128 [rvm: vex.nds.256.66.0f d1 /r] FUTURE,AVX2
+VPSRLW ymmreg,ymmreg*,imm8 [vmi: vex.ndd.256.66.0f 71 /2 ib] FUTURE,AVX2
+VPSRLD ymmreg,ymmreg*,xmmrm128 [rvm: vex.nds.256.66.0f d2 /r] FUTURE,AVX2
+VPSRLD ymmreg,ymmreg*,imm8 [vmi: vex.ndd.256.66.0f 72 /2 ib] FUTURE,AVX2
+VPSRLQ ymmreg,ymmreg*,xmmrm128 [rvm: vex.nds.256.66.0f d3 /r] FUTURE,AVX2
+VPSRLQ ymmreg,ymmreg*,imm8 [vmi: vex.ndd.256.66.0f.wig 73 /2 ib] FUTURE,AVX2
+VPSUBB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f f8 /r] FUTURE,AVX2
+VPSUBW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f f9 /r] FUTURE,AVX2
+VPSUBD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f fa /r] FUTURE,AVX2
+VPSUBQ ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f fb /r] FUTURE,AVX2
+VPSUBSB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f e8 /r] FUTURE,AVX2
+VPSUBSW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f e9 /r] FUTURE,AVX2
+VPSUBUSB ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f d8 /r] FUTURE,AVX2
+VPSUBUSW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f d9 /r] FUTURE,AVX2
+VPUNPCKHBW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 68 /r] FUTURE,AVX2
+VPUNPCKHWD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 69 /r] FUTURE,AVX2
+VPUNPCKHDQ ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 6a /r] FUTURE,AVX2
+VPUNPCKHQDQ ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 6d /r] FUTURE,AVX2
+VPUNPCKLBW ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 60 /r] FUTURE,AVX2
+VPUNPCKLWD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 61 /r] FUTURE,AVX2
+VPUNPCKLDQ ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 62 /r] FUTURE,AVX2
+VPUNPCKLQDQ ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f 6c /r] FUTURE,AVX2
+VPXOR ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f ef /r] FUTURE,AVX2
+VMOVNTDQA ymmreg,mem256 [rm: vex.256.66.0f38 2a /r] FUTURE,AVX2
+VBROADCASTSS xmmreg,xmmreg [rm: vex.128.66.0f38.w0 18 /r] FUTURE,AVX2
+VBROADCASTSS ymmreg,xmmreg [rm: vex.256.66.0f38.w0 18 /r] FUTURE,AVX2
+VBROADCASTSD ymmreg,xmmreg [rm: vex.256.66.0f38.w0 19 /r] FUTURE,AVX2
+VBROADCASTI128 ymmreg,mem128 [rm: vex.256.66.0f38.w0 5a /r] FUTURE,AVX2
+VPBLENDD xmmreg,xmmreg*,xmmrm128,imm8 [rvmi: vex.nds.128.66.0f3a.w0 02 /r ib] FUTURE,AVX2
+VPBLENDD ymmreg,ymmreg*,ymmrm256,imm8 [rvmi: vex.nds.256.66.0f3a.w0 02 /r ib] FUTURE,AVX2
+VPBROADCASTB xmmreg,mem8 [rm: vex.128.66.0f38.w0 78 /r] FUTURE,AVX2
+VPBROADCASTB xmmreg,xmmreg [rm: vex.128.66.0f38.w0 78 /r] FUTURE,AVX2
+VPBROADCASTB ymmreg,mem8 [rm: vex.256.66.0f38.w0 78 /r] FUTURE,AVX2
+VPBROADCASTB ymmreg,xmmreg [rm: vex.256.66.0f38.w0 78 /r] FUTURE,AVX2
+VPBROADCASTW xmmreg,mem16 [rm: vex.128.66.0f38.w0 79 /r] FUTURE,AVX2
+VPBROADCASTW xmmreg,xmmreg [rm: vex.128.66.0f38.w0 79 /r] FUTURE,AVX2
+VPBROADCASTW ymmreg,mem16 [rm: vex.256.66.0f38.w0 79 /r] FUTURE,AVX2
+VPBROADCASTW ymmreg,xmmreg [rm: vex.256.66.0f38.w0 79 /r] FUTURE,AVX2
+VPBROADCASTD xmmreg,mem32 [rm: vex.128.66.0f38.w0 58 /r] FUTURE,AVX2
+VPBROADCASTD xmmreg,xmmreg [rm: vex.128.66.0f38.w0 58 /r] FUTURE,AVX2
+VPBROADCASTD ymmreg,mem32 [rm: vex.256.66.0f38.w0 58 /r] FUTURE,AVX2
+VPBROADCASTD ymmreg,xmmreg [rm: vex.256.66.0f38.w0 58 /r] FUTURE,AVX2
+VPBROADCASTQ xmmreg,mem64 [rm: vex.128.66.0f38.w0 59 /r] FUTURE,AVX2
+VPBROADCASTQ xmmreg,xmmreg [rm: vex.128.66.0f38.w0 59 /r] FUTURE,AVX2
+VPBROADCASTQ ymmreg,mem64 [rm: vex.256.66.0f38.w0 59 /r] FUTURE,AVX2
+VPBROADCASTQ ymmreg,xmmreg [rm: vex.256.66.0f38.w0 59 /r] FUTURE,AVX2
+
+VPERMD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38.w0 36 /r] FUTURE,AVX2
+VPERMPD ymmreg,ymmrm256,imm8 [rmi: vex.256.66.0f3a.w1 01 /r ib] FUTURE,AVX2
+VPERMPS ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38.w0 16 /r] FUTURE,AVX2
+VPERMQ ymmreg,ymmrm256,imm8 [rmi: vex.256.66.0f3a.w1 00 /r ib] FUTURE,AVX2
+VPERM2I128 ymmreg,ymmreg*,ymmrm256,imm8 [rvmi: vex.nds.256.66.0f3a.w0 46 /r ib] FUTURE,AVX2
+VEXTRACTI128 xmmrm128,ymmreg,imm8 [mri: vex.256.66.0f3a.w0 39 /r ib] FUTURE,AVX2
+
+VINSERTI128 ymmreg,ymmreg*,xmmrm128,imm8 [rvmi: vex.nds.256.66.0f3a.w0 38 /r ib] FUTURE,AVX2
+VPMASKMOVD xmmreg,xmmreg*,mem128 [rvm: vex.nds.128.66.0f38.w0 8c /r] FUTURE,AVX2
+VPMASKMOVD ymmreg,ymmreg*,mem256 [rvm: vex.nds.256.66.0f38.w0 8c /r] FUTURE,AVX2
+VPMASKMOVQ xmmreg,xmmreg*,mem128 [rvm: vex.nds.128.66.0f38.w1 8c /r] FUTURE,AVX2
+VPMASKMOVQ ymmreg,ymmreg*,mem256 [rvm: vex.nds.256.66.0f38.w1 8c /r] FUTURE,AVX2
+
+VPMASKMOVD mem128,xmmreg*,xmmreg [mvr: vex.nds.128.66.0f38.w0 8e /r] FUTURE,AVX2
+VPMASKMOVD mem256,ymmreg*,ymmreg [mvr: vex.nds.256.66.0f38.w0 8e /r] FUTURE,AVX2
+VPMASKMOVQ mem128,xmmreg*,xmmreg [mvr: vex.nds.128.66.0f38.w1 8e /r] FUTURE,AVX2
+VPMASKMOVQ mem256,ymmreg*,ymmreg [mvr: vex.nds.256.66.0f38.w1 8e /r] FUTURE,AVX2
+
+VPSLLVD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38.w0 47 /r] FUTURE,AVX2
+VPSLLVQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38.w1 47 /r] FUTURE,AVX2
+VPSLLVD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38.w0 47 /r] FUTURE,AVX2
+VPSLLVQ ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38.w1 47 /r] FUTURE,AVX2
+
+VPSRAVD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38.w0 46 /r] FUTURE,AVX2
+VPSRAVD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38.w0 46 /r] FUTURE,AVX2
+
+VPSRLVD xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38.w0 45 /r] FUTURE,AVX2
+VPSRLVQ xmmreg,xmmreg*,xmmrm128 [rvm: vex.nds.128.66.0f38.w1 45 /r] FUTURE,AVX2
+VPSRLVD ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38.w0 45 /r] FUTURE,AVX2
+VPSRLVQ ymmreg,ymmreg*,ymmrm256 [rvm: vex.nds.256.66.0f38.w1 45 /r] FUTURE,AVX2
+
+VGATHERDPD xmmreg,xmem64,xmmreg [rmv: vm32x vex.dds.128.66.0f38.w1 92 /r] FUTURE,AVX2
+VGATHERQPD xmmreg,xmem64,xmmreg [rmv: vm64x vex.dds.128.66.0f38.w1 93 /r] FUTURE,AVX2
+VGATHERDPD ymmreg,xmem64,ymmreg [rmv: vm32x vex.dds.256.66.0f38.w1 92 /r] FUTURE,AVX2
+VGATHERQPD ymmreg,ymem64,ymmreg [rmv: vm64y vex.dds.256.66.0f38.w1 93 /r] FUTURE,AVX2
+
+VGATHERDPS xmmreg,xmem32,xmmreg [rmv: vm32x vex.dds.128.66.0f38.w0 92 /r] FUTURE,AVX2
+VGATHERQPS xmmreg,xmem32,xmmreg [rmv: vm64x vex.dds.128.66.0f38.w0 93 /r] FUTURE,AVX2
+VGATHERDPS ymmreg,ymem32,ymmreg [rmv: vm32y vex.dds.256.66.0f38.w0 92 /r] FUTURE,AVX2
+VGATHERQPS xmmreg,ymem32,xmmreg [rmv: vm64y vex.dds.256.66.0f38.w0 93 /r] FUTURE,AVX2
+
+VPGATHERDD xmmreg,xmem32,xmmreg [rmv: vm32x vex.dds.128.66.0f38.w0 90 /r] FUTURE,AVX2
+VPGATHERQD xmmreg,xmem32,xmmreg [rmv: vm64x vex.dds.128.66.0f38.w0 91 /r] FUTURE,AVX2
+VPGATHERDD ymmreg,ymem32,ymmreg [rmv: vm32y vex.dds.256.66.0f38.w0 90 /r] FUTURE,AVX2
+VPGATHERQD xmmreg,ymem32,xmmreg [rmv: vm64y vex.dds.256.66.0f38.w0 91 /r] FUTURE,AVX2
+
+VPGATHERDQ xmmreg,xmem64,xmmreg [rmv: vm32x vex.dds.128.66.0f38.w1 90 /r] FUTURE,AVX2
+VPGATHERQQ xmmreg,xmem64,xmmreg [rmv: vm64x vex.dds.128.66.0f38.w1 91 /r] FUTURE,AVX2
+VPGATHERDQ ymmreg,xmem64,ymmreg [rmv: vm32x vex.dds.256.66.0f38.w1 90 /r] FUTURE,AVX2
+VPGATHERQQ ymmreg,ymem64,ymmreg [rmv: vm64y vex.dds.256.66.0f38.w1 91 /r] FUTURE,AVX2
+
+;# Intel Transactional Synchronization Extensions (TSX)
+XABORT imm [i: c6 f8 ib] FUTURE,RTM
+XABORT imm8 [i: c6 f8 ib] FUTURE,RTM
+XBEGIN imm [i: odf c7 f8 rel] FUTURE,RTM
+XBEGIN imm|near [i: odf c7 f8 rel] FUTURE,RTM,ND
+XBEGIN imm16 [i: o16 c7 f8 rel] FUTURE,RTM,NOLONG
+XBEGIN imm16|near [i: o16 c7 f8 rel] FUTURE,RTM,NOLONG,ND
+XBEGIN imm32 [i: o32 c7 f8 rel] FUTURE,RTM,NOLONG
+XBEGIN imm32|near [i: o32 c7 f8 rel] FUTURE,RTM,NOLONG,ND
+XBEGIN imm64 [i: o64nw c7 f8 rel] FUTURE,RTM,LONG
+XBEGIN imm64|near [i: o64nw c7 f8 rel] FUTURE,RTM,LONG,ND
+XEND void [ 0f 01 d5] FUTURE,RTM
+XTEST void [ 0f 01 d6] FUTURE,HLE,RTM
+
+;# Intel BMI1 and BMI2 instructions, AMD TBM instructions
+;
+; based on pub number 319433-011 dated July 2011
+;
+ANDN reg32,reg32,rm32 [rvm: vex.nds.lz.0f38.w0 f2 /r] FUTURE,BMI1
+ANDN reg64,reg64,rm64 [rvm: vex.nds.lz.0f38.w1 f2 /r] LONG,FUTURE,BMI1
+BEXTR reg32,rm32,reg32 [rmv: vex.nds.lz.0f38.w0 f7 /r] FUTURE,BMI1
+BEXTR reg64,rm64,reg64 [rmv: vex.nds.lz.0f38.w1 f7 /r] LONG,FUTURE,BMI1
+BEXTR reg32,rm32,imm32 [rmi: xop.m10.lz.w0 10 /r id] FUTURE,TBM
+BEXTR reg64,rm64,imm32 [rmi: xop.m10.lz.w1 10 /r id] LONG,FUTURE,TBM
+BLCI reg32,rm32 [vm: xop.ndd.lz.m9.w0 02 /6] FUTURE,TBM
+BLCI reg64,rm64 [vm: xop.ndd.lz.m9.w1 02 /6] LONG,FUTURE,TBM
+BLCIC reg32,rm32 [vm: xop.ndd.lz.m9.w0 01 /5] FUTURE,TBM
+BLCIC reg64,rm64 [vm: xop.ndd.lz.m9.w1 01 /5] LONG,FUTURE,TBM
+BLSI reg32,rm32 [vm: vex.ndd.lz.0f38.w0 f3 /3] FUTURE,BMI1
+BLSI reg64,rm64 [vm: vex.ndd.lz.0f38.w1 f3 /3] LONG,FUTURE,BMI1
+BLSIC reg32,rm32 [vm: xop.ndd.lz.m9.w0 01 /6] FUTURE,TBM
+BLSIC reg64,rm64 [vm: xop.ndd.lz.m9.w1 01 /6] LONG,FUTURE,TBM
+BLCFILL reg32,rm32 [vm: xop.ndd.lz.m9.w0 01 /1] FUTURE,TBM
+BLCFILL reg64,rm64 [vm: xop.ndd.lz.m9.w1 01 /1] LONG,FUTURE,TBM
+BLSFILL reg32,rm32 [vm: xop.ndd.lz.m9.w0 01 /2] FUTURE,TBM
+BLSFILL reg64,rm64 [vm: xop.ndd.lz.m9.w1 01 /2] LONG,FUTURE,TBM
+BLCMSK reg32,rm32 [vm: xop.ndd.lz.m9.w0 02 /1] FUTURE,TBM
+BLCMSK reg64,rm64 [vm: xop.ndd.lz.m9.w1 02 /1] LONG,FUTURE,TBM
+BLSMSK reg32,rm32 [vm: vex.ndd.lz.0f38.w0 f3 /2] FUTURE,BMI1
+BLSMSK reg64,rm64 [vm: vex.ndd.lz.0f38.w1 f3 /2] LONG,FUTURE,BMI1
+BLSR reg32,rm32 [vm: vex.ndd.lz.0f38.w0 f3 /1] FUTURE,BMI1
+BLSR reg64,rm64 [vm: vex.ndd.lz.0f38.w1 f3 /1] LONG,FUTURE,BMI1
+BLCS reg32,rm32 [vm: xop.ndd.lz.m9.w0 01 /3] FUTURE,TBM
+BLCS reg64,rm64 [vm: xop.ndd.lz.m9.w1 01 /3] LONG,FUTURE,TBM
+BZHI reg32,rm32,reg32 [rmv: vex.nds.lz.0f38.w0 f5 /r] FUTURE,BMI2
+BZHI reg64,rm64,reg64 [rmv: vex.nds.lz.0f38.w1 f5 /r] LONG,FUTURE,BMI2
+MULX reg32,reg32,rm32 [rvm: vex.ndd.lz.f2.0f38.w0 f6 /r] FUTURE,BMI2
+MULX reg64,reg64,rm64 [rvm: vex.ndd.lz.f2.0f38.w1 f6 /r] LONG,FUTURE,BMI2
+PDEP reg32,reg32,rm32 [rvm: vex.nds.lz.f2.0f38.w0 f5 /r] FUTURE,BMI2
+PDEP reg64,reg64,rm64 [rvm: vex.nds.lz.f2.0f38.w1 f5 /r] LONG,FUTURE,BMI2
+PEXT reg32,reg32,rm32 [rvm: vex.nds.lz.f3.0f38.w0 f5 /r] FUTURE,BMI2
+PEXT reg64,reg64,rm64 [rvm: vex.nds.lz.f3.0f38.w1 f5 /r] LONG,FUTURE,BMI2
+RORX reg32,rm32,imm8 [rmi: vex.lz.f2.0f3a.w0 f0 /r ib] FUTURE,BMI2
+RORX reg64,rm64,imm8 [rmi: vex.lz.f2.0f3a.w1 f0 /r ib] LONG,FUTURE,BMI2
+SARX reg32,rm32,reg32 [rmv: vex.nds.lz.f3.0f38.w0 f7 /r] FUTURE,BMI2
+SARX reg64,rm64,reg64 [rmv: vex.nds.lz.f3.0f38.w1 f7 /r] LONG,FUTURE,BMI2
+SHLX reg32,rm32,reg32 [rmv: vex.nds.lz.66.0f38.w0 f7 /r] FUTURE,BMI2
+SHLX reg64,rm64,reg64 [rmv: vex.nds.lz.66.0f38.w1 f7 /r] LONG,FUTURE,BMI2
+SHRX reg32,rm32,reg32 [rmv: vex.nds.lz.f2.0f38.w0 f7 /r] FUTURE,BMI2
+SHRX reg64,rm64,reg64 [rmv: vex.nds.lz.f2.0f38.w1 f7 /r] LONG,FUTURE,BMI2
+TZCNT reg16,rm16 [rm: o16 f3i 0f bc /r] FUTURE,BMI1
+TZCNT reg32,rm32 [rm: o32 f3i 0f bc /r] FUTURE,BMI1
+TZCNT reg64,rm64 [rm: o64 f3i 0f bc /r] LONG,FUTURE,BMI1
+TZMSK reg32,rm32 [vm: xop.ndd.lz.m9.w0 01 /4] FUTURE,TBM
+TZMSK reg64,rm64 [vm: xop.ndd.lz.m9.w1 01 /4] LONG,FUTURE,TBM
+T1MSKC reg32,rm32 [vm: xop.ndd.lz.m9.w0 01 /7] FUTURE,TBM
+T1MSKC reg64,rm64 [vm: xop.ndd.lz.m9.w1 01 /7] LONG,FUTURE,TBM
+
+PREFETCHWT1 mem8 [m: 0f 0d /2 ] PREFETCHWT1,FUTURE
+
+;# Intel Memory Protection Extensions (MPX)
+BNDMK bndreg,mem [rm: f3 0f 1b /r ] MPX,MIB,FUTURE
+BNDCL bndreg,mem [rm: f3 0f 1a /r ] MPX,FUTURE
+BNDCL bndreg,reg32 [rm: f3 0f 1a /r ] MPX,NOLONG,FUTURE
+BNDCL bndreg,reg64 [rm: o64nw f3 0f 1a /r ] MPX,LONG,FUTURE
+BNDCU bndreg,mem [rm: f2 0f 1a /r ] MPX,FUTURE
+BNDCU bndreg,reg32 [rm: f2 0f 1a /r ] MPX,NOLONG,FUTURE
+BNDCU bndreg,reg64 [rm: o64nw f2 0f 1a /r ] MPX,LONG,FUTURE
+BNDCN bndreg,mem [rm: f2 0f 1b /r ] MPX,FUTURE
+BNDCN bndreg,reg32 [rm: f2 0f 1b /r ] MPX,NOLONG,FUTURE
+BNDCN bndreg,reg64 [rm: o64nw f2 0f 1b /r ] MPX,LONG,FUTURE
+BNDMOV bndreg,bndreg [rm: 66 0f 1a /r ] MPX,FUTURE
+BNDMOV bndreg,mem [rm: 66 0f 1a /r ] MPX,FUTURE
+BNDMOV bndreg,bndreg [mr: 66 0f 1b /r ] MPX,FUTURE
+BNDMOV mem,bndreg [mr: 66 0f 1b /r ] MPX,FUTURE
+BNDLDX bndreg,mem [rm: 0f 1a /r ] MPX,MIB,FUTURE
+BNDLDX bndreg,mem,reg32 [rmx: 0f 1a /r ] MPX,MIB,NOLONG,FUTURE
+BNDLDX bndreg,mem,reg64 [rmx: 0f 1a /r ] MPX,MIB,LONG,FUTURE
+BNDSTX mem,bndreg [mr: 0f 1b /r ] MPX,MIB,FUTURE
+BNDSTX mem,reg32,bndreg [mxr: 0f 1b /r ] MPX,MIB,NOLONG,FUTURE
+BNDSTX mem,reg64,bndreg [mxr: 0f 1b /r ] MPX,MIB,LONG,FUTURE
+BNDSTX mem,bndreg,reg32 [mrx: 0f 1b /r ] MPX,MIB,NOLONG,FUTURE
+BNDSTX mem,bndreg,reg64 [mrx: 0f 1b /r ] MPX,MIB,LONG,FUTURE
+
+;# Intel SHA acceleration instructions
+SHA1MSG1 xmmreg,xmmrm128 [rm: 0f 38 c9 /r ] SHA,FUTURE
+SHA1MSG2 xmmreg,xmmrm128 [rm: 0f 38 ca /r ] SHA,FUTURE
+SHA1NEXTE xmmreg,xmmrm128 [rm: 0f 38 c8 /r ] SHA,FUTURE
+SHA1RNDS4 xmmreg,xmmrm128,imm8 [rmi: 0f 3a cc /r ib ] SHA,FUTURE
+SHA256MSG1 xmmreg,xmmrm128 [rm: 0f 38 cc /r ] SHA,FUTURE
+SHA256MSG2 xmmreg,xmmrm128 [rm: 0f 38 cd /r ] SHA,FUTURE
+SHA256RNDS2 xmmreg,xmmrm128,xmm0 [rm-: 0f 38 cb /r ] SHA,FUTURE
+SHA256RNDS2 xmmreg,xmmrm128 [rm: 0f 38 cb /r ] SHA,FUTURE
+
+;# AVX-512 mask register instructions
+KADDB kreg,kreg,kreg [rvm: vex.nds.l1.66.0f.w0 4a /r ] FUTURE
+KADDD kreg,kreg,kreg [rvm: vex.nds.l1.66.0f.w1 4a /r ] FUTURE
+KADDQ kreg,kreg,kreg [rvm: vex.nds.l1.0f.w1 4a /r ] FUTURE
+KADDW kreg,kreg,kreg [rvm: vex.nds.l1.0f.w0 4a /r ] FUTURE
+KANDB kreg,kreg,kreg [rvm: vex.nds.l1.66.0f.w0 41 /r ] FUTURE
+KANDD kreg,kreg,kreg [rvm: vex.nds.l1.66.0f.w1 41 /r ] FUTURE
+KANDNB kreg,kreg,kreg [rvm: vex.nds.l1.66.0f.w0 42 /r ] FUTURE
+KANDND kreg,kreg,kreg [rvm: vex.nds.l1.66.0f.w1 42 /r ] FUTURE
+KANDNQ kreg,kreg,kreg [rvm: vex.nds.l1.0f.w1 42 /r ] FUTURE
+KANDNW kreg,kreg,kreg [rvm: vex.nds.l1.0f.w0 42 /r ] FUTURE
+KANDQ kreg,kreg,kreg [rvm: vex.nds.l1.0f.w1 41 /r ] FUTURE
+KANDW kreg,kreg,kreg [rvm: vex.nds.l1.0f.w0 41 /r ] FUTURE
+KMOVB kreg,krm8 [rm: vex.l0.66.0f.w0 90 /r ] FUTURE
+KMOVB mem8,kreg [mr: vex.l0.66.0f.w0 91 /r ] FUTURE
+KMOVB kreg,reg32 [rm: vex.l0.66.0f.w0 92 /r ] FUTURE
+KMOVB reg32,kreg [rm: vex.l0.66.0f.w0 93 /r ] FUTURE
+KMOVD kreg,krm32 [rm: vex.l0.66.0f.w1 90 /r ] FUTURE
+KMOVD mem32,kreg [mr: vex.l0.66.0f.w1 91 /r ] FUTURE
+KMOVD kreg,reg32 [rm: vex.l0.f2.0f.w0 92 /r ] FUTURE
+KMOVD reg32,kreg [rm: vex.l0.f2.0f.w0 93 /r ] FUTURE
+KMOVQ kreg,krm64 [rm: vex.l0.0f.w1 90 /r ] FUTURE
+KMOVQ mem64,kreg [mr: vex.l0.0f.w1 91 /r ] FUTURE
+KMOVQ kreg,reg64 [rm: vex.l0.f2.0f.w1 92 /r ] FUTURE
+KMOVQ reg64,kreg [rm: vex.l0.f2.0f.w1 93 /r ] FUTURE
+KMOVW kreg,krm16 [rm: vex.l0.0f.w0 90 /r ] FUTURE
+KMOVW mem16,kreg [mr: vex.l0.0f.w0 91 /r ] FUTURE
+KMOVW kreg,reg32 [rm: vex.l0.0f.w0 92 /r ] FUTURE
+KMOVW reg32,kreg [rm: vex.l0.0f.w0 93 /r ] FUTURE
+KNOTB kreg,kreg [rm: vex.l0.66.0f.w0 44 /r ] FUTURE
+KNOTD kreg,kreg [rm: vex.l0.66.0f.w1 44 /r ] FUTURE
+KNOTQ kreg,kreg [rm: vex.l0.0f.w1 44 /r ] FUTURE
+KNOTW kreg,kreg [rm: vex.l0.0f.w0 44 /r ] FUTURE
+KORB kreg,kreg,kreg [rvm: vex.nds.l1.66.0f.w0 45 /r ] FUTURE
+KORD kreg,kreg,kreg [rvm: vex.nds.l1.66.0f.w1 45 /r ] FUTURE
+KORQ kreg,kreg,kreg [rvm: vex.nds.l1.0f.w1 45 /r ] FUTURE
+KORTESTB kreg,kreg [rm: vex.l0.66.0f.w0 98 /r ] FUTURE
+KORTESTD kreg,kreg [rm: vex.l0.66.0f.w1 98 /r ] FUTURE
+KORTESTQ kreg,kreg [rm: vex.l0.0f.w1 98 /r ] FUTURE
+KORTESTW kreg,kreg [rm: vex.l0.0f.w0 98 /r ] FUTURE
+KORW kreg,kreg,kreg [rvm: vex.nds.l1.0f.w0 45 /r ] FUTURE
+KSHIFTLB kreg,kreg,imm8 [rmi: vex.l0.66.0f3a.w0 32 /r ib ] FUTURE
+KSHIFTLD kreg,kreg,imm8 [rmi: vex.l0.66.0f3a.w0 33 /r ib ] FUTURE
+KSHIFTLQ kreg,kreg,imm8 [rmi: vex.l0.66.0f3a.w1 33 /r ib ] FUTURE
+KSHIFTLW kreg,kreg,imm8 [rmi: vex.l0.66.0f3a.w1 32 /r ib ] FUTURE
+KSHIFTRB kreg,kreg,imm8 [rmi: vex.l0.66.0f3a.w0 30 /r ib ] FUTURE
+KSHIFTRD kreg,kreg,imm8 [rmi: vex.l0.66.0f3a.w0 31 /r ib ] FUTURE
+KSHIFTRQ kreg,kreg,imm8 [rmi: vex.l0.66.0f3a.w1 31 /r ib ] FUTURE
+KSHIFTRW kreg,kreg,imm8 [rmi: vex.l0.66.0f3a.w1 30 /r ib ] FUTURE
+KTESTB kreg,kreg [rm: vex.l0.66.0f.w0 99 /r ] FUTURE
+KTESTD kreg,kreg [rm: vex.l0.66.0f.w1 99 /r ] FUTURE
+KTESTQ kreg,kreg [rm: vex.l0.0f.w1 99 /r ] FUTURE
+KTESTW kreg,kreg [rm: vex.l0.0f.w0 99 /r ] FUTURE
+KUNPCKBW kreg,kreg,kreg [rvm: vex.nds.l1.66.0f.w0 4b /r ] FUTURE
+KUNPCKDQ kreg,kreg,kreg [rvm: vex.nds.l1.0f.w1 4b /r ] FUTURE
+KUNPCKWD kreg,kreg,kreg [rvm: vex.nds.l1.0f.w0 4b /r ] FUTURE
+KXNORB kreg,kreg,kreg [rvm: vex.nds.l1.66.0f.w0 46 /r ] FUTURE
+KXNORD kreg,kreg,kreg [rvm: vex.nds.l1.66.0f.w1 46 /r ] FUTURE
+KXNORQ kreg,kreg,kreg [rvm: vex.nds.l1.0f.w1 46 /r ] FUTURE
+KXNORW kreg,kreg,kreg [rvm: vex.nds.l1.0f.w0 46 /r ] FUTURE
+KXORB kreg,kreg,kreg [rvm: vex.nds.l1.66.0f.w0 47 /r ] FUTURE
+KXORD kreg,kreg,kreg [rvm: vex.nds.l1.66.0f.w1 47 /r ] FUTURE
+KXORQ kreg,kreg,kreg [rvm: vex.nds.l1.0f.w1 47 /r ] FUTURE
+KXORW kreg,kreg,kreg [rvm: vex.nds.l1.0f.w0 47 /r ] FUTURE
+
+;# AVX-512 instructions
+VADDPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 58 /r ] AVX512VL,AVX512,FUTURE
+VADDPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 58 /r ] AVX512VL,AVX512,FUTURE
+VADDPD zmmreg|mask|z,zmmreg*,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f.w1 58 /r ] AVX512,FUTURE
+VADDPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.0f.w0 58 /r ] AVX512VL,AVX512,FUTURE
+VADDPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.0f.w0 58 /r ] AVX512VL,AVX512,FUTURE
+VADDPS zmmreg|mask|z,zmmreg*,zmmrm512|b32|er [rvm:fv: evex.nds.512.0f.w0 58 /r ] AVX512,FUTURE
+VADDSD xmmreg|mask|z,xmmreg*,xmmrm64|er [rvm:t1s: evex.nds.128.f2.0f.w1 58 /r ] AVX512,FUTURE
+VADDSS xmmreg|mask|z,xmmreg*,xmmrm32|er [rvm:t1s: evex.nds.128.f3.0f.w0 58 /r ] AVX512,FUTURE
+VALIGND xmmreg|mask|z,xmmreg*,xmmrm128|b32,imm8 [rvmi:fv: evex.nds.128.66.0f3a.w0 03 /r ib ] AVX512VL,AVX512,FUTURE
+VALIGND ymmreg|mask|z,ymmreg*,ymmrm256|b32,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w0 03 /r ib ] AVX512VL,AVX512,FUTURE
+VALIGND zmmreg|mask|z,zmmreg*,zmmrm512|b32,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w0 03 /r ib ] AVX512,FUTURE
+VALIGNQ xmmreg|mask|z,xmmreg*,xmmrm128|b64,imm8 [rvmi:fv: evex.nds.128.66.0f3a.w1 03 /r ib ] AVX512VL,AVX512,FUTURE
+VALIGNQ ymmreg|mask|z,ymmreg*,ymmrm256|b64,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w1 03 /r ib ] AVX512VL,AVX512,FUTURE
+VALIGNQ zmmreg|mask|z,zmmreg*,zmmrm512|b64,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w1 03 /r ib ] AVX512,FUTURE
+VANDNPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 55 /r ] AVX512VL,AVX512DQ,FUTURE
+VANDNPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 55 /r ] AVX512VL,AVX512DQ,FUTURE
+VANDNPD zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 55 /r ] AVX512DQ,FUTURE
+VANDNPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.0f.w0 55 /r ] AVX512VL,AVX512DQ,FUTURE
+VANDNPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.0f.w0 55 /r ] AVX512VL,AVX512DQ,FUTURE
+VANDNPS zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.0f.w0 55 /r ] AVX512DQ,FUTURE
+VANDPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 54 /r ] AVX512VL,AVX512DQ,FUTURE
+VANDPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 54 /r ] AVX512VL,AVX512DQ,FUTURE
+VANDPD zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 54 /r ] AVX512DQ,FUTURE
+VANDPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.0f.w0 54 /r ] AVX512VL,AVX512DQ,FUTURE
+VANDPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.0f.w0 54 /r ] AVX512VL,AVX512DQ,FUTURE
+VANDPS zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.0f.w0 54 /r ] AVX512DQ,FUTURE
+VBLENDMPD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 65 /r ] AVX512VL,AVX512,FUTURE
+VBLENDMPD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 65 /r ] AVX512VL,AVX512,FUTURE
+VBLENDMPD zmmreg|mask|z,zmmreg,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 65 /r ] AVX512,FUTURE
+VBLENDMPS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 65 /r ] AVX512VL,AVX512,FUTURE
+VBLENDMPS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 65 /r ] AVX512VL,AVX512,FUTURE
+VBLENDMPS zmmreg|mask|z,zmmreg,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 65 /r ] AVX512,FUTURE
+VBROADCASTF32X2 ymmreg|mask|z,xmmrm64 [rm:t2: evex.256.66.0f38.w0 19 /r ] AVX512VL,AVX512DQ,FUTURE
+VBROADCASTF32X2 zmmreg|mask|z,xmmrm64 [rm:t2: evex.512.66.0f38.w0 19 /r ] AVX512DQ,FUTURE
+VBROADCASTF32X4 ymmreg|mask|z,mem128 [rm:t4: evex.256.66.0f38.w0 1a /r ] AVX512VL,AVX512,FUTURE
+VBROADCASTF32X4 zmmreg|mask|z,mem128 [rm:t4: evex.512.66.0f38.w0 1a /r ] AVX512,FUTURE
+VBROADCASTF32X8 zmmreg|mask|z,mem256 [rm:t8: evex.512.66.0f38.w0 1b /r ] AVX512DQ,FUTURE
+VBROADCASTF64X2 ymmreg|mask|z,mem128 [rm:t2: evex.256.66.0f38.w1 1a /r ] AVX512VL,AVX512DQ,FUTURE
+VBROADCASTF64X2 zmmreg|mask|z,mem128 [rm:t2: evex.512.66.0f38.w1 1a /r ] AVX512DQ,FUTURE
+VBROADCASTF64X4 zmmreg|mask|z,mem256 [rm:t4: evex.512.66.0f38.w1 1b /r ] AVX512,FUTURE
+VBROADCASTI32X2 xmmreg|mask|z,xmmrm64 [rm:t2: evex.128.66.0f38.w0 59 /r ] AVX512VL,AVX512DQ,FUTURE
+VBROADCASTI32X2 ymmreg|mask|z,xmmrm64 [rm:t2: evex.256.66.0f38.w0 59 /r ] AVX512VL,AVX512DQ,FUTURE
+VBROADCASTI32X2 zmmreg|mask|z,xmmrm64 [rm:t2: evex.512.66.0f38.w0 59 /r ] AVX512DQ,FUTURE
+VBROADCASTI32X4 ymmreg|mask|z,mem128 [rm:t4: evex.256.66.0f38.w0 5a /r ] AVX512VL,AVX512,FUTURE
+VBROADCASTI32X4 zmmreg|mask|z,mem128 [rm:t4: evex.512.66.0f38.w0 5a /r ] AVX512,FUTURE
+VBROADCASTI32X8 zmmreg|mask|z,mem256 [rm:t8: evex.512.66.0f38.w0 5b /r ] AVX512DQ,FUTURE
+VBROADCASTI64X2 ymmreg|mask|z,mem128 [rm:t2: evex.256.66.0f38.w1 5a /r ] AVX512VL,AVX512DQ,FUTURE
+VBROADCASTI64X2 zmmreg|mask|z,mem128 [rm:t2: evex.512.66.0f38.w1 5a /r ] AVX512DQ,FUTURE
+VBROADCASTI64X4 zmmreg|mask|z,mem256 [rm:t4: evex.512.66.0f38.w1 5b /r ] AVX512,FUTURE
+VBROADCASTSD ymmreg|mask|z,mem64 [rm:t1s: evex.256.66.0f38.w1 19 /r ] AVX512VL,AVX512,FUTURE
+VBROADCASTSD zmmreg|mask|z,mem64 [rm:t1s: evex.512.66.0f38.w1 19 /r ] AVX512,FUTURE
+VBROADCASTSD ymmreg|mask|z,xmmreg [rm: evex.256.66.0f38.w1 19 /r ] AVX512VL,AVX512,FUTURE
+VBROADCASTSD zmmreg|mask|z,xmmreg [rm: evex.512.66.0f38.w1 19 /r ] AVX512,FUTURE
+VBROADCASTSS xmmreg|mask|z,mem32 [rm:t1s: evex.128.66.0f38.w0 18 /r ] AVX512VL,AVX512,FUTURE
+VBROADCASTSS ymmreg|mask|z,mem32 [rm:t1s: evex.256.66.0f38.w0 18 /r ] AVX512VL,AVX512,FUTURE
+VBROADCASTSS zmmreg|mask|z,mem32 [rm:t1s: evex.512.66.0f38.w0 18 /r ] AVX512,FUTURE
+VBROADCASTSS xmmreg|mask|z,xmmreg [rm: evex.128.66.0f38.w0 18 /r ] AVX512VL,AVX512,FUTURE
+VBROADCASTSS ymmreg|mask|z,xmmreg [rm: evex.256.66.0f38.w0 18 /r ] AVX512VL,AVX512,FUTURE
+VBROADCASTSS zmmreg|mask|z,xmmreg [rm: evex.512.66.0f38.w0 18 /r ] AVX512,FUTURE
+VCMPPD kreg|mask,xmmreg,xmmrm128|b64,imm8 [rvmi:fv: evex.nds.128.66.0f.w1 c2 /r ib ] AVX512VL,AVX512,FUTURE
+VCMPPD kreg|mask,ymmreg,ymmrm256|b64,imm8 [rvmi:fv: evex.nds.256.66.0f.w1 c2 /r ib ] AVX512VL,AVX512,FUTURE
+VCMPPD kreg|mask,zmmreg,zmmrm512|b64|sae,imm8 [rvmi:fv: evex.nds.512.66.0f.w1 c2 /r ib ] AVX512,FUTURE
+VCMPPS kreg|mask,xmmreg,xmmrm128|b32,imm8 [rvmi:fv: evex.nds.128.0f.w0 c2 /r ib ] AVX512VL,AVX512,FUTURE
+VCMPPS kreg|mask,ymmreg,ymmrm256|b32,imm8 [rvmi:fv: evex.nds.256.0f.w0 c2 /r ib ] AVX512VL,AVX512,FUTURE
+VCMPPS kreg|mask,zmmreg,zmmrm512|b32|sae,imm8 [rvmi:fv: evex.nds.512.0f.w0 c2 /r ib ] AVX512,FUTURE
+VCMPSD kreg|mask,xmmreg,xmmrm64|sae,imm8 [rvmi:t1s: evex.nds.128.f2.0f.w1 c2 /r ib ] AVX512,FUTURE
+VCMPSS kreg|mask,xmmreg,xmmrm32|sae,imm8 [rvmi:t1s: evex.nds.128.f3.0f.w0 c2 /r ib ] AVX512,FUTURE
+VCOMISD xmmreg,xmmrm64|sae [rm:t1s: evex.128.66.0f.w1 2f /r ] AVX512,FUTURE
+VCOMISS xmmreg,xmmrm32|sae [rm:t1s: evex.128.0f.w0 2f /r ] AVX512,FUTURE
+VCOMPRESSPD mem128|mask,xmmreg [mr:t1s: evex.128.66.0f38.w1 8a /r ] AVX512VL,AVX512,FUTURE
+VCOMPRESSPD mem256|mask,ymmreg [mr:t1s: evex.256.66.0f38.w1 8a /r ] AVX512VL,AVX512,FUTURE
+VCOMPRESSPD mem512|mask,zmmreg [mr:t1s: evex.512.66.0f38.w1 8a /r ] AVX512,FUTURE
+VCOMPRESSPD xmmreg|mask|z,xmmreg [mr: evex.128.66.0f38.w1 8a /r ] AVX512VL,AVX512,FUTURE
+VCOMPRESSPD ymmreg|mask|z,ymmreg [mr: evex.256.66.0f38.w1 8a /r ] AVX512VL,AVX512,FUTURE
+VCOMPRESSPD zmmreg|mask|z,zmmreg [mr: evex.512.66.0f38.w1 8a /r ] AVX512,FUTURE
+VCOMPRESSPS mem128|mask,xmmreg [mr:t1s: evex.128.66.0f38.w0 8a /r ] AVX512VL,AVX512,FUTURE
+VCOMPRESSPS mem256|mask,ymmreg [mr:t1s: evex.256.66.0f38.w0 8a /r ] AVX512VL,AVX512,FUTURE
+VCOMPRESSPS mem512|mask,zmmreg [mr:t1s: evex.512.66.0f38.w0 8a /r ] AVX512,FUTURE
+VCOMPRESSPS xmmreg|mask|z,xmmreg [mr: evex.128.66.0f38.w0 8a /r ] AVX512VL,AVX512,FUTURE
+VCOMPRESSPS ymmreg|mask|z,ymmreg [mr: evex.256.66.0f38.w0 8a /r ] AVX512VL,AVX512,FUTURE
+VCOMPRESSPS zmmreg|mask|z,zmmreg [mr: evex.512.66.0f38.w0 8a /r ] AVX512,FUTURE
+VCVTDQ2PD xmmreg|mask|z,xmmrm64|b32 [rm:hv: evex.128.f3.0f.w0 e6 /r ] AVX512VL,AVX512,FUTURE
+VCVTDQ2PD ymmreg|mask|z,xmmrm128|b32 [rm:hv: evex.256.f3.0f.w0 e6 /r ] AVX512VL,AVX512,FUTURE
+VCVTDQ2PD zmmreg|mask|z,ymmrm256|b32|er [rm:hv: evex.512.f3.0f.w0 e6 /r ] AVX512,FUTURE
+VCVTDQ2PS xmmreg|mask|z,xmmrm128|b32 [rm:fv: evex.128.0f.w0 5b /r ] AVX512VL,AVX512,FUTURE
+VCVTDQ2PS ymmreg|mask|z,ymmrm256|b32 [rm:fv: evex.256.0f.w0 5b /r ] AVX512VL,AVX512,FUTURE
+VCVTDQ2PS zmmreg|mask|z,zmmrm512|b32|er [rm:fv: evex.512.0f.w0 5b /r ] AVX512,FUTURE
+VCVTPD2DQ xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.f2.0f.w1 e6 /r ] AVX512VL,AVX512,FUTURE
+VCVTPD2DQ xmmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.f2.0f.w1 e6 /r ] AVX512VL,AVX512,FUTURE
+VCVTPD2DQ ymmreg|mask|z,zmmrm512|b64|er [rm:fv: evex.512.f2.0f.w1 e6 /r ] AVX512,FUTURE
+VCVTPD2PS xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.66.0f.w1 5a /r ] AVX512VL,AVX512,FUTURE
+VCVTPD2PS xmmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.66.0f.w1 5a /r ] AVX512VL,AVX512,FUTURE
+VCVTPD2PS ymmreg|mask|z,zmmrm512|b64|er [rm:fv: evex.512.66.0f.w1 5a /r ] AVX512,FUTURE
+VCVTPD2QQ xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.66.0f.w1 7b /r ] AVX512VL,AVX512DQ,FUTURE
+VCVTPD2QQ ymmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.66.0f.w1 7b /r ] AVX512VL,AVX512DQ,FUTURE
+VCVTPD2QQ zmmreg|mask|z,zmmrm512|b64|er [rm:fv: evex.512.66.0f.w1 7b /r ] AVX512DQ,FUTURE
+VCVTPD2UDQ xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.0f.w1 79 /r ] AVX512VL,AVX512,FUTURE
+VCVTPD2UDQ xmmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.0f.w1 79 /r ] AVX512VL,AVX512,FUTURE
+VCVTPD2UDQ ymmreg|mask|z,zmmrm512|b64|er [rm:fv: evex.512.0f.w1 79 /r ] AVX512,FUTURE
+VCVTPD2UQQ xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.66.0f.w1 79 /r ] AVX512VL,AVX512DQ,FUTURE
+VCVTPD2UQQ ymmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.66.0f.w1 79 /r ] AVX512VL,AVX512DQ,FUTURE
+VCVTPD2UQQ zmmreg|mask|z,zmmrm512|b64|er [rm:fv: evex.512.66.0f.w1 79 /r ] AVX512DQ,FUTURE
+VCVTPH2PS xmmreg|mask|z,xmmrm64 [rm:hvm: evex.128.66.0f38.w0 13 /r ] AVX512VL,AVX512,FUTURE
+VCVTPH2PS ymmreg|mask|z,xmmrm128 [rm:hvm: evex.256.66.0f38.w0 13 /r ] AVX512VL,AVX512,FUTURE
+VCVTPH2PS zmmreg|mask|z,ymmrm256|sae [rm:hvm: evex.512.66.0f38.w0 13 /r ] AVX512,FUTURE
+VCVTPS2DQ xmmreg|mask|z,xmmrm128|b32 [rm:fv: evex.128.66.0f.w0 5b /r ] AVX512VL,AVX512,FUTURE
+VCVTPS2DQ ymmreg|mask|z,ymmrm256|b32 [rm:fv: evex.256.66.0f.w0 5b /r ] AVX512VL,AVX512,FUTURE
+VCVTPS2DQ zmmreg|mask|z,zmmrm512|b32|er [rm:fv: evex.512.66.0f.w0 5b /r ] AVX512,FUTURE
+VCVTPS2PD xmmreg|mask|z,xmmrm64|b32 [rm:hv: evex.128.0f.w0 5a /r ] AVX512VL,AVX512,FUTURE
+VCVTPS2PD ymmreg|mask|z,xmmrm128|b32 [rm:hv: evex.256.0f.w0 5a /r ] AVX512VL,AVX512,FUTURE
+VCVTPS2PD zmmreg|mask|z,ymmrm256|b32|sae [rm:hv: evex.512.0f.w0 5a /r ] AVX512,FUTURE
+VCVTPS2PH xmmreg|mask|z,xmmreg,imm8 [mri:hvm: evex.128.66.0f3a.w0 1d /r ib ] AVX512VL,AVX512,FUTURE
+VCVTPS2PH xmmreg|mask|z,ymmreg,imm8 [mri:hvm: evex.256.66.0f3a.w0 1d /r ib ] AVX512VL,AVX512,FUTURE
+VCVTPS2PH ymmreg|mask|z,zmmreg|sae,imm8 [mri:hvm: evex.512.66.0f3a.w0 1d /r ib ] AVX512,FUTURE
+VCVTPS2PH mem64|mask,xmmreg,imm8 [mri:hvm: evex.128.66.0f3a.w0 1d /r ib ] AVX512VL,AVX512,FUTURE
+VCVTPS2PH mem128|mask,ymmreg,imm8 [mri:hvm: evex.256.66.0f3a.w0 1d /r ib ] AVX512VL,AVX512,FUTURE
+VCVTPS2PH mem256|mask,zmmreg|sae,imm8 [mri:hvm: evex.512.66.0f3a.w0 1d /r ib ] AVX512,FUTURE
+VCVTPS2QQ xmmreg|mask|z,xmmrm64|b32 [rm:hv: evex.128.66.0f.w0 7b /r ] AVX512VL,AVX512DQ,FUTURE
+VCVTPS2QQ ymmreg|mask|z,xmmrm128|b32 [rm:hv: evex.256.66.0f.w0 7b /r ] AVX512VL,AVX512DQ,FUTURE
+VCVTPS2QQ zmmreg|mask|z,ymmrm256|b32|er [rm:hv: evex.512.66.0f.w0 7b /r ] AVX512DQ,FUTURE
+VCVTPS2UDQ xmmreg|mask|z,xmmrm128|b32 [rm:fv: evex.128.0f.w0 79 /r ] AVX512VL,AVX512,FUTURE
+VCVTPS2UDQ ymmreg|mask|z,ymmrm256|b32 [rm:fv: evex.256.0f.w0 79 /r ] AVX512VL,AVX512,FUTURE
+VCVTPS2UDQ zmmreg|mask|z,zmmrm512|b32|er [rm:fv: evex.512.0f.w0 79 /r ] AVX512,FUTURE
+VCVTPS2UQQ xmmreg|mask|z,xmmrm64|b32 [rm:hv: evex.128.66.0f.w0 79 /r ] AVX512VL,AVX512DQ,FUTURE
+VCVTPS2UQQ ymmreg|mask|z,xmmrm128|b32 [rm:hv: evex.256.66.0f.w0 79 /r ] AVX512VL,AVX512DQ,FUTURE
+VCVTPS2UQQ zmmreg|mask|z,ymmrm256|b32|er [rm:hv: evex.512.66.0f.w0 79 /r ] AVX512DQ,FUTURE
+VCVTQQ2PD xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.f3.0f.w1 e6 /r ] AVX512VL,AVX512DQ,FUTURE
+VCVTQQ2PD ymmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.f3.0f.w1 e6 /r ] AVX512VL,AVX512DQ,FUTURE
+VCVTQQ2PD zmmreg|mask|z,zmmrm512|b64|er [rm:fv: evex.512.f3.0f.w1 e6 /r ] AVX512DQ,FUTURE
+VCVTQQ2PS xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.0f.w1 5b /r ] AVX512VL,AVX512DQ,FUTURE
+VCVTQQ2PS xmmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.0f.w1 5b /r ] AVX512VL,AVX512DQ,FUTURE
+VCVTQQ2PS ymmreg|mask|z,zmmrm512|b64|er [rm:fv: evex.512.0f.w1 5b /r ] AVX512DQ,FUTURE
+VCVTSD2SI reg32,xmmrm64|er [rm:t1f64: evex.128.f2.0f.w0 2d /r ] AVX512,FUTURE
+VCVTSD2SI reg64,xmmrm64|er [rm:t1f64: evex.128.f2.0f.w1 2d /r ] AVX512,FUTURE
+VCVTSD2SS xmmreg|mask|z,xmmreg,xmmrm64|er [rvm:t1s: evex.nds.128.f2.0f.w1 5a /r ] AVX512,FUTURE
+VCVTSD2USI reg32,xmmrm64|er [rm:t1f64: evex.128.f2.0f.w0 79 /r ] AVX512,FUTURE
+VCVTSD2USI reg64,xmmrm64|er [rm:t1f64: evex.128.f2.0f.w1 79 /r ] AVX512,FUTURE
+VCVTSI2SD xmmreg,xmmreg|er,rm32 [rvm:t1s: evex.nds.128.f2.0f.w0 2a /r ] AVX512,FUTURE
+VCVTSI2SD xmmreg,xmmreg|er,rm64 [rvm:t1s: evex.nds.128.f2.0f.w1 2a /r ] AVX512,FUTURE
+VCVTSI2SS xmmreg,xmmreg|er,rm32 [rvm:t1s: evex.nds.128.f3.0f.w0 2a /r ] AVX512,FUTURE
+VCVTSI2SS xmmreg,xmmreg|er,rm64 [rvm:t1s: evex.nds.128.f3.0f.w1 2a /r ] AVX512,FUTURE
+VCVTSS2SD xmmreg|mask|z,xmmreg,xmmrm32|sae [rvm:t1s: evex.nds.128.f3.0f.w0 5a /r ] AVX512,FUTURE
+VCVTSS2SI reg32,xmmrm32|er [rm:t1f32: evex.128.f3.0f.w0 2d /r ] AVX512,FUTURE
+VCVTSS2SI reg64,xmmrm32|er [rm:t1f32: evex.128.f3.0f.w1 2d /r ] AVX512,FUTURE
+VCVTSS2USI reg32,xmmrm32|er [rm:t1f32: evex.128.f3.0f.w0 79 /r ] AVX512,FUTURE
+VCVTSS2USI reg64,xmmrm32|er [rm:t1f32: evex.128.f3.0f.w1 79 /r ] AVX512,FUTURE
+VCVTTPD2DQ xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.66.0f.w1 e6 /r ] AVX512VL,AVX512,FUTURE
+VCVTTPD2DQ xmmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.66.0f.w1 e6 /r ] AVX512VL,AVX512,FUTURE
+VCVTTPD2DQ ymmreg|mask|z,zmmrm512|b64|sae [rm:fv: evex.512.66.0f.w1 e6 /r ] AVX512,FUTURE
+VCVTTPD2QQ xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.66.0f.w1 7a /r ] AVX512VL,AVX512DQ,FUTURE
+VCVTTPD2QQ ymmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.66.0f.w1 7a /r ] AVX512VL,AVX512DQ,FUTURE
+VCVTTPD2QQ zmmreg|mask|z,zmmrm512|b64|sae [rm:fv: evex.512.66.0f.w1 7a /r ] AVX512DQ,FUTURE
+VCVTTPD2UDQ xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.0f.w1 78 /r ] AVX512VL,AVX512,FUTURE
+VCVTTPD2UDQ xmmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.0f.w1 78 /r ] AVX512VL,AVX512,FUTURE
+VCVTTPD2UDQ ymmreg|mask|z,zmmrm512|b64|sae [rm:fv: evex.512.0f.w1 78 /r ] AVX512,FUTURE
+VCVTTPD2UQQ xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.66.0f.w1 78 /r ] AVX512VL,AVX512DQ,FUTURE
+VCVTTPD2UQQ ymmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.66.0f.w1 78 /r ] AVX512VL,AVX512DQ,FUTURE
+VCVTTPD2UQQ zmmreg|mask|z,zmmrm512|b64|sae [rm:fv: evex.512.66.0f.w1 78 /r ] AVX512DQ,FUTURE
+VCVTTPS2DQ xmmreg|mask|z,xmmrm128|b32 [rm:fv: evex.128.f3.0f.w0 5b /r ] AVX512VL,AVX512,FUTURE
+VCVTTPS2DQ ymmreg|mask|z,ymmrm256|b32 [rm:fv: evex.256.f3.0f.w0 5b /r ] AVX512VL,AVX512,FUTURE
+VCVTTPS2DQ zmmreg|mask|z,zmmrm512|b32|sae [rm:fv: evex.512.f3.0f.w0 5b /r ] AVX512,FUTURE
+VCVTTPS2QQ xmmreg|mask|z,xmmrm64|b32 [rm:hv: evex.128.66.0f.w0 7a /r ] AVX512VL,AVX512DQ,FUTURE
+VCVTTPS2QQ ymmreg|mask|z,xmmrm128|b32 [rm:hv: evex.256.66.0f.w0 7a /r ] AVX512VL,AVX512DQ,FUTURE
+VCVTTPS2QQ zmmreg|mask|z,ymmrm256|b32|sae [rm:hv: evex.512.66.0f.w0 7a /r ] AVX512DQ,FUTURE
+VCVTTPS2UDQ xmmreg|mask|z,xmmrm128|b32 [rm:fv: evex.128.0f.w0 78 /r ] AVX512VL,AVX512,FUTURE
+VCVTTPS2UDQ ymmreg|mask|z,ymmrm256|b32 [rm:fv: evex.256.0f.w0 78 /r ] AVX512VL,AVX512,FUTURE
+VCVTTPS2UDQ zmmreg|mask|z,zmmrm512|b32|sae [rm:fv: evex.512.0f.w0 78 /r ] AVX512,FUTURE
+VCVTTPS2UQQ xmmreg|mask|z,xmmrm64|b32 [rm:hv: evex.128.66.0f.w0 78 /r ] AVX512VL,AVX512DQ,FUTURE
+VCVTTPS2UQQ ymmreg|mask|z,xmmrm128|b32 [rm:hv: evex.256.66.0f.w0 78 /r ] AVX512VL,AVX512DQ,FUTURE
+VCVTTPS2UQQ zmmreg|mask|z,ymmrm256|b32|sae [rm:hv: evex.512.66.0f.w0 78 /r ] AVX512DQ,FUTURE
+VCVTTSD2SI reg32,xmmrm64|sae [rm:t1f64: evex.128.f2.0f.w0 2c /r ] AVX512,FUTURE
+VCVTTSD2SI reg64,xmmrm64|sae [rm:t1f64: evex.128.f2.0f.w1 2c /r ] AVX512,FUTURE
+VCVTTSD2USI reg32,xmmrm64|sae [rm:t1f64: evex.128.f2.0f.w0 78 /r ] AVX512,FUTURE
+VCVTTSD2USI reg64,xmmrm64|sae [rm:t1f64: evex.128.f2.0f.w1 78 /r ] AVX512,FUTURE
+VCVTTSS2SI reg32,xmmrm32|sae [rm:t1f32: evex.128.f3.0f.w0 2c /r ] AVX512,FUTURE
+VCVTTSS2SI reg64,xmmrm32|sae [rm:t1f32: evex.128.f3.0f.w1 2c /r ] AVX512,FUTURE
+VCVTTSS2USI reg32,xmmrm32|sae [rm:t1f32: evex.128.f3.0f.w0 78 /r ] AVX512,FUTURE
+VCVTTSS2USI reg64,xmmrm32|sae [rm:t1f32: evex.128.f3.0f.w1 78 /r ] AVX512,FUTURE
+VCVTUDQ2PD xmmreg|mask|z,xmmrm64|b32 [rm:hv: evex.128.f3.0f.w0 7a /r ] AVX512VL,AVX512,FUTURE
+VCVTUDQ2PD ymmreg|mask|z,xmmrm128|b32 [rm:hv: evex.256.f3.0f.w0 7a /r ] AVX512VL,AVX512,FUTURE
+VCVTUDQ2PD zmmreg|mask|z,ymmrm256|b32|er [rm:hv: evex.512.f3.0f.w0 7a /r ] AVX512,FUTURE
+VCVTUDQ2PS xmmreg|mask|z,xmmrm128|b32 [rm:fv: evex.128.f2.0f.w0 7a /r ] AVX512VL,AVX512,FUTURE
+VCVTUDQ2PS ymmreg|mask|z,ymmrm256|b32 [rm:fv: evex.256.f2.0f.w0 7a /r ] AVX512VL,AVX512,FUTURE
+VCVTUDQ2PS zmmreg|mask|z,zmmrm512|b32|er [rm:fv: evex.512.f2.0f.w0 7a /r ] AVX512,FUTURE
+VCVTUQQ2PD xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.f3.0f.w1 7a /r ] AVX512VL,AVX512DQ,FUTURE
+VCVTUQQ2PD ymmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.f3.0f.w1 7a /r ] AVX512VL,AVX512DQ,FUTURE
+VCVTUQQ2PD zmmreg|mask|z,zmmrm512|b64|er [rm:fv: evex.512.f3.0f.w1 7a /r ] AVX512DQ,FUTURE
+VCVTUQQ2PS xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.f2.0f.w1 7a /r ] AVX512VL,AVX512DQ,FUTURE
+VCVTUQQ2PS xmmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.f2.0f.w1 7a /r ] AVX512VL,AVX512DQ,FUTURE
+VCVTUQQ2PS ymmreg|mask|z,zmmrm512|b64|er [rm:fv: evex.512.f2.0f.w1 7a /r ] AVX512DQ,FUTURE
+VCVTUSI2SD xmmreg,xmmreg|er,rm32 [rvm:t1s: evex.nds.128.f2.0f.w0 7b /r ] AVX512,FUTURE
+VCVTUSI2SD xmmreg,xmmreg|er,rm64 [rvm:t1s: evex.nds.128.f2.0f.w1 7b /r ] AVX512,FUTURE
+VCVTUSI2SS xmmreg,xmmreg|er,rm32 [rvm:t1s: evex.nds.128.f3.0f.w0 7b /r ] AVX512,FUTURE
+VCVTUSI2SS xmmreg,xmmreg|er,rm64 [rvm:t1s: evex.nds.128.f3.0f.w1 7b /r ] AVX512,FUTURE
+VDBPSADBW xmmreg|mask|z,xmmreg*,xmmrm128,imm8 [rvmi:fvm: evex.nds.128.66.0f3a.w0 42 /r ib ] AVX512VL,AVX512BW,FUTURE
+VDBPSADBW ymmreg|mask|z,ymmreg*,ymmrm256,imm8 [rvmi:fvm: evex.nds.256.66.0f3a.w0 42 /r ib ] AVX512VL,AVX512BW,FUTURE
+VDBPSADBW zmmreg|mask|z,zmmreg*,zmmrm512,imm8 [rvmi:fvm: evex.nds.512.66.0f3a.w0 42 /r ib ] AVX512BW,FUTURE
+VDIVPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 5e /r ] AVX512VL,AVX512,FUTURE
+VDIVPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 5e /r ] AVX512VL,AVX512,FUTURE
+VDIVPD zmmreg|mask|z,zmmreg*,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f.w1 5e /r ] AVX512,FUTURE
+VDIVPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.0f.w0 5e /r ] AVX512VL,AVX512,FUTURE
+VDIVPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.0f.w0 5e /r ] AVX512VL,AVX512,FUTURE
+VDIVPS zmmreg|mask|z,zmmreg*,zmmrm512|b32|er [rvm:fv: evex.nds.512.0f.w0 5e /r ] AVX512,FUTURE
+VDIVSD xmmreg|mask|z,xmmreg*,xmmrm64|er [rvm:t1s: evex.nds.128.f2.0f.w1 5e /r ] AVX512,FUTURE
+VDIVSS xmmreg|mask|z,xmmreg*,xmmrm32|er [rvm:t1s: evex.nds.128.f3.0f.w0 5e /r ] AVX512,FUTURE
+VEXP2PD zmmreg|mask|z,zmmrm512|b64|sae [rm:fv: evex.512.66.0f38.w1 c8 /r ] AVX512ER,FUTURE
+VEXP2PS zmmreg|mask|z,zmmrm512|b32|sae [rm:fv: evex.512.66.0f38.w0 c8 /r ] AVX512ER,FUTURE
+VEXPANDPD xmmreg|mask|z,mem128 [rm:t1s: evex.128.66.0f38.w1 88 /r ] AVX512VL,AVX512,FUTURE
+VEXPANDPD ymmreg|mask|z,mem256 [rm:t1s: evex.256.66.0f38.w1 88 /r ] AVX512VL,AVX512,FUTURE
+VEXPANDPD zmmreg|mask|z,mem512 [rm:t1s: evex.512.66.0f38.w1 88 /r ] AVX512,FUTURE
+VEXPANDPD xmmreg|mask|z,xmmreg [rm:t1s: evex.128.66.0f38.w1 88 /r ] AVX512VL,AVX512,FUTURE
+VEXPANDPD ymmreg|mask|z,ymmreg [rm:t1s: evex.256.66.0f38.w1 88 /r ] AVX512VL,AVX512,FUTURE
+VEXPANDPD zmmreg|mask|z,zmmreg [rm:t1s: evex.512.66.0f38.w1 88 /r ] AVX512,FUTURE
+VEXPANDPS xmmreg|mask|z,mem128 [rm:t1s: evex.128.66.0f38.w0 88 /r ] AVX512VL,AVX512,FUTURE
+VEXPANDPS ymmreg|mask|z,mem256 [rm:t1s: evex.256.66.0f38.w0 88 /r ] AVX512VL,AVX512,FUTURE
+VEXPANDPS zmmreg|mask|z,mem512 [rm:t1s: evex.512.66.0f38.w0 88 /r ] AVX512,FUTURE
+VEXPANDPS xmmreg|mask|z,xmmreg [rm:t1s: evex.128.66.0f38.w0 88 /r ] AVX512VL,AVX512,FUTURE
+VEXPANDPS ymmreg|mask|z,ymmreg [rm:t1s: evex.256.66.0f38.w0 88 /r ] AVX512VL,AVX512,FUTURE
+VEXPANDPS zmmreg|mask|z,zmmreg [rm:t1s: evex.512.66.0f38.w0 88 /r ] AVX512,FUTURE
+VEXTRACTF32X4 xmmreg|mask|z,ymmreg,imm8 [mri: evex.256.66.0f3a.w0 19 /r ib ] AVX512VL,AVX512,FUTURE
+VEXTRACTF32X4 xmmreg|mask|z,zmmreg,imm8 [mri: evex.512.66.0f3a.w0 19 /r ib ] AVX512,FUTURE
+VEXTRACTF32X4 mem128|mask,ymmreg,imm8 [mri:t4: evex.256.66.0f3a.w0 19 /r ib ] AVX512VL,AVX512,FUTURE
+VEXTRACTF32X4 mem128|mask,zmmreg,imm8 [mri:t4: evex.512.66.0f3a.w0 19 /r ib ] AVX512,FUTURE
+VEXTRACTF32X8 ymmreg|mask|z,zmmreg,imm8 [mri: evex.512.66.0f3a.w0 1b /r ib ] AVX512DQ,FUTURE
+VEXTRACTF32X8 mem256|mask,zmmreg,imm8 [mri:t8: evex.512.66.0f3a.w0 1b /r ib ] AVX512DQ,FUTURE
+VEXTRACTF64X2 xmmreg|mask|z,ymmreg,imm8 [mri: evex.256.66.0f3a.w1 19 /r ib ] AVX512VL,AVX512DQ,FUTURE
+VEXTRACTF64X2 xmmreg|mask|z,zmmreg,imm8 [mri: evex.512.66.0f3a.w1 19 /r ib ] AVX512DQ,FUTURE
+VEXTRACTF64X2 mem128|mask,ymmreg,imm8 [mri:t2: evex.256.66.0f3a.w1 19 /r ib ] AVX512VL,AVX512DQ,FUTURE
+VEXTRACTF64X2 mem128|mask,zmmreg,imm8 [mri:t2: evex.512.66.0f3a.w1 19 /r ib ] AVX512DQ,FUTURE
+VEXTRACTF64X4 ymmreg|mask|z,zmmreg,imm8 [mri: evex.512.66.0f3a.w1 1b /r ib ] AVX512,FUTURE
+VEXTRACTF64X4 mem256|mask,zmmreg,imm8 [mri:t4: evex.512.66.0f3a.w1 1b /r ib ] AVX512,FUTURE
+VEXTRACTI32X4 xmmreg|mask|z,ymmreg,imm8 [mri: evex.256.66.0f3a.w0 39 /r ib ] AVX512VL,AVX512,FUTURE
+VEXTRACTI32X4 xmmreg|mask|z,zmmreg,imm8 [mri: evex.512.66.0f3a.w0 39 /r ib ] AVX512,FUTURE
+VEXTRACTI32X4 mem128|mask,ymmreg,imm8 [mri:t4: evex.256.66.0f3a.w0 39 /r ib ] AVX512VL,AVX512,FUTURE
+VEXTRACTI32X4 mem128|mask,zmmreg,imm8 [mri:t4: evex.512.66.0f3a.w0 39 /r ib ] AVX512,FUTURE
+VEXTRACTI32X8 ymmreg|mask|z,zmmreg,imm8 [mri: evex.512.66.0f3a.w0 3b /r ib ] AVX512DQ,FUTURE
+VEXTRACTI32X8 mem256|mask,zmmreg,imm8 [mri:t8: evex.512.66.0f3a.w0 3b /r ib ] AVX512DQ,FUTURE
+VEXTRACTI64X2 xmmreg|mask|z,ymmreg,imm8 [mri: evex.256.66.0f3a.w1 39 /r ib ] AVX512VL,AVX512DQ,FUTURE
+VEXTRACTI64X2 xmmreg|mask|z,zmmreg,imm8 [mri: evex.512.66.0f3a.w1 39 /r ib ] AVX512DQ,FUTURE
+VEXTRACTI64X2 mem128|mask,ymmreg,imm8 [mri:t2: evex.256.66.0f3a.w1 39 /r ib ] AVX512VL,AVX512DQ,FUTURE
+VEXTRACTI64X2 mem128|mask,zmmreg,imm8 [mri:t2: evex.512.66.0f3a.w1 39 /r ib ] AVX512DQ,FUTURE
+VEXTRACTI64X4 ymmreg|mask|z,zmmreg,imm8 [mri: evex.512.66.0f3a.w1 3b /r ib ] AVX512,FUTURE
+VEXTRACTI64X4 mem256|mask,zmmreg,imm8 [mri:t4: evex.512.66.0f3a.w1 3b /r ib ] AVX512,FUTURE
+VEXTRACTPS reg32,xmmreg,imm8 [mri:t1s: evex.128.66.0f3a.wig 17 /r ib ] AVX512,FUTURE
+VEXTRACTPS reg64,xmmreg,imm8 [mri:t1s: evex.128.66.0f3a.wig 17 /r ib ] AVX512,FUTURE
+VEXTRACTPS mem32,xmmreg,imm8 [mri:t1s: evex.128.66.0f3a.wig 17 /r ib ] AVX512,FUTURE
+VFIXUPIMMPD xmmreg|mask|z,xmmreg*,xmmrm128|b64,imm8 [rvmi:fv: evex.nds.128.66.0f3a.w1 54 /r ib ] AVX512VL,AVX512,FUTURE
+VFIXUPIMMPD ymmreg|mask|z,ymmreg*,ymmrm256|b64,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w1 54 /r ib ] AVX512VL,AVX512,FUTURE
+VFIXUPIMMPD zmmreg|mask|z,zmmreg*,zmmrm512|b64|sae,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w1 54 /r ib ] AVX512,FUTURE
+VFIXUPIMMPS xmmreg|mask|z,xmmreg*,xmmrm128|b32,imm8 [rvmi:fv: evex.nds.128.66.0f3a.w0 54 /r ib ] AVX512VL,AVX512,FUTURE
+VFIXUPIMMPS ymmreg|mask|z,ymmreg*,ymmrm256|b32,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w0 54 /r ib ] AVX512VL,AVX512,FUTURE
+VFIXUPIMMPS zmmreg|mask|z,zmmreg*,zmmrm512|b32|sae,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w0 54 /r ib ] AVX512,FUTURE
+VFIXUPIMMSD xmmreg|mask|z,xmmreg*,xmmrm64|sae,imm8 [rvmi:t1s: evex.nds.128.66.0f3a.w1 55 /r ib ] AVX512,FUTURE
+VFIXUPIMMSS xmmreg|mask|z,xmmreg*,xmmrm32|sae,imm8 [rvmi:t1s: evex.nds.128.66.0f3a.w0 55 /r ib ] AVX512,FUTURE
+VFMADD132PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 98 /r ] AVX512VL,AVX512,FUTURE
+VFMADD132PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 98 /r ] AVX512VL,AVX512,FUTURE
+VFMADD132PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 98 /r ] AVX512,FUTURE
+VFMADD132PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 98 /r ] AVX512VL,AVX512,FUTURE
+VFMADD132PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 98 /r ] AVX512VL,AVX512,FUTURE
+VFMADD132PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 98 /r ] AVX512,FUTURE
+VFMADD132SD xmmreg|mask|z,xmmreg,xmmrm64|er [rvm:t1s: evex.nds.128.66.0f38.w1 99 /r ] AVX512,FUTURE
+VFMADD132SS xmmreg|mask|z,xmmreg,xmmrm32|er [rvm:t1s: evex.nds.128.66.0f38.w0 99 /r ] AVX512,FUTURE
+VFMADD213PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 a8 /r ] AVX512VL,AVX512,FUTURE
+VFMADD213PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 a8 /r ] AVX512VL,AVX512,FUTURE
+VFMADD213PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 a8 /r ] AVX512,FUTURE
+VFMADD213PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 a8 /r ] AVX512VL,AVX512,FUTURE
+VFMADD213PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 a8 /r ] AVX512VL,AVX512,FUTURE
+VFMADD213PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 a8 /r ] AVX512,FUTURE
+VFMADD213SD xmmreg|mask|z,xmmreg,xmmrm64|er [rvm:t1s: evex.nds.128.66.0f38.w1 a9 /r ] AVX512,FUTURE
+VFMADD213SS xmmreg|mask|z,xmmreg,xmmrm32|er [rvm:t1s: evex.nds.128.66.0f38.w0 a9 /r ] AVX512,FUTURE
+VFMADD231PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 b8 /r ] AVX512VL,AVX512,FUTURE
+VFMADD231PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 b8 /r ] AVX512VL,AVX512,FUTURE
+VFMADD231PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 b8 /r ] AVX512,FUTURE
+VFMADD231PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 b8 /r ] AVX512VL,AVX512,FUTURE
+VFMADD231PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 b8 /r ] AVX512VL,AVX512,FUTURE
+VFMADD231PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 b8 /r ] AVX512,FUTURE
+VFMADD231SD xmmreg|mask|z,xmmreg,xmmrm64|er [rvm:t1s: evex.nds.128.66.0f38.w1 b9 /r ] AVX512,FUTURE
+VFMADD231SS xmmreg|mask|z,xmmreg,xmmrm32|er [rvm:t1s: evex.nds.128.66.0f38.w0 b9 /r ] AVX512,FUTURE
+VFMADDSUB132PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 96 /r ] AVX512VL,AVX512,FUTURE
+VFMADDSUB132PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 96 /r ] AVX512VL,AVX512,FUTURE
+VFMADDSUB132PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 96 /r ] AVX512,FUTURE
+VFMADDSUB132PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 96 /r ] AVX512VL,AVX512,FUTURE
+VFMADDSUB132PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 96 /r ] AVX512VL,AVX512,FUTURE
+VFMADDSUB132PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 96 /r ] AVX512,FUTURE
+VFMADDSUB213PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 a6 /r ] AVX512VL,AVX512,FUTURE
+VFMADDSUB213PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 a6 /r ] AVX512VL,AVX512,FUTURE
+VFMADDSUB213PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 a6 /r ] AVX512,FUTURE
+VFMADDSUB213PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 a6 /r ] AVX512VL,AVX512,FUTURE
+VFMADDSUB213PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 a6 /r ] AVX512VL,AVX512,FUTURE
+VFMADDSUB213PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 a6 /r ] AVX512,FUTURE
+VFMADDSUB231PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 b6 /r ] AVX512VL,AVX512,FUTURE
+VFMADDSUB231PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 b6 /r ] AVX512VL,AVX512,FUTURE
+VFMADDSUB231PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 b6 /r ] AVX512,FUTURE
+VFMADDSUB231PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 b6 /r ] AVX512VL,AVX512,FUTURE
+VFMADDSUB231PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 b6 /r ] AVX512VL,AVX512,FUTURE
+VFMADDSUB231PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 b6 /r ] AVX512,FUTURE
+VFMSUB132PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 9a /r ] AVX512VL,AVX512,FUTURE
+VFMSUB132PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 9a /r ] AVX512VL,AVX512,FUTURE
+VFMSUB132PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 9a /r ] AVX512,FUTURE
+VFMSUB132PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 9a /r ] AVX512VL,AVX512,FUTURE
+VFMSUB132PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 9a /r ] AVX512VL,AVX512,FUTURE
+VFMSUB132PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 9a /r ] AVX512,FUTURE
+VFMSUB132SD xmmreg|mask|z,xmmreg,xmmrm64|er [rvm:t1s: evex.nds.128.66.0f38.w1 9b /r ] AVX512,FUTURE
+VFMSUB132SS xmmreg|mask|z,xmmreg,xmmrm32|er [rvm:t1s: evex.nds.128.66.0f38.w0 9b /r ] AVX512,FUTURE
+VFMSUB213PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 aa /r ] AVX512VL,AVX512,FUTURE
+VFMSUB213PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 aa /r ] AVX512VL,AVX512,FUTURE
+VFMSUB213PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 aa /r ] AVX512,FUTURE
+VFMSUB213PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 aa /r ] AVX512VL,AVX512,FUTURE
+VFMSUB213PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 aa /r ] AVX512VL,AVX512,FUTURE
+VFMSUB213PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 aa /r ] AVX512,FUTURE
+VFMSUB213SD xmmreg|mask|z,xmmreg,xmmrm64|er [rvm:t1s: evex.nds.128.66.0f38.w1 ab /r ] AVX512,FUTURE
+VFMSUB213SS xmmreg|mask|z,xmmreg,xmmrm32|er [rvm:t1s: evex.nds.128.66.0f38.w0 ab /r ] AVX512,FUTURE
+VFMSUB231PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 ba /r ] AVX512VL,AVX512,FUTURE
+VFMSUB231PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 ba /r ] AVX512VL,AVX512,FUTURE
+VFMSUB231PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 ba /r ] AVX512,FUTURE
+VFMSUB231PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 ba /r ] AVX512VL,AVX512,FUTURE
+VFMSUB231PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 ba /r ] AVX512VL,AVX512,FUTURE
+VFMSUB231PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 ba /r ] AVX512,FUTURE
+VFMSUB231SD xmmreg|mask|z,xmmreg,xmmrm64|er [rvm:t1s: evex.nds.128.66.0f38.w1 bb /r ] AVX512,FUTURE
+VFMSUB231SS xmmreg|mask|z,xmmreg,xmmrm32|er [rvm:t1s: evex.nds.128.66.0f38.w0 bb /r ] AVX512,FUTURE
+VFMSUBADD132PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 97 /r ] AVX512VL,AVX512,FUTURE
+VFMSUBADD132PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 97 /r ] AVX512VL,AVX512,FUTURE
+VFMSUBADD132PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 97 /r ] AVX512,FUTURE
+VFMSUBADD132PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 97 /r ] AVX512VL,AVX512,FUTURE
+VFMSUBADD132PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 97 /r ] AVX512VL,AVX512,FUTURE
+VFMSUBADD132PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 97 /r ] AVX512,FUTURE
+VFMSUBADD213PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 a7 /r ] AVX512VL,AVX512,FUTURE
+VFMSUBADD213PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 a7 /r ] AVX512VL,AVX512,FUTURE
+VFMSUBADD213PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 a7 /r ] AVX512,FUTURE
+VFMSUBADD213PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 a7 /r ] AVX512VL,AVX512,FUTURE
+VFMSUBADD213PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 a7 /r ] AVX512VL,AVX512,FUTURE
+VFMSUBADD213PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 a7 /r ] AVX512,FUTURE
+VFMSUBADD231PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 b7 /r ] AVX512VL,AVX512,FUTURE
+VFMSUBADD231PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 b7 /r ] AVX512VL,AVX512,FUTURE
+VFMSUBADD231PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 b7 /r ] AVX512,FUTURE
+VFMSUBADD231PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 b7 /r ] AVX512VL,AVX512,FUTURE
+VFMSUBADD231PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 b7 /r ] AVX512VL,AVX512,FUTURE
+VFMSUBADD231PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 b7 /r ] AVX512,FUTURE
+VFNMADD132PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 9c /r ] AVX512VL,AVX512,FUTURE
+VFNMADD132PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 9c /r ] AVX512VL,AVX512,FUTURE
+VFNMADD132PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 9c /r ] AVX512,FUTURE
+VFNMADD132PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 9c /r ] AVX512VL,AVX512,FUTURE
+VFNMADD132PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 9c /r ] AVX512VL,AVX512,FUTURE
+VFNMADD132PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 9c /r ] AVX512,FUTURE
+VFNMADD132SD xmmreg|mask|z,xmmreg,xmmrm64|er [rvm:t1s: evex.nds.128.66.0f38.w1 9d /r ] AVX512,FUTURE
+VFNMADD132SS xmmreg|mask|z,xmmreg,xmmrm32|er [rvm:t1s: evex.nds.128.66.0f38.w0 9d /r ] AVX512,FUTURE
+VFNMADD213PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 ac /r ] AVX512VL,AVX512,FUTURE
+VFNMADD213PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 ac /r ] AVX512VL,AVX512,FUTURE
+VFNMADD213PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 ac /r ] AVX512,FUTURE
+VFNMADD213PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 ac /r ] AVX512VL,AVX512,FUTURE
+VFNMADD213PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 ac /r ] AVX512VL,AVX512,FUTURE
+VFNMADD213PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 ac /r ] AVX512,FUTURE
+VFNMADD213SD xmmreg|mask|z,xmmreg,xmmrm64|er [rvm:t1s: evex.nds.128.66.0f38.w1 ad /r ] AVX512,FUTURE
+VFNMADD213SS xmmreg|mask|z,xmmreg,xmmrm32|er [rvm:t1s: evex.nds.128.66.0f38.w0 ad /r ] AVX512,FUTURE
+VFNMADD231PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 bc /r ] AVX512VL,AVX512,FUTURE
+VFNMADD231PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 bc /r ] AVX512VL,AVX512,FUTURE
+VFNMADD231PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 bc /r ] AVX512,FUTURE
+VFNMADD231PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 bc /r ] AVX512VL,AVX512,FUTURE
+VFNMADD231PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 bc /r ] AVX512VL,AVX512,FUTURE
+VFNMADD231PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 bc /r ] AVX512,FUTURE
+VFNMADD231SD xmmreg|mask|z,xmmreg,xmmrm64|er [rvm:t1s: evex.nds.128.66.0f38.w1 bd /r ] AVX512,FUTURE
+VFNMADD231SS xmmreg|mask|z,xmmreg,xmmrm32|er [rvm:t1s: evex.nds.128.66.0f38.w0 bd /r ] AVX512,FUTURE
+VFNMSUB132PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 9e /r ] AVX512VL,AVX512,FUTURE
+VFNMSUB132PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 9e /r ] AVX512VL,AVX512,FUTURE
+VFNMSUB132PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 9e /r ] AVX512,FUTURE
+VFNMSUB132PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 9e /r ] AVX512VL,AVX512,FUTURE
+VFNMSUB132PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 9e /r ] AVX512VL,AVX512,FUTURE
+VFNMSUB132PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 9e /r ] AVX512,FUTURE
+VFNMSUB132SD xmmreg|mask|z,xmmreg,xmmrm64|er [rvm:t1s: evex.nds.128.66.0f38.w1 9f /r ] AVX512,FUTURE
+VFNMSUB132SS xmmreg|mask|z,xmmreg,xmmrm32|er [rvm:t1s: evex.nds.128.66.0f38.w0 9f /r ] AVX512,FUTURE
+VFNMSUB213PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 ae /r ] AVX512VL,AVX512,FUTURE
+VFNMSUB213PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 ae /r ] AVX512VL,AVX512,FUTURE
+VFNMSUB213PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 ae /r ] AVX512,FUTURE
+VFNMSUB213PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 ae /r ] AVX512VL,AVX512,FUTURE
+VFNMSUB213PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 ae /r ] AVX512VL,AVX512,FUTURE
+VFNMSUB213PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 ae /r ] AVX512,FUTURE
+VFNMSUB213SD xmmreg|mask|z,xmmreg,xmmrm64|er [rvm:t1s: evex.nds.128.66.0f38.w1 af /r ] AVX512,FUTURE
+VFNMSUB213SS xmmreg|mask|z,xmmreg,xmmrm32|er [rvm:t1s: evex.nds.128.66.0f38.w0 af /r ] AVX512,FUTURE
+VFNMSUB231PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 be /r ] AVX512VL,AVX512,FUTURE
+VFNMSUB231PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 be /r ] AVX512VL,AVX512,FUTURE
+VFNMSUB231PD zmmreg|mask|z,zmmreg,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 be /r ] AVX512,FUTURE
+VFNMSUB231PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 be /r ] AVX512VL,AVX512,FUTURE
+VFNMSUB231PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 be /r ] AVX512VL,AVX512,FUTURE
+VFNMSUB231PS zmmreg|mask|z,zmmreg,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 be /r ] AVX512,FUTURE
+VFNMSUB231SD xmmreg|mask|z,xmmreg,xmmrm64|er [rvm:t1s: evex.nds.128.66.0f38.w1 bf /r ] AVX512,FUTURE
+VFNMSUB231SS xmmreg|mask|z,xmmreg,xmmrm32|er [rvm:t1s: evex.nds.128.66.0f38.w0 bf /r ] AVX512,FUTURE
+VFPCLASSPD kreg|mask,xmmrm128|b64,imm8 [rmi:fv: evex.128.66.0f3a.w1 66 /r ib ] AVX512VL,AVX512DQ,FUTURE
+VFPCLASSPD kreg|mask,ymmrm256|b64,imm8 [rmi:fv: evex.256.66.0f3a.w1 66 /r ib ] AVX512VL,AVX512DQ,FUTURE
+VFPCLASSPD kreg|mask,zmmrm512|b64,imm8 [rmi:fv: evex.512.66.0f3a.w1 66 /r ib ] AVX512DQ,FUTURE
+VFPCLASSPS kreg|mask,xmmrm128|b32,imm8 [rmi:fv: evex.128.66.0f3a.w0 66 /r ib ] AVX512VL,AVX512DQ,FUTURE
+VFPCLASSPS kreg|mask,ymmrm256|b32,imm8 [rmi:fv: evex.256.66.0f3a.w0 66 /r ib ] AVX512VL,AVX512DQ,FUTURE
+VFPCLASSPS kreg|mask,zmmrm512|b32,imm8 [rmi:fv: evex.512.66.0f3a.w0 66 /r ib ] AVX512DQ,FUTURE
+VFPCLASSSD kreg|mask,xmmrm64,imm8 [rmi:t1s: evex.128.66.0f3a.w1 67 /r ib ] AVX512DQ,FUTURE
+VFPCLASSSS kreg|mask,xmmrm32,imm8 [rmi:t1s: evex.128.66.0f3a.w0 67 /r ib ] AVX512DQ,FUTURE
+VGATHERDPD xmmreg|mask,xmem64 [rm:t1s: vsibx evex.128.66.0f38.w1 92 /r ] AVX512VL,AVX512,FUTURE
+VGATHERDPD ymmreg|mask,xmem64 [rm:t1s: vsibx evex.256.66.0f38.w1 92 /r ] AVX512VL,AVX512,FUTURE
+VGATHERDPD zmmreg|mask,ymem64 [rm:t1s: vsiby evex.512.66.0f38.w1 92 /r ] AVX512,FUTURE
+VGATHERDPS xmmreg|mask,xmem32 [rm:t1s: vsibx evex.128.66.0f38.w0 92 /r ] AVX512VL,AVX512,FUTURE
+VGATHERDPS ymmreg|mask,ymem32 [rm:t1s: vsiby evex.256.66.0f38.w0 92 /r ] AVX512VL,AVX512,FUTURE
+VGATHERDPS zmmreg|mask,zmem32 [rm:t1s: vsibz evex.512.66.0f38.w0 92 /r ] AVX512,FUTURE
+VGATHERPF0DPD ymem64|mask [m:t1s: vsiby evex.512.66.0f38.w1 c6 /1 ] AVX512PF,FUTURE
+VGATHERPF0DPS zmem32|mask [m:t1s: vsibz evex.512.66.0f38.w0 c6 /1 ] AVX512PF,FUTURE
+VGATHERPF0QPD zmem64|mask [m:t1s: vsibz evex.512.66.0f38.w1 c7 /1 ] AVX512PF,FUTURE
+VGATHERPF0QPS zmem32|mask [m:t1s: vsibz evex.512.66.0f38.w0 c7 /1 ] AVX512PF,FUTURE
+VGATHERPF1DPD ymem64|mask [m:t1s: vsiby evex.512.66.0f38.w1 c6 /2 ] AVX512PF,FUTURE
+VGATHERPF1DPS zmem32|mask [m:t1s: vsibz evex.512.66.0f38.w0 c6 /2 ] AVX512PF,FUTURE
+VGATHERPF1QPD zmem64|mask [m:t1s: vsibz evex.512.66.0f38.w1 c7 /2 ] AVX512PF,FUTURE
+VGATHERPF1QPS zmem32|mask [m:t1s: vsibz evex.512.66.0f38.w0 c7 /2 ] AVX512PF,FUTURE
+VGATHERQPD xmmreg|mask,xmem64 [rm:t1s: vsibx evex.128.66.0f38.w1 93 /r ] AVX512VL,AVX512,FUTURE
+VGATHERQPD ymmreg|mask,ymem64 [rm:t1s: vsiby evex.256.66.0f38.w1 93 /r ] AVX512VL,AVX512,FUTURE
+VGATHERQPD zmmreg|mask,zmem64 [rm:t1s: vsibz evex.512.66.0f38.w1 93 /r ] AVX512,FUTURE
+VGATHERQPS xmmreg|mask,xmem32 [rm:t1s: vsibx evex.128.66.0f38.w0 93 /r ] AVX512VL,AVX512,FUTURE
+VGATHERQPS xmmreg|mask,ymem32 [rm:t1s: vsiby evex.256.66.0f38.w0 93 /r ] AVX512VL,AVX512,FUTURE
+VGATHERQPS ymmreg|mask,zmem32 [rm:t1s: vsibz evex.512.66.0f38.w0 93 /r ] AVX512,FUTURE
+VGETEXPPD xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.66.0f38.w1 42 /r ] AVX512VL,AVX512,FUTURE
+VGETEXPPD ymmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.66.0f38.w1 42 /r ] AVX512VL,AVX512,FUTURE
+VGETEXPPD zmmreg|mask|z,zmmrm512|b64|sae [rm:fv: evex.512.66.0f38.w1 42 /r ] AVX512,FUTURE
+VGETEXPPS xmmreg|mask|z,xmmrm128|b32 [rm:fv: evex.128.66.0f38.w0 42 /r ] AVX512VL,AVX512,FUTURE
+VGETEXPPS ymmreg|mask|z,ymmrm256|b32 [rm:fv: evex.256.66.0f38.w0 42 /r ] AVX512VL,AVX512,FUTURE
+VGETEXPPS zmmreg|mask|z,zmmrm512|b32|sae [rm:fv: evex.512.66.0f38.w0 42 /r ] AVX512,FUTURE
+VGETEXPSD xmmreg|mask|z,xmmreg,xmmrm64|sae [rvm:t1s: evex.nds.128.66.0f38.w1 43 /r ] AVX512,FUTURE
+VGETEXPSS xmmreg|mask|z,xmmreg,xmmrm32|sae [rvm:t1s: evex.nds.128.66.0f38.w0 43 /r ] AVX512,FUTURE
+VGETMANTPD xmmreg|mask|z,xmmrm128|b64,imm8 [rmi:fv: evex.128.66.0f3a.w1 26 /r ib ] AVX512VL,AVX512,FUTURE
+VGETMANTPD ymmreg|mask|z,ymmrm256|b64,imm8 [rmi:fv: evex.256.66.0f3a.w1 26 /r ib ] AVX512VL,AVX512,FUTURE
+VGETMANTPD zmmreg|mask|z,zmmrm512|b64|sae,imm8 [rmi:fv: evex.512.66.0f3a.w1 26 /r ib ] AVX512,FUTURE
+VGETMANTPS xmmreg|mask|z,xmmrm128|b32,imm8 [rmi:fv: evex.128.66.0f3a.w0 26 /r ib ] AVX512VL,AVX512,FUTURE
+VGETMANTPS ymmreg|mask|z,ymmrm256|b32,imm8 [rmi:fv: evex.256.66.0f3a.w0 26 /r ib ] AVX512VL,AVX512,FUTURE
+VGETMANTPS zmmreg|mask|z,zmmrm512|b32|sae,imm8 [rmi:fv: evex.512.66.0f3a.w0 26 /r ib ] AVX512,FUTURE
+VGETMANTSD xmmreg|mask|z,xmmreg,xmmrm64|sae,imm8 [rvmi:t1s: evex.nds.128.66.0f3a.w1 27 /r ib ] AVX512,FUTURE
+VGETMANTSS xmmreg|mask|z,xmmreg,xmmrm32|sae,imm8 [rvmi:t1s: evex.nds.128.66.0f3a.w0 27 /r ib ] AVX512,FUTURE
+VINSERTF32X4 ymmreg|mask|z,ymmreg*,xmmrm128,imm8 [rvmi:t4: evex.nds.256.66.0f3a.w0 18 /r ib ] AVX512VL,AVX512,FUTURE
+VINSERTF32X4 zmmreg|mask|z,zmmreg*,xmmrm128,imm8 [rvmi:t4: evex.nds.512.66.0f3a.w0 18 /r ib ] AVX512,FUTURE
+VINSERTF32X8 zmmreg|mask|z,zmmreg*,ymmrm256,imm8 [rvmi:t8: evex.nds.512.66.0f3a.w0 1a /r ib ] AVX512DQ,FUTURE
+VINSERTF64X2 ymmreg|mask|z,ymmreg*,xmmrm128,imm8 [rvmi:t2: evex.nds.256.66.0f3a.w1 18 /r ib ] AVX512VL,AVX512DQ,FUTURE
+VINSERTF64X2 zmmreg|mask|z,zmmreg*,xmmrm128,imm8 [rvmi:t2: evex.nds.512.66.0f3a.w1 18 /r ib ] AVX512DQ,FUTURE
+VINSERTF64X4 zmmreg|mask|z,zmmreg*,ymmrm256,imm8 [rvmi:t4: evex.nds.512.66.0f3a.w1 1a /r ib ] AVX512,FUTURE
+VINSERTI32X4 ymmreg|mask|z,ymmreg*,xmmrm128,imm8 [rvmi:t4: evex.nds.256.66.0f3a.w0 38 /r ib ] AVX512VL,AVX512,FUTURE
+VINSERTI32X4 zmmreg|mask|z,zmmreg*,xmmrm128,imm8 [rvmi:t4: evex.nds.512.66.0f3a.w0 38 /r ib ] AVX512,FUTURE
+VINSERTI32X8 zmmreg|mask|z,zmmreg*,ymmrm256,imm8 [rvmi:t8: evex.nds.512.66.0f3a.w0 3a /r ib ] AVX512DQ,FUTURE
+VINSERTI64X2 ymmreg|mask|z,ymmreg*,xmmrm128,imm8 [rvmi:t2: evex.nds.256.66.0f3a.w1 38 /r ib ] AVX512VL,AVX512DQ,FUTURE
+VINSERTI64X2 zmmreg|mask|z,zmmreg*,xmmrm128,imm8 [rvmi:t2: evex.nds.512.66.0f3a.w1 38 /r ib ] AVX512DQ,FUTURE
+VINSERTI64X4 zmmreg|mask|z,zmmreg*,ymmrm256,imm8 [rvmi:t4: evex.nds.512.66.0f3a.w1 3a /r ib ] AVX512,FUTURE
+VINSERTPS xmmreg,xmmreg*,xmmrm32,imm8 [rvmi:t1s: evex.nds.128.66.0f3a.w0 21 /r ib ] AVX512,FUTURE
+VMAXPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 5f /r ] AVX512VL,AVX512,FUTURE
+VMAXPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 5f /r ] AVX512VL,AVX512,FUTURE
+VMAXPD zmmreg|mask|z,zmmreg*,zmmrm512|b64|sae [rvm:fv: evex.nds.512.66.0f.w1 5f /r ] AVX512,FUTURE
+VMAXPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.0f.w0 5f /r ] AVX512VL,AVX512,FUTURE
+VMAXPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.0f.w0 5f /r ] AVX512VL,AVX512,FUTURE
+VMAXPS zmmreg|mask|z,zmmreg*,zmmrm512|b32|sae [rvm:fv: evex.nds.512.0f.w0 5f /r ] AVX512,FUTURE
+VMAXSD xmmreg|mask|z,xmmreg*,xmmrm64|sae [rvm:t1s: evex.nds.128.f2.0f.w1 5f /r ] AVX512,FUTURE
+VMAXSS xmmreg|mask|z,xmmreg*,xmmrm32|sae [rvm:t1s: evex.nds.128.f3.0f.w0 5f /r ] AVX512,FUTURE
+VMINPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 5d /r ] AVX512VL,AVX512,FUTURE
+VMINPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 5d /r ] AVX512VL,AVX512,FUTURE
+VMINPD zmmreg|mask|z,zmmreg*,zmmrm512|b64|sae [rvm:fv: evex.nds.512.66.0f.w1 5d /r ] AVX512,FUTURE
+VMINPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.0f.w0 5d /r ] AVX512VL,AVX512,FUTURE
+VMINPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.0f.w0 5d /r ] AVX512VL,AVX512,FUTURE
+VMINPS zmmreg|mask|z,zmmreg*,zmmrm512|b32|sae [rvm:fv: evex.nds.512.0f.w0 5d /r ] AVX512,FUTURE
+VMINSD xmmreg|mask|z,xmmreg*,xmmrm64|sae [rvm:t1s: evex.nds.128.f2.0f.w1 5d /r ] AVX512,FUTURE
+VMINSS xmmreg|mask|z,xmmreg*,xmmrm32|sae [rvm:t1s: evex.nds.128.f3.0f.w0 5d /r ] AVX512,FUTURE
+VMOVAPD xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.66.0f.w1 28 /r ] AVX512VL,AVX512,FUTURE
+VMOVAPD ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.66.0f.w1 28 /r ] AVX512VL,AVX512,FUTURE
+VMOVAPD zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.66.0f.w1 28 /r ] AVX512,FUTURE
+VMOVAPD xmmreg|mask|z,xmmreg [mr: evex.128.66.0f.w1 29 /r ] AVX512VL,AVX512,FUTURE
+VMOVAPD ymmreg|mask|z,ymmreg [mr: evex.256.66.0f.w1 29 /r ] AVX512VL,AVX512,FUTURE
+VMOVAPD zmmreg|mask|z,zmmreg [mr: evex.512.66.0f.w1 29 /r ] AVX512,FUTURE
+VMOVAPD mem128|mask,xmmreg [mr:fvm: evex.128.66.0f.w1 29 /r ] AVX512VL,AVX512,FUTURE
+VMOVAPD mem256|mask,ymmreg [mr:fvm: evex.256.66.0f.w1 29 /r ] AVX512VL,AVX512,FUTURE
+VMOVAPD mem512|mask,zmmreg [mr:fvm: evex.512.66.0f.w1 29 /r ] AVX512,FUTURE
+VMOVAPS xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.0f.w0 28 /r ] AVX512VL,AVX512,FUTURE
+VMOVAPS ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.0f.w0 28 /r ] AVX512VL,AVX512,FUTURE
+VMOVAPS zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.0f.w0 28 /r ] AVX512,FUTURE
+VMOVAPS xmmreg|mask|z,xmmreg [mr: evex.128.0f.w0 29 /r ] AVX512VL,AVX512,FUTURE
+VMOVAPS ymmreg|mask|z,ymmreg [mr: evex.256.0f.w0 29 /r ] AVX512VL,AVX512,FUTURE
+VMOVAPS zmmreg|mask|z,zmmreg [mr: evex.512.0f.w0 29 /r ] AVX512,FUTURE
+VMOVAPS mem128|mask,xmmreg [mr:fvm: evex.128.0f.w0 29 /r ] AVX512VL,AVX512,FUTURE
+VMOVAPS mem256|mask,ymmreg [mr:fvm: evex.256.0f.w0 29 /r ] AVX512VL,AVX512,FUTURE
+VMOVAPS mem512|mask,zmmreg [mr:fvm: evex.512.0f.w0 29 /r ] AVX512,FUTURE
+VMOVD xmmreg,rm32 [rm:t1s: evex.128.66.0f.w0 6e /r ] AVX512,FUTURE
+VMOVD rm32,xmmreg [mr:t1s: evex.128.66.0f.w0 7e /r ] AVX512,FUTURE
+VMOVDDUP xmmreg|mask|z,xmmrm64 [rm:dup: evex.128.f2.0f.w1 12 /r ] AVX512VL,AVX512,FUTURE
+VMOVDDUP ymmreg|mask|z,ymmrm256 [rm:dup: evex.256.f2.0f.w1 12 /r ] AVX512VL,AVX512,FUTURE
+VMOVDDUP zmmreg|mask|z,zmmrm512 [rm:dup: evex.512.f2.0f.w1 12 /r ] AVX512,FUTURE
+VMOVDQA32 xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.66.0f.w0 6f /r ] AVX512VL,AVX512,FUTURE
+VMOVDQA32 ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.66.0f.w0 6f /r ] AVX512VL,AVX512,FUTURE
+VMOVDQA32 zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.66.0f.w0 6f /r ] AVX512,FUTURE
+VMOVDQA32 xmmrm128|mask|z,xmmreg [mr:fvm: evex.128.66.0f.w0 7f /r ] AVX512VL,AVX512,FUTURE
+VMOVDQA32 ymmrm256|mask|z,ymmreg [mr:fvm: evex.256.66.0f.w0 7f /r ] AVX512VL,AVX512,FUTURE
+VMOVDQA32 zmmrm512|mask|z,zmmreg [mr:fvm: evex.512.66.0f.w0 7f /r ] AVX512,FUTURE
+VMOVDQA64 xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.66.0f.w1 6f /r ] AVX512VL,AVX512,FUTURE
+VMOVDQA64 ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.66.0f.w1 6f /r ] AVX512VL,AVX512,FUTURE
+VMOVDQA64 zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.66.0f.w1 6f /r ] AVX512,FUTURE
+VMOVDQA64 xmmrm128|mask|z,xmmreg [mr:fvm: evex.128.66.0f.w1 7f /r ] AVX512VL,AVX512,FUTURE
+VMOVDQA64 ymmrm256|mask|z,ymmreg [mr:fvm: evex.256.66.0f.w1 7f /r ] AVX512VL,AVX512,FUTURE
+VMOVDQA64 zmmrm512|mask|z,zmmreg [mr:fvm: evex.512.66.0f.w1 7f /r ] AVX512,FUTURE
+VMOVDQU16 xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.f2.0f.w1 6f /r ] AVX512VL,AVX512BW,FUTURE
+VMOVDQU16 ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.f2.0f.w1 6f /r ] AVX512VL,AVX512BW,FUTURE
+VMOVDQU16 zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.f2.0f.w1 6f /r ] AVX512BW,FUTURE
+VMOVDQU16 xmmrm128|mask|z,xmmreg [mr:fvm: evex.128.f2.0f.w1 7f /r ] AVX512VL,AVX512BW,FUTURE
+VMOVDQU16 ymmrm256|mask|z,ymmreg [mr:fvm: evex.256.f2.0f.w1 7f /r ] AVX512VL,AVX512BW,FUTURE
+VMOVDQU16 zmmrm512|mask|z,zmmreg [mr:fvm: evex.512.f2.0f.w1 7f /r ] AVX512BW,FUTURE
+VMOVDQU32 xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.f3.0f.w0 6f /r ] AVX512VL,AVX512,FUTURE
+VMOVDQU32 ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.f3.0f.w0 6f /r ] AVX512VL,AVX512,FUTURE
+VMOVDQU32 zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.f3.0f.w0 6f /r ] AVX512,FUTURE
+VMOVDQU32 xmmrm128|mask|z,xmmreg [mr:fvm: evex.128.f3.0f.w0 7f /r ] AVX512VL,AVX512,FUTURE
+VMOVDQU32 ymmrm256|mask|z,ymmreg [mr:fvm: evex.256.f3.0f.w0 7f /r ] AVX512VL,AVX512,FUTURE
+VMOVDQU32 zmmrm512|mask|z,zmmreg [mr:fvm: evex.512.f3.0f.w0 7f /r ] AVX512,FUTURE
+VMOVDQU64 xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.f3.0f.w1 6f /r ] AVX512VL,AVX512,FUTURE
+VMOVDQU64 ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.f3.0f.w1 6f /r ] AVX512VL,AVX512,FUTURE
+VMOVDQU64 zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.f3.0f.w1 6f /r ] AVX512,FUTURE
+VMOVDQU64 xmmrm128|mask|z,xmmreg [mr:fvm: evex.128.f3.0f.w1 7f /r ] AVX512VL,AVX512,FUTURE
+VMOVDQU64 ymmrm256|mask|z,ymmreg [mr:fvm: evex.256.f3.0f.w1 7f /r ] AVX512VL,AVX512,FUTURE
+VMOVDQU64 zmmrm512|mask|z,zmmreg [mr:fvm: evex.512.f3.0f.w1 7f /r ] AVX512,FUTURE
+VMOVDQU8 xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.f2.0f.w0 6f /r ] AVX512VL,AVX512BW,FUTURE
+VMOVDQU8 ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.f2.0f.w0 6f /r ] AVX512VL,AVX512BW,FUTURE
+VMOVDQU8 zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.f2.0f.w0 6f /r ] AVX512BW,FUTURE
+VMOVDQU8 xmmrm128|mask|z,xmmreg [mr:fvm: evex.128.f2.0f.w0 7f /r ] AVX512VL,AVX512BW,FUTURE
+VMOVDQU8 ymmrm256|mask|z,ymmreg [mr:fvm: evex.256.f2.0f.w0 7f /r ] AVX512VL,AVX512BW,FUTURE
+VMOVDQU8 zmmrm512|mask|z,zmmreg [mr:fvm: evex.512.f2.0f.w0 7f /r ] AVX512BW,FUTURE
+VMOVHLPS xmmreg,xmmreg*,xmmreg [rvm: evex.nds.128.0f.w0 12 /r ] AVX512,FUTURE
+VMOVHPD xmmreg,xmmreg*,mem64 [rvm:t1s: evex.nds.128.66.0f.w1 16 /r ] AVX512,FUTURE
+VMOVHPD mem64,xmmreg [mr:t1s: evex.128.66.0f.w1 17 /r ] AVX512,FUTURE
+VMOVHPS xmmreg,xmmreg*,mem64 [rvm:t2: evex.nds.128.0f.w0 16 /r ] AVX512,FUTURE
+VMOVHPS mem64,xmmreg [mr:t2: evex.128.0f.w0 17 /r ] AVX512,FUTURE
+VMOVLHPS xmmreg,xmmreg*,xmmreg [rvm: evex.nds.128.0f.w0 16 /r ] AVX512,FUTURE
+VMOVLPD xmmreg,xmmreg*,mem64 [rvm:t1s: evex.nds.128.66.0f.w1 12 /r ] AVX512,FUTURE
+VMOVLPD mem64,xmmreg [mr:t1s: evex.128.66.0f.w1 13 /r ] AVX512,FUTURE
+VMOVLPS xmmreg,xmmreg*,mem64 [rvm:t2: evex.nds.128.0f.w0 12 /r ] AVX512,FUTURE
+VMOVLPS mem64,xmmreg [mr:t2: evex.128.0f.w0 13 /r ] AVX512,FUTURE
+VMOVNTDQ mem128,xmmreg [mr:fvm: evex.128.66.0f.w0 e7 /r ] AVX512VL,AVX512,FUTURE
+VMOVNTDQ mem256,ymmreg [mr:fvm: evex.256.66.0f.w0 e7 /r ] AVX512VL,AVX512,FUTURE
+VMOVNTDQ mem512,zmmreg [mr:fvm: evex.512.66.0f.w0 e7 /r ] AVX512,FUTURE
+VMOVNTDQA xmmreg,mem128 [rm:fvm: evex.128.66.0f38.w0 2a /r ] AVX512VL,AVX512,FUTURE
+VMOVNTDQA ymmreg,mem256 [rm:fvm: evex.256.66.0f38.w0 2a /r ] AVX512VL,AVX512,FUTURE
+VMOVNTDQA zmmreg,mem512 [rm:fvm: evex.512.66.0f38.w0 2a /r ] AVX512,FUTURE
+VMOVNTPD mem128,xmmreg [mr:fvm: evex.128.66.0f.w1 2b /r ] AVX512VL,AVX512,FUTURE
+VMOVNTPD mem256,ymmreg [mr:fvm: evex.256.66.0f.w1 2b /r ] AVX512VL,AVX512,FUTURE
+VMOVNTPD mem512,zmmreg [mr:fvm: evex.512.66.0f.w1 2b /r ] AVX512,FUTURE
+VMOVNTPS mem128,xmmreg [mr:fvm: evex.128.0f.w0 2b /r ] AVX512VL,AVX512,FUTURE
+VMOVNTPS mem256,ymmreg [mr:fvm: evex.256.0f.w0 2b /r ] AVX512VL,AVX512,FUTURE
+VMOVNTPS mem512,zmmreg [mr:fvm: evex.512.0f.w0 2b /r ] AVX512,FUTURE
+VMOVQ xmmreg,rm64 [rm:t1s: evex.128.66.0f.w1 6e /r ] AVX512,FUTURE
+VMOVQ rm64,xmmreg [mr:t1s: evex.128.66.0f.w1 7e /r ] AVX512,FUTURE
+VMOVQ xmmreg,xmmrm64 [rm:t1s: evex.128.f3.0f.w1 7e /r ] AVX512,FUTURE
+VMOVQ xmmrm64,xmmreg [mr:t1s: evex.128.66.0f.w1 d6 /r ] AVX512,FUTURE
+VMOVSD xmmreg|mask|z,mem64 [rm:t1s: evex.128.f2.0f.w1 10 /r ] AVX512,FUTURE
+VMOVSD mem64|mask,xmmreg [mr:t1s: evex.128.f2.0f.w1 11 /r ] AVX512,FUTURE
+VMOVSD xmmreg|mask|z,xmmreg*,xmmreg [rvm: evex.nds.128.f2.0f.w1 10 /r ] AVX512,FUTURE
+VMOVSD xmmreg|mask|z,xmmreg*,xmmreg [mvr: evex.nds.128.f2.0f.w1 11 /r ] AVX512,FUTURE
+VMOVSHDUP xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.f3.0f.w0 16 /r ] AVX512VL,AVX512,FUTURE
+VMOVSHDUP ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.f3.0f.w0 16 /r ] AVX512VL,AVX512,FUTURE
+VMOVSHDUP zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.f3.0f.w0 16 /r ] AVX512,FUTURE
+VMOVSLDUP xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.f3.0f.w0 12 /r ] AVX512VL,AVX512,FUTURE
+VMOVSLDUP ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.f3.0f.w0 12 /r ] AVX512VL,AVX512,FUTURE
+VMOVSLDUP zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.f3.0f.w0 12 /r ] AVX512,FUTURE
+VMOVSS xmmreg|mask|z,mem32 [rm:t1s: evex.128.f3.0f.w0 10 /r ] AVX512,FUTURE
+VMOVSS mem32|mask,xmmreg [mr:t1s: evex.128.f3.0f.w0 11 /r ] AVX512,FUTURE
+VMOVSS xmmreg|mask|z,xmmreg*,xmmreg [rvm: evex.nds.128.f3.0f.w0 10 /r ] AVX512,FUTURE
+VMOVSS xmmreg|mask|z,xmmreg*,xmmreg [mvr: evex.nds.128.f3.0f.w0 11 /r ] AVX512,FUTURE
+VMOVUPD xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.66.0f.w1 10 /r ] AVX512VL,AVX512,FUTURE
+VMOVUPD ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.66.0f.w1 10 /r ] AVX512VL,AVX512,FUTURE
+VMOVUPD zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.66.0f.w1 10 /r ] AVX512,FUTURE
+VMOVUPD xmmreg|mask|z,xmmreg [mr: evex.128.66.0f.w1 11 /r ] AVX512VL,AVX512,FUTURE
+VMOVUPD ymmreg|mask|z,ymmreg [mr: evex.256.66.0f.w1 11 /r ] AVX512VL,AVX512,FUTURE
+VMOVUPD zmmreg|mask|z,zmmreg [mr: evex.512.66.0f.w1 11 /r ] AVX512,FUTURE
+VMOVUPD mem128|mask,xmmreg [mr:fvm: evex.128.66.0f.w1 11 /r ] AVX512VL,AVX512,FUTURE
+VMOVUPD mem256|mask,ymmreg [mr:fvm: evex.256.66.0f.w1 11 /r ] AVX512VL,AVX512,FUTURE
+VMOVUPD mem512|mask,zmmreg [mr:fvm: evex.512.66.0f.w1 11 /r ] AVX512,FUTURE
+VMOVUPS xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.0f.w0 10 /r ] AVX512VL,AVX512,FUTURE
+VMOVUPS ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.0f.w0 10 /r ] AVX512VL,AVX512,FUTURE
+VMOVUPS zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.0f.w0 10 /r ] AVX512,FUTURE
+VMOVUPS xmmreg|mask|z,xmmreg [mr: evex.128.0f.w0 11 /r ] AVX512VL,AVX512,FUTURE
+VMOVUPS ymmreg|mask|z,ymmreg [mr: evex.256.0f.w0 11 /r ] AVX512VL,AVX512,FUTURE
+VMOVUPS zmmreg|mask|z,zmmreg [mr: evex.512.0f.w0 11 /r ] AVX512,FUTURE
+VMOVUPS mem128|mask,xmmreg [mr:fvm: evex.128.0f.w0 11 /r ] AVX512VL,AVX512,FUTURE
+VMOVUPS mem256|mask,ymmreg [mr:fvm: evex.256.0f.w0 11 /r ] AVX512VL,AVX512,FUTURE
+VMOVUPS mem512|mask,zmmreg [mr:fvm: evex.512.0f.w0 11 /r ] AVX512,FUTURE
+VMULPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 59 /r ] AVX512VL,AVX512,FUTURE
+VMULPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 59 /r ] AVX512VL,AVX512,FUTURE
+VMULPD zmmreg|mask|z,zmmreg*,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f.w1 59 /r ] AVX512,FUTURE
+VMULPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.0f.w0 59 /r ] AVX512VL,AVX512,FUTURE
+VMULPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.0f.w0 59 /r ] AVX512VL,AVX512,FUTURE
+VMULPS zmmreg|mask|z,zmmreg*,zmmrm512|b32|er [rvm:fv: evex.nds.512.0f.w0 59 /r ] AVX512,FUTURE
+VMULSD xmmreg|mask|z,xmmreg*,xmmrm64|er [rvm:t1s: evex.nds.128.f2.0f.w1 59 /r ] AVX512,FUTURE
+VMULSS xmmreg|mask|z,xmmreg*,xmmrm32|er [rvm:t1s: evex.nds.128.f3.0f.w0 59 /r ] AVX512,FUTURE
+VORPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 56 /r ] AVX512VL,AVX512DQ,FUTURE
+VORPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 56 /r ] AVX512VL,AVX512DQ,FUTURE
+VORPD zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 56 /r ] AVX512DQ,FUTURE
+VORPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.0f.w0 56 /r ] AVX512VL,AVX512DQ,FUTURE
+VORPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.0f.w0 56 /r ] AVX512VL,AVX512DQ,FUTURE
+VORPS zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.0f.w0 56 /r ] AVX512DQ,FUTURE
+VPABSB xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.66.0f38.wig 1c /r ] AVX512VL,AVX512BW,FUTURE
+VPABSB ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.66.0f38.wig 1c /r ] AVX512VL,AVX512BW,FUTURE
+VPABSB zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.66.0f38.wig 1c /r ] AVX512BW,FUTURE
+VPABSD xmmreg|mask|z,xmmrm128|b32 [rm:fv: evex.128.66.0f38.w0 1e /r ] AVX512VL,AVX512,FUTURE
+VPABSD ymmreg|mask|z,ymmrm256|b32 [rm:fv: evex.256.66.0f38.w0 1e /r ] AVX512VL,AVX512,FUTURE
+VPABSD zmmreg|mask|z,zmmrm512|b32 [rm:fv: evex.512.66.0f38.w0 1e /r ] AVX512,FUTURE
+VPABSQ xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.66.0f38.w1 1f /r ] AVX512VL,AVX512,FUTURE
+VPABSQ ymmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.66.0f38.w1 1f /r ] AVX512VL,AVX512,FUTURE
+VPABSQ zmmreg|mask|z,zmmrm512|b64 [rm:fv: evex.512.66.0f38.w1 1f /r ] AVX512,FUTURE
+VPABSW xmmreg|mask|z,xmmrm128 [rm:fvm: evex.128.66.0f38.wig 1d /r ] AVX512VL,AVX512BW,FUTURE
+VPABSW ymmreg|mask|z,ymmrm256 [rm:fvm: evex.256.66.0f38.wig 1d /r ] AVX512VL,AVX512BW,FUTURE
+VPABSW zmmreg|mask|z,zmmrm512 [rm:fvm: evex.512.66.0f38.wig 1d /r ] AVX512BW,FUTURE
+VPACKSSDW xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f.w0 6b /r ] AVX512VL,AVX512BW,FUTURE
+VPACKSSDW ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f.w0 6b /r ] AVX512VL,AVX512BW,FUTURE
+VPACKSSDW zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f.w0 6b /r ] AVX512BW,FUTURE
+VPACKSSWB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig 63 /r ] AVX512VL,AVX512BW,FUTURE
+VPACKSSWB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig 63 /r ] AVX512VL,AVX512BW,FUTURE
+VPACKSSWB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig 63 /r ] AVX512BW,FUTURE
+VPACKUSDW xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 2b /r ] AVX512VL,AVX512BW,FUTURE
+VPACKUSDW ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 2b /r ] AVX512VL,AVX512BW,FUTURE
+VPACKUSDW zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 2b /r ] AVX512BW,FUTURE
+VPACKUSWB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig 67 /r ] AVX512VL,AVX512BW,FUTURE
+VPACKUSWB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig 67 /r ] AVX512VL,AVX512BW,FUTURE
+VPACKUSWB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig 67 /r ] AVX512BW,FUTURE
+VPADDB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig fc /r ] AVX512VL,AVX512BW,FUTURE
+VPADDB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig fc /r ] AVX512VL,AVX512BW,FUTURE
+VPADDB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig fc /r ] AVX512BW,FUTURE
+VPADDD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f.w0 fe /r ] AVX512VL,AVX512,FUTURE
+VPADDD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f.w0 fe /r ] AVX512VL,AVX512,FUTURE
+VPADDD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f.w0 fe /r ] AVX512,FUTURE
+VPADDQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 d4 /r ] AVX512VL,AVX512,FUTURE
+VPADDQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 d4 /r ] AVX512VL,AVX512,FUTURE
+VPADDQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 d4 /r ] AVX512,FUTURE
+VPADDSB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig ec /r ] AVX512VL,AVX512BW,FUTURE
+VPADDSB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig ec /r ] AVX512VL,AVX512BW,FUTURE
+VPADDSB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig ec /r ] AVX512BW,FUTURE
+VPADDSW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig ed /r ] AVX512VL,AVX512BW,FUTURE
+VPADDSW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig ed /r ] AVX512VL,AVX512BW,FUTURE
+VPADDSW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig ed /r ] AVX512BW,FUTURE
+VPADDUSB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig dc /r ] AVX512VL,AVX512BW,FUTURE
+VPADDUSB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig dc /r ] AVX512VL,AVX512BW,FUTURE
+VPADDUSB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig dc /r ] AVX512BW,FUTURE
+VPADDUSW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig dd /r ] AVX512VL,AVX512BW,FUTURE
+VPADDUSW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig dd /r ] AVX512VL,AVX512BW,FUTURE
+VPADDUSW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig dd /r ] AVX512BW,FUTURE
+VPADDW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig fd /r ] AVX512VL,AVX512BW,FUTURE
+VPADDW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig fd /r ] AVX512VL,AVX512BW,FUTURE
+VPADDW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig fd /r ] AVX512BW,FUTURE
+VPALIGNR xmmreg|mask|z,xmmreg*,xmmrm128,imm8 [rvmi:fvm: evex.nds.128.66.0f3a.wig 0f /r ib ] AVX512VL,AVX512BW,FUTURE
+VPALIGNR ymmreg|mask|z,ymmreg*,ymmrm256,imm8 [rvmi:fvm: evex.nds.256.66.0f3a.wig 0f /r ib ] AVX512VL,AVX512BW,FUTURE
+VPALIGNR zmmreg|mask|z,zmmreg*,zmmrm512,imm8 [rvmi:fvm: evex.nds.512.66.0f3a.wig 0f /r ib ] AVX512BW,FUTURE
+VPANDD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f.w0 db /r ] AVX512VL,AVX512,FUTURE
+VPANDD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f.w0 db /r ] AVX512VL,AVX512,FUTURE
+VPANDD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f.w0 db /r ] AVX512,FUTURE
+VPANDND xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f.w0 df /r ] AVX512VL,AVX512,FUTURE
+VPANDND ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f.w0 df /r ] AVX512VL,AVX512,FUTURE
+VPANDND zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f.w0 df /r ] AVX512,FUTURE
+VPANDNQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 df /r ] AVX512VL,AVX512,FUTURE
+VPANDNQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 df /r ] AVX512VL,AVX512,FUTURE
+VPANDNQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 df /r ] AVX512,FUTURE
+VPANDQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 db /r ] AVX512VL,AVX512,FUTURE
+VPANDQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 db /r ] AVX512VL,AVX512,FUTURE
+VPANDQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 db /r ] AVX512,FUTURE
+VPAVGB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig e0 /r ] AVX512VL,AVX512BW,FUTURE
+VPAVGB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig e0 /r ] AVX512VL,AVX512BW,FUTURE
+VPAVGB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig e0 /r ] AVX512BW,FUTURE
+VPAVGW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig e3 /r ] AVX512VL,AVX512BW,FUTURE
+VPAVGW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig e3 /r ] AVX512VL,AVX512BW,FUTURE
+VPAVGW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig e3 /r ] AVX512BW,FUTURE
+VPBLENDMB xmmreg|mask|z,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.w0 66 /r ] AVX512VL,AVX512BW,FUTURE
+VPBLENDMB ymmreg|mask|z,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.w0 66 /r ] AVX512VL,AVX512BW,FUTURE
+VPBLENDMB zmmreg|mask|z,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.w0 66 /r ] AVX512BW,FUTURE
+VPBLENDMD xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 64 /r ] AVX512VL,AVX512,FUTURE
+VPBLENDMD ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 64 /r ] AVX512VL,AVX512,FUTURE
+VPBLENDMD zmmreg|mask|z,zmmreg,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 64 /r ] AVX512,FUTURE
+VPBLENDMQ xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 64 /r ] AVX512VL,AVX512,FUTURE
+VPBLENDMQ ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 64 /r ] AVX512VL,AVX512,FUTURE
+VPBLENDMQ zmmreg|mask|z,zmmreg,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 64 /r ] AVX512,FUTURE
+VPBLENDMW xmmreg|mask|z,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.w1 66 /r ] AVX512VL,AVX512BW,FUTURE
+VPBLENDMW ymmreg|mask|z,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.w1 66 /r ] AVX512VL,AVX512BW,FUTURE
+VPBLENDMW zmmreg|mask|z,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.w1 66 /r ] AVX512BW,FUTURE
+VPBROADCASTB xmmreg|mask|z,xmmrm8 [rm:t1s8: evex.128.66.0f38.w0 78 /r ] AVX512VL,AVX512BW,FUTURE
+VPBROADCASTB ymmreg|mask|z,xmmrm8 [rm:t1s8: evex.256.66.0f38.w0 78 /r ] AVX512VL,AVX512BW,FUTURE
+VPBROADCASTB zmmreg|mask|z,xmmrm8 [rm:t1s8: evex.512.66.0f38.w0 78 /r ] AVX512BW,FUTURE
+VPBROADCASTB xmmreg|mask|z,reg8 [rm: evex.128.66.0f38.w0 7a /r ] AVX512VL,AVX512BW,FUTURE
+VPBROADCASTB xmmreg|mask|z,reg16 [rm: evex.128.66.0f38.w0 7a /r ] AVX512VL,AVX512BW,FUTURE
+VPBROADCASTB xmmreg|mask|z,reg32 [rm: evex.128.66.0f38.w0 7a /r ] AVX512VL,AVX512BW,FUTURE
+VPBROADCASTB xmmreg|mask|z,reg64 [rm: evex.128.66.0f38.w0 7a /r ] AVX512VL,AVX512BW,FUTURE
+VPBROADCASTB ymmreg|mask|z,reg8 [rm: evex.256.66.0f38.w0 7a /r ] AVX512VL,AVX512BW,FUTURE
+VPBROADCASTB ymmreg|mask|z,reg16 [rm: evex.256.66.0f38.w0 7a /r ] AVX512VL,AVX512BW,FUTURE
+VPBROADCASTB ymmreg|mask|z,reg32 [rm: evex.256.66.0f38.w0 7a /r ] AVX512VL,AVX512BW,FUTURE
+VPBROADCASTB ymmreg|mask|z,reg64 [rm: evex.256.66.0f38.w0 7a /r ] AVX512VL,AVX512BW,FUTURE
+VPBROADCASTB zmmreg|mask|z,reg8 [rm: evex.512.66.0f38.w0 7a /r ] AVX512BW,FUTURE
+VPBROADCASTB zmmreg|mask|z,reg16 [rm: evex.512.66.0f38.w0 7a /r ] AVX512BW,FUTURE
+VPBROADCASTB zmmreg|mask|z,reg32 [rm: evex.512.66.0f38.w0 7a /r ] AVX512BW,FUTURE
+VPBROADCASTB zmmreg|mask|z,reg64 [rm: evex.512.66.0f38.w0 7a /r ] AVX512BW,FUTURE
+VPBROADCASTD xmmreg|mask|z,mem32 [rm:t1s: evex.128.66.0f38.w0 58 /r ] AVX512VL,AVX512,FUTURE
+VPBROADCASTD ymmreg|mask|z,mem32 [rm:t1s: evex.256.66.0f38.w0 58 /r ] AVX512VL,AVX512,FUTURE
+VPBROADCASTD zmmreg|mask|z,mem32 [rm:t1s: evex.512.66.0f38.w0 58 /r ] AVX512,FUTURE
+VPBROADCASTD xmmreg|mask|z,xmmreg [rm: evex.128.66.0f38.w0 58 /r ] AVX512VL,AVX512,FUTURE
+VPBROADCASTD ymmreg|mask|z,xmmreg [rm: evex.256.66.0f38.w0 58 /r ] AVX512VL,AVX512,FUTURE
+VPBROADCASTD zmmreg|mask|z,xmmreg [rm: evex.512.66.0f38.w0 58 /r ] AVX512,FUTURE
+VPBROADCASTD xmmreg|mask|z,reg32 [rm: evex.128.66.0f38.w0 7c /r ] AVX512VL,AVX512,FUTURE
+VPBROADCASTD ymmreg|mask|z,reg32 [rm: evex.256.66.0f38.w0 7c /r ] AVX512VL,AVX512,FUTURE
+VPBROADCASTD zmmreg|mask|z,reg32 [rm: evex.512.66.0f38.w0 7c /r ] AVX512,FUTURE
+VPBROADCASTMB2Q xmmreg,kreg [rm: evex.128.f3.0f38.w1 2a /r ] AVX512VL,AVX512CD,FUTURE
+VPBROADCASTMB2Q ymmreg,kreg [rm: evex.256.f3.0f38.w1 2a /r ] AVX512VL,AVX512CD,FUTURE
+VPBROADCASTMB2Q zmmreg,kreg [rm: evex.512.f3.0f38.w1 2a /r ] AVX512CD,FUTURE
+VPBROADCASTMW2D xmmreg,kreg [rm: evex.128.f3.0f38.w0 3a /r ] AVX512VL,AVX512CD,FUTURE
+VPBROADCASTMW2D ymmreg,kreg [rm: evex.256.f3.0f38.w0 3a /r ] AVX512VL,AVX512CD,FUTURE
+VPBROADCASTMW2D zmmreg,kreg [rm: evex.512.f3.0f38.w0 3a /r ] AVX512CD,FUTURE
+VPBROADCASTQ xmmreg|mask|z,mem64 [rm:t1s: evex.128.66.0f38.w1 59 /r ] AVX512VL,AVX512,FUTURE
+VPBROADCASTQ ymmreg|mask|z,mem64 [rm:t1s: evex.256.66.0f38.w1 59 /r ] AVX512VL,AVX512,FUTURE
+VPBROADCASTQ zmmreg|mask|z,mem64 [rm:t1s: evex.512.66.0f38.w1 59 /r ] AVX512,FUTURE
+VPBROADCASTQ xmmreg|mask|z,xmmreg [rm: evex.128.66.0f38.w1 59 /r ] AVX512VL,AVX512,FUTURE
+VPBROADCASTQ ymmreg|mask|z,xmmreg [rm: evex.256.66.0f38.w1 59 /r ] AVX512VL,AVX512,FUTURE
+VPBROADCASTQ zmmreg|mask|z,xmmreg [rm: evex.512.66.0f38.w1 59 /r ] AVX512,FUTURE
+VPBROADCASTQ xmmreg|mask|z,reg64 [rm: evex.128.66.0f38.w1 7c /r ] AVX512VL,AVX512,FUTURE
+VPBROADCASTQ ymmreg|mask|z,reg64 [rm: evex.256.66.0f38.w1 7c /r ] AVX512VL,AVX512,FUTURE
+VPBROADCASTQ zmmreg|mask|z,reg64 [rm: evex.512.66.0f38.w1 7c /r ] AVX512,FUTURE
+VPBROADCASTW xmmreg|mask|z,xmmrm16 [rm:t1s16: evex.128.66.0f38.w0 79 /r ] AVX512VL,AVX512BW,FUTURE
+VPBROADCASTW ymmreg|mask|z,xmmrm16 [rm:t1s16: evex.256.66.0f38.w0 79 /r ] AVX512VL,AVX512BW,FUTURE
+VPBROADCASTW zmmreg|mask|z,xmmrm16 [rm:t1s16: evex.512.66.0f38.w0 79 /r ] AVX512BW,FUTURE
+VPBROADCASTW xmmreg|mask|z,reg16 [rm: evex.128.66.0f38.w0 7b /r ] AVX512VL,AVX512BW,FUTURE
+VPBROADCASTW xmmreg|mask|z,reg32 [rm: evex.128.66.0f38.w0 7b /r ] AVX512VL,AVX512BW,FUTURE
+VPBROADCASTW xmmreg|mask|z,reg64 [rm: evex.128.66.0f38.w0 7b /r ] AVX512VL,AVX512BW,FUTURE
+VPBROADCASTW ymmreg|mask|z,reg16 [rm: evex.256.66.0f38.w0 7b /r ] AVX512VL,AVX512BW,FUTURE
+VPBROADCASTW ymmreg|mask|z,reg32 [rm: evex.256.66.0f38.w0 7b /r ] AVX512VL,AVX512BW,FUTURE
+VPBROADCASTW ymmreg|mask|z,reg64 [rm: evex.256.66.0f38.w0 7b /r ] AVX512VL,AVX512BW,FUTURE
+VPBROADCASTW zmmreg|mask|z,reg16 [rm: evex.512.66.0f38.w0 7b /r ] AVX512BW,FUTURE
+VPBROADCASTW zmmreg|mask|z,reg32 [rm: evex.512.66.0f38.w0 7b /r ] AVX512BW,FUTURE
+VPBROADCASTW zmmreg|mask|z,reg64 [rm: evex.512.66.0f38.w0 7b /r ] AVX512BW,FUTURE
+VPCMPB kreg|mask,xmmreg,xmmrm128,imm8 [rvmi:fvm: evex.nds.128.66.0f3a.w0 3f /r ib ] AVX512VL,AVX512BW,FUTURE
+VPCMPB kreg|mask,ymmreg,ymmrm256,imm8 [rvmi:fvm: evex.nds.256.66.0f3a.w0 3f /r ib ] AVX512VL,AVX512BW,FUTURE
+VPCMPB kreg|mask,zmmreg,zmmrm512,imm8 [rvmi:fvm: evex.nds.512.66.0f3a.w0 3f /r ib ] AVX512BW,FUTURE
+VPCMPD kreg|mask,xmmreg,xmmrm128|b32,imm8 [rvmi:fv: evex.nds.128.66.0f3a.w0 1f /r ib ] AVX512VL,AVX512,FUTURE
+VPCMPD kreg|mask,ymmreg,ymmrm256|b32,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w0 1f /r ib ] AVX512VL,AVX512,FUTURE
+VPCMPD kreg|mask,zmmreg,zmmrm512|b32,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w0 1f /r ib ] AVX512,FUTURE
+VPCMPEQB kreg|mask,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig 74 /r ] AVX512VL,AVX512BW,FUTURE
+VPCMPEQB kreg|mask,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig 74 /r ] AVX512VL,AVX512BW,FUTURE
+VPCMPEQB kreg|mask,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig 74 /r ] AVX512BW,FUTURE
+VPCMPEQD kreg|mask,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f.w0 76 /r ] AVX512VL,AVX512,FUTURE
+VPCMPEQD kreg|mask,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f.w0 76 /r ] AVX512VL,AVX512,FUTURE
+VPCMPEQD kreg|mask,zmmreg,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f.w0 76 /r ] AVX512,FUTURE
+VPCMPEQQ kreg|mask,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 29 /r ] AVX512VL,AVX512,FUTURE
+VPCMPEQQ kreg|mask,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 29 /r ] AVX512VL,AVX512,FUTURE
+VPCMPEQQ kreg|mask,zmmreg,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 29 /r ] AVX512,FUTURE
+VPCMPEQW kreg|mask,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig 75 /r ] AVX512VL,AVX512BW,FUTURE
+VPCMPEQW kreg|mask,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig 75 /r ] AVX512VL,AVX512BW,FUTURE
+VPCMPEQW kreg|mask,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig 75 /r ] AVX512BW,FUTURE
+VPCMPGTB kreg|mask,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig 64 /r ] AVX512VL,AVX512BW,FUTURE
+VPCMPGTB kreg|mask,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig 64 /r ] AVX512VL,AVX512BW,FUTURE
+VPCMPGTB kreg|mask,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig 64 /r ] AVX512BW,FUTURE
+VPCMPGTD kreg|mask,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f.w0 66 /r ] AVX512VL,AVX512,FUTURE
+VPCMPGTD kreg|mask,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f.w0 66 /r ] AVX512VL,AVX512,FUTURE
+VPCMPGTD kreg|mask,zmmreg,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f.w0 66 /r ] AVX512,FUTURE
+VPCMPGTQ kreg|mask,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 37 /r ] AVX512VL,AVX512,FUTURE
+VPCMPGTQ kreg|mask,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 37 /r ] AVX512VL,AVX512,FUTURE
+VPCMPGTQ kreg|mask,zmmreg,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 37 /r ] AVX512,FUTURE
+VPCMPGTW kreg|mask,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig 65 /r ] AVX512VL,AVX512BW,FUTURE
+VPCMPGTW kreg|mask,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig 65 /r ] AVX512VL,AVX512BW,FUTURE
+VPCMPGTW kreg|mask,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig 65 /r ] AVX512BW,FUTURE
+VPCMPQ kreg|mask,xmmreg,xmmrm128|b64,imm8 [rvmi:fv: evex.nds.128.66.0f3a.w1 1f /r ib ] AVX512VL,AVX512,FUTURE
+VPCMPQ kreg|mask,ymmreg,ymmrm256|b64,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w1 1f /r ib ] AVX512VL,AVX512,FUTURE
+VPCMPQ kreg|mask,zmmreg,zmmrm512|b64,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w1 1f /r ib ] AVX512,FUTURE
+VPCMPUB kreg|mask,xmmreg,xmmrm128,imm8 [rvmi:fvm: evex.nds.128.66.0f3a.w0 3e /r ib ] AVX512VL,AVX512BW,FUTURE
+VPCMPUB kreg|mask,ymmreg,ymmrm256,imm8 [rvmi:fvm: evex.nds.256.66.0f3a.w0 3e /r ib ] AVX512VL,AVX512BW,FUTURE
+VPCMPUB kreg|mask,zmmreg,zmmrm512,imm8 [rvmi:fvm: evex.nds.512.66.0f3a.w0 3e /r ib ] AVX512BW,FUTURE
+VPCMPUD kreg|mask,xmmreg,xmmrm128|b32,imm8 [rvmi:fv: evex.nds.128.66.0f3a.w0 1e /r ib ] AVX512VL,AVX512,FUTURE
+VPCMPUD kreg|mask,ymmreg,ymmrm256|b32,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w0 1e /r ib ] AVX512VL,AVX512,FUTURE
+VPCMPUD kreg|mask,zmmreg,zmmrm512|b32,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w0 1e /r ib ] AVX512,FUTURE
+VPCMPUQ kreg|mask,xmmreg,xmmrm128|b64,imm8 [rvmi:fv: evex.nds.128.66.0f3a.w1 1e /r ib ] AVX512VL,AVX512,FUTURE
+VPCMPUQ kreg|mask,ymmreg,ymmrm256|b64,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w1 1e /r ib ] AVX512VL,AVX512,FUTURE
+VPCMPUQ kreg|mask,zmmreg,zmmrm512|b64,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w1 1e /r ib ] AVX512,FUTURE
+VPCMPUW kreg|mask,xmmreg,xmmrm128,imm8 [rvmi:fvm: evex.nds.128.66.0f3a.w1 3e /r ib ] AVX512VL,AVX512BW,FUTURE
+VPCMPUW kreg|mask,ymmreg,ymmrm256,imm8 [rvmi:fvm: evex.nds.256.66.0f3a.w1 3e /r ib ] AVX512VL,AVX512BW,FUTURE
+VPCMPUW kreg|mask,zmmreg,zmmrm512,imm8 [rvmi:fvm: evex.nds.512.66.0f3a.w1 3e /r ib ] AVX512BW,FUTURE
+VPCMPW kreg|mask,xmmreg,xmmrm128,imm8 [rvmi:fvm: evex.nds.128.66.0f3a.w1 3f /r ib ] AVX512VL,AVX512BW,FUTURE
+VPCMPW kreg|mask,ymmreg,ymmrm256,imm8 [rvmi:fvm: evex.nds.256.66.0f3a.w1 3f /r ib ] AVX512VL,AVX512BW,FUTURE
+VPCMPW kreg|mask,zmmreg,zmmrm512,imm8 [rvmi:fvm: evex.nds.512.66.0f3a.w1 3f /r ib ] AVX512BW,FUTURE
+VPCOMPRESSD mem128|mask,xmmreg [mr:t1s: evex.128.66.0f38.w0 8b /r ] AVX512VL,AVX512,FUTURE
+VPCOMPRESSD mem256|mask,ymmreg [mr:t1s: evex.256.66.0f38.w0 8b /r ] AVX512VL,AVX512,FUTURE
+VPCOMPRESSD mem512|mask,zmmreg [mr:t1s: evex.512.66.0f38.w0 8b /r ] AVX512,FUTURE
+VPCOMPRESSD xmmreg|mask|z,xmmreg [mr: evex.128.66.0f38.w0 8b /r ] AVX512VL,AVX512,FUTURE
+VPCOMPRESSD ymmreg|mask|z,ymmreg [mr: evex.256.66.0f38.w0 8b /r ] AVX512VL,AVX512,FUTURE
+VPCOMPRESSD zmmreg|mask|z,zmmreg [mr: evex.512.66.0f38.w0 8b /r ] AVX512,FUTURE
+VPCOMPRESSQ mem128|mask,xmmreg [mr:t1s: evex.128.66.0f38.w1 8b /r ] AVX512VL,AVX512,FUTURE
+VPCOMPRESSQ mem256|mask,ymmreg [mr:t1s: evex.256.66.0f38.w1 8b /r ] AVX512VL,AVX512,FUTURE
+VPCOMPRESSQ mem512|mask,zmmreg [mr:t1s: evex.512.66.0f38.w1 8b /r ] AVX512,FUTURE
+VPCOMPRESSQ xmmreg|mask|z,xmmreg [mr: evex.128.66.0f38.w1 8b /r ] AVX512VL,AVX512,FUTURE
+VPCOMPRESSQ ymmreg|mask|z,ymmreg [mr: evex.256.66.0f38.w1 8b /r ] AVX512VL,AVX512,FUTURE
+VPCOMPRESSQ zmmreg|mask|z,zmmreg [mr: evex.512.66.0f38.w1 8b /r ] AVX512,FUTURE
+VPCONFLICTD xmmreg|mask|z,xmmrm128|b32 [rm:fv: evex.128.66.0f38.w0 c4 /r ] AVX512VL,AVX512CD,FUTURE
+VPCONFLICTD ymmreg|mask|z,ymmrm256|b32 [rm:fv: evex.256.66.0f38.w0 c4 /r ] AVX512VL,AVX512CD,FUTURE
+VPCONFLICTD zmmreg|mask|z,zmmrm512|b32 [rm:fv: evex.512.66.0f38.w0 c4 /r ] AVX512CD,FUTURE
+VPCONFLICTQ xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.66.0f38.w1 c4 /r ] AVX512VL,AVX512CD,FUTURE
+VPCONFLICTQ ymmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.66.0f38.w1 c4 /r ] AVX512VL,AVX512CD,FUTURE
+VPCONFLICTQ zmmreg|mask|z,zmmrm512|b64 [rm:fv: evex.512.66.0f38.w1 c4 /r ] AVX512CD,FUTURE
+VPERMB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.w0 8d /r ] AVX512VL,AVX512VBMI,FUTURE
+VPERMB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.w0 8d /r ] AVX512VL,AVX512VBMI,FUTURE
+VPERMB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.w0 8d /r ] AVX512VBMI,FUTURE
+VPERMD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 36 /r ] AVX512VL,AVX512,FUTURE
+VPERMD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 36 /r ] AVX512,FUTURE
+VPERMI2B xmmreg|mask|z,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.w0 75 /r ] AVX512VL,AVX512VBMI,FUTURE
+VPERMI2B ymmreg|mask|z,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.w0 75 /r ] AVX512VL,AVX512VBMI,FUTURE
+VPERMI2B zmmreg|mask|z,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.w0 75 /r ] AVX512VBMI,FUTURE
+VPERMI2D xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 76 /r ] AVX512VL,AVX512,FUTURE
+VPERMI2D ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 76 /r ] AVX512VL,AVX512,FUTURE
+VPERMI2D zmmreg|mask|z,zmmreg,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 76 /r ] AVX512,FUTURE
+VPERMI2PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 77 /r ] AVX512VL,AVX512,FUTURE
+VPERMI2PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 77 /r ] AVX512VL,AVX512,FUTURE
+VPERMI2PD zmmreg|mask|z,zmmreg,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 77 /r ] AVX512,FUTURE
+VPERMI2PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 77 /r ] AVX512VL,AVX512,FUTURE
+VPERMI2PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 77 /r ] AVX512VL,AVX512,FUTURE
+VPERMI2PS zmmreg|mask|z,zmmreg,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 77 /r ] AVX512,FUTURE
+VPERMI2Q xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 76 /r ] AVX512VL,AVX512,FUTURE
+VPERMI2Q ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 76 /r ] AVX512VL,AVX512,FUTURE
+VPERMI2Q zmmreg|mask|z,zmmreg,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 76 /r ] AVX512,FUTURE
+VPERMI2W xmmreg|mask|z,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.w1 75 /r ] AVX512VL,AVX512BW,FUTURE
+VPERMI2W ymmreg|mask|z,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.w1 75 /r ] AVX512VL,AVX512BW,FUTURE
+VPERMI2W zmmreg|mask|z,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.w1 75 /r ] AVX512BW,FUTURE
+VPERMILPD xmmreg|mask|z,xmmrm128|b64,imm8 [rmi:fv: evex.128.66.0f3a.w1 05 /r ib ] AVX512VL,AVX512,FUTURE
+VPERMILPD ymmreg|mask|z,ymmrm256|b64,imm8 [rmi:fv: evex.256.66.0f3a.w1 05 /r ib ] AVX512VL,AVX512,FUTURE
+VPERMILPD zmmreg|mask|z,zmmrm512|b64,imm8 [rmi:fv: evex.512.66.0f3a.w1 05 /r ib ] AVX512,FUTURE
+VPERMILPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 0d /r ] AVX512VL,AVX512,FUTURE
+VPERMILPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 0d /r ] AVX512VL,AVX512,FUTURE
+VPERMILPD zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 0d /r ] AVX512,FUTURE
+VPERMILPS xmmreg|mask|z,xmmrm128|b32,imm8 [rmi:fv: evex.128.66.0f3a.w0 04 /r ib ] AVX512VL,AVX512,FUTURE
+VPERMILPS ymmreg|mask|z,ymmrm256|b32,imm8 [rmi:fv: evex.256.66.0f3a.w0 04 /r ib ] AVX512VL,AVX512,FUTURE
+VPERMILPS zmmreg|mask|z,zmmrm512|b32,imm8 [rmi:fv: evex.512.66.0f3a.w0 04 /r ib ] AVX512,FUTURE
+VPERMILPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 0c /r ] AVX512VL,AVX512,FUTURE
+VPERMILPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 0c /r ] AVX512VL,AVX512,FUTURE
+VPERMILPS zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 0c /r ] AVX512,FUTURE
+VPERMPD ymmreg|mask|z,ymmrm256|b64,imm8 [rmi:fv: evex.256.66.0f3a.w1 01 /r ib ] AVX512VL,AVX512,FUTURE
+VPERMPD zmmreg|mask|z,zmmrm512|b64,imm8 [rmi:fv: evex.512.66.0f3a.w1 01 /r ib ] AVX512,FUTURE
+VPERMPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 16 /r ] AVX512VL,AVX512,FUTURE
+VPERMPD zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 16 /r ] AVX512,FUTURE
+VPERMPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 16 /r ] AVX512VL,AVX512,FUTURE
+VPERMPS zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 16 /r ] AVX512,FUTURE
+VPERMQ ymmreg|mask|z,ymmrm256|b64,imm8 [rmi:fv: evex.256.66.0f3a.w1 00 /r ib ] AVX512VL,AVX512,FUTURE
+VPERMQ zmmreg|mask|z,zmmrm512|b64,imm8 [rmi:fv: evex.512.66.0f3a.w1 00 /r ib ] AVX512,FUTURE
+VPERMQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 36 /r ] AVX512VL,AVX512,FUTURE
+VPERMQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 36 /r ] AVX512,FUTURE
+VPERMT2B xmmreg|mask|z,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.w0 7d /r ] AVX512VL,AVX512VBMI,FUTURE
+VPERMT2B ymmreg|mask|z,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.w0 7d /r ] AVX512VL,AVX512VBMI,FUTURE
+VPERMT2B zmmreg|mask|z,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.w0 7d /r ] AVX512VBMI,FUTURE
+VPERMT2D xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 7e /r ] AVX512VL,AVX512,FUTURE
+VPERMT2D ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 7e /r ] AVX512VL,AVX512,FUTURE
+VPERMT2D zmmreg|mask|z,zmmreg,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 7e /r ] AVX512,FUTURE
+VPERMT2PD xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 7f /r ] AVX512VL,AVX512,FUTURE
+VPERMT2PD ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 7f /r ] AVX512VL,AVX512,FUTURE
+VPERMT2PD zmmreg|mask|z,zmmreg,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 7f /r ] AVX512,FUTURE
+VPERMT2PS xmmreg|mask|z,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 7f /r ] AVX512VL,AVX512,FUTURE
+VPERMT2PS ymmreg|mask|z,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 7f /r ] AVX512VL,AVX512,FUTURE
+VPERMT2PS zmmreg|mask|z,zmmreg,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 7f /r ] AVX512,FUTURE
+VPERMT2Q xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 7e /r ] AVX512VL,AVX512,FUTURE
+VPERMT2Q ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 7e /r ] AVX512VL,AVX512,FUTURE
+VPERMT2Q zmmreg|mask|z,zmmreg,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 7e /r ] AVX512,FUTURE
+VPERMT2W xmmreg|mask|z,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.w1 7d /r ] AVX512VL,AVX512BW,FUTURE
+VPERMT2W ymmreg|mask|z,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.w1 7d /r ] AVX512VL,AVX512BW,FUTURE
+VPERMT2W zmmreg|mask|z,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.w1 7d /r ] AVX512BW,FUTURE
+VPERMW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.w1 8d /r ] AVX512VL,AVX512BW,FUTURE
+VPERMW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.w1 8d /r ] AVX512VL,AVX512BW,FUTURE
+VPERMW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.w1 8d /r ] AVX512BW,FUTURE
+VPEXPANDD xmmreg|mask|z,mem128 [rm:t1s: evex.128.66.0f38.w0 89 /r ] AVX512VL,AVX512,FUTURE
+VPEXPANDD ymmreg|mask|z,mem256 [rm:t1s: evex.256.66.0f38.w0 89 /r ] AVX512VL,AVX512,FUTURE
+VPEXPANDD zmmreg|mask|z,mem512 [rm:t1s: evex.512.66.0f38.w0 89 /r ] AVX512,FUTURE
+VPEXPANDD xmmreg|mask|z,xmmreg [rm:t1s: evex.128.66.0f38.w0 89 /r ] AVX512VL,AVX512,FUTURE
+VPEXPANDD ymmreg|mask|z,ymmreg [rm:t1s: evex.256.66.0f38.w0 89 /r ] AVX512VL,AVX512,FUTURE
+VPEXPANDD zmmreg|mask|z,zmmreg [rm:t1s: evex.512.66.0f38.w0 89 /r ] AVX512,FUTURE
+VPEXPANDQ xmmreg|mask|z,mem128 [rm:t1s: evex.128.66.0f38.w1 89 /r ] AVX512VL,AVX512,FUTURE
+VPEXPANDQ ymmreg|mask|z,mem256 [rm:t1s: evex.256.66.0f38.w1 89 /r ] AVX512VL,AVX512,FUTURE
+VPEXPANDQ zmmreg|mask|z,mem512 [rm:t1s: evex.512.66.0f38.w1 89 /r ] AVX512,FUTURE
+VPEXPANDQ xmmreg|mask|z,xmmreg [rm:t1s: evex.128.66.0f38.w1 89 /r ] AVX512VL,AVX512,FUTURE
+VPEXPANDQ ymmreg|mask|z,ymmreg [rm:t1s: evex.256.66.0f38.w1 89 /r ] AVX512VL,AVX512,FUTURE
+VPEXPANDQ zmmreg|mask|z,zmmreg [rm:t1s: evex.512.66.0f38.w1 89 /r ] AVX512,FUTURE
+VPEXTRB reg8,xmmreg,imm8 [mri:t1s8: evex.128.66.0f3a.wig 14 /r ib ] AVX512BW,FUTURE
+VPEXTRB reg16,xmmreg,imm8 [mri:t1s8: evex.128.66.0f3a.wig 14 /r ib ] AVX512BW,FUTURE
+VPEXTRB reg32,xmmreg,imm8 [mri:t1s8: evex.128.66.0f3a.wig 14 /r ib ] AVX512BW,FUTURE
+VPEXTRB reg64,xmmreg,imm8 [mri:t1s8: evex.128.66.0f3a.wig 14 /r ib ] AVX512BW,FUTURE
+VPEXTRB mem8,xmmreg,imm8 [mri:t1s8: evex.128.66.0f3a.wig 14 /r ib ] AVX512BW,FUTURE
+VPEXTRD rm32,xmmreg,imm8 [mri:t1s: evex.128.66.0f3a.w0 16 /r ib ] AVX512DQ,FUTURE
+VPEXTRQ rm64,xmmreg,imm8 [mri:t1s: evex.128.66.0f3a.w1 16 /r ib ] AVX512DQ,FUTURE
+VPEXTRW reg16,xmmreg,imm8 [mri:t1s16: evex.128.66.0f3a.wig 15 /r ib ] AVX512BW,FUTURE
+VPEXTRW reg32,xmmreg,imm8 [mri:t1s16: evex.128.66.0f3a.wig 15 /r ib ] AVX512BW,FUTURE
+VPEXTRW reg64,xmmreg,imm8 [mri:t1s16: evex.128.66.0f3a.wig 15 /r ib ] AVX512BW,FUTURE
+VPEXTRW mem16,xmmreg,imm8 [mri:t1s16: evex.128.66.0f3a.wig 15 /r ib ] AVX512BW,FUTURE
+VPEXTRW reg16,xmmreg,imm8 [rmi: evex.128.66.0f.wig c5 /r ib ] AVX512BW,FUTURE
+VPEXTRW reg32,xmmreg,imm8 [rmi: evex.128.66.0f.wig c5 /r ib ] AVX512BW,FUTURE
+VPEXTRW reg64,xmmreg,imm8 [rmi: evex.128.66.0f.wig c5 /r ib ] AVX512BW,FUTURE
+VPGATHERDD xmmreg|mask,xmem32 [rm:t1s: vsibx evex.128.66.0f38.w0 90 /r ] AVX512VL,AVX512,FUTURE
+VPGATHERDD ymmreg|mask,ymem32 [rm:t1s: vsiby evex.256.66.0f38.w0 90 /r ] AVX512VL,AVX512,FUTURE
+VPGATHERDD zmmreg|mask,zmem32 [rm:t1s: vsibz evex.512.66.0f38.w0 90 /r ] AVX512,FUTURE
+VPGATHERDQ xmmreg|mask,xmem64 [rm:t1s: vsibx evex.128.66.0f38.w1 90 /r ] AVX512VL,AVX512,FUTURE
+VPGATHERDQ ymmreg|mask,xmem64 [rm:t1s: vsibx evex.256.66.0f38.w1 90 /r ] AVX512VL,AVX512,FUTURE
+VPGATHERDQ zmmreg|mask,ymem64 [rm:t1s: vsiby evex.512.66.0f38.w1 90 /r ] AVX512,FUTURE
+VPGATHERQD xmmreg|mask,xmem32 [rm:t1s: vsibx evex.128.66.0f38.w0 91 /r ] AVX512VL,AVX512,FUTURE
+VPGATHERQD xmmreg|mask,ymem32 [rm:t1s: vsiby evex.256.66.0f38.w0 91 /r ] AVX512VL,AVX512,FUTURE
+VPGATHERQD ymmreg|mask,zmem32 [rm:t1s: vsibz evex.512.66.0f38.w0 91 /r ] AVX512,FUTURE
+VPGATHERQQ xmmreg|mask,xmem64 [rm:t1s: vsibx evex.128.66.0f38.w1 91 /r ] AVX512VL,AVX512,FUTURE
+VPGATHERQQ ymmreg|mask,ymem64 [rm:t1s: vsiby evex.256.66.0f38.w1 91 /r ] AVX512VL,AVX512,FUTURE
+VPGATHERQQ zmmreg|mask,zmem64 [rm:t1s: vsibz evex.512.66.0f38.w1 91 /r ] AVX512,FUTURE
+VPINSRB xmmreg,xmmreg*,reg32,imm8 [rvmi:t1s8: evex.nds.128.66.0f3a.wig 20 /r ib ] AVX512BW,FUTURE
+VPINSRB xmmreg,xmmreg*,mem8,imm8 [rvmi:t1s8: evex.nds.128.66.0f3a.wig 20 /r ib ] AVX512BW,FUTURE
+VPINSRD xmmreg,xmmreg*,rm32,imm8 [rvmi:t1s: evex.nds.128.66.0f3a.w0 22 /r ib ] AVX512DQ,FUTURE
+VPINSRQ xmmreg,xmmreg*,rm64,imm8 [rvmi:t1s: evex.nds.128.66.0f3a.w1 22 /r ib ] AVX512DQ,FUTURE
+VPINSRW xmmreg,xmmreg*,reg32,imm8 [rvmi:t1s16: evex.nds.128.66.0f.wig c4 /r ib ] AVX512BW,FUTURE
+VPINSRW xmmreg,xmmreg*,mem16,imm8 [rvmi:t1s16: evex.nds.128.66.0f.wig c4 /r ib ] AVX512BW,FUTURE
+VPLZCNTD xmmreg|mask|z,xmmrm128|b32 [rm:fv: evex.128.66.0f38.w0 44 /r ] AVX512VL,AVX512CD,FUTURE
+VPLZCNTD ymmreg|mask|z,ymmrm256|b32 [rm:fv: evex.256.66.0f38.w0 44 /r ] AVX512VL,AVX512CD,FUTURE
+VPLZCNTD zmmreg|mask|z,zmmrm512|b32 [rm:fv: evex.512.66.0f38.w0 44 /r ] AVX512CD,FUTURE
+VPLZCNTQ xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.66.0f38.w1 44 /r ] AVX512VL,AVX512CD,FUTURE
+VPLZCNTQ ymmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.66.0f38.w1 44 /r ] AVX512VL,AVX512CD,FUTURE
+VPLZCNTQ zmmreg|mask|z,zmmrm512|b64 [rm:fv: evex.512.66.0f38.w1 44 /r ] AVX512CD,FUTURE
+VPMADD52HUQ xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 b5 /r ] AVX512VL,AVX512IFMA,FUTURE
+VPMADD52HUQ ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 b5 /r ] AVX512VL,AVX512IFMA,FUTURE
+VPMADD52HUQ zmmreg|mask|z,zmmreg,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 b5 /r ] AVX512IFMA,FUTURE
+VPMADD52LUQ xmmreg|mask|z,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 b4 /r ] AVX512VL,AVX512IFMA,FUTURE
+VPMADD52LUQ ymmreg|mask|z,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 b4 /r ] AVX512VL,AVX512IFMA,FUTURE
+VPMADD52LUQ zmmreg|mask|z,zmmreg,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 b4 /r ] AVX512IFMA,FUTURE
+VPMADDUBSW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.wig 04 /r ] AVX512VL,AVX512BW,FUTURE
+VPMADDUBSW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.wig 04 /r ] AVX512VL,AVX512BW,FUTURE
+VPMADDUBSW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.wig 04 /r ] AVX512BW,FUTURE
+VPMADDWD xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig f5 /r ] AVX512VL,AVX512BW,FUTURE
+VPMADDWD ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig f5 /r ] AVX512VL,AVX512BW,FUTURE
+VPMADDWD zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig f5 /r ] AVX512BW,FUTURE
+VPMAXSB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.wig 3c /r ] AVX512VL,AVX512BW,FUTURE
+VPMAXSB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.wig 3c /r ] AVX512VL,AVX512BW,FUTURE
+VPMAXSB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.wig 3c /r ] AVX512BW,FUTURE
+VPMAXSD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 3d /r ] AVX512VL,AVX512,FUTURE
+VPMAXSD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 3d /r ] AVX512VL,AVX512,FUTURE
+VPMAXSD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 3d /r ] AVX512,FUTURE
+VPMAXSQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 3d /r ] AVX512VL,AVX512,FUTURE
+VPMAXSQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 3d /r ] AVX512VL,AVX512,FUTURE
+VPMAXSQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 3d /r ] AVX512,FUTURE
+VPMAXSW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig ee /r ] AVX512VL,AVX512BW,FUTURE
+VPMAXSW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig ee /r ] AVX512VL,AVX512BW,FUTURE
+VPMAXSW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig ee /r ] AVX512BW,FUTURE
+VPMAXUB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig de /r ] AVX512VL,AVX512BW,FUTURE
+VPMAXUB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig de /r ] AVX512VL,AVX512BW,FUTURE
+VPMAXUB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig de /r ] AVX512BW,FUTURE
+VPMAXUD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 3f /r ] AVX512VL,AVX512,FUTURE
+VPMAXUD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 3f /r ] AVX512VL,AVX512,FUTURE
+VPMAXUD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 3f /r ] AVX512,FUTURE
+VPMAXUQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 3f /r ] AVX512VL,AVX512,FUTURE
+VPMAXUQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 3f /r ] AVX512VL,AVX512,FUTURE
+VPMAXUQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 3f /r ] AVX512,FUTURE
+VPMAXUW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.wig 3e /r ] AVX512VL,AVX512BW,FUTURE
+VPMAXUW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.wig 3e /r ] AVX512VL,AVX512BW,FUTURE
+VPMAXUW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.wig 3e /r ] AVX512BW,FUTURE
+VPMINSB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.wig 38 /r ] AVX512VL,AVX512BW,FUTURE
+VPMINSB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.wig 38 /r ] AVX512VL,AVX512BW,FUTURE
+VPMINSB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.wig 38 /r ] AVX512BW,FUTURE
+VPMINSD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 39 /r ] AVX512VL,AVX512,FUTURE
+VPMINSD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 39 /r ] AVX512VL,AVX512,FUTURE
+VPMINSD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 39 /r ] AVX512,FUTURE
+VPMINSQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 39 /r ] AVX512VL,AVX512,FUTURE
+VPMINSQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 39 /r ] AVX512VL,AVX512,FUTURE
+VPMINSQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 39 /r ] AVX512,FUTURE
+VPMINSW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig ea /r ] AVX512VL,AVX512BW,FUTURE
+VPMINSW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig ea /r ] AVX512VL,AVX512BW,FUTURE
+VPMINSW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig ea /r ] AVX512BW,FUTURE
+VPMINUB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig da /r ] AVX512VL,AVX512BW,FUTURE
+VPMINUB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig da /r ] AVX512VL,AVX512BW,FUTURE
+VPMINUB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig da /r ] AVX512BW,FUTURE
+VPMINUD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 3b /r ] AVX512VL,AVX512,FUTURE
+VPMINUD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 3b /r ] AVX512VL,AVX512,FUTURE
+VPMINUD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 3b /r ] AVX512,FUTURE
+VPMINUQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 3b /r ] AVX512VL,AVX512,FUTURE
+VPMINUQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 3b /r ] AVX512VL,AVX512,FUTURE
+VPMINUQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 3b /r ] AVX512,FUTURE
+VPMINUW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.wig 3a /r ] AVX512VL,AVX512BW,FUTURE
+VPMINUW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.wig 3a /r ] AVX512VL,AVX512BW,FUTURE
+VPMINUW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.wig 3a /r ] AVX512BW,FUTURE
+VPMOVB2M kreg,xmmreg [rm: evex.128.f3.0f38.w0 29 /r ] AVX512VL,AVX512BW,FUTURE
+VPMOVB2M kreg,ymmreg [rm: evex.256.f3.0f38.w0 29 /r ] AVX512VL,AVX512BW,FUTURE
+VPMOVB2M kreg,zmmreg [rm: evex.512.f3.0f38.w0 29 /r ] AVX512BW,FUTURE
+VPMOVD2M kreg,xmmreg [rm: evex.128.f3.0f38.w0 39 /r ] AVX512VL,AVX512DQ,FUTURE
+VPMOVD2M kreg,ymmreg [rm: evex.256.f3.0f38.w0 39 /r ] AVX512VL,AVX512DQ,FUTURE
+VPMOVD2M kreg,zmmreg [rm: evex.512.f3.0f38.w0 39 /r ] AVX512DQ,FUTURE
+VPMOVDB xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 31 /r ] AVX512VL,AVX512,FUTURE
+VPMOVDB xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 31 /r ] AVX512VL,AVX512,FUTURE
+VPMOVDB xmmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 31 /r ] AVX512,FUTURE
+VPMOVDB mem32|mask,xmmreg [mr:qvm: evex.128.f3.0f38.w0 31 /r ] AVX512VL,AVX512,FUTURE
+VPMOVDB mem64|mask,ymmreg [mr:qvm: evex.256.f3.0f38.w0 31 /r ] AVX512VL,AVX512,FUTURE
+VPMOVDB mem128|mask,zmmreg [mr:qvm: evex.512.f3.0f38.w0 31 /r ] AVX512,FUTURE
+VPMOVDW xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 33 /r ] AVX512VL,AVX512,FUTURE
+VPMOVDW xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 33 /r ] AVX512VL,AVX512,FUTURE
+VPMOVDW ymmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 33 /r ] AVX512,FUTURE
+VPMOVDW mem64|mask,xmmreg [mr:hvm: evex.128.f3.0f38.w0 33 /r ] AVX512VL,AVX512,FUTURE
+VPMOVDW mem128|mask,ymmreg [mr:hvm: evex.256.f3.0f38.w0 33 /r ] AVX512VL,AVX512,FUTURE
+VPMOVDW mem256|mask,zmmreg [mr:hvm: evex.512.f3.0f38.w0 33 /r ] AVX512,FUTURE
+VPMOVM2B xmmreg,kreg [rm: evex.128.f3.0f38.w0 28 /r ] AVX512VL,AVX512BW,FUTURE
+VPMOVM2B ymmreg,kreg [rm: evex.256.f3.0f38.w0 28 /r ] AVX512VL,AVX512BW,FUTURE
+VPMOVM2B zmmreg,kreg [rm: evex.512.f3.0f38.w0 28 /r ] AVX512BW,FUTURE
+VPMOVM2D xmmreg,kreg [rm: evex.128.f3.0f38.w0 38 /r ] AVX512VL,AVX512DQ,FUTURE
+VPMOVM2D ymmreg,kreg [rm: evex.256.f3.0f38.w0 38 /r ] AVX512VL,AVX512DQ,FUTURE
+VPMOVM2D zmmreg,kreg [rm: evex.512.f3.0f38.w0 38 /r ] AVX512DQ,FUTURE
+VPMOVM2Q xmmreg,kreg [rm: evex.128.f3.0f38.w1 38 /r ] AVX512VL,AVX512DQ,FUTURE
+VPMOVM2Q ymmreg,kreg [rm: evex.256.f3.0f38.w1 38 /r ] AVX512VL,AVX512DQ,FUTURE
+VPMOVM2Q zmmreg,kreg [rm: evex.512.f3.0f38.w1 38 /r ] AVX512DQ,FUTURE
+VPMOVM2W xmmreg,kreg [rm: evex.128.f3.0f38.w1 28 /r ] AVX512VL,AVX512BW,FUTURE
+VPMOVM2W ymmreg,kreg [rm: evex.256.f3.0f38.w1 28 /r ] AVX512VL,AVX512BW,FUTURE
+VPMOVM2W zmmreg,kreg [rm: evex.512.f3.0f38.w1 28 /r ] AVX512BW,FUTURE
+VPMOVQ2M kreg,xmmreg [rm: evex.128.f3.0f38.w1 39 /r ] AVX512VL,AVX512DQ,FUTURE
+VPMOVQ2M kreg,ymmreg [rm: evex.256.f3.0f38.w1 39 /r ] AVX512VL,AVX512DQ,FUTURE
+VPMOVQ2M kreg,zmmreg [rm: evex.512.f3.0f38.w1 39 /r ] AVX512DQ,FUTURE
+VPMOVQB xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 32 /r ] AVX512VL,AVX512,FUTURE
+VPMOVQB xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 32 /r ] AVX512VL,AVX512,FUTURE
+VPMOVQB xmmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 32 /r ] AVX512,FUTURE
+VPMOVQB mem16|mask,xmmreg [mr:ovm: evex.128.f3.0f38.w0 32 /r ] AVX512VL,AVX512,FUTURE
+VPMOVQB mem32|mask,ymmreg [mr:ovm: evex.256.f3.0f38.w0 32 /r ] AVX512VL,AVX512,FUTURE
+VPMOVQB mem64|mask,zmmreg [mr:ovm: evex.512.f3.0f38.w0 32 /r ] AVX512,FUTURE
+VPMOVQD xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 35 /r ] AVX512VL,AVX512,FUTURE
+VPMOVQD xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 35 /r ] AVX512VL,AVX512,FUTURE
+VPMOVQD ymmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 35 /r ] AVX512,FUTURE
+VPMOVQD mem64|mask,xmmreg [mr:hvm: evex.128.f3.0f38.w0 35 /r ] AVX512VL,AVX512,FUTURE
+VPMOVQD mem128|mask,ymmreg [mr:hvm: evex.256.f3.0f38.w0 35 /r ] AVX512VL,AVX512,FUTURE
+VPMOVQD mem256|mask,zmmreg [mr:hvm: evex.512.f3.0f38.w0 35 /r ] AVX512,FUTURE
+VPMOVQW xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 34 /r ] AVX512VL,AVX512,FUTURE
+VPMOVQW xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 34 /r ] AVX512VL,AVX512,FUTURE
+VPMOVQW xmmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 34 /r ] AVX512,FUTURE
+VPMOVQW mem32|mask,xmmreg [mr:qvm: evex.128.f3.0f38.w0 34 /r ] AVX512VL,AVX512,FUTURE
+VPMOVQW mem64|mask,ymmreg [mr:qvm: evex.256.f3.0f38.w0 34 /r ] AVX512VL,AVX512,FUTURE
+VPMOVQW mem128|mask,zmmreg [mr:qvm: evex.512.f3.0f38.w0 34 /r ] AVX512,FUTURE
+VPMOVSDB xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 21 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSDB xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 21 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSDB xmmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 21 /r ] AVX512,FUTURE
+VPMOVSDB mem32|mask,xmmreg [mr:qvm: evex.128.f3.0f38.w0 21 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSDB mem64|mask,ymmreg [mr:qvm: evex.256.f3.0f38.w0 21 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSDB mem128|mask,zmmreg [mr:qvm: evex.512.f3.0f38.w0 21 /r ] AVX512,FUTURE
+VPMOVSDW xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 23 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSDW xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 23 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSDW ymmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 23 /r ] AVX512,FUTURE
+VPMOVSDW mem64|mask,xmmreg [mr:hvm: evex.128.f3.0f38.w0 23 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSDW mem128|mask,ymmreg [mr:hvm: evex.256.f3.0f38.w0 23 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSDW mem256|mask,zmmreg [mr:hvm: evex.512.f3.0f38.w0 23 /r ] AVX512,FUTURE
+VPMOVSQB xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 22 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSQB xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 22 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSQB xmmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 22 /r ] AVX512,FUTURE
+VPMOVSQB mem16|mask,xmmreg [mr:ovm: evex.128.f3.0f38.w0 22 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSQB mem32|mask,ymmreg [mr:ovm: evex.256.f3.0f38.w0 22 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSQB mem64|mask,zmmreg [mr:ovm: evex.512.f3.0f38.w0 22 /r ] AVX512,FUTURE
+VPMOVSQD xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 25 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSQD xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 25 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSQD ymmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 25 /r ] AVX512,FUTURE
+VPMOVSQD mem64|mask,xmmreg [mr:hvm: evex.128.f3.0f38.w0 25 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSQD mem128|mask,ymmreg [mr:hvm: evex.256.f3.0f38.w0 25 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSQD mem256|mask,zmmreg [mr:hvm: evex.512.f3.0f38.w0 25 /r ] AVX512,FUTURE
+VPMOVSQW xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 24 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSQW xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 24 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSQW xmmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 24 /r ] AVX512,FUTURE
+VPMOVSQW mem32|mask,xmmreg [mr:qvm: evex.128.f3.0f38.w0 24 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSQW mem64|mask,ymmreg [mr:qvm: evex.256.f3.0f38.w0 24 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSQW mem128|mask,zmmreg [mr:qvm: evex.512.f3.0f38.w0 24 /r ] AVX512,FUTURE
+VPMOVSWB xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 20 /r ] AVX512VL,AVX512BW,FUTURE
+VPMOVSWB xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 20 /r ] AVX512VL,AVX512BW,FUTURE
+VPMOVSWB ymmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 20 /r ] AVX512BW,FUTURE
+VPMOVSWB mem64|mask,xmmreg [mr:hvm: evex.128.f3.0f38.w0 20 /r ] AVX512VL,AVX512BW,FUTURE
+VPMOVSWB mem128|mask,ymmreg [mr:hvm: evex.256.f3.0f38.w0 20 /r ] AVX512VL,AVX512BW,FUTURE
+VPMOVSWB mem256|mask,zmmreg [mr:hvm: evex.512.f3.0f38.w0 20 /r ] AVX512BW,FUTURE
+VPMOVSXBD xmmreg|mask|z,xmmrm32 [rm:qvm: evex.128.66.0f38.wig 21 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSXBD ymmreg|mask|z,xmmrm64 [rm:qvm: evex.256.66.0f38.wig 21 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSXBD zmmreg|mask|z,xmmrm128 [rm:qvm: evex.512.66.0f38.wig 21 /r ] AVX512,FUTURE
+VPMOVSXBQ xmmreg|mask|z,xmmrm16 [rm:ovm: evex.128.66.0f38.wig 22 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSXBQ ymmreg|mask|z,xmmrm32 [rm:ovm: evex.256.66.0f38.wig 22 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSXBQ zmmreg|mask|z,xmmrm64 [rm:ovm: evex.512.66.0f38.wig 22 /r ] AVX512,FUTURE
+VPMOVSXBW xmmreg|mask|z,xmmrm64 [rm:hvm: evex.128.66.0f38.wig 20 /r ] AVX512VL,AVX512BW,FUTURE
+VPMOVSXBW ymmreg|mask|z,xmmrm128 [rm:hvm: evex.256.66.0f38.wig 20 /r ] AVX512VL,AVX512BW,FUTURE
+VPMOVSXBW zmmreg|mask|z,ymmrm256 [rm:hvm: evex.512.66.0f38.wig 20 /r ] AVX512BW,FUTURE
+VPMOVSXDQ xmmreg|mask|z,xmmrm64 [rm:hvm: evex.128.66.0f38.w0 25 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSXDQ ymmreg|mask|z,xmmrm128 [rm:hvm: evex.256.66.0f38.w0 25 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSXDQ zmmreg|mask|z,ymmrm256 [rm:hvm: evex.512.66.0f38.w0 25 /r ] AVX512,FUTURE
+VPMOVSXWD xmmreg|mask|z,xmmrm64 [rm:hvm: evex.128.66.0f38.wig 23 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSXWD ymmreg|mask|z,xmmrm128 [rm:hvm: evex.256.66.0f38.wig 23 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSXWD zmmreg|mask|z,ymmrm256 [rm:hvm: evex.512.66.0f38.wig 23 /r ] AVX512,FUTURE
+VPMOVSXWQ xmmreg|mask|z,xmmrm32 [rm:qvm: evex.128.66.0f38.wig 24 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSXWQ ymmreg|mask|z,xmmrm64 [rm:qvm: evex.256.66.0f38.wig 24 /r ] AVX512VL,AVX512,FUTURE
+VPMOVSXWQ zmmreg|mask|z,xmmrm128 [rm:qvm: evex.512.66.0f38.wig 24 /r ] AVX512,FUTURE
+VPMOVUSDB xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 11 /r ] AVX512VL,AVX512,FUTURE
+VPMOVUSDB xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 11 /r ] AVX512VL,AVX512,FUTURE
+VPMOVUSDB xmmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 11 /r ] AVX512,FUTURE
+VPMOVUSDB mem32|mask,xmmreg [mr:qvm: evex.128.f3.0f38.w0 11 /r ] AVX512VL,AVX512,FUTURE
+VPMOVUSDB mem64|mask,ymmreg [mr:qvm: evex.256.f3.0f38.w0 11 /r ] AVX512VL,AVX512,FUTURE
+VPMOVUSDB mem128|mask,zmmreg [mr:qvm: evex.512.f3.0f38.w0 11 /r ] AVX512,FUTURE
+VPMOVUSDW xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 13 /r ] AVX512VL,AVX512,FUTURE
+VPMOVUSDW xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 13 /r ] AVX512VL,AVX512,FUTURE
+VPMOVUSDW ymmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 13 /r ] AVX512,FUTURE
+VPMOVUSDW mem64|mask,xmmreg [mr:hvm: evex.128.f3.0f38.w0 13 /r ] AVX512VL,AVX512,FUTURE
+VPMOVUSDW mem128|mask,ymmreg [mr:hvm: evex.256.f3.0f38.w0 13 /r ] AVX512VL,AVX512,FUTURE
+VPMOVUSDW mem256|mask,zmmreg [mr:hvm: evex.512.f3.0f38.w0 13 /r ] AVX512,FUTURE
+VPMOVUSQB xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 12 /r ] AVX512VL,AVX512,FUTURE
+VPMOVUSQB xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 12 /r ] AVX512VL,AVX512,FUTURE
+VPMOVUSQB xmmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 12 /r ] AVX512,FUTURE
+VPMOVUSQB mem16|mask,xmmreg [mr:ovm: evex.128.f3.0f38.w0 12 /r ] AVX512VL,AVX512,FUTURE
+VPMOVUSQB mem32|mask,ymmreg [mr:ovm: evex.256.f3.0f38.w0 12 /r ] AVX512VL,AVX512,FUTURE
+VPMOVUSQB mem64|mask,zmmreg [mr:ovm: evex.512.f3.0f38.w0 12 /r ] AVX512,FUTURE
+VPMOVUSQD xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 15 /r ] AVX512VL,AVX512,FUTURE
+VPMOVUSQD xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 15 /r ] AVX512VL,AVX512,FUTURE
+VPMOVUSQD ymmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 15 /r ] AVX512,FUTURE
+VPMOVUSQD mem64|mask,xmmreg [mr:hvm: evex.128.f3.0f38.w0 15 /r ] AVX512VL,AVX512,FUTURE
+VPMOVUSQD mem128|mask,ymmreg [mr:hvm: evex.256.f3.0f38.w0 15 /r ] AVX512VL,AVX512,FUTURE
+VPMOVUSQD mem256|mask,zmmreg [mr:hvm: evex.512.f3.0f38.w0 15 /r ] AVX512,FUTURE
+VPMOVUSQW xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 14 /r ] AVX512VL,AVX512,FUTURE
+VPMOVUSQW xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 14 /r ] AVX512VL,AVX512,FUTURE
+VPMOVUSQW xmmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 14 /r ] AVX512,FUTURE
+VPMOVUSQW mem32|mask,xmmreg [mr:qvm: evex.128.f3.0f38.w0 14 /r ] AVX512VL,AVX512,FUTURE
+VPMOVUSQW mem64|mask,ymmreg [mr:qvm: evex.256.f3.0f38.w0 14 /r ] AVX512VL,AVX512,FUTURE
+VPMOVUSQW mem128|mask,zmmreg [mr:qvm: evex.512.f3.0f38.w0 14 /r ] AVX512,FUTURE
+VPMOVUSWB xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 10 /r ] AVX512VL,AVX512BW,FUTURE
+VPMOVUSWB xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 10 /r ] AVX512VL,AVX512BW,FUTURE
+VPMOVUSWB ymmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 10 /r ] AVX512BW,FUTURE
+VPMOVUSWB mem64|mask,xmmreg [mr:hvm: evex.128.f3.0f38.w0 10 /r ] AVX512VL,AVX512BW,FUTURE
+VPMOVUSWB mem128|mask,ymmreg [mr:hvm: evex.256.f3.0f38.w0 10 /r ] AVX512VL,AVX512BW,FUTURE
+VPMOVUSWB mem256|mask,zmmreg [mr:hvm: evex.512.f3.0f38.w0 10 /r ] AVX512BW,FUTURE
+VPMOVW2M kreg,xmmreg [rm: evex.128.f3.0f38.w1 29 /r ] AVX512VL,AVX512BW,FUTURE
+VPMOVW2M kreg,ymmreg [rm: evex.256.f3.0f38.w1 29 /r ] AVX512VL,AVX512BW,FUTURE
+VPMOVW2M kreg,zmmreg [rm: evex.512.f3.0f38.w1 29 /r ] AVX512BW,FUTURE
+VPMOVWB xmmreg|mask|z,xmmreg [mr: evex.128.f3.0f38.w0 30 /r ] AVX512VL,AVX512BW,FUTURE
+VPMOVWB xmmreg|mask|z,ymmreg [mr: evex.256.f3.0f38.w0 30 /r ] AVX512VL,AVX512BW,FUTURE
+VPMOVWB ymmreg|mask|z,zmmreg [mr: evex.512.f3.0f38.w0 30 /r ] AVX512BW,FUTURE
+VPMOVWB mem64|mask,xmmreg [mr:hvm: evex.128.f3.0f38.w0 30 /r ] AVX512VL,AVX512BW,FUTURE
+VPMOVWB mem128|mask,ymmreg [mr:hvm: evex.256.f3.0f38.w0 30 /r ] AVX512VL,AVX512BW,FUTURE
+VPMOVWB mem256|mask,zmmreg [mr:hvm: evex.512.f3.0f38.w0 30 /r ] AVX512BW,FUTURE
+VPMOVZXBD xmmreg|mask|z,xmmrm32 [rm:qvm: evex.128.66.0f38.wig 31 /r ] AVX512VL,AVX512,FUTURE
+VPMOVZXBD ymmreg|mask|z,xmmrm64 [rm:qvm: evex.256.66.0f38.wig 31 /r ] AVX512VL,AVX512,FUTURE
+VPMOVZXBD zmmreg|mask|z,xmmrm128 [rm:qvm: evex.512.66.0f38.wig 31 /r ] AVX512,FUTURE
+VPMOVZXBQ xmmreg|mask|z,xmmrm16 [rm:ovm: evex.128.66.0f38.wig 32 /r ] AVX512VL,AVX512,FUTURE
+VPMOVZXBQ ymmreg|mask|z,xmmrm32 [rm:ovm: evex.256.66.0f38.wig 32 /r ] AVX512VL,AVX512,FUTURE
+VPMOVZXBQ zmmreg|mask|z,xmmrm64 [rm:ovm: evex.512.66.0f38.wig 32 /r ] AVX512,FUTURE
+VPMOVZXBW xmmreg|mask|z,xmmrm64 [rm:hvm: evex.128.66.0f38.wig 30 /r ] AVX512VL,AVX512BW,FUTURE
+VPMOVZXBW ymmreg|mask|z,xmmrm128 [rm:hvm: evex.256.66.0f38.wig 30 /r ] AVX512VL,AVX512BW,FUTURE
+VPMOVZXBW zmmreg|mask|z,ymmrm256 [rm:hvm: evex.512.66.0f38.wig 30 /r ] AVX512BW,FUTURE
+VPMOVZXDQ xmmreg|mask|z,xmmrm64 [rm:hvm: evex.128.66.0f38.w0 35 /r ] AVX512VL,AVX512,FUTURE
+VPMOVZXDQ ymmreg|mask|z,xmmrm128 [rm:hvm: evex.256.66.0f38.w0 35 /r ] AVX512VL,AVX512,FUTURE
+VPMOVZXDQ zmmreg|mask|z,ymmrm256 [rm:hvm: evex.512.66.0f38.w0 35 /r ] AVX512,FUTURE
+VPMOVZXWD xmmreg|mask|z,xmmrm64 [rm:hvm: evex.128.66.0f38.wig 33 /r ] AVX512VL,AVX512,FUTURE
+VPMOVZXWD ymmreg|mask|z,xmmrm128 [rm:hvm: evex.256.66.0f38.wig 33 /r ] AVX512VL,AVX512,FUTURE
+VPMOVZXWD zmmreg|mask|z,ymmrm256 [rm:hvm: evex.512.66.0f38.wig 33 /r ] AVX512,FUTURE
+VPMOVZXWQ xmmreg|mask|z,xmmrm32 [rm:qvm: evex.128.66.0f38.wig 34 /r ] AVX512VL,AVX512,FUTURE
+VPMOVZXWQ ymmreg|mask|z,xmmrm64 [rm:qvm: evex.256.66.0f38.wig 34 /r ] AVX512VL,AVX512,FUTURE
+VPMOVZXWQ zmmreg|mask|z,xmmrm128 [rm:qvm: evex.512.66.0f38.wig 34 /r ] AVX512,FUTURE
+VPMULDQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 28 /r ] AVX512VL,AVX512,FUTURE
+VPMULDQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 28 /r ] AVX512VL,AVX512,FUTURE
+VPMULDQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 28 /r ] AVX512,FUTURE
+VPMULHRSW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.wig 0b /r ] AVX512VL,AVX512BW,FUTURE
+VPMULHRSW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.wig 0b /r ] AVX512VL,AVX512BW,FUTURE
+VPMULHRSW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.wig 0b /r ] AVX512BW,FUTURE
+VPMULHUW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig e4 /r ] AVX512VL,AVX512BW,FUTURE
+VPMULHUW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig e4 /r ] AVX512VL,AVX512BW,FUTURE
+VPMULHUW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig e4 /r ] AVX512BW,FUTURE
+VPMULHW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig e5 /r ] AVX512VL,AVX512BW,FUTURE
+VPMULHW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig e5 /r ] AVX512VL,AVX512BW,FUTURE
+VPMULHW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig e5 /r ] AVX512BW,FUTURE
+VPMULLD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 40 /r ] AVX512VL,AVX512,FUTURE
+VPMULLD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 40 /r ] AVX512VL,AVX512,FUTURE
+VPMULLD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 40 /r ] AVX512,FUTURE
+VPMULLQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 40 /r ] AVX512VL,AVX512DQ,FUTURE
+VPMULLQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 40 /r ] AVX512VL,AVX512DQ,FUTURE
+VPMULLQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 40 /r ] AVX512DQ,FUTURE
+VPMULLW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig d5 /r ] AVX512VL,AVX512BW,FUTURE
+VPMULLW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig d5 /r ] AVX512VL,AVX512BW,FUTURE
+VPMULLW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig d5 /r ] AVX512BW,FUTURE
+VPMULTISHIFTQB xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 83 /r ] AVX512VL,AVX512VBMI,FUTURE
+VPMULTISHIFTQB ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 83 /r ] AVX512VL,AVX512VBMI,FUTURE
+VPMULTISHIFTQB zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 83 /r ] AVX512VBMI,FUTURE
+VPMULUDQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 f4 /r ] AVX512VL,AVX512,FUTURE
+VPMULUDQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 f4 /r ] AVX512VL,AVX512,FUTURE
+VPMULUDQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 f4 /r ] AVX512,FUTURE
+VPORD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f.w0 eb /r ] AVX512VL,AVX512,FUTURE
+VPORD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f.w0 eb /r ] AVX512VL,AVX512,FUTURE
+VPORD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f.w0 eb /r ] AVX512,FUTURE
+VPORQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 eb /r ] AVX512VL,AVX512,FUTURE
+VPORQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 eb /r ] AVX512VL,AVX512,FUTURE
+VPORQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 eb /r ] AVX512,FUTURE
+VPROLD xmmreg|mask|z,xmmrm128|b32*,imm8 [vmi:fv: evex.nds.128.66.0f.w0 72 /1 ib ] AVX512VL,AVX512,FUTURE
+VPROLD ymmreg|mask|z,ymmrm256|b32*,imm8 [vmi:fv: evex.nds.256.66.0f.w0 72 /1 ib ] AVX512VL,AVX512,FUTURE
+VPROLD zmmreg|mask|z,zmmrm512|b32*,imm8 [vmi:fv: evex.nds.512.66.0f.w0 72 /1 ib ] AVX512,FUTURE
+VPROLQ xmmreg|mask|z,xmmrm128|b64*,imm8 [vmi:fv: evex.nds.128.66.0f.w1 72 /1 ib ] AVX512VL,AVX512,FUTURE
+VPROLQ ymmreg|mask|z,ymmrm256|b64*,imm8 [vmi:fv: evex.nds.256.66.0f.w1 72 /1 ib ] AVX512VL,AVX512,FUTURE
+VPROLQ zmmreg|mask|z,zmmrm512|b64*,imm8 [vmi:fv: evex.nds.512.66.0f.w1 72 /1 ib ] AVX512,FUTURE
+VPROLVD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 15 /r ] AVX512VL,AVX512,FUTURE
+VPROLVD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 15 /r ] AVX512VL,AVX512,FUTURE
+VPROLVD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 15 /r ] AVX512,FUTURE
+VPROLVQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 15 /r ] AVX512VL,AVX512,FUTURE
+VPROLVQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 15 /r ] AVX512VL,AVX512,FUTURE
+VPROLVQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 15 /r ] AVX512,FUTURE
+VPRORD xmmreg|mask|z,xmmrm128|b32*,imm8 [vmi:fv: evex.nds.128.66.0f.w0 72 /0 ib ] AVX512VL,AVX512,FUTURE
+VPRORD ymmreg|mask|z,ymmrm256|b32*,imm8 [vmi:fv: evex.nds.256.66.0f.w0 72 /0 ib ] AVX512VL,AVX512,FUTURE
+VPRORD zmmreg|mask|z,zmmrm512|b32*,imm8 [vmi:fv: evex.nds.512.66.0f.w0 72 /0 ib ] AVX512,FUTURE
+VPRORQ xmmreg|mask|z,xmmrm128|b64*,imm8 [vmi:fv: evex.nds.128.66.0f.w1 72 /0 ib ] AVX512VL,AVX512,FUTURE
+VPRORQ ymmreg|mask|z,ymmrm256|b64*,imm8 [vmi:fv: evex.nds.256.66.0f.w1 72 /0 ib ] AVX512VL,AVX512,FUTURE
+VPRORQ zmmreg|mask|z,zmmrm512|b64*,imm8 [vmi:fv: evex.nds.512.66.0f.w1 72 /0 ib ] AVX512,FUTURE
+VPRORVD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 14 /r ] AVX512VL,AVX512,FUTURE
+VPRORVD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 14 /r ] AVX512VL,AVX512,FUTURE
+VPRORVD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 14 /r ] AVX512,FUTURE
+VPRORVQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 14 /r ] AVX512VL,AVX512,FUTURE
+VPRORVQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 14 /r ] AVX512VL,AVX512,FUTURE
+VPRORVQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 14 /r ] AVX512,FUTURE
+VPSADBW xmmreg,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig f6 /r ] AVX512VL,AVX512BW,FUTURE
+VPSADBW ymmreg,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig f6 /r ] AVX512VL,AVX512BW,FUTURE
+VPSADBW zmmreg,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig f6 /r ] AVX512BW,FUTURE
+VPSCATTERDD xmem32|mask,xmmreg [mr:t1s: vsibx evex.128.66.0f38.w0 a0 /r ] AVX512VL,AVX512,FUTURE
+VPSCATTERDD ymem32|mask,ymmreg [mr:t1s: vsiby evex.256.66.0f38.w0 a0 /r ] AVX512VL,AVX512,FUTURE
+VPSCATTERDD zmem32|mask,zmmreg [mr:t1s: vsibz evex.512.66.0f38.w0 a0 /r ] AVX512,FUTURE
+VPSCATTERDQ xmem64|mask,xmmreg [mr:t1s: vsibx evex.128.66.0f38.w1 a0 /r ] AVX512VL,AVX512,FUTURE
+VPSCATTERDQ xmem64|mask,ymmreg [mr:t1s: vsibx evex.256.66.0f38.w1 a0 /r ] AVX512VL,AVX512,FUTURE
+VPSCATTERDQ ymem64|mask,zmmreg [mr:t1s: vsiby evex.512.66.0f38.w1 a0 /r ] AVX512,FUTURE
+VPSCATTERQD xmem32|mask,xmmreg [mr:t1s: vsibx evex.128.66.0f38.w0 a1 /r ] AVX512VL,AVX512,FUTURE
+VPSCATTERQD ymem32|mask,xmmreg [mr:t1s: vsiby evex.256.66.0f38.w0 a1 /r ] AVX512VL,AVX512,FUTURE
+VPSCATTERQD zmem32|mask,ymmreg [mr:t1s: vsibz evex.512.66.0f38.w0 a1 /r ] AVX512,FUTURE
+VPSCATTERQQ xmem64|mask,xmmreg [mr:t1s: vsibx evex.128.66.0f38.w1 a1 /r ] AVX512VL,AVX512,FUTURE
+VPSCATTERQQ ymem64|mask,ymmreg [mr:t1s: vsiby evex.256.66.0f38.w1 a1 /r ] AVX512VL,AVX512,FUTURE
+VPSCATTERQQ zmem64|mask,zmmreg [mr:t1s: vsibz evex.512.66.0f38.w1 a1 /r ] AVX512,FUTURE
+VPSHUFB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.wig 00 /r ] AVX512VL,AVX512BW,FUTURE
+VPSHUFB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.wig 00 /r ] AVX512VL,AVX512BW,FUTURE
+VPSHUFB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.wig 00 /r ] AVX512BW,FUTURE
+VPSHUFD xmmreg|mask|z,xmmrm128|b32,imm8 [rmi:fv: evex.128.66.0f.w0 70 /r ib ] AVX512VL,AVX512,FUTURE
+VPSHUFD ymmreg|mask|z,ymmrm256|b32,imm8 [rmi:fv: evex.256.66.0f.w0 70 /r ib ] AVX512VL,AVX512,FUTURE
+VPSHUFD zmmreg|mask|z,zmmrm512|b32,imm8 [rmi:fv: evex.512.66.0f.w0 70 /r ib ] AVX512,FUTURE
+VPSHUFHW xmmreg|mask|z,xmmrm128,imm8 [rmi:fvm: evex.128.f3.0f.wig 70 /r ib ] AVX512VL,AVX512BW,FUTURE
+VPSHUFHW ymmreg|mask|z,ymmrm256,imm8 [rmi:fvm: evex.256.f3.0f.wig 70 /r ib ] AVX512VL,AVX512BW,FUTURE
+VPSHUFHW zmmreg|mask|z,zmmrm512,imm8 [rmi:fvm: evex.512.f3.0f.wig 70 /r ib ] AVX512BW,FUTURE
+VPSHUFLW xmmreg|mask|z,xmmrm128,imm8 [rmi:fvm: evex.128.f2.0f.wig 70 /r ib ] AVX512VL,AVX512BW,FUTURE
+VPSHUFLW ymmreg|mask|z,ymmrm256,imm8 [rmi:fvm: evex.256.f2.0f.wig 70 /r ib ] AVX512VL,AVX512BW,FUTURE
+VPSHUFLW zmmreg|mask|z,zmmrm512,imm8 [rmi:fvm: evex.512.f2.0f.wig 70 /r ib ] AVX512BW,FUTURE
+VPSLLD xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:m128: evex.nds.128.66.0f.w0 f2 /r ] AVX512VL,AVX512,FUTURE
+VPSLLD ymmreg|mask|z,ymmreg*,xmmrm128 [rvm:m128: evex.nds.256.66.0f.w0 f2 /r ] AVX512VL,AVX512,FUTURE
+VPSLLD zmmreg|mask|z,zmmreg*,xmmrm128 [rvm:m128: evex.nds.512.66.0f.w0 f2 /r ] AVX512,FUTURE
+VPSLLD xmmreg|mask|z,xmmrm128|b32*,imm8 [vmi:fv: evex.nds.128.66.0f.w0 72 /6 ib ] AVX512VL,AVX512,FUTURE
+VPSLLD ymmreg|mask|z,ymmrm256|b32*,imm8 [vmi:fv: evex.nds.256.66.0f.w0 72 /6 ib ] AVX512VL,AVX512,FUTURE
+VPSLLD zmmreg|mask|z,zmmrm512|b32*,imm8 [vmi:fv: evex.nds.512.66.0f.w0 72 /6 ib ] AVX512,FUTURE
+VPSLLDQ xmmreg,xmmrm128*,imm8 [vmi:fvm: evex.nds.128.66.0f.wig 73 /7 ib ] AVX512VL,AVX512BW,FUTURE
+VPSLLDQ ymmreg,ymmrm256*,imm8 [vmi:fvm: evex.nds.256.66.0f.wig 73 /7 ib ] AVX512VL,AVX512BW,FUTURE
+VPSLLDQ zmmreg,zmmrm512*,imm8 [vmi:fvm: evex.nds.512.66.0f.wig 73 /7 ib ] AVX512BW,FUTURE
+VPSLLQ xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:m128: evex.nds.128.66.0f.w1 f3 /r ] AVX512VL,AVX512,FUTURE
+VPSLLQ ymmreg|mask|z,ymmreg*,xmmrm128 [rvm:m128: evex.nds.256.66.0f.w1 f3 /r ] AVX512VL,AVX512,FUTURE
+VPSLLQ zmmreg|mask|z,zmmreg*,xmmrm128 [rvm:m128: evex.nds.512.66.0f.w1 f3 /r ] AVX512,FUTURE
+VPSLLQ xmmreg|mask|z,xmmrm128|b64*,imm8 [vmi:fv: evex.nds.128.66.0f.w1 73 /6 ib ] AVX512VL,AVX512,FUTURE
+VPSLLQ ymmreg|mask|z,ymmrm256|b64*,imm8 [vmi:fv: evex.nds.256.66.0f.w1 73 /6 ib ] AVX512VL,AVX512,FUTURE
+VPSLLQ zmmreg|mask|z,zmmrm512|b64*,imm8 [vmi:fv: evex.nds.512.66.0f.w1 73 /6 ib ] AVX512,FUTURE
+VPSLLVD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 47 /r ] AVX512VL,AVX512,FUTURE
+VPSLLVD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 47 /r ] AVX512VL,AVX512,FUTURE
+VPSLLVD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 47 /r ] AVX512,FUTURE
+VPSLLVQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 47 /r ] AVX512VL,AVX512,FUTURE
+VPSLLVQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 47 /r ] AVX512VL,AVX512,FUTURE
+VPSLLVQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 47 /r ] AVX512,FUTURE
+VPSLLVW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.w1 12 /r ] AVX512VL,AVX512BW,FUTURE
+VPSLLVW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.w1 12 /r ] AVX512VL,AVX512BW,FUTURE
+VPSLLVW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.w1 12 /r ] AVX512BW,FUTURE
+VPSLLW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:m128: evex.nds.128.66.0f.wig f1 /r ] AVX512VL,AVX512BW,FUTURE
+VPSLLW ymmreg|mask|z,ymmreg*,xmmrm128 [rvm:m128: evex.nds.256.66.0f.wig f1 /r ] AVX512VL,AVX512BW,FUTURE
+VPSLLW zmmreg|mask|z,zmmreg*,xmmrm128 [rvm:m128: evex.nds.512.66.0f.wig f1 /r ] AVX512BW,FUTURE
+VPSLLW xmmreg|mask|z,xmmrm128*,imm8 [vmi:fvm: evex.nds.128.66.0f.wig 71 /6 ib ] AVX512VL,AVX512BW,FUTURE
+VPSLLW ymmreg|mask|z,ymmrm256*,imm8 [vmi:fvm: evex.nds.256.66.0f.wig 71 /6 ib ] AVX512VL,AVX512BW,FUTURE
+VPSLLW zmmreg|mask|z,zmmrm512*,imm8 [vmi:fvm: evex.nds.512.66.0f.wig 71 /6 ib ] AVX512BW,FUTURE
+VPSRAD xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:m128: evex.nds.128.66.0f.w0 e2 /r ] AVX512VL,AVX512,FUTURE
+VPSRAD ymmreg|mask|z,ymmreg*,xmmrm128 [rvm:m128: evex.nds.256.66.0f.w0 e2 /r ] AVX512VL,AVX512,FUTURE
+VPSRAD zmmreg|mask|z,zmmreg*,xmmrm128 [rvm:m128: evex.nds.512.66.0f.w0 e2 /r ] AVX512,FUTURE
+VPSRAD xmmreg|mask|z,xmmrm128|b32*,imm8 [vmi:fv: evex.nds.128.66.0f.w0 72 /4 ib ] AVX512VL,AVX512,FUTURE
+VPSRAD ymmreg|mask|z,ymmrm256|b32*,imm8 [vmi:fv: evex.nds.256.66.0f.w0 72 /4 ib ] AVX512VL,AVX512,FUTURE
+VPSRAD zmmreg|mask|z,zmmrm512|b32*,imm8 [vmi:fv: evex.nds.512.66.0f.w0 72 /4 ib ] AVX512,FUTURE
+VPSRAQ xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:m128: evex.nds.128.66.0f.w1 e2 /r ] AVX512VL,AVX512,FUTURE
+VPSRAQ ymmreg|mask|z,ymmreg*,xmmrm128 [rvm:m128: evex.nds.256.66.0f.w1 e2 /r ] AVX512VL,AVX512,FUTURE
+VPSRAQ zmmreg|mask|z,zmmreg*,xmmrm128 [rvm:m128: evex.nds.512.66.0f.w1 e2 /r ] AVX512,FUTURE
+VPSRAQ xmmreg|mask|z,xmmrm128|b64*,imm8 [vmi:fv: evex.nds.128.66.0f.w1 72 /4 ib ] AVX512VL,AVX512,FUTURE
+VPSRAQ ymmreg|mask|z,ymmrm256|b64*,imm8 [vmi:fv: evex.nds.256.66.0f.w1 72 /4 ib ] AVX512VL,AVX512,FUTURE
+VPSRAQ zmmreg|mask|z,zmmrm512|b64*,imm8 [vmi:fv: evex.nds.512.66.0f.w1 72 /4 ib ] AVX512,FUTURE
+VPSRAVD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 46 /r ] AVX512VL,AVX512,FUTURE
+VPSRAVD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 46 /r ] AVX512VL,AVX512,FUTURE
+VPSRAVD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 46 /r ] AVX512,FUTURE
+VPSRAVQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 46 /r ] AVX512VL,AVX512,FUTURE
+VPSRAVQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 46 /r ] AVX512VL,AVX512,FUTURE
+VPSRAVQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 46 /r ] AVX512,FUTURE
+VPSRAVW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.w1 11 /r ] AVX512VL,AVX512BW,FUTURE
+VPSRAVW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.w1 11 /r ] AVX512VL,AVX512BW,FUTURE
+VPSRAVW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.w1 11 /r ] AVX512BW,FUTURE
+VPSRAW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:m128: evex.nds.128.66.0f.wig e1 /r ] AVX512VL,AVX512BW,FUTURE
+VPSRAW ymmreg|mask|z,ymmreg*,xmmrm128 [rvm:m128: evex.nds.256.66.0f.wig e1 /r ] AVX512VL,AVX512BW,FUTURE
+VPSRAW zmmreg|mask|z,zmmreg*,xmmrm128 [rvm:m128: evex.nds.512.66.0f.wig e1 /r ] AVX512BW,FUTURE
+VPSRAW xmmreg|mask|z,xmmrm128*,imm8 [vmi:fvm: evex.nds.128.66.0f.wig 71 /4 ib ] AVX512VL,AVX512BW,FUTURE
+VPSRAW ymmreg|mask|z,ymmrm256*,imm8 [vmi:fvm: evex.nds.256.66.0f.wig 71 /4 ib ] AVX512VL,AVX512BW,FUTURE
+VPSRAW zmmreg|mask|z,zmmrm512*,imm8 [vmi:fvm: evex.nds.512.66.0f.wig 71 /4 ib ] AVX512BW,FUTURE
+VPSRLD xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:m128: evex.nds.128.66.0f.w0 d2 /r ] AVX512VL,AVX512,FUTURE
+VPSRLD ymmreg|mask|z,ymmreg*,xmmrm128 [rvm:m128: evex.nds.256.66.0f.w0 d2 /r ] AVX512VL,AVX512,FUTURE
+VPSRLD zmmreg|mask|z,zmmreg*,xmmrm128 [rvm:m128: evex.nds.512.66.0f.w0 d2 /r ] AVX512,FUTURE
+VPSRLD xmmreg|mask|z,xmmrm128|b32*,imm8 [vmi:fv: evex.nds.128.66.0f.w0 72 /2 ib ] AVX512VL,AVX512,FUTURE
+VPSRLD ymmreg|mask|z,ymmrm256|b32*,imm8 [vmi:fv: evex.nds.256.66.0f.w0 72 /2 ib ] AVX512VL,AVX512,FUTURE
+VPSRLD zmmreg|mask|z,zmmrm512|b32*,imm8 [vmi:fv: evex.nds.512.66.0f.w0 72 /2 ib ] AVX512,FUTURE
+VPSRLDQ xmmreg,xmmrm128*,imm8 [vmi:fvm: evex.nds.128.66.0f.wig 73 /3 ib ] AVX512VL,AVX512BW,FUTURE
+VPSRLDQ ymmreg,ymmrm256*,imm8 [vmi:fvm: evex.nds.256.66.0f.wig 73 /3 ib ] AVX512VL,AVX512BW,FUTURE
+VPSRLDQ zmmreg,zmmrm512*,imm8 [vmi:fvm: evex.nds.512.66.0f.wig 73 /3 ib ] AVX512BW,FUTURE
+VPSRLQ xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:m128: evex.nds.128.66.0f.w1 d3 /r ] AVX512VL,AVX512,FUTURE
+VPSRLQ ymmreg|mask|z,ymmreg*,xmmrm128 [rvm:m128: evex.nds.256.66.0f.w1 d3 /r ] AVX512VL,AVX512,FUTURE
+VPSRLQ zmmreg|mask|z,zmmreg*,xmmrm128 [rvm:m128: evex.nds.512.66.0f.w1 d3 /r ] AVX512,FUTURE
+VPSRLQ xmmreg|mask|z,xmmrm128|b64*,imm8 [vmi:fv: evex.nds.128.66.0f.w1 73 /2 ib ] AVX512VL,AVX512,FUTURE
+VPSRLQ ymmreg|mask|z,ymmrm256|b64*,imm8 [vmi:fv: evex.nds.256.66.0f.w1 73 /2 ib ] AVX512VL,AVX512,FUTURE
+VPSRLQ zmmreg|mask|z,zmmrm512|b64*,imm8 [vmi:fv: evex.nds.512.66.0f.w1 73 /2 ib ] AVX512,FUTURE
+VPSRLVD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 45 /r ] AVX512VL,AVX512,FUTURE
+VPSRLVD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 45 /r ] AVX512VL,AVX512,FUTURE
+VPSRLVD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 45 /r ] AVX512,FUTURE
+VPSRLVQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 45 /r ] AVX512VL,AVX512,FUTURE
+VPSRLVQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 45 /r ] AVX512VL,AVX512,FUTURE
+VPSRLVQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 45 /r ] AVX512,FUTURE
+VPSRLVW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.w1 10 /r ] AVX512VL,AVX512BW,FUTURE
+VPSRLVW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.w1 10 /r ] AVX512VL,AVX512BW,FUTURE
+VPSRLVW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.w1 10 /r ] AVX512BW,FUTURE
+VPSRLW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:m128: evex.nds.128.66.0f.wig d1 /r ] AVX512VL,AVX512BW,FUTURE
+VPSRLW ymmreg|mask|z,ymmreg*,xmmrm128 [rvm:m128: evex.nds.256.66.0f.wig d1 /r ] AVX512VL,AVX512BW,FUTURE
+VPSRLW zmmreg|mask|z,zmmreg*,xmmrm128 [rvm:m128: evex.nds.512.66.0f.wig d1 /r ] AVX512BW,FUTURE
+VPSRLW xmmreg|mask|z,xmmrm128*,imm8 [vmi:fvm: evex.nds.128.66.0f.wig 71 /2 ib ] AVX512VL,AVX512BW,FUTURE
+VPSRLW ymmreg|mask|z,ymmrm256*,imm8 [vmi:fvm: evex.nds.256.66.0f.wig 71 /2 ib ] AVX512VL,AVX512BW,FUTURE
+VPSRLW zmmreg|mask|z,zmmrm512*,imm8 [vmi:fvm: evex.nds.512.66.0f.wig 71 /2 ib ] AVX512BW,FUTURE
+VPSUBB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig f8 /r ] AVX512VL,AVX512BW,FUTURE
+VPSUBB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig f8 /r ] AVX512VL,AVX512BW,FUTURE
+VPSUBB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig f8 /r ] AVX512BW,FUTURE
+VPSUBD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f.w0 fa /r ] AVX512VL,AVX512,FUTURE
+VPSUBD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f.w0 fa /r ] AVX512VL,AVX512,FUTURE
+VPSUBD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f.w0 fa /r ] AVX512,FUTURE
+VPSUBQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 fb /r ] AVX512VL,AVX512,FUTURE
+VPSUBQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 fb /r ] AVX512VL,AVX512,FUTURE
+VPSUBQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 fb /r ] AVX512,FUTURE
+VPSUBSB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig e8 /r ] AVX512VL,AVX512BW,FUTURE
+VPSUBSB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig e8 /r ] AVX512VL,AVX512BW,FUTURE
+VPSUBSB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig e8 /r ] AVX512BW,FUTURE
+VPSUBSW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig e9 /r ] AVX512VL,AVX512BW,FUTURE
+VPSUBSW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig e9 /r ] AVX512VL,AVX512BW,FUTURE
+VPSUBSW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig e9 /r ] AVX512BW,FUTURE
+VPSUBUSB xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig d8 /r ] AVX512VL,AVX512BW,FUTURE
+VPSUBUSB ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig d8 /r ] AVX512VL,AVX512BW,FUTURE
+VPSUBUSB zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig d8 /r ] AVX512BW,FUTURE
+VPSUBUSW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig d9 /r ] AVX512VL,AVX512BW,FUTURE
+VPSUBUSW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig d9 /r ] AVX512VL,AVX512BW,FUTURE
+VPSUBUSW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig d9 /r ] AVX512BW,FUTURE
+VPSUBW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig f9 /r ] AVX512VL,AVX512BW,FUTURE
+VPSUBW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig f9 /r ] AVX512VL,AVX512BW,FUTURE
+VPSUBW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig f9 /r ] AVX512BW,FUTURE
+VPTERNLOGD xmmreg|mask|z,xmmreg,xmmrm128|b32,imm8 [rvmi:fv: evex.nds.128.66.0f3a.w0 25 /r ib ] AVX512VL,AVX512,FUTURE
+VPTERNLOGD ymmreg|mask|z,ymmreg,ymmrm256|b32,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w0 25 /r ib ] AVX512VL,AVX512,FUTURE
+VPTERNLOGD zmmreg|mask|z,zmmreg,zmmrm512|b32,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w0 25 /r ib ] AVX512,FUTURE
+VPTERNLOGQ xmmreg|mask|z,xmmreg,xmmrm128|b64,imm8 [rvmi:fv: evex.nds.128.66.0f3a.w1 25 /r ib ] AVX512VL,AVX512,FUTURE
+VPTERNLOGQ ymmreg|mask|z,ymmreg,ymmrm256|b64,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w1 25 /r ib ] AVX512VL,AVX512,FUTURE
+VPTERNLOGQ zmmreg|mask|z,zmmreg,zmmrm512|b64,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w1 25 /r ib ] AVX512,FUTURE
+VPTESTMB kreg|mask,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.w0 26 /r ] AVX512VL,AVX512BW,FUTURE
+VPTESTMB kreg|mask,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.w0 26 /r ] AVX512VL,AVX512BW,FUTURE
+VPTESTMB kreg|mask,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.w0 26 /r ] AVX512BW,FUTURE
+VPTESTMD kreg|mask,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 27 /r ] AVX512VL,AVX512,FUTURE
+VPTESTMD kreg|mask,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 27 /r ] AVX512VL,AVX512,FUTURE
+VPTESTMD kreg|mask,zmmreg,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f38.w0 27 /r ] AVX512,FUTURE
+VPTESTMQ kreg|mask,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 27 /r ] AVX512VL,AVX512,FUTURE
+VPTESTMQ kreg|mask,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 27 /r ] AVX512VL,AVX512,FUTURE
+VPTESTMQ kreg|mask,zmmreg,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f38.w1 27 /r ] AVX512,FUTURE
+VPTESTMW kreg|mask,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.66.0f38.w1 26 /r ] AVX512VL,AVX512BW,FUTURE
+VPTESTMW kreg|mask,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.66.0f38.w1 26 /r ] AVX512VL,AVX512BW,FUTURE
+VPTESTMW kreg|mask,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.66.0f38.w1 26 /r ] AVX512BW,FUTURE
+VPTESTNMB kreg|mask,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.f3.0f38.w0 26 /r ] AVX512VL,AVX512BW,FUTURE
+VPTESTNMB kreg|mask,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.f3.0f38.w0 26 /r ] AVX512VL,AVX512BW,FUTURE
+VPTESTNMB kreg|mask,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.f3.0f38.w0 26 /r ] AVX512BW,FUTURE
+VPTESTNMD kreg|mask,xmmreg,xmmrm128|b32 [rvm:fv: evex.nds.128.f3.0f38.w0 27 /r ] AVX512VL,AVX512,FUTURE
+VPTESTNMD kreg|mask,ymmreg,ymmrm256|b32 [rvm:fv: evex.nds.256.f3.0f38.w0 27 /r ] AVX512VL,AVX512,FUTURE
+VPTESTNMD kreg|mask,zmmreg,zmmrm512|b32 [rvm:fv: evex.nds.512.f3.0f38.w0 27 /r ] AVX512,FUTURE
+VPTESTNMQ kreg|mask,xmmreg,xmmrm128|b64 [rvm:fv: evex.nds.128.f3.0f38.w1 27 /r ] AVX512VL,AVX512,FUTURE
+VPTESTNMQ kreg|mask,ymmreg,ymmrm256|b64 [rvm:fv: evex.nds.256.f3.0f38.w1 27 /r ] AVX512VL,AVX512,FUTURE
+VPTESTNMQ kreg|mask,zmmreg,zmmrm512|b64 [rvm:fv: evex.nds.512.f3.0f38.w1 27 /r ] AVX512,FUTURE
+VPTESTNMW kreg|mask,xmmreg,xmmrm128 [rvm:fvm: evex.nds.128.f3.0f38.w1 26 /r ] AVX512VL,AVX512BW,FUTURE
+VPTESTNMW kreg|mask,ymmreg,ymmrm256 [rvm:fvm: evex.nds.256.f3.0f38.w1 26 /r ] AVX512VL,AVX512BW,FUTURE
+VPTESTNMW kreg|mask,zmmreg,zmmrm512 [rvm:fvm: evex.nds.512.f3.0f38.w1 26 /r ] AVX512BW,FUTURE
+VPUNPCKHBW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig 68 /r ] AVX512VL,AVX512BW,FUTURE
+VPUNPCKHBW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig 68 /r ] AVX512VL,AVX512BW,FUTURE
+VPUNPCKHBW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig 68 /r ] AVX512BW,FUTURE
+VPUNPCKHDQ xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f.w0 6a /r ] AVX512VL,AVX512,FUTURE
+VPUNPCKHDQ ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f.w0 6a /r ] AVX512VL,AVX512,FUTURE
+VPUNPCKHDQ zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f.w0 6a /r ] AVX512,FUTURE
+VPUNPCKHQDQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 6d /r ] AVX512VL,AVX512,FUTURE
+VPUNPCKHQDQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 6d /r ] AVX512VL,AVX512,FUTURE
+VPUNPCKHQDQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 6d /r ] AVX512,FUTURE
+VPUNPCKHWD xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig 69 /r ] AVX512VL,AVX512BW,FUTURE
+VPUNPCKHWD ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig 69 /r ] AVX512VL,AVX512BW,FUTURE
+VPUNPCKHWD zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig 69 /r ] AVX512BW,FUTURE
+VPUNPCKLBW xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig 60 /r ] AVX512VL,AVX512BW,FUTURE
+VPUNPCKLBW ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig 60 /r ] AVX512VL,AVX512BW,FUTURE
+VPUNPCKLBW zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig 60 /r ] AVX512BW,FUTURE
+VPUNPCKLDQ xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f.w0 62 /r ] AVX512VL,AVX512,FUTURE
+VPUNPCKLDQ ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f.w0 62 /r ] AVX512VL,AVX512,FUTURE
+VPUNPCKLDQ zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f.w0 62 /r ] AVX512,FUTURE
+VPUNPCKLQDQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 6c /r ] AVX512VL,AVX512,FUTURE
+VPUNPCKLQDQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 6c /r ] AVX512VL,AVX512,FUTURE
+VPUNPCKLQDQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 6c /r ] AVX512,FUTURE
+VPUNPCKLWD xmmreg|mask|z,xmmreg*,xmmrm128 [rvm:fvm: evex.nds.128.66.0f.wig 61 /r ] AVX512VL,AVX512BW,FUTURE
+VPUNPCKLWD ymmreg|mask|z,ymmreg*,ymmrm256 [rvm:fvm: evex.nds.256.66.0f.wig 61 /r ] AVX512VL,AVX512BW,FUTURE
+VPUNPCKLWD zmmreg|mask|z,zmmreg*,zmmrm512 [rvm:fvm: evex.nds.512.66.0f.wig 61 /r ] AVX512BW,FUTURE
+VPXORD xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f.w0 ef /r ] AVX512VL,AVX512,FUTURE
+VPXORD ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f.w0 ef /r ] AVX512VL,AVX512,FUTURE
+VPXORD zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.66.0f.w0 ef /r ] AVX512,FUTURE
+VPXORQ xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 ef /r ] AVX512VL,AVX512,FUTURE
+VPXORQ ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 ef /r ] AVX512VL,AVX512,FUTURE
+VPXORQ zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 ef /r ] AVX512,FUTURE
+VRANGEPD xmmreg|mask|z,xmmreg*,xmmrm128|b64,imm8 [rvmi:fv: evex.nds.128.66.0f3a.w1 50 /r ib ] AVX512VL,AVX512DQ,FUTURE
+VRANGEPD ymmreg|mask|z,ymmreg*,ymmrm256|b64,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w1 50 /r ib ] AVX512VL,AVX512DQ,FUTURE
+VRANGEPD zmmreg|mask|z,zmmreg*,zmmrm512|b64|sae,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w1 50 /r ib ] AVX512DQ,FUTURE
+VRANGEPS xmmreg|mask|z,xmmreg*,xmmrm128|b32,imm8 [rvmi:fv: evex.nds.128.66.0f3a.w0 50 /r ib ] AVX512VL,AVX512DQ,FUTURE
+VRANGEPS ymmreg|mask|z,ymmreg*,ymmrm256|b32,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w0 50 /r ib ] AVX512VL,AVX512DQ,FUTURE
+VRANGEPS zmmreg|mask|z,zmmreg*,zmmrm512|b32|sae,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w0 50 /r ib ] AVX512DQ,FUTURE
+VRANGESD xmmreg|mask|z,xmmreg*,xmmrm64|sae,imm8 [rvmi:t1s: evex.nds.128.66.0f3a.w1 51 /r ib ] AVX512DQ,FUTURE
+VRANGESS xmmreg|mask|z,xmmreg*,xmmrm32|sae,imm8 [rvmi:t1s: evex.nds.128.66.0f3a.w0 51 /r ib ] AVX512DQ,FUTURE
+VRCP14PD xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.66.0f38.w1 4c /r ] AVX512VL,AVX512,FUTURE
+VRCP14PD ymmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.66.0f38.w1 4c /r ] AVX512VL,AVX512,FUTURE
+VRCP14PD zmmreg|mask|z,zmmrm512|b64 [rm:fv: evex.512.66.0f38.w1 4c /r ] AVX512,FUTURE
+VRCP14PS xmmreg|mask|z,xmmrm128|b32 [rm:fv: evex.128.66.0f38.w0 4c /r ] AVX512VL,AVX512,FUTURE
+VRCP14PS ymmreg|mask|z,ymmrm256|b32 [rm:fv: evex.256.66.0f38.w0 4c /r ] AVX512VL,AVX512,FUTURE
+VRCP14PS zmmreg|mask|z,zmmrm512|b32 [rm:fv: evex.512.66.0f38.w0 4c /r ] AVX512,FUTURE
+VRCP14SD xmmreg|mask|z,xmmreg*,xmmrm64 [rvm:t1s: evex.nds.128.66.0f38.w1 4d /r ] AVX512,FUTURE
+VRCP14SS xmmreg|mask|z,xmmreg*,xmmrm32 [rvm:t1s: evex.nds.128.66.0f38.w0 4d /r ] AVX512,FUTURE
+VRCP28PD zmmreg|mask|z,zmmrm512|b64|sae [rm:fv: evex.512.66.0f38.w1 ca /r ] AVX512ER,FUTURE
+VRCP28PS zmmreg|mask|z,zmmrm512|b32|sae [rm:fv: evex.512.66.0f38.w0 ca /r ] AVX512ER,FUTURE
+VRCP28SD xmmreg|mask|z,xmmreg*,xmmrm64|sae [rvm:t1s: evex.nds.128.66.0f38.w1 cb /r ] AVX512ER,FUTURE
+VRCP28SS xmmreg|mask|z,xmmreg*,xmmrm32|sae [rvm:t1s: evex.nds.128.66.0f38.w0 cb /r ] AVX512ER,FUTURE
+VREDUCEPD xmmreg|mask|z,xmmrm128|b64,imm8 [rmi:fv: evex.128.66.0f3a.w1 56 /r ib ] AVX512VL,AVX512DQ,FUTURE
+VREDUCEPD ymmreg|mask|z,ymmrm256|b64,imm8 [rmi:fv: evex.256.66.0f3a.w1 56 /r ib ] AVX512VL,AVX512DQ,FUTURE
+VREDUCEPD zmmreg|mask|z,zmmrm512|b64|sae,imm8 [rmi:fv: evex.512.66.0f3a.w1 56 /r ib ] AVX512DQ,FUTURE
+VREDUCEPS xmmreg|mask|z,xmmrm128|b32,imm8 [rmi:fv: evex.128.66.0f3a.w0 56 /r ib ] AVX512VL,AVX512DQ,FUTURE
+VREDUCEPS ymmreg|mask|z,ymmrm256|b32,imm8 [rmi:fv: evex.256.66.0f3a.w0 56 /r ib ] AVX512VL,AVX512DQ,FUTURE
+VREDUCEPS zmmreg|mask|z,zmmrm512|b32|sae,imm8 [rmi:fv: evex.512.66.0f3a.w0 56 /r ib ] AVX512DQ,FUTURE
+VREDUCESD xmmreg|mask|z,xmmreg*,xmmrm64|sae,imm8 [rvmi:t1s: evex.nds.128.66.0f3a.w1 57 /r ib ] AVX512DQ,FUTURE
+VREDUCESS xmmreg|mask|z,xmmreg*,xmmrm32|sae,imm8 [rvmi:t1s: evex.nds.128.66.0f3a.w0 57 /r ib ] AVX512DQ,FUTURE
+VRNDSCALEPD xmmreg|mask|z,xmmrm128|b64,imm8 [rmi:fv: evex.128.66.0f3a.w1 09 /r ib ] AVX512VL,AVX512,FUTURE
+VRNDSCALEPD ymmreg|mask|z,ymmrm256|b64,imm8 [rmi:fv: evex.256.66.0f3a.w1 09 /r ib ] AVX512VL,AVX512,FUTURE
+VRNDSCALEPD zmmreg|mask|z,zmmrm512|b64|sae,imm8 [rmi:fv: evex.512.66.0f3a.w1 09 /r ib ] AVX512,FUTURE
+VRNDSCALEPS xmmreg|mask|z,xmmrm128|b32,imm8 [rmi:fv: evex.128.66.0f3a.w0 08 /r ib ] AVX512VL,AVX512,FUTURE
+VRNDSCALEPS ymmreg|mask|z,ymmrm256|b32,imm8 [rmi:fv: evex.256.66.0f3a.w0 08 /r ib ] AVX512VL,AVX512,FUTURE
+VRNDSCALEPS zmmreg|mask|z,zmmrm512|b32|sae,imm8 [rmi:fv: evex.512.66.0f3a.w0 08 /r ib ] AVX512,FUTURE
+VRNDSCALESD xmmreg|mask|z,xmmreg*,xmmrm64|sae,imm8 [rvmi:t1s: evex.nds.128.66.0f3a.w1 0b /r ib ] AVX512,FUTURE
+VRNDSCALESS xmmreg|mask|z,xmmreg*,xmmrm32|sae,imm8 [rvmi:t1s: evex.nds.128.66.0f3a.w0 0a /r ib ] AVX512,FUTURE
+VRSQRT14PD xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.66.0f38.w1 4e /r ] AVX512VL,AVX512,FUTURE
+VRSQRT14PD ymmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.66.0f38.w1 4e /r ] AVX512VL,AVX512,FUTURE
+VRSQRT14PD zmmreg|mask|z,zmmrm512|b64 [rm:fv: evex.512.66.0f38.w1 4e /r ] AVX512,FUTURE
+VRSQRT14PS xmmreg|mask|z,xmmrm128|b32 [rm:fv: evex.128.66.0f38.w0 4e /r ] AVX512VL,AVX512,FUTURE
+VRSQRT14PS ymmreg|mask|z,ymmrm256|b32 [rm:fv: evex.256.66.0f38.w0 4e /r ] AVX512VL,AVX512,FUTURE
+VRSQRT14PS zmmreg|mask|z,zmmrm512|b32 [rm:fv: evex.512.66.0f38.w0 4e /r ] AVX512,FUTURE
+VRSQRT14SD xmmreg|mask|z,xmmreg*,xmmrm64 [rvm:t1s: evex.nds.128.66.0f38.w1 4f /r ] AVX512,FUTURE
+VRSQRT14SS xmmreg|mask|z,xmmreg*,xmmrm32 [rvm:t1s: evex.nds.128.66.0f38.w0 4f /r ] AVX512,FUTURE
+VRSQRT28PD zmmreg|mask|z,zmmrm512|b64|sae [rm:fv: evex.512.66.0f38.w1 cc /r ] AVX512ER,FUTURE
+VRSQRT28PS zmmreg|mask|z,zmmrm512|b32|sae [rm:fv: evex.512.66.0f38.w0 cc /r ] AVX512ER,FUTURE
+VRSQRT28SD xmmreg|mask|z,xmmreg*,xmmrm64|sae [rvm:t1s: evex.nds.128.66.0f38.w1 cd /r ] AVX512ER,FUTURE
+VRSQRT28SS xmmreg|mask|z,xmmreg*,xmmrm32|sae [rvm:t1s: evex.nds.128.66.0f38.w0 cd /r ] AVX512ER,FUTURE
+VSCALEFPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f38.w1 2c /r ] AVX512VL,AVX512,FUTURE
+VSCALEFPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f38.w1 2c /r ] AVX512VL,AVX512,FUTURE
+VSCALEFPD zmmreg|mask|z,zmmreg*,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f38.w1 2c /r ] AVX512,FUTURE
+VSCALEFPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.66.0f38.w0 2c /r ] AVX512VL,AVX512,FUTURE
+VSCALEFPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.66.0f38.w0 2c /r ] AVX512VL,AVX512,FUTURE
+VSCALEFPS zmmreg|mask|z,zmmreg*,zmmrm512|b32|er [rvm:fv: evex.nds.512.66.0f38.w0 2c /r ] AVX512,FUTURE
+VSCALEFSD xmmreg|mask|z,xmmreg*,xmmrm64|er [rvm:t1s: evex.nds.128.66.0f38.w1 2d /r ] AVX512,FUTURE
+VSCALEFSS xmmreg|mask|z,xmmreg*,xmmrm32|er [rvm:t1s: evex.nds.128.66.0f38.w0 2d /r ] AVX512,FUTURE
+VSCATTERDPD xmem64|mask,xmmreg [mr:t1s: vsibx evex.128.66.0f38.w1 a2 /r ] AVX512VL,AVX512,FUTURE
+VSCATTERDPD xmem64|mask,ymmreg [mr:t1s: vsibx evex.256.66.0f38.w1 a2 /r ] AVX512VL,AVX512,FUTURE
+VSCATTERDPD ymem64|mask,zmmreg [mr:t1s: vsiby evex.512.66.0f38.w1 a2 /r ] AVX512,FUTURE
+VSCATTERDPS xmem32|mask,xmmreg [mr:t1s: vsibx evex.128.66.0f38.w0 a2 /r ] AVX512VL,AVX512,FUTURE
+VSCATTERDPS ymem32|mask,ymmreg [mr:t1s: vsiby evex.256.66.0f38.w0 a2 /r ] AVX512VL,AVX512,FUTURE
+VSCATTERDPS zmem32|mask,zmmreg [mr:t1s: vsibz evex.512.66.0f38.w0 a2 /r ] AVX512,FUTURE
+VSCATTERPF0DPD ymem64|mask [m:t1s: vsiby evex.512.66.0f38.w1 c6 /5 ] AVX512PF,FUTURE
+VSCATTERPF0DPS zmem32|mask [m:t1s: vsibz evex.512.66.0f38.w0 c6 /5 ] AVX512PF,FUTURE
+VSCATTERPF0QPD zmem64|mask [m:t1s: vsibz evex.512.66.0f38.w1 c7 /5 ] AVX512PF,FUTURE
+VSCATTERPF0QPS zmem32|mask [m:t1s: vsibz evex.512.66.0f38.w0 c7 /5 ] AVX512PF,FUTURE
+VSCATTERPF1DPD ymem64|mask [m:t1s: vsiby evex.512.66.0f38.w1 c6 /6 ] AVX512PF,FUTURE
+VSCATTERPF1DPS zmem32|mask [m:t1s: vsibz evex.512.66.0f38.w0 c6 /6 ] AVX512PF,FUTURE
+VSCATTERPF1QPD zmem64|mask [m:t1s: vsibz evex.512.66.0f38.w1 c7 /6 ] AVX512PF,FUTURE
+VSCATTERPF1QPS zmem32|mask [m:t1s: vsibz evex.512.66.0f38.w0 c7 /6 ] AVX512PF,FUTURE
+VSCATTERQPD xmem64|mask,xmmreg [mr:t1s: vsibx evex.128.66.0f38.w1 a3 /r ] AVX512VL,AVX512,FUTURE
+VSCATTERQPD ymem64|mask,ymmreg [mr:t1s: vsiby evex.256.66.0f38.w1 a3 /r ] AVX512VL,AVX512,FUTURE
+VSCATTERQPD zmem64|mask,zmmreg [mr:t1s: vsibz evex.512.66.0f38.w1 a3 /r ] AVX512,FUTURE
+VSCATTERQPS xmem32|mask,xmmreg [mr:t1s: vsibx evex.128.66.0f38.w0 a3 /r ] AVX512VL,AVX512,FUTURE
+VSCATTERQPS ymem32|mask,xmmreg [mr:t1s: vsiby evex.256.66.0f38.w0 a3 /r ] AVX512VL,AVX512,FUTURE
+VSCATTERQPS zmem32|mask,ymmreg [mr:t1s: vsibz evex.512.66.0f38.w0 a3 /r ] AVX512,FUTURE
+VSHUFF32X4 ymmreg|mask|z,ymmreg*,ymmrm256|b32,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w0 23 /r ib ] AVX512VL,AVX512,FUTURE
+VSHUFF32X4 zmmreg|mask|z,zmmreg*,zmmrm512|b32,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w0 23 /r ib ] AVX512,FUTURE
+VSHUFF64X2 ymmreg|mask|z,ymmreg*,ymmrm256|b64,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w1 23 /r ib ] AVX512VL,AVX512,FUTURE
+VSHUFF64X2 zmmreg|mask|z,zmmreg*,zmmrm512|b64,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w1 23 /r ib ] AVX512,FUTURE
+VSHUFI32X4 ymmreg|mask|z,ymmreg*,ymmrm256|b32,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w0 43 /r ib ] AVX512VL,AVX512,FUTURE
+VSHUFI32X4 zmmreg|mask|z,zmmreg*,zmmrm512|b32,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w0 43 /r ib ] AVX512,FUTURE
+VSHUFI64X2 ymmreg|mask|z,ymmreg*,ymmrm256|b64,imm8 [rvmi:fv: evex.nds.256.66.0f3a.w1 43 /r ib ] AVX512VL,AVX512,FUTURE
+VSHUFI64X2 zmmreg|mask|z,zmmreg*,zmmrm512|b64,imm8 [rvmi:fv: evex.nds.512.66.0f3a.w1 43 /r ib ] AVX512,FUTURE
+VSHUFPD xmmreg|mask|z,xmmreg*,xmmrm128|b64,imm8 [rvmi:fv: evex.nds.128.66.0f.w1 c6 /r ib ] AVX512VL,AVX512,FUTURE
+VSHUFPD ymmreg|mask|z,ymmreg*,ymmrm256|b64,imm8 [rvmi:fv: evex.nds.256.66.0f.w1 c6 /r ib ] AVX512VL,AVX512,FUTURE
+VSHUFPD zmmreg|mask|z,zmmreg*,zmmrm512|b64,imm8 [rvmi:fv: evex.nds.512.66.0f.w1 c6 /r ib ] AVX512,FUTURE
+VSHUFPS xmmreg|mask|z,xmmreg*,xmmrm128|b32,imm8 [rvmi:fv: evex.nds.128.0f.w0 c6 /r ib ] AVX512VL,AVX512,FUTURE
+VSHUFPS ymmreg|mask|z,ymmreg*,ymmrm256|b32,imm8 [rvmi:fv: evex.nds.256.0f.w0 c6 /r ib ] AVX512VL,AVX512,FUTURE
+VSHUFPS zmmreg|mask|z,zmmreg*,zmmrm512|b32,imm8 [rvmi:fv: evex.nds.512.0f.w0 c6 /r ib ] AVX512,FUTURE
+VSQRTPD xmmreg|mask|z,xmmrm128|b64 [rm:fv: evex.128.66.0f.w1 51 /r ] AVX512VL,AVX512,FUTURE
+VSQRTPD ymmreg|mask|z,ymmrm256|b64 [rm:fv: evex.256.66.0f.w1 51 /r ] AVX512VL,AVX512,FUTURE
+VSQRTPD zmmreg|mask|z,zmmrm512|b64|er [rm:fv: evex.512.66.0f.w1 51 /r ] AVX512,FUTURE
+VSQRTPS xmmreg|mask|z,xmmrm128|b32 [rm:fv: evex.128.0f.w0 51 /r ] AVX512VL,AVX512,FUTURE
+VSQRTPS ymmreg|mask|z,ymmrm256|b32 [rm:fv: evex.256.0f.w0 51 /r ] AVX512VL,AVX512,FUTURE
+VSQRTPS zmmreg|mask|z,zmmrm512|b32|er [rm:fv: evex.512.0f.w0 51 /r ] AVX512,FUTURE
+VSQRTSD xmmreg|mask|z,xmmreg*,xmmrm64|er [rvm:t1s: evex.nds.128.f2.0f.w1 51 /r ] AVX512,FUTURE
+VSQRTSS xmmreg|mask|z,xmmreg*,xmmrm32|er [rvm:t1s: evex.nds.128.f3.0f.w0 51 /r ] AVX512,FUTURE
+VSUBPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 5c /r ] AVX512VL,AVX512,FUTURE
+VSUBPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 5c /r ] AVX512VL,AVX512,FUTURE
+VSUBPD zmmreg|mask|z,zmmreg*,zmmrm512|b64|er [rvm:fv: evex.nds.512.66.0f.w1 5c /r ] AVX512,FUTURE
+VSUBPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.0f.w0 5c /r ] AVX512VL,AVX512,FUTURE
+VSUBPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.0f.w0 5c /r ] AVX512VL,AVX512,FUTURE
+VSUBPS zmmreg|mask|z,zmmreg*,zmmrm512|b32|er [rvm:fv: evex.nds.512.0f.w0 5c /r ] AVX512,FUTURE
+VSUBSD xmmreg|mask|z,xmmreg*,xmmrm64|er [rvm:t1s: evex.nds.128.f2.0f.w1 5c /r ] AVX512,FUTURE
+VSUBSS xmmreg|mask|z,xmmreg*,xmmrm32|er [rvm:t1s: evex.nds.128.f3.0f.w0 5c /r ] AVX512,FUTURE
+VUCOMISD xmmreg,xmmrm64|sae [rm:t1s: evex.128.66.0f.w1 2e /r ] AVX512,FUTURE
+VUCOMISS xmmreg,xmmrm32|sae [rm:t1s: evex.128.0f.w0 2e /r ] AVX512,FUTURE
+VUNPCKHPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 15 /r ] AVX512VL,AVX512,FUTURE
+VUNPCKHPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 15 /r ] AVX512VL,AVX512,FUTURE
+VUNPCKHPD zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 15 /r ] AVX512,FUTURE
+VUNPCKHPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.0f.w0 15 /r ] AVX512VL,AVX512,FUTURE
+VUNPCKHPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.0f.w0 15 /r ] AVX512VL,AVX512,FUTURE
+VUNPCKHPS zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.0f.w0 15 /r ] AVX512,FUTURE
+VUNPCKLPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 14 /r ] AVX512VL,AVX512,FUTURE
+VUNPCKLPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 14 /r ] AVX512VL,AVX512,FUTURE
+VUNPCKLPD zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 14 /r ] AVX512,FUTURE
+VUNPCKLPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.0f.w0 14 /r ] AVX512VL,AVX512,FUTURE
+VUNPCKLPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.0f.w0 14 /r ] AVX512VL,AVX512,FUTURE
+VUNPCKLPS zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.0f.w0 14 /r ] AVX512,FUTURE
+VXORPD xmmreg|mask|z,xmmreg*,xmmrm128|b64 [rvm:fv: evex.nds.128.66.0f.w1 57 /r ] AVX512VL,AVX512DQ,FUTURE
+VXORPD ymmreg|mask|z,ymmreg*,ymmrm256|b64 [rvm:fv: evex.nds.256.66.0f.w1 57 /r ] AVX512VL,AVX512DQ,FUTURE
+VXORPD zmmreg|mask|z,zmmreg*,zmmrm512|b64 [rvm:fv: evex.nds.512.66.0f.w1 57 /r ] AVX512DQ,FUTURE
+VXORPS xmmreg|mask|z,xmmreg*,xmmrm128|b32 [rvm:fv: evex.nds.128.0f.w0 57 /r ] AVX512VL,AVX512DQ,FUTURE
+VXORPS ymmreg|mask|z,ymmreg*,ymmrm256|b32 [rvm:fv: evex.nds.256.0f.w0 57 /r ] AVX512VL,AVX512DQ,FUTURE
+VXORPS zmmreg|mask|z,zmmreg*,zmmrm512|b32 [rvm:fv: evex.nds.512.0f.w0 57 /r ] AVX512DQ,FUTURE
+; MJC PUBLIC END
+
+;# Intel memory protection keys for userspace (PKU aka PKEYs)
+RDPKRU void [ 0f 01 ee] X64,FUTURE
+WRPKRU void [ 0f 01 ef] X64,FUTURE
+
+;# Read Processor ID
+RDPID reg32 [m: f3 0f c7 /7] NOLONG,FUTURE
+RDPID reg64 [m: o64nw f3 0f c7 /7] X64,FUTURE
+RDPID reg32 [m: f3 0f c7 /7] X64,UNDOC,FUTURE
+
+;# New memory instructions
+CLFLUSHOPT mem [m: 66 0f ae /7] FUTURE
+CLWB mem [m: 66 0f ae /6] FUTURE
+; This one was killed before it saw the light of day
+PCOMMIT void [ 66 0f ae f8] FUTURE,UNDOC,OBSOLETE
+
+; AMD Zen v1
+CLZERO void [ 0f 01 fc] FUTURE,AMD
+
+;# Systematic names for the hinting nop instructions
+; These should be last in the file
+HINT_NOP0 rm16 [m: o16 0f 18 /0] P6,UNDOC
+HINT_NOP0 rm32 [m: o32 0f 18 /0] P6,UNDOC
+HINT_NOP0 rm64 [m: o64 0f 18 /0] X64,UNDOC
+HINT_NOP1 rm16 [m: o16 0f 18 /1] P6,UNDOC
+HINT_NOP1 rm32 [m: o32 0f 18 /1] P6,UNDOC
+HINT_NOP1 rm64 [m: o64 0f 18 /1] X64,UNDOC
+HINT_NOP2 rm16 [m: o16 0f 18 /2] P6,UNDOC
+HINT_NOP2 rm32 [m: o32 0f 18 /2] P6,UNDOC
+HINT_NOP2 rm64 [m: o64 0f 18 /2] X64,UNDOC
+HINT_NOP3 rm16 [m: o16 0f 18 /3] P6,UNDOC
+HINT_NOP3 rm32 [m: o32 0f 18 /3] P6,UNDOC
+HINT_NOP3 rm64 [m: o64 0f 18 /3] X64,UNDOC
+HINT_NOP4 rm16 [m: o16 0f 18 /4] P6,UNDOC
+HINT_NOP4 rm32 [m: o32 0f 18 /4] P6,UNDOC
+HINT_NOP4 rm64 [m: o64 0f 18 /4] X64,UNDOC
+HINT_NOP5 rm16 [m: o16 0f 18 /5] P6,UNDOC
+HINT_NOP5 rm32 [m: o32 0f 18 /5] P6,UNDOC
+HINT_NOP5 rm64 [m: o64 0f 18 /5] X64,UNDOC
+HINT_NOP6 rm16 [m: o16 0f 18 /6] P6,UNDOC
+HINT_NOP6 rm32 [m: o32 0f 18 /6] P6,UNDOC
+HINT_NOP6 rm64 [m: o64 0f 18 /6] X64,UNDOC
+HINT_NOP7 rm16 [m: o16 0f 18 /7] P6,UNDOC
+HINT_NOP7 rm32 [m: o32 0f 18 /7] P6,UNDOC
+HINT_NOP7 rm64 [m: o64 0f 18 /7] X64,UNDOC
+HINT_NOP8 rm16 [m: o16 0f 19 /0] P6,UNDOC
+HINT_NOP8 rm32 [m: o32 0f 19 /0] P6,UNDOC
+HINT_NOP8 rm64 [m: o64 0f 19 /0] X64,UNDOC
+HINT_NOP9 rm16 [m: o16 0f 19 /1] P6,UNDOC
+HINT_NOP9 rm32 [m: o32 0f 19 /1] P6,UNDOC
+HINT_NOP9 rm64 [m: o64 0f 19 /1] X64,UNDOC
+HINT_NOP10 rm16 [m: o16 0f 19 /2] P6,UNDOC
+HINT_NOP10 rm32 [m: o32 0f 19 /2] P6,UNDOC
+HINT_NOP10 rm64 [m: o64 0f 19 /2] X64,UNDOC
+HINT_NOP11 rm16 [m: o16 0f 19 /3] P6,UNDOC
+HINT_NOP11 rm32 [m: o32 0f 19 /3] P6,UNDOC
+HINT_NOP11 rm64 [m: o64 0f 19 /3] X64,UNDOC
+HINT_NOP12 rm16 [m: o16 0f 19 /4] P6,UNDOC
+HINT_NOP12 rm32 [m: o32 0f 19 /4] P6,UNDOC
+HINT_NOP12 rm64 [m: o64 0f 19 /4] X64,UNDOC
+HINT_NOP13 rm16 [m: o16 0f 19 /5] P6,UNDOC
+HINT_NOP13 rm32 [m: o32 0f 19 /5] P6,UNDOC
+HINT_NOP13 rm64 [m: o64 0f 19 /5] X64,UNDOC
+HINT_NOP14 rm16 [m: o16 0f 19 /6] P6,UNDOC
+HINT_NOP14 rm32 [m: o32 0f 19 /6] P6,UNDOC
+HINT_NOP14 rm64 [m: o64 0f 19 /6] X64,UNDOC
+HINT_NOP15 rm16 [m: o16 0f 19 /7] P6,UNDOC
+HINT_NOP15 rm32 [m: o32 0f 19 /7] P6,UNDOC
+HINT_NOP15 rm64 [m: o64 0f 19 /7] X64,UNDOC
+HINT_NOP16 rm16 [m: o16 0f 1a /0] P6,UNDOC
+HINT_NOP16 rm32 [m: o32 0f 1a /0] P6,UNDOC
+HINT_NOP16 rm64 [m: o64 0f 1a /0] X64,UNDOC
+HINT_NOP17 rm16 [m: o16 0f 1a /1] P6,UNDOC
+HINT_NOP17 rm32 [m: o32 0f 1a /1] P6,UNDOC
+HINT_NOP17 rm64 [m: o64 0f 1a /1] X64,UNDOC
+HINT_NOP18 rm16 [m: o16 0f 1a /2] P6,UNDOC
+HINT_NOP18 rm32 [m: o32 0f 1a /2] P6,UNDOC
+HINT_NOP18 rm64 [m: o64 0f 1a /2] X64,UNDOC
+HINT_NOP19 rm16 [m: o16 0f 1a /3] P6,UNDOC
+HINT_NOP19 rm32 [m: o32 0f 1a /3] P6,UNDOC
+HINT_NOP19 rm64 [m: o64 0f 1a /3] X64,UNDOC
+HINT_NOP20 rm16 [m: o16 0f 1a /4] P6,UNDOC
+HINT_NOP20 rm32 [m: o32 0f 1a /4] P6,UNDOC
+HINT_NOP20 rm64 [m: o64 0f 1a /4] X64,UNDOC
+HINT_NOP21 rm16 [m: o16 0f 1a /5] P6,UNDOC
+HINT_NOP21 rm32 [m: o32 0f 1a /5] P6,UNDOC
+HINT_NOP21 rm64 [m: o64 0f 1a /5] X64,UNDOC
+HINT_NOP22 rm16 [m: o16 0f 1a /6] P6,UNDOC
+HINT_NOP22 rm32 [m: o32 0f 1a /6] P6,UNDOC
+HINT_NOP22 rm64 [m: o64 0f 1a /6] X64,UNDOC
+HINT_NOP23 rm16 [m: o16 0f 1a /7] P6,UNDOC
+HINT_NOP23 rm32 [m: o32 0f 1a /7] P6,UNDOC
+HINT_NOP23 rm64 [m: o64 0f 1a /7] X64,UNDOC
+HINT_NOP24 rm16 [m: o16 0f 1b /0] P6,UNDOC
+HINT_NOP24 rm32 [m: o32 0f 1b /0] P6,UNDOC
+HINT_NOP24 rm64 [m: o64 0f 1b /0] X64,UNDOC
+HINT_NOP25 rm16 [m: o16 0f 1b /1] P6,UNDOC
+HINT_NOP25 rm32 [m: o32 0f 1b /1] P6,UNDOC
+HINT_NOP25 rm64 [m: o64 0f 1b /1] X64,UNDOC
+HINT_NOP26 rm16 [m: o16 0f 1b /2] P6,UNDOC
+HINT_NOP26 rm32 [m: o32 0f 1b /2] P6,UNDOC
+HINT_NOP26 rm64 [m: o64 0f 1b /2] X64,UNDOC
+HINT_NOP27 rm16 [m: o16 0f 1b /3] P6,UNDOC
+HINT_NOP27 rm32 [m: o32 0f 1b /3] P6,UNDOC
+HINT_NOP27 rm64 [m: o64 0f 1b /3] X64,UNDOC
+HINT_NOP28 rm16 [m: o16 0f 1b /4] P6,UNDOC
+HINT_NOP28 rm32 [m: o32 0f 1b /4] P6,UNDOC
+HINT_NOP28 rm64 [m: o64 0f 1b /4] X64,UNDOC
+HINT_NOP29 rm16 [m: o16 0f 1b /5] P6,UNDOC
+HINT_NOP29 rm32 [m: o32 0f 1b /5] P6,UNDOC
+HINT_NOP29 rm64 [m: o64 0f 1b /5] X64,UNDOC
+HINT_NOP30 rm16 [m: o16 0f 1b /6] P6,UNDOC
+HINT_NOP30 rm32 [m: o32 0f 1b /6] P6,UNDOC
+HINT_NOP30 rm64 [m: o64 0f 1b /6] X64,UNDOC
+HINT_NOP31 rm16 [m: o16 0f 1b /7] P6,UNDOC
+HINT_NOP31 rm32 [m: o32 0f 1b /7] P6,UNDOC
+HINT_NOP31 rm64 [m: o64 0f 1b /7] X64,UNDOC
+HINT_NOP32 rm16 [m: o16 0f 1c /0] P6,UNDOC
+HINT_NOP32 rm32 [m: o32 0f 1c /0] P6,UNDOC
+HINT_NOP32 rm64 [m: o64 0f 1c /0] X64,UNDOC
+HINT_NOP33 rm16 [m: o16 0f 1c /1] P6,UNDOC
+HINT_NOP33 rm32 [m: o32 0f 1c /1] P6,UNDOC
+HINT_NOP33 rm64 [m: o64 0f 1c /1] X64,UNDOC
+HINT_NOP34 rm16 [m: o16 0f 1c /2] P6,UNDOC
+HINT_NOP34 rm32 [m: o32 0f 1c /2] P6,UNDOC
+HINT_NOP34 rm64 [m: o64 0f 1c /2] X64,UNDOC
+HINT_NOP35 rm16 [m: o16 0f 1c /3] P6,UNDOC
+HINT_NOP35 rm32 [m: o32 0f 1c /3] P6,UNDOC
+HINT_NOP35 rm64 [m: o64 0f 1c /3] X64,UNDOC
+HINT_NOP36 rm16 [m: o16 0f 1c /4] P6,UNDOC
+HINT_NOP36 rm32 [m: o32 0f 1c /4] P6,UNDOC
+HINT_NOP36 rm64 [m: o64 0f 1c /4] X64,UNDOC
+HINT_NOP37 rm16 [m: o16 0f 1c /5] P6,UNDOC
+HINT_NOP37 rm32 [m: o32 0f 1c /5] P6,UNDOC
+HINT_NOP37 rm64 [m: o64 0f 1c /5] X64,UNDOC
+HINT_NOP38 rm16 [m: o16 0f 1c /6] P6,UNDOC
+HINT_NOP38 rm32 [m: o32 0f 1c /6] P6,UNDOC
+HINT_NOP38 rm64 [m: o64 0f 1c /6] X64,UNDOC
+HINT_NOP39 rm16 [m: o16 0f 1c /7] P6,UNDOC
+HINT_NOP39 rm32 [m: o32 0f 1c /7] P6,UNDOC
+HINT_NOP39 rm64 [m: o64 0f 1c /7] X64,UNDOC
+HINT_NOP40 rm16 [m: o16 0f 1d /0] P6,UNDOC
+HINT_NOP40 rm32 [m: o32 0f 1d /0] P6,UNDOC
+HINT_NOP40 rm64 [m: o64 0f 1d /0] X64,UNDOC
+HINT_NOP41 rm16 [m: o16 0f 1d /1] P6,UNDOC
+HINT_NOP41 rm32 [m: o32 0f 1d /1] P6,UNDOC
+HINT_NOP41 rm64 [m: o64 0f 1d /1] X64,UNDOC
+HINT_NOP42 rm16 [m: o16 0f 1d /2] P6,UNDOC
+HINT_NOP42 rm32 [m: o32 0f 1d /2] P6,UNDOC
+HINT_NOP42 rm64 [m: o64 0f 1d /2] X64,UNDOC
+HINT_NOP43 rm16 [m: o16 0f 1d /3] P6,UNDOC
+HINT_NOP43 rm32 [m: o32 0f 1d /3] P6,UNDOC
+HINT_NOP43 rm64 [m: o64 0f 1d /3] X64,UNDOC
+HINT_NOP44 rm16 [m: o16 0f 1d /4] P6,UNDOC
+HINT_NOP44 rm32 [m: o32 0f 1d /4] P6,UNDOC
+HINT_NOP44 rm64 [m: o64 0f 1d /4] X64,UNDOC
+HINT_NOP45 rm16 [m: o16 0f 1d /5] P6,UNDOC
+HINT_NOP45 rm32 [m: o32 0f 1d /5] P6,UNDOC
+HINT_NOP45 rm64 [m: o64 0f 1d /5] X64,UNDOC
+HINT_NOP46 rm16 [m: o16 0f 1d /6] P6,UNDOC
+HINT_NOP46 rm32 [m: o32 0f 1d /6] P6,UNDOC
+HINT_NOP46 rm64 [m: o64 0f 1d /6] X64,UNDOC
+HINT_NOP47 rm16 [m: o16 0f 1d /7] P6,UNDOC
+HINT_NOP47 rm32 [m: o32 0f 1d /7] P6,UNDOC
+HINT_NOP47 rm64 [m: o64 0f 1d /7] X64,UNDOC
+HINT_NOP48 rm16 [m: o16 0f 1e /0] P6,UNDOC
+HINT_NOP48 rm32 [m: o32 0f 1e /0] P6,UNDOC
+HINT_NOP48 rm64 [m: o64 0f 1e /0] X64,UNDOC
+HINT_NOP49 rm16 [m: o16 0f 1e /1] P6,UNDOC
+HINT_NOP49 rm32 [m: o32 0f 1e /1] P6,UNDOC
+HINT_NOP49 rm64 [m: o64 0f 1e /1] X64,UNDOC
+HINT_NOP50 rm16 [m: o16 0f 1e /2] P6,UNDOC
+HINT_NOP50 rm32 [m: o32 0f 1e /2] P6,UNDOC
+HINT_NOP50 rm64 [m: o64 0f 1e /2] X64,UNDOC
+HINT_NOP51 rm16 [m: o16 0f 1e /3] P6,UNDOC
+HINT_NOP51 rm32 [m: o32 0f 1e /3] P6,UNDOC
+HINT_NOP51 rm64 [m: o64 0f 1e /3] X64,UNDOC
+HINT_NOP52 rm16 [m: o16 0f 1e /4] P6,UNDOC
+HINT_NOP52 rm32 [m: o32 0f 1e /4] P6,UNDOC
+HINT_NOP52 rm64 [m: o64 0f 1e /4] X64,UNDOC
+HINT_NOP53 rm16 [m: o16 0f 1e /5] P6,UNDOC
+HINT_NOP53 rm32 [m: o32 0f 1e /5] P6,UNDOC
+HINT_NOP53 rm64 [m: o64 0f 1e /5] X64,UNDOC
+HINT_NOP54 rm16 [m: o16 0f 1e /6] P6,UNDOC
+HINT_NOP54 rm32 [m: o32 0f 1e /6] P6,UNDOC
+HINT_NOP54 rm64 [m: o64 0f 1e /6] X64,UNDOC
+HINT_NOP55 rm16 [m: o16 0f 1e /7] P6,UNDOC
+HINT_NOP55 rm32 [m: o32 0f 1e /7] P6,UNDOC
+HINT_NOP55 rm64 [m: o64 0f 1e /7] X64,UNDOC
+HINT_NOP56 rm16 [m: o16 0f 1f /0] P6,UNDOC
+HINT_NOP56 rm32 [m: o32 0f 1f /0] P6,UNDOC
+HINT_NOP56 rm64 [m: o64 0f 1f /0] X64,UNDOC
+HINT_NOP57 rm16 [m: o16 0f 1f /1] P6,UNDOC
+HINT_NOP57 rm32 [m: o32 0f 1f /1] P6,UNDOC
+HINT_NOP57 rm64 [m: o64 0f 1f /1] X64,UNDOC
+HINT_NOP58 rm16 [m: o16 0f 1f /2] P6,UNDOC
+HINT_NOP58 rm32 [m: o32 0f 1f /2] P6,UNDOC
+HINT_NOP58 rm64 [m: o64 0f 1f /2] X64,UNDOC
+HINT_NOP59 rm16 [m: o16 0f 1f /3] P6,UNDOC
+HINT_NOP59 rm32 [m: o32 0f 1f /3] P6,UNDOC
+HINT_NOP59 rm64 [m: o64 0f 1f /3] X64,UNDOC
+HINT_NOP60 rm16 [m: o16 0f 1f /4] P6,UNDOC
+HINT_NOP60 rm32 [m: o32 0f 1f /4] P6,UNDOC
+HINT_NOP60 rm64 [m: o64 0f 1f /4] X64,UNDOC
+HINT_NOP61 rm16 [m: o16 0f 1f /5] P6,UNDOC
+HINT_NOP61 rm32 [m: o32 0f 1f /5] P6,UNDOC
+HINT_NOP61 rm64 [m: o64 0f 1f /5] X64,UNDOC
+HINT_NOP62 rm16 [m: o16 0f 1f /6] P6,UNDOC
+HINT_NOP62 rm32 [m: o32 0f 1f /6] P6,UNDOC
+HINT_NOP62 rm64 [m: o64 0f 1f /6] X64,UNDOC
+HINT_NOP63 rm16 [m: o16 0f 1f /7] P6,UNDOC
+HINT_NOP63 rm32 [m: o32 0f 1f /7] P6,UNDOC
+HINT_NOP63 rm64 [m: o64 0f 1f /7] X64,UNDOC
--- /dev/null
+++ b/src/cmd/as/target/x86/proc.h
@@ -1,0 +1,158 @@
+enum args {
+ AREG_CS = AMAX,
+ AREG_DS,
+ AREG_SS,
+ AREG_ES,
+ AREG_FS,
+ AREG_GS,
+
+ AREG_EFLAGS,
+ AREG_CF,
+ AREG_PF,
+ AREG_AF,
+ AREG_ZF,
+ AREG_SF,
+ AREG_TF,
+ AREG_IF,
+ AREG_DF,
+ AREG_OF,
+ AREG_IOPL,
+ AREG_NT,
+ AREG_RF,
+ AREG_VM,
+ AREG_AC,
+ AREG_VIF,
+ AREG_VIP,
+ AREG_ID,
+
+ AREG_AX,
+ AREG_AL,
+ AREG_AH,
+ AREG_EAX,
+ AREG_RAX,
+
+ AREG_BX,
+ AREG_BL,
+ AREG_BH,
+ AREG_EBX,
+ AREG_RBX,
+
+ AREG_CX,
+ AREG_CL,
+ AREG_CH,
+ AREG_ECX,
+ AREG_RCX,
+
+ AREG_DX,
+ AREG_DL,
+ AREG_DH,
+ AREG_EDX,
+ AREG_RDX,
+
+ AREG_SI,
+ AREG_SIL,
+ AREG_ESI,
+ AREG_RSI,
+ AREG_DI,
+ AREG_DIL,
+ AREG_EDI,
+ AREG_RDI,
+
+ AREG_SP,
+ AREG_SPL,
+ AREG_ESP,
+ AREG_RSP,
+
+ AREG_BP,
+ AREG_BPL,
+ AREG_EBP,
+ AREG_RBP,
+
+ AREG_R0,
+ AREG_MM0,
+ AREG_R1,
+ AREG_MM1,
+ AREG_R2,
+ AREG_MM2,
+ AREG_R3,
+ AREG_MM3,
+ AREG_R4,
+ AREG_MM4,
+ AREG_R5,
+ AREG_MM5,
+ AREG_R6,
+ AREG_MM6,
+ AREG_R7,
+ AREG_MM7,
+
+ AREG_R8,
+ AREG_R8L,
+ AREG_R8W,
+ AREG_R9,
+ AREG_R9L,
+ AREG_R9W,
+ AREG_R10,
+ AREG_R10L,
+ AREG_R10W,
+ AREG_R11,
+ AREG_R11L,
+ AREG_R11W,
+ AREG_R12,
+ AREG_R12L,
+ AREG_R12W,
+ AREG_R13,
+ AREG_R13L,
+ AREG_R13W,
+ AREG_R14,
+ AREG_R14L,
+ AREG_R14W,
+ AREG_R15,
+ AREG_R15L,
+ AREG_R15W,
+
+ AREG_XMM0,
+ AREG_XMM1,
+ AREG_XMM2,
+ AREG_XMM3,
+ AREG_XMM4,
+ AREG_XMM5,
+ AREG_XMM6,
+ AREG_XMM7,
+ AREG_XMM8,
+ AREG_XMM9,
+ AREG_XMM10,
+ AREG_XMM11,
+ AREG_XMM12,
+ AREG_XMM13,
+ AREG_XMM14,
+ AREG_XMM15,
+
+ AREG_YMM0,
+ AREG_YMM1,
+ AREG_YMM2,
+ AREG_YMM3,
+ AREG_YMM4,
+ AREG_YMM5,
+ AREG_YMM6,
+ AREG_YMM7,
+ AREG_YMM8,
+ AREG_YMM9,
+ AREG_YMM10,
+ AREG_YMM11,
+ AREG_YMM12,
+ AREG_YMM13,
+ AREG_YMM14,
+ AREG_YMM15,
+
+ AREG_MXCSR,
+
+ AREG_R8CLASS, /* register class for 8 bit registers in i286 */
+ AREG_R16CLASS, /* register class for 16 bit registers in i286,i386,amd64 */
+ AREG_R32CLASS, /* register class for 32 bit registers in i386,amd64 */
+};
+
+enum class {
+ R8CLASS = 1 << 0,
+ R16CLASS = 1 << 1,
+ R32CLASS = 1 << 2,
+};
--- /dev/null
+++ b/src/cmd/as/target/x86/rules.dat
@@ -1,0 +1,10 @@
+reg8 AREG_R8CLASS
+reg16 AREG_R16CLASS
+reg32 AREG_R32CLASS
+imm8 AIMM8
+imm16 AIMM16
+imm32 AIMM32
+imm64 AIMM64
+\(n\) ADIRECT
+sym ASYM
+string ASTR
--- /dev/null
+++ b/src/cmd/as/target/x86/x86.dat
@@ -1,0 +1,31 @@
+# Tab 16, tabs 16, :set ts=16
+# op args size bytes format cpu
+.DB imm8+ 0 none defb I286,I386,AMD64
+.DEFB imm8+ 0 none defb I286,I386,AMD64
+.BYTE imm8+ 0 none defb I286,I386,AMD64
+.DW imm16+ 0 none defw I286,I386,AMD64
+.DEFW imm16+ 0 none defw I286,I386,AMD64
+.SHORT imm16+ 0 none defw I286,I386,AMD64
+.WORD imm16+ 0 none defw I286
+.WORD imm32+ 0 none defd I386,AMD64
+.DD imm32+ 0 none defd I286,I386,AMD64
+.DEFD imm32+ 0 none defd I286,I386,AMD64
+.LONG imm32+ 0 none defd I286,I386
+.LONG imm64+ 0 none defq AMD64
+.INT imm32+ 0 none defd I386,AMD64
+.INT imm16+ 0 none defd I286
+.DQ imm64+ 0 none defq I286,I386,AMD64
+.DEFQ imm64+ 0 none defq I286,I386,AMD64
+.EQU imm16 0 none equ I286
+.EQU imm32 0 none equ I386
+.EQU imm64 0 none equ AMD64
+NOP none 1 0x90 noargs I286,I386,AMD64
+RET none 1 0xc3 noargs I286,I386,AMD64
+
+
+# 8 bit arithmetic operations
+ADDB reg8,reg8 2 0x00 reg8_reg8 I286,I386,AMD64
+ADDB imm8,reg8 3 0x80 imm8_reg8 I286,I386,AMD64
+ADDW reg16,reg16 2 0x01 reg16_reg16 I286
+ADDW reg16,reg16 3 0x66,0x01 reg16_reg16 I386,AMD64
+ADDL reg32,reg32 2 0x01 reg32_reg32 I386,AMD64
--- /dev/null
+++ b/src/cmd/as/target/z80.mk
@@ -1,0 +1,10 @@
+Z80_OBJ = $(OBJS) \
+ target/x80/z80tbl.o \
+ target/x80/z80.o \
+ target/x80/ins.o \
+
+target/x80/z80tbl.c: target/x80/x80.dat target/x80/rules.dat
+ ./mktbl -f x80 -c z80
+
+$(LIBEXEC)/as-z80: $(OBJ) $(Z80_OBJ)
+ $(CC) $(SCC_LDFLAGS) $(Z80_OBJ) -lscc -o $@
--- /dev/null
+++ b/src/cmd/cc1/Makefile
@@ -1,0 +1,38 @@
+.POSIX:
+
+PROJECTDIR = ../../..
+include $(PROJECTDIR)/scripts/rules.mk
+
+OBJS = types.o \
+ decl.o \
+ lex.o \
+ error.o \
+ symbol.o \
+ main.o \
+ expr.o \
+ code.o \
+ stmt.o \
+ cpp.o \
+ fold.o \
+ init.o \
+ builtin.o \
+
+TARGET = $(LIBEXEC)/cc1-amd64-sysv \
+ $(LIBEXEC)/cc1-arm64-sysv \
+ $(LIBEXEC)/cc1-i386-sysv \
+ $(LIBEXEC)/cc1-z80-scc \
+
+all: $(TARGET)
+
+$(TARGET): $(LIBDIR)/libscc.a
+
+dep: inc-dep
+
+clean:
+ rm -f target/*/*.o
+
+include target/amd64-sysv/arch.mk
+include target/arm64-sysv/arch.mk
+include target/i386-sysv/arch.mk
+include target/z80-scc/arch.mk
+include deps.mk
--- /dev/null
+++ b/src/cmd/cc1/TODO
@@ -1,0 +1,14 @@
+* Implement bitfields
+* Rewrite error recovery code, and ensure correct state after recovery
+* Parse correctly all integer and float constants
+* Add C99 features (almost all the new features of C99 are missed)
+* Add correct emit for any kind of constant
+* Add warning when some ANSI limit is violated.
+* Free memory in emit after some error happened.
+* Rewrite initializers to deal with the idea of "current object"
+* Add some test about pointer airthmetic.
+* Merge all the definitions of the same string
+* Do not assign identifierss until symbols are emitted. This change will
+ avoid identifiers that are not emitted.
+* Fix assignation abbreviations. They fail whe lhs type is smaller than
+ the type in rhs
--- /dev/null
+++ b/src/cmd/cc1/builtin.c
@@ -1,0 +1,121 @@
+static char sccsid[] = "@(#) ./cc1/builtin.c";
+
+#include <stdio.h>
+
+#include <scc/scc.h>
+#include "cc1.h"
+
+static Node *
+builtin_va_arg(Symbol *sym)
+{
+ Node *np, *ap;
+ Type *tp;
+
+ ap = assign();
+ expect(',');
+ tp = typename();
+
+ if (!valid_va_list(ap->type)) {
+ errorp("incorrect parameters for va_arg");
+ goto error;
+ }
+ if (tp == booltype ||
+ tp == chartype || tp == uchartype || tp == schartype ||
+ tp == shortype || tp == ushortype) {
+ warn("bool, char and short are promoted to int when passed through '...'");
+ tp = (tp->prop & TSIGNED) ? inttype : uinttype;
+ }
+
+ np = node(OBUILTIN, tp, ap, NULL);
+ np->sym = sym;
+ return np;
+
+error:
+ return constnode(zero);
+}
+
+static Node *
+builtin_va_copy(Symbol *sym)
+{
+ Node *np, *src, *dst;
+
+ dst = assign();
+ expect(',');
+ src = assign();
+
+ if (!valid_va_list(dst->type) || !valid_va_list(src->type)) {
+ errorp("incorrect parameters for va_copy");
+ return constnode(zero);
+ }
+
+ np = node(OBUILTIN, voidtype, dst, src);
+ np->sym = sym;
+ return np;
+}
+
+static Node *
+builtin_va_start(Symbol *sym)
+{
+ Node *np, *ap, *last;
+ Symbol **p;
+ Type *tp;
+
+ ap = assign();
+ expect(',');
+ last = assign();
+ if (last->op != OSYM)
+ goto error;
+
+ if (!valid_va_list(ap->type) || !(last->sym->flags&SDECLARED))
+ goto error;
+
+ for (p = curfun->u.pars; p && *p != last->sym; ++p)
+ ;
+ if (!p || *p == NULL || p[1] == NULL || p[1]->type != ellipsistype)
+ warn("second parameter of 'va_start' not last named argument");
+
+ tp = last->type;
+ if (tp == booltype ||
+ tp == chartype || tp == uchartype || tp == schartype ||
+ tp == shortype || tp == ushortype) {
+ warn("last parameter before '...' must not be bool, char or short");
+ }
+
+ np = node(OBUILTIN, voidtype, ap, last);
+ np->sym = sym;
+ return np;
+
+error:
+ errorp("incorrect parameters for va_start");
+ return constnode(zero);
+}
+
+static Node *
+builtin_va_end(Symbol *sym)
+{
+ Node *ap, *np;
+
+ ap = assign();
+
+ if (!valid_va_list(ap->type)) {
+ errorp("incorrect parameters for va_end");
+ return constnode(zero);
+ }
+
+ np = node(OBUILTIN, voidtype, ap, NULL);
+ np->sym = sym;
+ return np;
+}
+
+void
+ibuilts(void)
+{
+ struct builtin built[] = {
+ {"__builtin_va_arg", builtin_va_arg},
+ {"__builtin_va_copy", builtin_va_copy},
+ {"__builtin_va_start", builtin_va_start},
+ {"__builtin_va_end", builtin_va_end},
+ {NULL}
+ };
+ builtins(built);
+}
--- /dev/null
+++ b/src/cmd/cc1/cc1.h
@@ -1,0 +1,496 @@
+#define INPUTSIZ LINESIZ
+
+#define GLOBALCTX 0
+#define PARAMCTX 1
+
+#define NR_USWITCHES 20
+
+/*
+ * Definition of enumerations
+ */
+enum {
+ NOALLOC,
+ ALLOC
+};
+
+enum typeprops {
+ TDEFINED = 1 << 0, /* type defined */
+ TSIGNED = 1 << 1, /* signedness of the type */
+ TINTEGER = 1 << 2, /* the type is INT of enum */
+ TARITH = 1 << 3, /* the type is INT, ENUM or FLOAT */
+ TAGGREG = 1 << 4, /* the type is struct or union */
+ TK_R = 1 << 5, /* this is a K&R-function */
+ TELLIPSIS= 1 << 6, /* this function has an ellipsis par */
+ TFUNDEF = 1 << 7, /* function definition */
+};
+
+enum inputtype {
+ IMACRO = 1 << 0, /* macro expansion type */
+ IFILE = 1 << 1, /* input file type */
+ ISTDIN = 1 << 2, /* stdin type */
+ IEOF = 1 << 3, /* EOF mark */
+ ITYPE = IMACRO | IFILE | ISTDIN,
+};
+
+/* data type letters */
+enum ns {
+ L_INT8 = 'C',
+ L_INT16 = 'I',
+ L_INT32 = 'W',
+ L_INT64 = 'Q',
+ L_UINT8 = 'K',
+ L_UINT16 = 'N',
+ L_UINT32 = 'Z',
+ L_UINT64 = 'O',
+ L_BOOL = 'B',
+
+ L_FLOAT = 'J',
+ L_DOUBLE = 'D',
+ L_LDOUBLE = 'H',
+
+ L_ELLIPSIS = 'E',
+ L_VOID = '0',
+ L_POINTER = 'P',
+ L_FUNCTION = 'F',
+ L_ARRAY = 'V',
+ L_UNION = 'U',
+ L_STRUCT = 'S',
+ L_VA_ARG = '1',
+};
+
+/* recovery points */
+enum {
+ END_DECL,
+ END_LDECL,
+ END_COMP,
+ END_COND
+};
+
+/* type constructors */
+enum typeop {
+ FTN = 1,
+ PTR,
+ ARY,
+ KRFTN
+};
+
+/* namespaces */
+enum namespaces {
+ NS_DUMMY,
+ NS_IDEN,
+ NS_TAG,
+ NS_LABEL,
+ NS_CPP,
+ NS_KEYWORD,
+ NS_CPPCLAUSES,
+ NS_STRUCTS
+};
+
+/* symbol flags */
+enum {
+ SAUTO = 1 << 0,
+ SREGISTER = 1 << 1,
+ SDECLARED = 1 << 2,
+ SFIELD = 1 << 3,
+ SEXTERN = 1 << 4,
+ SUSED = 1 << 5,
+ SCONSTANT = 1 << 6,
+ SGLOBAL = 1 << 7,
+ SPRIVATE = 1 << 8,
+ SLOCAL = 1 << 9,
+ SEMITTED = 1 << 10,
+ SDEFINED = 1 << 11,
+ SSTRING = 1 << 12,
+ STYPEDEF = 1 << 13,
+ SINITLST = 1 << 14,
+ SHASINIT = 1 << 15
+};
+
+/* node flags */
+enum {
+ NLVAL = 1 << 0,
+ NCONST = 1 << 1,
+ NEFFECT = 1 << 2
+};
+
+/* lexer mode, compiler or preprocessor directive */
+enum {
+ CCMODE,
+ CPPMODE
+};
+
+/* input tokens */
+enum tokens {
+ CONST = 1 << 0, /* type qualifier tokens are used as flags */
+ RESTRICT = 1 << 1,
+ VOLATILE = 1 << 2,
+ INLINE = 1 << 3,
+ TQUALIFIER = 1 << 7, /* this value is picked outside of ASCII range */
+ TYPE,
+ IDEN,
+ SCLASS,
+ CONSTANT,
+ STRING,
+ SIZEOF,
+ INDIR,
+ INC,
+ DEC,
+ SHL,
+ SHR,
+ LE,
+ GE,
+ EQ,
+ NE,
+ AND,
+ OR,
+ MUL_EQ,
+ DIV_EQ,
+ MOD_EQ,
+ ADD_EQ,
+ SUB_EQ,
+ AND_EQ,
+ XOR_EQ,
+ OR_EQ,
+ SHL_EQ,
+ SHR_EQ,
+ ELLIPSIS,
+ CASE,
+ DEFAULT,
+ IF,
+ ELSE,
+ SWITCH,
+ WHILE,
+ DO,
+ FOR,
+ GOTO,
+ VOID,
+ FLOAT,
+ INT,
+ BOOL,
+ VA_LIST,
+ STRUCT,
+ UNION,
+ CHAR,
+ DOUBLE,
+ SHORT,
+ LONG,
+ LLONG,
+ COMPLEX,
+ TYPEDEF,
+ EXTERN,
+ STATIC,
+ AUTO,
+ REGISTER,
+ ENUM,
+ TYPEIDEN,
+ UNSIGNED,
+ SIGNED,
+ CONTINUE,
+ BREAK,
+ RETURN,
+ DEFINE,
+ INCLUDE,
+ LINE,
+ PRAGMA,
+ ERROR,
+ IFDEF,
+ ELIF,
+ IFNDEF,
+ UNDEF,
+ ENDIF,
+ BUILTIN,
+ EOFTOK
+};
+
+/* operations */
+enum op {
+ OADD,
+ OMUL,
+ OSUB,
+ OINC,
+ ODEC,
+ ODIV,
+ OMOD,
+ OSHL,
+ OSHR,
+ OBAND,
+ OBXOR,
+ OBOR,
+ OSNEG,
+ ONEG,
+ OCPL,
+ OAND,
+ OOR,
+ OEQ,
+ ONE,
+ OLT,
+ OGE,
+ OLE,
+ OGT,
+ OASSIGN,
+ OA_MUL,
+ OA_DIV,
+ OA_MOD,
+ OA_ADD,
+ OA_SUB,
+ OA_SHL,
+ OA_SHR,
+ OA_AND,
+ OA_XOR,
+ OA_OR,
+ OADDR,
+ OCOMMA,
+ OCAST,
+ OPTR,
+ OSYM,
+ OASK,
+ OCOLON,
+ OFIELD,
+ OLABEL,
+ ODEFAULT,
+ OCASE,
+ OJUMP,
+ OBRANCH,
+ OEXPR,
+ OEFUN,
+ OELOOP,
+ OBLOOP,
+ OFUN,
+ OPAR,
+ OCALL,
+ OCALLE,
+ ORET,
+ ODECL,
+ OBSWITCH,
+ OESWITCH,
+ OINIT,
+ OBUILTIN,
+ OTYP,
+};
+
+/*
+ * Definition of structures
+ */
+typedef struct type Type;
+typedef struct symbol Symbol;
+typedef struct swtch Switch;
+typedef struct node Node;
+typedef struct input Input;
+
+struct limits {
+ union {
+ TUINT i;
+ TFLOAT f;
+ } max;
+ union {
+ TUINT i;
+ TFLOAT f;
+ } min;
+};
+
+struct builtin {
+ char *str;
+ Node *(*fun)(Symbol *);
+};
+
+struct keyword {
+ char *str;
+ unsigned char token, value;
+};
+
+struct type {
+ unsigned char op; /* type builder operator */
+ unsigned char ns; /* namespace for struct members */
+ short id; /* type id, used in dcls */
+ char letter; /* letter of the type */
+ unsigned char prop; /* type properties */
+ unsigned char align; /* align of the type */
+ unsigned long size; /* sizeof the type */
+ Type *type; /* base type */
+ Symbol *tag; /* symbol of the strug tag */
+ union {
+ Type **pars; /* Function type parameters */
+ Symbol **fields; /* fields of aggregate type */
+ } p;
+ union {
+ unsigned char rank; /* convertion rank */
+ TINT elem; /* number of type parameters */
+ } n;
+ Type *next; /* local list pointer */
+ Type *h_next; /* hash collision list */
+};
+
+struct symbol {
+ unsigned char ctx;
+ unsigned char hide;
+ char ns;
+ unsigned short id;
+ unsigned short flags;
+ char *name;
+ Type *type;
+ unsigned char token;
+ union {
+ TINT i;
+ TUINT u;
+ TFLOAT f;
+ char *s;
+ unsigned char token;
+ Node **init;
+ Symbol **pars;
+ Node *(*fun)(Symbol *);
+ } u;
+ struct symbol *next;
+ struct symbol *hash;
+};
+
+struct node {
+ unsigned char op;
+ unsigned char flags;
+ Type *type;
+ Symbol *sym;
+ struct node *left, *right;
+};
+
+struct swtch {
+ short nr;
+ char hasdef;
+};
+
+struct yystype {
+ Symbol *sym;
+ unsigned char token;
+};
+
+#ifdef stdin
+struct input {
+ char flags;
+ unsigned lineno;
+ char *filenam;
+ FILE *fp;
+ Symbol *hide;
+ char *line, *begin, *p;
+ struct input *next;
+};
+#endif
+
+/* error.c */
+extern void error(char *fmt, ...);
+extern void warn(char *fmt, ...);
+extern void unexpected(void);
+extern void errorp(char *fmt, ...);
+extern void cpperror(char *fmt, ...);
+extern Type *deftype(Type *tp);
+
+/* types.c */
+extern int eqtype(Type *tp1, Type *tp2, int eqflag);
+extern Type *ctype(int type, int sign, int size);
+extern Type *mktype(Type *tp, int op, TINT nelem, Type *data[]);
+extern Type *duptype(Type *base);
+extern struct limits *getlimits(Type *tp);
+extern void typesize(Type *tp);
+extern void flushtypes(void);
+
+/* symbol.c */
+extern void dumpstab(Symbol **tbl, char *msg);
+extern Symbol *lookup(int ns, char *name, int alloc);
+extern Symbol *nextsym(Symbol *sym, int ns);
+extern Symbol *install(int ns, Symbol *sym);
+extern Symbol *newsym(int ns, char *name);
+extern void pushctx(void), popctx(void);
+extern void killsym(Symbol *sym);
+extern Symbol *newlabel(void);
+extern void keywords(struct keyword *key, int ns);
+extern void builtins(struct builtin *builts);
+extern Symbol *newstring(char *s, size_t len);
+extern unsigned newid(void);
+
+/* stmt.c */
+extern void compound(Symbol *lbreak, Symbol *lcont, Switch *sw);
+
+/* decl.c */
+extern Type *typename(void);
+extern void decl(void);
+
+/* lex.c */
+extern int ahead(void);
+extern int next(void);
+extern void expect(int tok);
+extern void discard(void);
+extern void addinput(char *fname, Symbol *hide, char *buffer);
+extern void delinput(void);
+extern void setsafe(int type);
+extern void ilex(void);
+extern void setloc(char *fname, unsigned line);
+#define accept(t) ((yytoken == (t)) ? next() : 0)
+
+/* code.c */
+extern void prtree(Node *np);
+extern void emit(int, void *);
+extern Node *node(int op, Type *tp, Node *left, Node *rigth);
+extern Node *varnode(Symbol *sym);
+extern Node *constnode(Symbol *sym);
+extern Node *sizeofnode(Type *tp);
+extern void freetree(Node *np);
+extern void icode(void);
+#define BTYPE(np) ((np)->type->op)
+
+/* fold.c */
+extern Node *simplify(Node *np);
+extern TUINT ones(int nbytes);
+
+/* expr.c */
+extern Node *decay(Node *), *negate(Node *np), *assign(void);
+extern Node *convert(Node *np, Type *tp1, int iscast);
+extern Node *constexpr(void), *condexpr(int neg), *expr(void);
+extern int isnodecmp(int op);
+extern int negop(int op);
+extern int cmpnode(Node *np, TUINT val);
+
+/* init.c */
+extern void initializer(Symbol *sym, Type *tp);
+extern Node *initlist(Type *tp);
+
+/* cpp.c */
+extern void icpp(void);
+extern int cpp(void);
+extern int expand(char *begin, Symbol *sym);
+extern void incdir(char *dir);
+extern void outcpp(void);
+extern void defdefine(char *macro, char *val, char *source);
+extern void undefmacro(char *s);
+extern void ppragmaln(void);
+
+/* builtin.c */
+extern void ibuilts(void);
+
+/* arch.c */
+extern void iarch(void);
+extern int valid_va_list(Type *tp);
+
+/*
+ * Definition of global variables
+ */
+extern struct yystype yylval;
+extern char yytext[];
+extern int yytoken;
+extern unsigned short yylen;
+extern int disexpand;
+extern unsigned cppctx;
+extern Input *input;
+extern int lexmode, namespace;
+extern int onlycpp, onlyheader;
+extern unsigned curctx;
+extern Symbol *curfun, *zero, *one;
+extern char *infile;
+extern unsigned lineno;
+extern char filenam[];
+
+extern Type *voidtype, *pvoidtype, *booltype,
+ *uchartype, *chartype, *schartype,
+ *uinttype, *inttype,
+ *sizettype, *pdifftype,
+ *ushortype, *shortype,
+ *longtype, *ulongtype,
+ *ullongtype, *llongtype,
+ *floattype, *doubletype, *ldoubletype,
+ *ellipsistype, *va_list_type, *va_type;
--- /dev/null
+++ b/src/cmd/cc1/code.c
@@ -1,0 +1,550 @@
+static char sccsid[] = "@(#) ./cc1/code.c";
+#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+
+#include <scc/scc.h>
+#include "cc1.h"
+
+static void emitbin(int, void *),
+ emitcast(int, void *),
+ emitsym(int, void *),
+ emitexp(int, void *),
+ emitsymid(int, void *),
+ emittext(int, void *),
+ emitfun(int, void *),
+ emitdcl(int, void *),
+ emitinit(int, void *),
+ emittype(int, void *),
+ emitbuilt(int, void *);
+
+char *optxt[] = {
+ [OADD] = "+",
+ [OSUB] = "-",
+ [OMUL] = "*",
+ [OINC] = ":i",
+ [ODEC] = ":d",
+ [OPTR] = "@",
+ [OMOD] = "%",
+ [ODIV] = "/",
+ [OSHL] = "l",
+ [OSHR] = "r",
+ [OLT] = "<",
+ [OGT] = ">",
+ [OGE] = "]",
+ [OLE] = "[",
+ [OEQ] = "=",
+ [ONE] = "!",
+ [OBAND] = "&",
+ [OBXOR] = "^",
+ [OBOR] = "|",
+ [OASSIGN] = ":",
+ [OA_MUL] = ":*",
+ [OA_DIV] = ":/",
+ [OA_MOD] = ":%",
+ [OA_ADD] = ":+",
+ [OA_SUB] = ":-",
+ [OA_SHL] = ":l",
+ [OA_SHR] = ":r",
+ [OA_AND] = ":&",
+ [OA_XOR] = ":^",
+ [OA_OR] = ":|",
+ [OADDR] = "'",
+ [OSNEG] = "_",
+ [ONEG] = "n",
+ [OCPL] = "~",
+ [OAND] = "a",
+ [OOR] = "o",
+ [OASK] = "?",
+ [OCOMMA] = ",",
+ [OLABEL] = "L%d\n",
+ [ODEFAULT] = "\tf\tL%d\n",
+ [OBSWITCH] = "\ts",
+ [OESWITCH] = "\tt\tL%d\n",
+ [OCASE] = "\tv\tL%d",
+ [OJUMP] = "\tj\tL%d\n",
+ [OBRANCH] = "\ty\tL%d",
+ [OEFUN] = "}\n",
+ [OELOOP] = "\tb\n",
+ [OBLOOP] = "\te\n",
+ [ORET] = "\th",
+ [OPAR] = "p",
+ [OCALL] = "c",
+ [OCALLE] = "z",
+ [OFIELD] = "."
+};
+
+void (*opcode[])(int, void *) = {
+ [OADD] = emitbin,
+ [OSUB] = emitbin,
+ [OMUL] = emitbin,
+ [OINC] = emitbin,
+ [ODEC] = emitbin,
+ [OPTR] = emitbin,
+ [OMOD] = emitbin,
+ [ODIV] = emitbin,
+ [OSHL] = emitbin,
+ [OSHR] = emitbin,
+ [OLT] = emitbin,
+ [OGT] = emitbin,
+ [OGE] = emitbin,
+ [OLE] = emitbin,
+ [OEQ] = emitbin,
+ [ONE] = emitbin,
+ [OBAND] = emitbin,
+ [OBXOR] = emitbin,
+ [OBOR] = emitbin,
+ [OASSIGN] = emitbin,
+ [OA_MUL] = emitbin,
+ [OA_DIV] = emitbin,
+ [OA_MOD] = emitbin,
+ [OA_ADD] = emitbin,
+ [OA_SUB] = emitbin,
+ [OA_SHL] = emitbin,
+ [OA_SHR] = emitbin,
+ [OA_AND] = emitbin,
+ [OA_XOR] = emitbin,
+ [OA_OR] = emitbin,
+ [OADDR] = emitbin,
+ [OSNEG] = emitbin,
+ [ONEG] = emitbin,
+ [OCPL] = emitbin,
+ [OAND] = emitbin,
+ [OOR] = emitbin,
+ [OCOMMA] = emitbin,
+ [OCAST] = emitcast,
+ [OSYM] = emitsym,
+ [OASK] = emitbin,
+ [OCOLON] = emitbin,
+ [OFIELD]= emitbin,
+ [OEXPR] = emitexp,
+ [OLABEL] = emitsymid,
+ [ODEFAULT] = emitsymid,
+ [OCASE] = emitsymid,
+ [OJUMP] = emitsymid,
+ [OBRANCH] = emitsymid,
+ [OEFUN] = emittext,
+ [OELOOP] = emittext,
+ [OBLOOP] = emittext,
+ [OFUN] = emitfun,
+ [ORET] = emittext,
+ [ODECL] = emitdcl,
+ [OBSWITCH] = emittext,
+ [OESWITCH] = emitsymid,
+ [OPAR] = emitbin,
+ [OCALL] = emitbin,
+ [OCALLE] = emitbin,
+ [OINIT] = emitinit,
+ [OBUILTIN] = emitbuilt,
+ [OTYP] = emittype,
+};
+
+static FILE *outfp;
+
+void
+icode(void)
+{
+ outfp = stdout;
+}
+
+void
+freetree(Node *np)
+{
+ if (!np)
+ return;
+ freetree(np->left);
+ freetree(np->right);
+ free(np);
+}
+
+static void
+emitnode(Node *np)
+{
+ if (np)
+ (*opcode[np->op])(np->op, np);
+}
+
+void
+prtree(Node *np)
+{
+ outfp = stderr;
+ fputs("DBG prtree", outfp);
+ emitnode(np);
+ putc('\n', outfp);
+ outfp = stdout;
+}
+
+void
+emit(int op, void *arg)
+{
+ extern int failure;
+
+ if (failure || onlycpp || onlyheader)
+ return;
+ (*opcode[op])(op, arg);
+}
+
+static void
+emitvar(Symbol *sym)
+{
+ int c;
+ short flags = sym->flags;
+
+ if (flags & SLOCAL)
+ c = 'T';
+ else if (flags & SPRIVATE)
+ c = 'Y';
+ else if (flags & SGLOBAL)
+ c = 'G';
+ else if (flags & SREGISTER)
+ c = 'R';
+ else if (flags & SFIELD)
+ c = 'M';
+ else if (flags & SEXTERN)
+ c = 'X';
+ else
+ c = 'A';
+ fprintf(outfp, "%c%u", c, sym->id);
+}
+
+static void
+emitconst(Node *np)
+{
+ Symbol *sym = np->sym;
+ Type *tp = np->type;
+ TUINT u;
+
+ switch (tp->op) {
+ case PTR:
+ case INT:
+ case ENUM:
+ u = (tp->prop & TSIGNED) ? (TUINT) sym->u.i : sym->u.u;
+ fprintf(outfp,
+ "#%c%llX",
+ np->type->letter,
+ (long long) u & ones(tp->size));
+ break;
+ default:
+ abort();
+ }
+}
+
+static void
+emitsym(int op, void *arg)
+{
+ Node *np = arg;
+
+ if ((np->sym->flags & SINITLST) == 0) {
+ /*
+ * When we have a compound literal we are going
+ * to call to emitnode for every element of it,
+ * and it means that we will have two '\t'
+ * for the first element
+ */
+ putc('\t', outfp);
+ }
+ (np->flags & NCONST) ? emitconst(np) : emitvar(np->sym);
+}
+
+static void
+emitletter(Type *tp)
+{
+ int letter;
+
+ letter = (tp->prop&TELLIPSIS) ? 'E' : tp->letter;
+ putc(letter, outfp);
+ switch (tp->op) {
+ case ARY:
+ case STRUCT:
+ case UNION:
+ fprintf(outfp, "%u", tp->id);
+ }
+}
+
+static void
+emittype(int op, void *arg)
+{
+ TINT n;
+ Symbol **sp;
+ char *tag;
+ Type *tp = arg;
+
+ if (!(tp->prop & TDEFINED))
+ return;
+
+ switch (tp->op) {
+ case ARY:
+ emitletter(tp);
+ putc('\t', outfp);
+ emitletter(tp->type);
+ fprintf(outfp,
+ "\t#%c%llX\n",
+ sizettype->letter, (long long) tp->n.elem);
+ return;
+ case UNION:
+ case STRUCT:
+ emitletter(tp);
+ tag = tp->tag->name;
+ fprintf(outfp,
+ "\t\"%s\t#%c%lX\t#%c%X\n",
+ (tag) ? tag : "",
+ sizettype->letter,
+ tp->size,
+ sizettype->letter,
+ tp->align);
+ n = tp->n.elem;
+ for (sp = tp->p.fields; n-- > 0; ++sp)
+ emit(ODECL, *sp);
+ break;
+ case PTR:
+ case FTN:
+ case ENUM:
+ return;
+ default:
+ abort();
+ }
+}
+
+static void
+emitstring(Symbol *sym, Type *tp)
+{
+ char *bp, *s, *lim;
+ int n;
+
+ bp = sym->u.s;
+ lim = &sym->u.s[tp->n.elem];
+ while (bp < lim) {
+ s = bp;
+ while (bp < lim && isprint(*bp))
+ ++bp;
+ if ((n = bp - s) > 1)
+ fprintf(outfp, "\t#\"%.*s\n", n, s);
+ else
+ bp = s;
+ if (bp == lim)
+ break;
+ do {
+ fprintf(outfp,
+ "\t#%c%02X\n",
+ chartype->letter, (*bp++) & 0xFF);
+ } while (bp < lim && !isprint(*bp));
+ }
+}
+
+static void
+emitdesig(Node *np, Type *tp)
+{
+ Symbol *sym;
+ size_t n; /* TODO: This should be SIZET */
+ Node *aux;
+ Type *p;
+
+ if (!np) {
+ sym = NULL;
+ } else {
+ if (!np->sym)
+ goto emit_expression;
+ sym = np->sym;
+ if (sym->flags & SSTRING) {
+ emitstring(sym, tp);
+ return;
+ }
+ if ((sym->flags & SINITLST) == 0)
+ goto emit_expression;
+ }
+
+ switch (tp->op) {
+ case PTR:
+ case INT:
+ case ENUM:
+ aux = (sym) ? *sym->u.init : convert(constnode(zero), tp, 0);
+ emitexp(OEXPR, aux);
+ break;
+ case UNION:
+ n = tp->n.elem-1;
+ aux = (sym) ? sym->u.init[0] : NULL;
+ emitdesig(aux, aux->type);
+ break;
+ case STRUCT:
+ case ARY:
+ for (n = 0; n < tp->n.elem; ++n) {
+ aux = (sym) ? sym->u.init[n] : NULL;
+ p = (tp->op == ARY) ? tp->type : tp->p.fields[n]->type;
+ emitdesig(aux, p);
+ }
+ break;
+ default:
+ abort();
+ }
+
+ if (sym) {
+ free(sym->u.init);
+ sym->u.init = NULL;
+ }
+ freetree(np);
+ return;
+
+emit_expression:
+ emitexp(OEXPR, np);
+}
+
+static void
+emitinit(int op, void *arg)
+{
+ Node *np = arg;
+
+ fputs("\t(\n", outfp);
+ emitdesig(np, np->type);
+ fputs(")\n", outfp);
+}
+
+static void
+emitdcl(int op, void *arg)
+{
+ Symbol *sym = arg;
+
+ if (sym->flags & SEMITTED)
+ return;
+ emitvar(sym);
+ putc('\t', outfp);
+ if (sym->type->op == FTN) {
+ emitletter(sym->type->type);
+ putc('\t', outfp);
+ }
+ emitletter(sym->type);
+ fprintf(outfp, "\t\"%s", (sym->name) ? sym->name : "");
+ if (sym->flags & SFIELD)
+ fprintf(outfp, "\t#%c%llX", sizettype->letter, sym->u.i);
+ sym->flags |= SEMITTED;
+ if ((sym->flags & SHASINIT) == 0)
+ putc('\n', outfp);
+}
+
+static void
+emitcast(int op, void *arg)
+{
+ Node *np = arg, *lp = np->left;
+
+ emitnode(lp);
+ if (np->type != voidtype)
+ fprintf(outfp, "\tg%c", np->type->letter);
+}
+
+static void
+emitbin(int op, void *arg)
+{
+ Node *np = arg;
+ char *s;
+
+ emitnode(np->left);
+ emitnode(np->right);
+ if ((s = optxt[op]) != NULL) { /* do not print in OCOLON case */
+ fprintf(outfp, "\t%s", s);
+ emitletter(np->type);
+ }
+}
+
+static void
+emitbuilt(int op, void *arg)
+{
+ Node *np = arg;
+
+ emitnode(np->left);
+ emitnode(np->right);
+ fprintf(outfp, "\t\"%s\tm", np->sym->name);
+ emitletter(np->type);
+}
+
+
+static void
+emitexp(int op, void *arg)
+{
+ Node *np = arg;
+
+ emitnode(np);
+ putc('\n', outfp);
+ freetree(np);
+}
+
+static void
+emitfun(int op, void *arg)
+{
+ Symbol *sym = arg, **sp;
+
+ emitdcl(op, arg);
+ fputs("{\n", outfp);
+
+ for (sp = sym->u.pars; sp && *sp; ++sp)
+ emit(ODECL, *sp);
+ fputs("\\\n", outfp);
+}
+
+static void
+emittext(int op, void *arg)
+{
+ fputs(optxt[op], outfp);
+}
+
+static void
+emitsymid(int op, void *arg)
+{
+ Symbol *sym = arg;
+ fprintf(outfp, optxt[op], sym->id);
+}
+
+Node *
+node(int op, Type *tp, Node *lp, Node *rp)
+{
+ Node *np;
+
+ np = xmalloc(sizeof(*np));
+ np->op = op;
+ np->type = tp;
+ np->sym = NULL;
+ np->flags = 0;
+ np->left = lp;
+ np->right = rp;
+
+ if (lp)
+ np->flags |= lp->flags & NEFFECT;
+ if (rp)
+ np->flags |= rp->flags & NEFFECT;
+ return np;
+}
+
+Node *
+varnode(Symbol *sym)
+{
+ Node *np;
+ Type *tp = sym->type;
+
+ np = node(OSYM, sym->type, NULL, NULL);
+ np->type = sym->type;
+ np->flags = (tp->op != FTN && tp->op != ARY) ? NLVAL : 0;
+ np->sym = sym;
+ return np;
+}
+
+Node *
+constnode(Symbol *sym)
+{
+ Node *np;
+
+ np = node(OSYM, sym->type, NULL, NULL);
+ np->type = sym->type;
+ np->flags = NCONST;
+ np->sym = sym;
+ return np;
+}
+
+Node *
+sizeofnode(Type *tp)
+{
+ Symbol *sym;
+
+ sym = newsym(NS_IDEN, NULL);
+ sym->type = sizettype;
+ sym->u.i = tp->size;
+ return constnode(sym);
+}
--- /dev/null
+++ b/src/cmd/cc1/cpp.c
@@ -1,0 +1,839 @@
+static char sccsid[] = "@(#) ./cc1/cpp.c";
+#include <ctype.h>
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+#include <scc/cstd.h>
+#include <scc/scc.h>
+#include "cc1.h"
+
+static char *argp, *macroname;
+static unsigned arglen;
+static unsigned ncmdlines;
+static Symbol *symline, *symfile;
+static unsigned char ifstatus[NR_COND];
+static int cppoff;
+static struct items dirinclude;
+
+unsigned cppctx;
+int disexpand;
+
+void
+defdefine(char *macro, char *val, char *source)
+{
+ char *def, *fmt = "#define %s %s\n";
+ Symbol dummy = {.flags = SDECLARED};
+
+ if (!val)
+ val = "";
+ def = xmalloc(strlen(fmt) + strlen(macro) + strlen(val));
+
+ sprintf(def, fmt, macro, val);
+ lineno = ++ncmdlines;
+ addinput(source, &dummy, def);
+ cpp();
+ delinput();
+}
+
+void
+undefmacro(char *s)
+{
+ killsym(lookup(NS_CPP, s, NOALLOC));
+}
+
+void
+icpp(void)
+{
+ static char sdate[14], stime[11];
+ struct tm *tm;
+ time_t t;
+ static char **bp, *list[] = {
+ "__STDC__",
+ "__STDC_HOSTED__",
+ "__SCC__",
+ NULL
+ };
+ static struct keyword keys[] = {
+ {"define", DEFINE, DEFINE},
+ {"include", INCLUDE, INCLUDE},
+ {"line", LINE, LINE},
+ {"ifdef", IFDEF, IFDEF},
+ {"if", IF, IF},
+ {"elif", ELIF, ELIF},
+ {"else", ELSE, ELSE},
+ {"ifndef", IFNDEF, IFNDEF},
+ {"endif", ENDIF, ENDIF},
+ {"undef", UNDEF, UNDEF},
+ {"pragma", PRAGMA, PRAGMA},
+ {"error", ERROR, ERROR},
+ {NULL, 0, 0}
+ };
+
+ keywords(keys, NS_CPPCLAUSES);
+
+ t = time(NULL);
+ tm = localtime(&t);
+ strftime(sdate, sizeof(sdate), "\"%b %d %Y\"", tm);
+ strftime(stime, sizeof(stime), "\"%H:%M:%S\"", tm);
+ defdefine("__DATE__", sdate, "built-in");
+ defdefine("__TIME__", stime, "built-in");
+ defdefine("__STDC_VERSION__", STDC_VERSION, "built-in");
+ defdefine("__LINE__", NULL, "built-in");
+ defdefine("__FILE__", NULL, "built-in");
+
+ symline = lookup(NS_CPP, "__LINE__", ALLOC);
+ symfile = lookup(NS_CPP, "__FILE__", ALLOC);
+
+ for (bp = list; *bp; ++bp)
+ defdefine(*bp, "1", "built-in");
+
+ ncmdlines = 0;
+}
+
+static void
+nextcpp(void)
+{
+ next();
+ if (yytoken == EOFTOK)
+ error("unterminated argument list invoking macro \"%s\"",
+ macroname);
+ if (yylen + 1 > arglen)
+ error("argument overflow invoking macro \"%s\"",
+ macroname);
+ if (yytoken == IDEN)
+ yylval.sym->flags |= SUSED;
+ memcpy(argp, yytext, yylen);
+ argp += yylen;
+ *argp++ = ' ';
+ arglen -= yylen + 1;
+}
+
+static void
+paren(void)
+{
+ for (;;) {
+ nextcpp();
+ switch (yytoken) {
+ case ')':
+ return;
+ case '(':
+ paren();
+ break;
+ }
+ }
+}
+
+static void
+parameter(void)
+{
+ for (;;) {
+ nextcpp();
+ switch (yytoken) {
+ case ')':
+ case ',':
+ argp -= 3; /* remove " , " or " ) "*/
+ *argp++ = '\0';
+ return;
+ case '(':
+ paren();
+ break;
+ }
+ }
+}
+
+static int
+parsepars(char *buffer, char **listp, int nargs)
+{
+ int n;
+
+ if (nargs == -1)
+ return -1;
+ if (ahead() != '(' && nargs > 0)
+ return 0;
+
+ disexpand = 1;
+ next();
+ n = 0;
+ argp = buffer;
+ arglen = INPUTSIZ;
+ if (ahead() == ')') {
+ next();
+ } else {
+ do {
+ *listp++ = argp;
+ parameter();
+ } while (++n < NR_MACROARG && yytoken == ',');
+ }
+ if (yytoken != ')')
+ error("incorrect macro function-alike invocation");
+ disexpand = 0;
+
+ if (n == NR_MACROARG)
+ error("too many parameters in macro \"%s\"", macroname);
+ if (n != nargs) {
+ error("macro \"%s\" received %d arguments, but it takes %d",
+ macroname, n, nargs);
+ }
+
+ return 1;
+}
+
+static size_t
+copymacro(char *buffer, char *s, size_t bufsiz, char *arglist[])
+{
+ int delim, prevc, c;
+ char *p, *arg, *bp = buffer;
+ size_t size;
+
+ for (prevc = '\0'; c = *s; prevc = c, ++s) {
+ switch (c) {
+ case '$':
+ while (bp[-1] == ' ')
+ --bp, ++bufsiz;
+ while (s[1] == ' ')
+ ++s;
+ case '#':
+ break;
+ case '\'':
+ delim = '\'';
+ goto search_delim;
+ case '\"':
+ delim = '"';
+ search_delim:
+ for (p = s; *++s != delim; )
+ ;
+ size = s - p + 1;
+ if (size > bufsiz)
+ goto expansion_too_long;
+ memcpy(bp, p, size);
+ bufsiz -= size;
+ bp += size;
+ break;
+ case '@':
+ if (prevc == '#')
+ bufsiz -= 2;
+ arg = arglist[atoi(++s)];
+ size = strlen(arg);
+ if (size > bufsiz)
+ goto expansion_too_long;
+ if (prevc == '#')
+ *bp++ = '"';
+ memcpy(bp, arg, size);
+ bp += size;
+ if (prevc == '#')
+ *bp++ = '"';
+ bufsiz -= size;
+ s += 2;
+ break;
+ default:
+ if (bufsiz-- == 0)
+ goto expansion_too_long;
+ *bp++ = c;
+ break;
+ }
+ }
+ *bp = '\0';
+
+ return bp - buffer;
+
+expansion_too_long:
+ error("macro expansion of \"%s\" too long", macroname);
+}
+
+int
+expand(char *begin, Symbol *sym)
+{
+ size_t elen;
+ int n, i;
+ char *s = sym->u.s;
+ char *arglist[NR_MACROARG], arguments[INPUTSIZ], buffer[INPUTSIZ];
+
+ macroname = sym->name;
+ if (sym == symfile) {
+ elen = sprintf(buffer, "\"%s\" ", filenam);
+ goto substitute;
+ }
+ if (sym == symline) {
+ elen = sprintf(buffer, "%d ", lineno);
+ goto substitute;
+ }
+ if (!s)
+ return 1;
+
+ n = atoi(s);
+ if (!parsepars(arguments, arglist, n))
+ return 0;
+ for (i = 0; i < n; ++i)
+ DBG("MACRO par%d:%s", i, arglist[i]);
+
+ elen = copymacro(buffer, s+3, INPUTSIZ-1, arglist);
+
+substitute:
+ DBG("MACRO '%s' expanded to :'%s'", macroname, buffer);
+ buffer[elen] = '\0';
+ addinput(filenam, sym, xstrdup(buffer));
+
+ return 1;
+}
+
+static int
+getpars(Symbol *args[NR_MACROARG])
+{
+ int n, c;
+ Symbol *sym;
+
+ c = *input->p;
+ next();
+ if (c != '(')
+ return -1;
+ next(); /* skip the '(' */
+ if (accept(')'))
+ return 0;
+
+ n = 0;
+ do {
+ if (n == NR_MACROARG) {
+ cpperror("too many parameters in macro");
+ return NR_MACROARG;
+ }
+ if (accept(ELLIPSIS)) {
+ args[n++] = NULL;
+ break;
+ }
+ if (yytoken != IDEN) {
+ cpperror("macro arguments must be identifiers");
+ return NR_MACROARG;
+ }
+ sym = install(NS_IDEN, yylval.sym);
+ sym->flags |= SUSED;
+ args[n++] = sym;
+ next();
+ } while (accept(','));
+ expect(')');
+
+ return n;
+}
+
+static int
+getdefs(Symbol *args[NR_MACROARG], int nargs, char *bp, size_t bufsiz)
+{
+ Symbol **argp;
+ size_t len;
+ int prevc = 0, ispar;
+
+ if (yytoken == '$') {
+ cpperror("'##' cannot appear at either ends of a macro expansion");
+ return 0;
+ }
+
+ for (;;) {
+ ispar = 0;
+ if (yytoken == IDEN && nargs >= 0) {
+ for (argp = args; argp < &args[nargs]; ++argp) {
+ if (*argp == yylval.sym)
+ break;
+ }
+ if (argp != &args[nargs]) {
+ sprintf(yytext, "@%02d@", (int) (argp - args));
+ ispar = 1;
+ }
+ }
+ if (prevc == '#' && !ispar) {
+ cpperror("'#' is not followed by a macro parameter");
+ return 0;
+ }
+ if (yytoken == '\n')
+ break;
+
+ if ((len = strlen(yytext)) >= bufsiz) {
+ cpperror("macro too long");
+ return 0;
+ }
+ if (yytoken == '$') {
+ *bp++ = '$';
+ --bufsiz;
+ } else {
+ memcpy(bp, yytext, len);
+ bp += len;
+ bufsiz -= len;
+ }
+ if ((prevc = yytoken) != '#') {
+ *bp++ = ' ';
+ --bufsiz;
+ }
+ next();
+ }
+ *bp = '\0';
+ return 1;
+}
+
+static void
+define(void)
+{
+ Symbol *sym,*args[NR_MACROARG];
+ char buff[LINESIZ+1];
+ int n;
+
+ if (cppoff)
+ return;
+
+ namespace = NS_CPP;
+ next();
+
+ if (yytoken != IDEN) {
+ cpperror("macro names must be identifiers");
+ return;
+ }
+ sym = yylval.sym;
+ if (sym->flags & SDECLARED) {
+ warn("'%s' redefined", yytext);
+ free(sym->u.s);
+ } else {
+ sym = install(NS_CPP, sym);
+ sym->flags |= SDECLARED|SSTRING;
+ }
+
+ namespace = NS_IDEN; /* Avoid polution in NS_CPP */
+ if ((n = getpars(args)) == NR_MACROARG)
+ goto delete;
+ if (n > 0 && !args[n-1]) /* it is a variadic function */
+ --n;
+ sprintf(buff, "%02d#", n);
+ if (!getdefs(args, n, buff+3, LINESIZ-3))
+ goto delete;
+ sym->u.s = xstrdup(buff);
+ DBG("MACRO '%s' defined as '%s'", sym->name, buff);
+ return;
+
+delete:
+ killsym(sym);
+}
+
+void
+incdir(char *dir)
+{
+ if (!dir || *dir == '\0')
+ die("cc1: incorrect -I flag");
+ newitem(&dirinclude, dir);
+}
+
+static int
+includefile(char *dir, char *file, size_t filelen)
+{
+ size_t dirlen;
+ char path[FILENAME_MAX];
+
+ if (!dir) {
+ dirlen = 0;
+ if (filelen > FILENAME_MAX-1)
+ return 0;
+ } else {
+ dirlen = strlen(dir);
+ if (dirlen + filelen > FILENAME_MAX-2)
+ return 0;
+ memcpy(path, dir, dirlen);
+ if (dir[dirlen-1] != '/')
+ path[dirlen++] = '/';
+ }
+ memcpy(path+dirlen, file, filelen);
+ path[dirlen + filelen] = '\0';
+
+ addinput(path, NULL, NULL);
+ return 1;
+}
+
+static char *
+cwd(char *buf)
+{
+ char *p, *s = filenam;
+ size_t len;
+
+ if ((p = strrchr(s, '/')) == NULL)
+ return NULL;
+ if ((len = p - s) >= FILENAME_MAX)
+ die("cc1: current work directory too long");
+ memcpy(buf, s, len);
+ buf[len] = '\0';
+ return buf;
+}
+
+static void
+include(void)
+{
+ char dir[FILENAME_MAX], file[FILENAME_MAX], *p, **bp;
+ size_t filelen;
+ int n;
+
+ if (cppoff)
+ return;
+
+ namespace = NS_IDEN;
+ next();
+
+ switch (*yytext) {
+ case '<':
+ if ((p = strchr(input->begin, '>')) == NULL || p[-1] == '<')
+ goto bad_include;
+ filelen = p - input->begin;
+ if (filelen >= FILENAME_MAX)
+ goto too_long;
+ memcpy(file, input->begin, filelen);
+ file[filelen] = '\0';
+
+ input->begin = input->p = p+1;
+ if (next() != '\n')
+ goto trailing_characters;
+
+ break;
+ case '"':
+ if (yylen < 3)
+ goto bad_include;
+ filelen = yylen-2;
+ if (filelen >= FILENAME_MAX)
+ goto too_long;
+ memcpy(file, yytext+1, filelen);
+ file[filelen] = '\0';
+
+ if (next() != '\n')
+ goto trailing_characters;
+
+ if (includefile(cwd(dir), file, filelen))
+ goto its_done;
+ break;
+ default:
+ goto bad_include;
+ }
+
+ n = dirinclude.n;
+ for (bp = dirinclude.s; n--; ++bp) {
+ if (includefile(*bp, file, filelen))
+ goto its_done;
+ }
+ cpperror("included file '%s' not found", file);
+
+its_done:
+ return;
+
+trailing_characters:
+ cpperror("trailing characters after preprocessor directive");
+ return;
+
+too_long:
+ cpperror("too long file name in #include");
+ return;
+
+bad_include:
+ cpperror("#include expects \"FILENAME\" or <FILENAME>");
+ return;
+}
+
+static void
+line(void)
+{
+ long n;
+ char *endp, *fname;
+
+ if (cppoff)
+ return;
+
+ disexpand = 0;
+ next();
+ n = strtol(yytext, &endp, 10);
+ if (n <= 0 || n > USHRT_MAX || *endp != '\0') {
+ cpperror("first parameter of #line is not a positive integer");
+ return;
+ }
+
+ next();
+ if (yytoken == '\n') {
+ fname = NULL;
+ } else {
+ if (*yytext != '\"' || yylen == 1) {
+ cpperror("second parameter of #line is not a valid filename");
+ return;
+ }
+ fname = yylval.sym->u.s;
+ }
+ setloc(fname, n - 1);
+ if (yytoken != '\n')
+ next();
+}
+
+static void
+pragma(void)
+{
+ if (cppoff)
+ return;
+ next();
+ warn("ignoring pragma '%s'", yytext);
+ *input->p = '\0';
+ next();
+}
+
+static void
+usererr(void)
+{
+ if (cppoff)
+ return;
+ cpperror("#error %s", input->p);
+ *input->p = '\0';
+ next();
+}
+
+static void
+ifclause(int negate, int isifdef)
+{
+ Symbol *sym;
+ unsigned n;
+ int status;
+ Node *expr;
+
+ if (cppctx == NR_COND-1)
+ error("too many nesting levels of conditional inclusion");
+
+ n = cppctx++;
+ namespace = NS_CPP;
+ next();
+
+ if (isifdef) {
+ if (yytoken != IDEN) {
+ cpperror("no macro name given in #%s directive",
+ (negate) ? "ifndef" : "ifdef");
+ return;
+ }
+ sym = yylval.sym;
+ next();
+ status = (sym->flags & SDECLARED) != 0;
+ if (!status)
+ killsym(sym);
+ } else {
+ /* TODO: catch recovery here */
+ if ((expr = constexpr()) == NULL) {
+ cpperror("parameter of #if is not an integer constant expression");
+ return;
+ }
+ status = expr->sym->u.i != 0;
+ freetree(expr);
+ }
+
+ if (negate)
+ status = !status;
+ if ((ifstatus[n] = status) == 0)
+ ++cppoff;
+}
+
+static void
+cppif(void)
+{
+ disexpand = 0;
+ ifclause(0, 0);
+}
+
+static void
+ifdef(void)
+{
+ ifclause(0, 1);
+}
+
+static void
+ifndef(void)
+{
+ ifclause(1, 1);
+}
+
+static void
+elseclause(void)
+{
+ int status;
+
+ if (cppctx == 0) {
+ cpperror("#else without #ifdef/ifndef");
+ return;
+ }
+
+ status = ifstatus[cppctx-1];
+ ifstatus[cppctx-1] = !status;
+ cppoff += (status) ? 1 : -1;
+}
+
+static void
+cppelse(void)
+{
+ elseclause();
+ next();
+}
+
+static void
+elif(void)
+{
+ elseclause();
+ if (ifstatus[cppctx-1]) {
+ --cppctx;
+ cppif();
+ }
+}
+
+static void
+endif(void)
+{
+ if (cppctx == 0)
+ error("#endif without #if");
+ if (!ifstatus[--cppctx])
+ --cppoff;
+ next();
+}
+
+static void
+undef(void)
+{
+ if (cppoff)
+ return;
+
+ namespace = NS_CPP;
+ next();
+ if (yytoken != IDEN) {
+ error("no macro name given in #undef directive");
+ return;
+ }
+ killsym(yylval.sym);
+ next();
+}
+
+int
+cpp(void)
+{
+ static struct {
+ unsigned char token;
+ void (*fun)(void);
+ } *bp, clauses [] = {
+ {DEFINE, define},
+ {INCLUDE, include},
+ {LINE, line},
+ {IFDEF, ifdef},
+ {IF, cppif},
+ {ELIF, elif},
+ {IFNDEF, ifndef},
+ {ELSE, cppelse},
+ {ENDIF, endif},
+ {UNDEF, undef},
+ {PRAGMA, pragma},
+ {ERROR, usererr},
+ {0, NULL}
+ };
+ int ns;
+ char *p;
+
+ for (p = input->p; isspace(*p); ++p)
+ ;
+
+ if (*p != '#')
+ return cppoff;
+ input->p = p+1;
+
+ disexpand = 1;
+ lexmode = CPPMODE;
+ ns = namespace;
+ namespace = NS_CPPCLAUSES;
+ next();
+ namespace = NS_IDEN;
+
+ for (bp = clauses; bp->token && bp->token != yytoken; ++bp)
+ ;
+ if (!bp->token) {
+ errorp("incorrect preprocessor directive '%s'", yytext);
+ goto error;
+ }
+
+ DBG("CPP %s", yytext);
+
+ pushctx(); /* create a new context to avoid polish */
+ (*bp->fun)(); /* the current context, and to get all */
+ popctx(); /* the symbols freed at the end */
+
+ /*
+ * #include changes the content of input->line, so the correctness
+ * of the line must be checked in the own include(), and we have
+ * to skip this tests. For the same reason include() is the only
+ * function which does not prepare the next token
+ */
+ if (yytoken != '\n' && !cppoff && bp->token != INCLUDE)
+ errorp("trailing characters after preprocessor directive");
+
+error:
+ disexpand = 0;
+ lexmode = CCMODE;
+ namespace = ns;
+
+ return 1;
+}
+
+void
+ppragmaln(void)
+{
+ static char file[FILENAME_MAX];
+ static unsigned nline;
+ char *s;
+
+ putchar('\n');
+ if (strcmp(file, filenam)) {
+ strcpy(file, filenam);
+ s = "#line %u \"%s\"\n";
+ } else if (nline+1 != lineno) {
+ s = "#line %u\n";
+ } else {
+ s = "";
+ }
+ nline = lineno;
+ printf(s, nline, file);
+}
+
+void
+outcpp(void)
+{
+ int c;
+ char *s, *t;
+
+ for (next(); yytoken != EOFTOK; next()) {
+ if (onlyheader)
+ continue;
+ if (yytoken != STRING) {
+ printf("%s ", yytext);
+ continue;
+ }
+ for (s = yytext; c = *s; ++s) {
+ switch (c) {
+ case '\n':
+ t = "\\n";
+ goto print_str;
+ case '\v':
+ t = "\\v";
+ goto print_str;
+ case '\b':
+ t = "\\b";
+ goto print_str;
+ case '\t':
+ t = "\\t";
+ goto print_str;
+ case '\a':
+ t = "\\a";
+ print_str:
+ fputs(t, stdout);
+ break;
+ case '\\':
+ putchar('\\');
+ default:
+ if (!isprint(c))
+ printf("\\x%x", c);
+ else
+ putchar(c);
+ break;
+ }
+ }
+ putchar(' ');
+ }
+ putchar('\n');
+}
+
--- /dev/null
+++ b/src/cmd/cc1/decl.c
@@ -1,0 +1,967 @@
+static char sccsid[] = "@(#) ./cc1/decl.c";
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <scc/cstd.h>
+#include <scc/scc.h>
+#include "cc1.h"
+
+#define NOSCLASS 0
+
+#define NOREP 0
+#define REP 1
+#define QUIET 1
+#define NOQUIET 0
+
+#define NR_DCL_TYP (NR_DECLARATORS+NR_FUNPARAM)
+#define NR_DCL_SYM (NR_DECLARATORS+NR_FUNPARAM+1)
+
+struct declarators {
+ unsigned nr;
+ unsigned ns;
+ struct decl *dcl;
+ unsigned nr_types;
+ Type **tpars;
+ Symbol **pars;
+ struct declarator {
+ unsigned char op;
+ TINT nelem;
+ Symbol *sym;
+ Type **tpars;
+ Symbol **pars;
+ } d [NR_DECLARATORS];
+};
+
+struct decl {
+ unsigned ns;
+ int sclass;
+ int qualifier;
+ Symbol *sym;
+ Type *type;
+ Type *parent;
+ Symbol **pars;
+ Symbol *bufpars[NR_DCL_SYM];
+ Type *buftpars[NR_DCL_TYP];
+};
+
+
+static void
+endfundcl(Type *tp, Symbol **pars)
+{
+ if (tp->prop&TK_R && *pars)
+ warn("parameter names (without types) in function declaration");
+ /*
+ * avoid non used warnings in prototypes
+ */
+ while (*pars)
+ (*pars++)->flags |= SUSED;
+ popctx();
+}
+
+static void
+push(struct declarators *dp, int op, ...)
+{
+ va_list va;
+ unsigned n;
+ struct declarator *p;
+
+ va_start(va, op);
+ if ((n = dp->nr++) == NR_DECLARATORS)
+ error("too many declarators");
+
+ p = &dp->d[n];
+ p->op = op;
+ p->tpars = NULL;
+
+ switch (op) {
+ case ARY:
+ p->nelem = va_arg(va, TINT);
+ break;
+ case KRFTN:
+ case FTN:
+ p->nelem = va_arg(va, unsigned);
+ p->tpars = va_arg(va, Type **);
+ p->pars = va_arg(va, Symbol **);
+ break;
+ case IDEN:
+ p->sym = va_arg(va, Symbol *);
+ break;
+ }
+ va_end(va);
+}
+
+static int
+pop(struct declarators *dp, struct decl *dcl)
+{
+ struct declarator *p;
+
+ if (dp->nr == 0)
+ return 0;
+
+ p = &dp->d[--dp->nr];
+ if (p->op == IDEN) {
+ dcl->sym = p->sym;
+ return 1;
+ }
+
+ if (dcl->type->op == FTN)
+ endfundcl(dcl->type, dcl->pars);
+ dcl->pars = p->pars;
+
+ dcl->type = mktype(dcl->type, p->op, p->nelem, p->tpars);
+ return 1;
+}
+
+static void
+arydcl(struct declarators *dp)
+{
+ Node *np = NULL;
+ TINT n = 0;
+
+ expect('[');
+ if (yytoken != ']') {
+ if ((np = constexpr()) == NULL) {
+ errorp("invalid storage size");
+ } else {
+ if ((n = np->sym->u.i) <= 0) {
+ errorp("array size is not a positive number");
+ n = 1;
+ }
+ freetree(np);
+ }
+ }
+ expect(']');
+
+ push(dp, ARY, n);
+}
+
+static int
+empty(Symbol *sym, Type *tp, int param)
+{
+ if (!sym->name) {
+ sym->type = tp;
+ switch (tp->op) {
+ default:
+ /* warn if it is not a parameter */
+ if (!param)
+ warn("empty declaration");
+ case STRUCT:
+ case UNION:
+ case ENUM:
+ return 1;
+ }
+ }
+ return 0;
+}
+
+static void
+bad_storage(Type *tp, char *name)
+{
+ if (tp->op != FTN)
+ errorp("incorrect storage class for file-scope declaration");
+ else
+ errorp("invalid storage class for function '%s'", name);
+}
+
+static Symbol *
+redcl(Symbol *sym, Type *tp, int sclass)
+{
+ int flags;
+ char *name = sym->name;
+
+ if (!eqtype(sym->type, tp, 1)) {
+ errorp("conflicting types for '%s'", name);
+ return sym;
+ }
+
+ if (sym->token == TYPEIDEN && sclass != TYPEDEF ||
+ sym->token != TYPEIDEN && sclass == TYPEDEF) {
+ goto redeclaration;
+ }
+ if (curctx != GLOBALCTX && tp->op != FTN) {
+ /* is it the redeclaration of a local variable? */
+ if ((sym->flags & SEXTERN) && sclass == EXTERN)
+ return sym;
+ goto redeclaration;
+ }
+
+ flags = sym->flags;
+ switch (sclass) {
+ case REGISTER:
+ case AUTO:
+ bad_storage(tp, name);
+ break;
+ case NOSCLASS:
+ if ((flags & SPRIVATE) == 0) {
+ if (flags & SEXTERN)
+ flags &= ~(SEXTERN|SEMITTED);
+ flags |= SGLOBAL;
+ break;
+ }
+ errorp("non-static declaration of '%s' follows static declaration",
+ name);
+ break;
+ case TYPEDEF:
+ /* Only C11 allows multiple definitions of a typedef. */
+ goto redeclaration;
+ case EXTERN:
+ break;
+ case STATIC:
+ if ((flags & (SGLOBAL|SEXTERN)) == 0) {
+ flags |= SPRIVATE;
+ break;
+ }
+ errorp("static declaration of '%s' follows non-static declaration",
+ name);
+ break;
+ }
+ sym->flags = flags;
+
+ return sym;
+
+redeclaration:
+ errorp("redeclaration of '%s'", name);
+ return sym;
+}
+
+static Symbol *
+identifier(struct decl *dcl)
+{
+ Symbol *sym = dcl->sym;
+ Type *tp = dcl->type;
+ int sclass = dcl->sclass;
+ char *name = sym->name;
+
+ if (empty(sym, tp, 0))
+ return sym;
+
+ /* TODO: Add warning about ANSI limits */
+ if (!(tp->prop & TDEFINED) &&
+ sclass != EXTERN && sclass != TYPEDEF &&
+ !(tp->op == ARY && yytoken == '=')) {
+ errorp("declared variable '%s' of incomplete type", name);
+ }
+
+ if (tp->op == FTN) {
+ if (sclass == NOSCLASS)
+ sclass = EXTERN;
+ if (!strcmp(name, "main") && tp->type != inttype) {
+ errorp("main shall be defined with a return type of int");
+ errorp("please contact __20h__ on irc.freenode.net (#bitreich-en) via IRC");
+ }
+ }
+
+ if (sym->flags & SDECLARED) {
+ sym = redcl(dcl->sym, tp, sclass);
+ } else {
+ int flags = sym->flags | SDECLARED;
+
+ sym->type = tp;
+
+ switch (sclass) {
+ case REGISTER:
+ case AUTO:
+ if (curctx != GLOBALCTX && tp->op != FTN) {
+ flags |= (sclass == REGISTER) ? SREGISTER : SAUTO;
+ break;
+ }
+ bad_storage(tp, name);
+ case NOSCLASS:
+ if (tp->op == FTN)
+ flags |= SEXTERN;
+ else
+ flags |= (curctx == GLOBALCTX) ? SGLOBAL : SAUTO;
+ break;
+ case EXTERN:
+ flags |= SEXTERN;
+ break;
+ case STATIC:
+ flags |= (curctx == GLOBALCTX) ? SPRIVATE : SLOCAL;
+ break;
+ case TYPEDEF:
+ flags |= STYPEDEF;
+ sym->u.token = sym->token = TYPEIDEN;
+ break;
+ }
+ sym->flags = flags;
+ }
+
+ if (accept('='))
+ initializer(sym, sym->type);
+ if (!(sym->flags & (SGLOBAL|SEXTERN)) && tp->op != FTN)
+ sym->flags |= SDEFINED;
+ if (sym->token == IDEN && tp->op != FTN)
+ emit(ODECL, sym);
+ return sym;
+}
+
+static Symbol *
+parameter(struct decl *dcl)
+{
+ Symbol *sym = dcl->sym;
+ Type *funtp = dcl->parent, *tp = dcl->type;
+ char *name = sym->name;
+ int flags;
+
+ flags = 0;
+ switch (dcl->sclass) {
+ case STATIC:
+ case EXTERN:
+ case AUTO:
+ errorp("bad storage class in function parameter");
+ break;
+ case REGISTER:
+ flags |= SREGISTER;
+ break;
+ case NOSCLASS:
+ flags |= SAUTO;
+ break;
+ }
+
+ switch (tp->op) {
+ case VOID:
+ funtp->n.elem = 1;
+ if (dcl->sclass)
+ errorp("void as unique parameter may not be qualified");
+ return NULL;
+ case ARY:
+ tp = mktype(tp->type, PTR, 0, NULL);
+ break;
+ case FTN:
+ errorp("incorrect function type for a function parameter");
+ return NULL;
+ }
+ if (!empty(sym, tp, 1)) {
+ int isdcl = sym->flags&SDECLARED, isk_r = funtp->prop & TK_R;
+ if (isdcl && !isk_r) {
+ errorp("redefinition of parameter '%s'", name);
+ return NULL;
+ }
+ if (!isdcl && isk_r) {
+ errorp("declaration for parameter '%s' but no such parameter",
+ sym->name);
+ return NULL;
+ }
+ sym->flags |= SDECLARED;
+ }
+
+ sym->type = tp;
+ sym->flags &= ~(SAUTO|SREGISTER);
+ sym->flags |= flags;
+ return sym;
+}
+
+static Symbol *dodcl(int rep,
+ Symbol *(*fun)(struct decl *),
+ unsigned ns,
+ Type *type);
+
+static int
+krpars(struct declarators *dp)
+{
+ Symbol *sym;
+ int toomany = 0;
+ unsigned npars = 0;
+
+ do {
+ sym = yylval.sym;
+ expect(IDEN);
+ sym->flags |= SAUTO;
+ if ((sym = install(NS_IDEN, sym)) == NULL) {
+ errorp("redefinition of parameter '%s'",
+ yylval.sym->name);
+ continue;
+ }
+ if (npars < NR_FUNPARAM) {
+ ++npars;
+ *dp->pars++ = sym;
+ continue;
+ }
+ if (!toomany)
+ toomany = 1;
+ } while (accept(','));
+
+ return toomany;
+}
+
+static unsigned
+krfun(struct declarators *dp)
+{
+ int toomany = 0;
+
+
+ if (yytoken != ')')
+ toomany = krpars(dp);
+
+ if (dp->nr_types == NR_DCL_TYP) {
+ toomany = 1;
+ } else {
+ ++dp->nr_types;
+ *dp->tpars++ = ellipsistype;
+ }
+
+ if (toomany)
+ errorp("too many parameters in function definition");
+ return 1;
+}
+
+static unsigned
+ansifun(struct declarators *dp)
+{
+ Symbol *sym;
+ unsigned npars, ntype, toomany, distoomany, voidpar;
+ Type type, *tp;
+
+ type.n.elem = 0;
+ type.prop = 0;
+ npars = ntype = toomany = distoomany = voidpar = 0;
+
+ do {
+ if (accept(ELLIPSIS)) {
+ if (ntype < 1)
+ errorp("a named argument is requiered before '...'");
+ if (yytoken != ')')
+ errorp("... must be the last parameter");
+ sym = NULL;
+ tp = ellipsistype;
+ } else if ((sym = dodcl(NOREP, parameter, NS_IDEN, &type)) == NULL) {
+ if (type.n.elem == 1 && ntype > 1)
+ voidpar = 1;
+ sym = NULL;
+ tp = NULL;
+ } else {
+ tp = sym->type;
+ }
+
+ if (sym) {
+ if (npars == NR_FUNPARAM) {
+ toomany = 1;
+ } else {
+ npars++;
+ *dp->pars++ = sym;
+ }
+ }
+
+ if (tp) {
+ if (dp->nr_types == NR_DCL_TYP) {
+ toomany = 1;
+ } else {
+ ntype++;
+ dp->nr_types++;
+ *dp->tpars++ = tp;
+ }
+ }
+
+ } while (accept(','));
+
+ if (toomany == 1)
+ errorp("too many parameters in function definition");
+ if (voidpar && ntype > 1)
+ errorp("'void' must be the only parameter");
+ return ntype;
+}
+
+static int
+funbody(Symbol *sym, Symbol *pars[])
+{
+ Type *tp;
+ Symbol **bp, *p;
+
+ if (!sym)
+ return 0;
+ tp = sym->type;
+ if (tp->op != FTN)
+ return 0;
+
+ switch (yytoken) {
+ case '{':
+ case TYPE:
+ case TYPEIDEN:
+ if (curctx != PARAMCTX)
+ errorp("nested function declaration");
+ if (sym && sym->ns == NS_IDEN)
+ break;
+ default:
+ emit(ODECL, sym);
+ endfundcl(tp, pars);
+ return 0;
+ }
+
+ tp->prop |= TFUNDEF;
+ curfun = sym;
+ if (sym->type->prop & TK_R) {
+ while (yytoken != '{') {
+ dodcl(REP, parameter, NS_IDEN, sym->type);
+ expect(';');
+ }
+ for (bp = pars; p = *bp; ++bp) {
+ if (p->type == NULL) {
+ warn("type of '%s' defaults to int", p->name);
+ p->type = inttype;
+ }
+ }
+ }
+ if (sym->flags & STYPEDEF)
+ errorp("function definition declared 'typedef'");
+ if (sym->flags & SDEFINED)
+ errorp("redefinition of '%s'", sym->name);
+ if (sym->flags & SEXTERN) {
+ sym->flags &= ~SEXTERN;
+ sym->flags |= SGLOBAL;
+ }
+ sym->flags |= SDEFINED;
+ sym->flags &= ~SEMITTED;
+ sym->u.pars = pars;
+ emit(OFUN, sym);
+ compound(NULL, NULL, NULL);
+ emit(OEFUN, NULL);
+ popctx();
+ flushtypes();
+ curfun = NULL;
+ return 1;
+}
+
+static void
+fundcl(struct declarators *dp)
+{
+ Type **types = dp->tpars;
+ unsigned ntypes, typefun;
+ Symbol **pars = dp->pars;
+ unsigned (*fun)(struct declarators *);
+
+ pushctx();
+ expect('(');
+ if (yytoken == ')' || yytoken == IDEN) {
+ typefun = KRFTN;
+ fun = krfun;
+ } else {
+ typefun = FTN;
+ fun = ansifun;
+ }
+ ntypes = (*fun)(dp);
+ *dp->pars++= NULL;
+ expect(')');
+
+ push(dp, typefun, ntypes, types, pars);
+}
+
+static void declarator(struct declarators *dp);
+
+static void
+directdcl(struct declarators *dp)
+{
+ Symbol *p, *sym;
+ static int nested;
+
+ if (accept('(')) {
+ if (nested == NR_SUBTYPE)
+ error("too many declarators nested by parentheses");
+ ++nested;
+ declarator(dp);
+ --nested;
+ expect(')');
+ } else {
+ if (yytoken == IDEN || yytoken == TYPEIDEN) {
+ sym = yylval.sym;
+ if (p = install(dp->ns, sym)) {
+ sym = p;
+ sym->flags &= ~SDECLARED;
+ }
+ next();
+ } else {
+ sym = newsym(dp->ns, NULL);
+ }
+ push(dp, IDEN, sym);
+ }
+
+ for (;;) {
+ switch (yytoken) {
+ case '(': fundcl(dp); break;
+ case '[': arydcl(dp); break;
+ default: return;
+ }
+ }
+}
+
+static void
+declarator(struct declarators *dp)
+{
+ unsigned n;
+
+ for (n = 0; accept('*'); ++n) {
+ while (accept(TQUALIFIER))
+ ;
+ }
+
+ directdcl(dp);
+
+ while (n--)
+ push(dp, PTR);
+}
+
+static Type *structdcl(void), *enumdcl(void);
+
+static Type *
+specifier(int *sclass, int *qualifier)
+{
+ Type *tp = NULL;
+ unsigned spec, qlf, sign, type, cls, size;
+
+ spec = qlf = sign = type = cls = size = 0;
+
+ for (;;) {
+ unsigned *p = NULL;
+ Type *(*dcl)(void) = NULL;
+
+ switch (yytoken) {
+ case SCLASS:
+ p = &cls;
+ break;
+ case TQUALIFIER:
+ qlf |= yylval.token;
+ next();
+ continue;
+ case TYPEIDEN:
+ if (type)
+ goto return_type;
+ tp = yylval.sym->type;
+ p = &type;
+ break;
+ case TYPE:
+ switch (yylval.token) {
+ case ENUM:
+ dcl = enumdcl;
+ p = &type;
+ break;
+ case STRUCT:
+ case UNION:
+ dcl = structdcl;
+ p = &type;
+ break;
+ case VA_LIST:
+ case VOID:
+ case BOOL:
+ case CHAR:
+ case INT:
+ case FLOAT:
+ case DOUBLE:
+ p = &type;
+ break;
+ case SIGNED:
+ case UNSIGNED:
+ p = &sign;
+ break;
+ case LONG:
+ if (size == LONG) {
+ yylval.token = LLONG;
+ size = 0;
+ }
+ case SHORT:
+ p = &size;
+ break;
+ }
+ break;
+ default:
+ goto return_type;
+ }
+ if (*p)
+ errorp("invalid type specification");
+ *p = yylval.token;
+ if (dcl) {
+ if (size || sign)
+ errorp("invalid type specification");
+ tp = (*dcl)();
+ goto return_type;
+ } else {
+ next();
+ }
+ spec = 1;
+ }
+
+return_type:
+ *sclass = cls;
+ *qualifier = qlf;
+ if (!tp) {
+ if (spec) {
+ tp = ctype(type, sign, size);
+ } else {
+ if (curctx != GLOBALCTX)
+ unexpected();
+ warn("type defaults to 'int' in declaration");
+ tp = inttype;
+ }
+ }
+ return tp;
+}
+
+static Symbol *
+newtag(void)
+{
+ Symbol *sym;
+ int ns, op, tag = yylval.token;
+ static unsigned tpns = NS_STRUCTS;
+
+ ns = namespace;
+ namespace = NS_TAG;
+ next();
+ namespace = ns;
+
+ switch (yytoken) {
+ case IDEN:
+ case TYPEIDEN:
+ sym = yylval.sym;
+ if ((sym->flags & SDECLARED) == 0)
+ install(NS_TAG, yylval.sym);
+ next();
+ break;
+ default:
+ sym = newsym(NS_TAG, NULL);
+ break;
+ }
+ if (!sym->type) {
+ Type *tp;
+
+ if (tpns == NS_STRUCTS + NR_MAXSTRUCTS)
+ error("too many tags declared");
+ tp = mktype(NULL, tag, 0, NULL);
+ tp->ns = tpns++;
+ sym->type = tp;
+ tp->tag = sym;
+ DBG("declared tag '%s' with ns = %d\n",
+ (sym->name) ? sym->name : "anonymous", tp->ns);
+ }
+
+ if ((op = sym->type->op) != tag && op != INT)
+ error("'%s' defined as wrong kind of tag", sym->name);
+ return sym;
+}
+
+static void fieldlist(Type *tp);
+
+static Type *
+structdcl(void)
+{
+ Symbol *sym;
+ Type *tp;
+ static int nested;
+ int ns;
+
+ sym = newtag();
+ tp = sym->type;
+
+ if (!accept('{'))
+ return tp;
+
+ ns = namespace;
+ namespace = tp->ns;
+
+ if (tp->prop & TDEFINED && sym->ctx == curctx)
+ error("redefinition of struct/union '%s'", sym->name);
+
+ if (nested == NR_STRUCT_LEVEL)
+ error("too many levels of nested structure or union definitions");
+
+ ++nested;
+ while (yytoken != '}') {
+ fieldlist(tp);
+ }
+ --nested;
+
+ deftype(tp);
+ namespace = ns;
+ expect('}');
+ return tp;
+}
+
+static Type *
+enumdcl(void)
+{
+ Type *tp;
+ Symbol *sym, *tagsym;
+ int ns, val, toomany;
+ unsigned nctes;
+
+ ns = namespace;
+ tagsym = newtag();
+ tp = tagsym->type;
+
+ if (!accept('{'))
+ goto restore_name;
+ if (tp->prop & TDEFINED)
+ errorp("redefinition of enumeration '%s'", tagsym->name);
+ deftype(tp);
+ namespace = NS_IDEN;
+
+ /* TODO: check incorrect values in val */
+ for (nctes = val = 0; yytoken != '}'; ++nctes, ++val) {
+ if (yytoken != IDEN)
+ unexpected();
+ sym = yylval.sym;
+ next();
+ if (nctes == NR_ENUM_CTES && !toomany) {
+ errorp("too many enum constants in a single enum");
+ toomany = 1;
+ }
+ if (accept('=')) {
+ Node *np = constexpr();
+
+ if (np == NULL)
+ errorp("invalid enumeration value");
+ else
+ val = np->sym->u.i;
+ freetree(np);
+ }
+ if ((sym = install(NS_IDEN, sym)) == NULL) {
+ errorp("'%s' redeclared as different kind of symbol",
+ yytext);
+ } else {
+ sym->u.i = val;
+ sym->flags |= SCONSTANT;
+ sym->type = inttype;
+ }
+ if (!accept(','))
+ break;
+ }
+ expect('}');
+
+restore_name:
+ namespace = ns;
+ return tp;
+}
+
+static Symbol *
+type(struct decl *dcl)
+{
+ Symbol *sym = dcl->sym;
+
+ if (dcl->sclass)
+ error("class storage in type name");
+ if (sym->name)
+ error("unexpected identifier in type name");
+ sym->type = dcl->type;
+
+ return sym;
+}
+
+static Symbol *
+field(struct decl *dcl)
+{
+ static char *anon = "<anonymous>";
+ Symbol *sym = dcl->sym;
+ char *name = (sym->name) ? sym->name : anon;
+ Type *structp = dcl->parent, *tp = dcl->type;
+ TINT n = structp->n.elem;
+ int err = 0;
+
+ if (accept(':')) {
+ Node *np;
+ TINT n;
+
+ if ((np = constexpr()) == NULL) {
+ unexpected();
+ n = 0;
+ } else {
+ n = np->sym->u.i;
+ freetree(np);
+ }
+ if (n == 0 && name != anon)
+ errorp("zero width for bit-field '%s'", name);
+ if (tp != booltype && tp != inttype && tp != uinttype)
+ errorp("bit-field '%s' has invalid type", name);
+ if (n < 0)
+ errorp("negative width in bit-field '%s'", name);
+ else if (n > tp->size*8)
+ errorp("width of '%s' exceeds its type", name);
+ } else if (empty(sym, tp, 0)) {
+ return sym;
+ }
+
+ if (tp->op == FTN) {
+ errorp("invalid type '%s' in struct/union", name);
+ err = 1;
+ }
+ if (dcl->sclass) {
+ errorp("storage class in struct/union field '%s'", name);
+ err = 1;
+ }
+ if (!(tp->prop & TDEFINED)) {
+ error("field '%s' has incomplete type", name);
+ err = 1;
+ }
+ if (err)
+ return sym;
+
+ if (sym->flags & SDECLARED)
+ error("duplicated member '%s'", name);
+ sym->flags |= SFIELD|SDECLARED;
+ sym->type = tp;
+
+ if (n == NR_FIELDS)
+ error("too many fields in struct/union");
+ DBG("New field '%s' in namespace %d\n", name, structp->ns);
+ structp->p.fields = xrealloc(structp->p.fields, ++n * sizeof(*sym));
+ structp->p.fields[n-1] = sym;
+ structp->n.elem = n;
+
+ return sym;
+}
+
+static Symbol *
+dodcl(int rep, Symbol *(*fun)(struct decl *), unsigned ns, Type *parent)
+{
+ Symbol *sym;
+ Type *base;
+ struct decl dcl;
+ struct declarators stack;
+
+ dcl.ns = ns;
+ dcl.parent = parent;
+ base = specifier(&dcl.sclass, &dcl.qualifier);
+
+ do {
+ dcl.type = base;
+ stack.nr_types = stack.nr = 0;
+ stack.tpars = dcl.buftpars;
+ stack.pars = dcl.bufpars;
+ stack.dcl = &dcl;
+ stack.ns = ns;
+
+ declarator(&stack);
+
+ while (pop(&stack, &dcl))
+ ;
+ sym = (*fun)(&dcl);
+ if (funbody(sym, dcl.pars))
+ return sym;
+ } while (rep && accept(','));
+
+ return sym;
+}
+
+void
+decl(void)
+{
+ Symbol *sym;
+
+ if (accept(';'))
+ return;
+ sym = dodcl(REP, identifier, NS_IDEN, NULL);
+ if (sym->type->prop & TFUNDEF)
+ return;
+ expect(';');
+}
+
+static void
+fieldlist(Type *tp)
+{
+ if (yytoken != ';')
+ dodcl(REP, field, tp->ns, tp);
+ expect(';');
+}
+
+Type *
+typename(void)
+{
+ return dodcl(NOREP, type, NS_DUMMY, NULL)->type;
+}
--- /dev/null
+++ b/src/cmd/cc1/deps.mk
@@ -1,0 +1,44 @@
+#deps
+builtin.o: $(INCDIR)/scc/scc/scc.h
+builtin.o: cc1.h
+code.o: $(INCDIR)/scc/scc/scc.h
+code.o: cc1.h
+cpp.o: $(INCDIR)/scc/scc/cstd.h
+cpp.o: $(INCDIR)/scc/scc/scc.h
+cpp.o: cc1.h
+decl.o: $(INCDIR)/scc/scc/cstd.h
+decl.o: $(INCDIR)/scc/scc/scc.h
+decl.o: cc1.h
+error.o: $(INCDIR)/scc/scc/scc.h
+error.o: cc1.h
+expr.o: $(INCDIR)/scc/scc/cstd.h
+expr.o: $(INCDIR)/scc/scc/scc.h
+expr.o: cc1.h
+fold.o: $(INCDIR)/scc/scc/scc.h
+fold.o: cc1.h
+init.o: $(INCDIR)/scc/scc/cstd.h
+init.o: $(INCDIR)/scc/scc/scc.h
+init.o: cc1.h
+lex.o: $(INCDIR)/scc/scc/cstd.h
+lex.o: $(INCDIR)/scc/scc/scc.h
+lex.o: cc1.h
+main.o: $(INCDIR)/scc/scc/arg.h
+main.o: $(INCDIR)/scc/scc/scc.h
+main.o: cc1.h
+stmt.o: $(INCDIR)/scc/scc/cstd.h
+stmt.o: $(INCDIR)/scc/scc/scc.h
+stmt.o: cc1.h
+symbol.o: $(INCDIR)/scc/scc/cstd.h
+symbol.o: $(INCDIR)/scc/scc/scc.h
+symbol.o: cc1.h
+target/amd64-sysv/arch.o: $(INCDIR)/scc/scc/scc.h
+target/amd64-sysv/arch.o: target/amd64-sysv/../../cc1.h
+target/arm64-sysv/arch.o: $(INCDIR)/scc/scc/scc.h
+target/arm64-sysv/arch.o: target/arm64-sysv/../../cc1.h
+target/i386-sysv/arch.o: $(INCDIR)/scc/scc/scc.h
+target/i386-sysv/arch.o: target/i386-sysv/../../cc1.h
+target/z80-scc/arch.o: $(INCDIR)/scc/scc/scc.h
+target/z80-scc/arch.o: target/z80-scc/../../cc1.h
+types.o: $(INCDIR)/scc/scc/cstd.h
+types.o: $(INCDIR)/scc/scc/scc.h
+types.o: cc1.h
--- /dev/null
+++ b/src/cmd/cc1/error.c
@@ -1,0 +1,85 @@
+static char sccsid[] = "@(#) ./cc1/error.c";
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <scc/scc.h>
+#include "cc1.h"
+
+#define MAXERRNUM 10
+
+extern int failure;
+static unsigned nerrors;
+
+static void
+warn_error(int flag, char *fmt, va_list va)
+{
+ if (flag == 0)
+ return;
+ fprintf(stderr, "%s:%u: %s: ",
+ filenam, lineno,
+ (flag < 0) ? "error" : "warning");
+ vfprintf(stderr, fmt, va);
+ putc('\n', stderr);
+
+ if (flag < 0) {
+ if (!failure)
+ fclose(stdout);
+ failure = 1;
+ if (++nerrors == MAXERRNUM) {
+ fputs("too many errors\n", stderr);
+ exit(1);
+ }
+ }
+}
+
+void
+warn(char *fmt, ...)
+{
+ extern int warnings;
+
+ va_list va;
+ va_start(va, fmt);
+ warn_error(warnings, fmt, va);
+ va_end(va);
+}
+
+void
+error(char *fmt, ...)
+{
+ va_list va;
+
+ va_start(va, fmt);
+ warn_error(-1, fmt, va);
+ va_end(va);
+ exit(1);
+ discard();
+}
+
+void
+errorp(char *fmt, ...)
+{
+ va_list va;
+ va_start(va, fmt);
+ warn_error(-1, fmt, va);
+ va_end(va);
+}
+
+void
+cpperror(char *fmt, ...)
+{
+ va_list va;
+ va_start(va, fmt);
+ warn_error(-1, fmt, va);
+ va_end(va);
+
+ /* discard input until the end of the line */
+ *input->p = '\0';
+ next();
+}
+
+void
+unexpected(void)
+{
+ error("unexpected '%s'", yytext);
+}
--- /dev/null
+++ b/src/cmd/cc1/expr.c
@@ -1,0 +1,1185 @@
+static char sccsid[] = "@(#) ./cc1/expr.c";
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <scc/cstd.h>
+#include <scc/scc.h>
+#include "cc1.h"
+
+#define XCHG(lp, rp, np) (np = lp, lp = rp, rp = np)
+
+static Node *xexpr(void), *xassign(void);
+
+int
+cmpnode(Node *np, TUINT val)
+{
+ Symbol *sym;
+ Type *tp;
+ TUINT mask, nodeval;
+
+ if (!np || !(np->flags & NCONST) || !np->sym)
+ return 0;
+ sym = np->sym;
+ tp = sym->type;
+
+ switch (tp->op) {
+ case PTR:
+ case INT:
+ mask = (val > 1) ? ones(np->type->size) : -1;
+ nodeval = (tp->prop & TSIGNED) ? sym->u.i : sym->u.u;
+ return (nodeval & mask) == (val & mask);
+ case FLOAT:
+ return sym->u.f == val;
+ }
+ return 0;
+}
+
+static Node *
+promote(Node *np)
+{
+ Type *tp;
+ Node *new;
+ struct limits *lim, *ilim;
+
+ tp = np->type;
+
+ switch (tp->op) {
+ case ENUM:
+ case INT:
+ if (tp->n.rank >= inttype->n.rank)
+ return np;
+ lim = getlimits(tp);
+ ilim = getlimits(inttype);
+ tp = (lim->max.i <= ilim->max.i) ? inttype : uinttype;
+ break;
+ case FLOAT:
+ /* TODO: Add support for C99 float math */
+ tp = doubletype;
+ break;
+ default:
+ abort();
+ }
+ if ((new = convert(np, tp, 1)) != NULL)
+ return new;
+ return np;
+}
+
+static void
+arithconv(Node **p1, Node **p2)
+{
+ int to = 0, s1, s2;
+ unsigned r1, r2;
+ Type *tp1, *tp2;
+ Node *np1, *np2;
+ struct limits *lp1, *lp2;
+
+ np1 = promote(*p1);
+ np2 = promote(*p2);
+
+ tp1 = np1->type;
+ tp2 = np2->type;
+
+ if (tp1 == tp2)
+ goto set_p1_p2;
+
+ s1 = (tp1->prop & TSIGNED) != 0;
+ r1 = tp1->n.rank;
+ lp1 = getlimits(tp1);
+
+ s2 = (tp2->prop & TSIGNED) != 0;
+ r2 = tp2->n.rank;
+ lp2 = getlimits(tp2);
+
+ if (s1 == s2 || tp1->op == FLOAT || tp2->op == FLOAT) {
+ to = r1 - r2;
+ } else if (!s1) {
+ if (r1 >= r2 || lp1->max.i >= lp2->max.i)
+ to = 1;
+ else
+ to = -1;
+ } else {
+ if (r2 >= r1 || lp2->max.i >= lp1->max.i)
+ to = -1;
+ else
+ to = 1;
+ }
+
+ if (to > 0)
+ np2 = convert(np2, tp1, 1);
+ else if (to < 0)
+ np1 = convert(np1, tp2, 1);
+
+set_p1_p2:
+ *p1 = np1;
+ *p2 = np2;
+}
+
+static int
+null(Node *np)
+{
+ if (np->type != pvoidtype || np->op != OCAST)
+ return 0;
+
+ np = np->left;
+ if (np->type != inttype)
+ return 0;
+
+ return cmpnode(np, 0);
+}
+
+static Node *
+chkternary(Node *yes, Node *no)
+{
+ /*
+ * FIXME:
+ * We are ignoring type qualifiers here,
+ * but the standard has strong rules about this.
+ * take a look to 6.5.15
+ */
+
+ if (!eqtype(yes->type, no->type, 1)) {
+ if ((yes->type->prop & TARITH) && (no->type->prop & TARITH)) {
+ arithconv(&yes, &no);
+ } else if (yes->type->op != PTR && no->type->op != PTR) {
+ goto wrong_type;
+ } else {
+ /* convert integer 0 to NULL */
+ if ((yes->type->prop & TINTEGER) && cmpnode(yes, 0))
+ yes = convert(yes, pvoidtype, 0);
+ if ((no->type->prop & TINTEGER) && cmpnode(no, 0))
+ no = convert(no, pvoidtype, 0);
+ /*
+ * At this point the type of both should be
+ * a pointer to something, or we have don't
+ * compatible types
+ */
+ if (yes->type->op != PTR || no->type->op != PTR)
+ goto wrong_type;
+ /*
+ * If we have a null pointer constant then
+ * convert to the another type
+ */
+ if (null(yes))
+ yes = convert(yes, no->type, 0);
+ if (null(no))
+ no = convert(no, yes->type, 0);
+
+ if (!eqtype(yes->type, no->type, 1))
+ goto wrong_type;
+ }
+ }
+ return node(OCOLON, yes->type, yes, no);
+
+wrong_type:
+ errorp("type mismatch in conditional expression");
+ freetree(yes);
+ freetree(no);
+ return constnode(zero);
+}
+
+static void
+chklvalue(Node *np)
+{
+ if (!(np->flags & NLVAL))
+ errorp("lvalue required in operation");
+ if (np->type == voidtype)
+ errorp("invalid use of void expression");
+}
+
+Node *
+decay(Node *np)
+{
+ Node *new;
+ Type *tp = np->type;
+
+ switch (tp->op) {
+ case ARY:
+ tp = tp->type;
+ if (np->op == OPTR) {
+ new = np->left;
+ free(np);
+ new->type = mktype(tp, PTR, 0, NULL);
+ return new;
+ }
+ case FTN:
+ new = node(OADDR, mktype(tp, PTR, 0, NULL), np, NULL);
+ if (np->sym && np->sym->flags & (SGLOBAL|SLOCAL|SPRIVATE))
+ new->flags |= NCONST;
+ return new;
+ default:
+ return np;
+ }
+}
+
+static Node *
+integerop(int op, Node *lp, Node *rp)
+{
+ if (!(lp->type->prop & TINTEGER) || !(rp->type->prop & TINTEGER))
+ error("operator requires integer operands");
+ arithconv(&lp, &rp);
+ return node(op, lp->type, lp, rp);
+}
+
+static Node *
+integeruop(int op, Node *np)
+{
+ if (!(np->type->prop & TINTEGER))
+ error("unary operator requires integer operand");
+ np = promote(np);
+ return node(op, np->type, np, NULL);
+}
+
+static Node *
+numericaluop(int op, Node *np)
+{
+ if (!(np->type->prop & TARITH))
+ error("unary operator requires numerical operand");
+ np = promote(np);
+ return node(op, np->type, np, NULL);
+}
+
+Node *
+convert(Node *np, Type *newtp, int iscast)
+{
+ Type *oldtp = np->type;
+
+ if (eqtype(newtp, oldtp, 0))
+ return np;
+
+ switch (oldtp->op) {
+ case ENUM:
+ case INT:
+ case FLOAT:
+ switch (newtp->op) {
+ case PTR:
+ if (oldtp->op == FLOAT || !cmpnode(np, 0) && !iscast)
+ return NULL;
+ case INT:
+ case FLOAT:
+ case ENUM:
+ break;
+ default:
+ return NULL;
+ }
+ break;
+ case PTR:
+ switch (newtp->op) {
+ case ENUM:
+ case INT:
+ case VOID:
+ if (!iscast)
+ return NULL;
+ break;
+ case PTR:
+ if (eqtype(newtp, oldtp, 1) ||
+ iscast ||
+ newtp == pvoidtype || oldtp == pvoidtype) {
+ np->type = newtp;
+ return np;
+ }
+ default:
+ return NULL;
+ }
+ break;
+ default:
+ return NULL;
+ }
+ return node(OCAST, newtp, np, NULL);
+}
+
+static Node *
+parithmetic(int op, Node *lp, Node *rp)
+{
+ Type *tp;
+ Node *size, *np;
+
+ if (lp->type->op != PTR)
+ XCHG(lp, rp, np);
+
+ tp = rp->type;
+ if (tp->op == PTR && !(tp->type->prop & TDEFINED))
+ goto incomplete;
+ tp = lp->type;
+ if (!(tp->type->prop & TDEFINED))
+ goto incomplete;
+ size = sizeofnode(tp->type);
+
+ if (op == OSUB && BTYPE(rp) == PTR) {
+ if ((rp = convert(rp, lp->type, 0)) == NULL)
+ goto incorrect;
+ lp = node(OSUB, pdifftype, lp, rp);
+ return node(ODIV, inttype, lp, size);
+ }
+ if (!(rp->type->prop & TINTEGER))
+ goto incorrect;
+
+ rp = convert(promote(rp), sizettype, 0);
+ rp = node(OMUL, sizettype, rp, size);
+ rp = convert(rp, tp, 1);
+
+ return node(op, tp, lp, rp);
+
+incomplete:
+ errorp("invalid use of undefined type");
+ return lp;
+incorrect:
+ errorp("incorrect arithmetic operands");
+ return lp;
+
+}
+
+static Node *
+arithmetic(int op, Node *lp, Node *rp)
+{
+ Type *ltp = lp->type, *rtp = rp->type;
+
+ if ((ltp->prop & TARITH) && (rtp->prop & TARITH)) {
+ arithconv(&lp, &rp);
+ return node(op, lp->type, lp, rp);
+ } else if ((ltp->op == PTR || rtp->op == PTR)) {
+ switch (op) {
+ case OADD:
+ case OSUB:
+ case OA_ADD:
+ case OA_SUB:
+ case OINC:
+ case ODEC:
+ return parithmetic(op, lp, rp);
+ }
+ }
+ errorp("incorrect arithmetic operands");
+}
+
+static Node *
+pcompare(int op, Node *lp, Node *rp)
+{
+ Node *np;
+
+ if (lp->type->prop & TINTEGER)
+ XCHG(lp, rp, np);
+ else if (eqtype(lp->type, pvoidtype, 1))
+ XCHG(lp, rp, np);
+
+ if ((np = convert(rp, lp->type, 0)) != NULL)
+ rp = np;
+ else
+ errorp("incompatible types in comparison");
+ return convert(node(op, pvoidtype, lp, rp), inttype, 1);
+}
+
+static Node *
+compare(int op, Node *lp, Node *rp)
+{
+ Type *ltp, *rtp;
+
+ ltp = lp->type;
+ rtp = rp->type;
+
+ if (ltp->op == PTR || rtp->op == PTR) {
+ return pcompare(op, rp, lp);
+ } else if ((ltp->prop & TARITH) && (rtp->prop & TARITH)) {
+ arithconv(&lp, &rp);
+ return convert(node(op, lp->type, lp, rp), inttype, 1);;
+ } else {
+ errorp("incompatible types in comparison");
+ freetree(lp);
+ freetree(rp);
+ return constnode(zero);
+ }
+}
+
+int
+negop(int op)
+{
+ switch (op) {
+ case OEQ: return ONE;
+ case ONE: return OEQ;
+ case OLT: return OGE;
+ case OGE: return OLT;
+ case OLE: return OGT;
+ case OGT: return OLE;
+ default: abort();
+ }
+ return op;
+}
+
+static Node *
+exp2cond(Node *np, int neg)
+{
+ if (np->type->prop & TAGGREG) {
+ errorp("used struct/union type value where scalar is required");
+ return constnode(zero);
+ }
+ switch (np->op) {
+ case ONEG:
+ case OOR:
+ case OAND:
+ return (neg) ? node(ONEG, inttype, np, NULL) : np;
+ case OEQ:
+ case ONE:
+ case OLT:
+ case OGE:
+ case OLE:
+ case OGT:
+ if (neg)
+ np->op = negop(np->op);
+ return np;
+ default:
+ return compare((neg) ? OEQ : ONE, np, constnode(zero));
+ }
+}
+
+static Node *
+logic(int op, Node *lp, Node *rp)
+{
+ lp = exp2cond(lp, 0);
+ rp = exp2cond(rp, 0);
+ return node(op, inttype, lp, rp);
+}
+
+static Node *
+field(Node *np)
+{
+ Symbol *sym;
+
+ namespace = np->type->ns;
+ next();
+ namespace = NS_IDEN;
+
+ sym = yylval.sym;
+ if (yytoken != IDEN)
+ unexpected();
+ next();
+
+ if (!(np->type->prop & TAGGREG)) {
+ errorp("request for member '%s' in something not a structure or union",
+ yylval.sym->name);
+ goto free_np;
+ }
+ if ((sym->flags & SDECLARED) == 0) {
+ errorp("incorrect field in struct/union");
+ goto free_np;
+ }
+ np = node(OFIELD, sym->type, np, varnode(sym));
+ np->flags |= NLVAL;
+ return np;
+
+free_np:
+ freetree(np);
+ return constnode(zero);
+}
+
+static Node *
+content(int op, Node *np)
+{
+ if (BTYPE(np) != PTR) {
+ errorp("invalid argument of memory indirection");
+ } else {
+ if (np->op == OADDR) {
+ Node *new = np->left;
+ new->type = np->type->type;
+ free(np);
+ np = new;
+ } else {
+ np = node(op, np->type->type, np, NULL);
+ }
+ np->flags |= NLVAL;
+ }
+ return np;
+}
+
+static Node *
+array(Node *lp, Node *rp)
+{
+ Type *tp;
+ Node *np;
+
+ if (!(lp->type->prop & TINTEGER) && !(rp->type->prop & TINTEGER))
+ error("array subscript is not an integer");
+ np = arithmetic(OADD, lp, rp);
+ tp = np->type;
+ if (tp->op != PTR)
+ errorp("subscripted value is neither array nor pointer");
+ return content(OPTR, np);
+}
+
+static Node *
+assignop(int op, Node *lp, Node *rp)
+{
+ if ((rp = convert(rp, lp->type, 0)) == NULL) {
+ errorp("incompatible types when assigning");
+ return lp;
+ }
+
+ return node(op, lp->type, lp, rp);
+}
+
+static Node *
+incdec(Node *np, int op)
+{
+ Type *tp = np->type;
+ Node *inc;
+
+ chklvalue(np);
+ np->flags |= NEFFECT;
+
+ if (!(tp->prop & TDEFINED)) {
+ errorp("invalid use of undefined type");
+ return np;
+ } else if (tp->op == PTR && !(tp->type->prop & TDEFINED)) {
+ errorp("%s of pointer to an incomplete type",
+ (op == OINC || op == OA_ADD) ? "increment" : "decrement");
+ return np;
+ } else if (tp->op == PTR || (tp->prop & TARITH)) {
+ inc = constnode(one);
+ } else {
+ errorp("wrong type argument to increment or decrement");
+ return np;
+ }
+ return arithmetic(op, np, inc);
+}
+
+static Node *
+address(int op, Node *np)
+{
+ Node *new;
+
+ /*
+ * ansi c accepts & applied to a function name, and it generates
+ * a function pointer
+ */
+ if (np->op == OSYM) {
+ if (np->type->op == FTN)
+ return decay(np);
+ if (np->type->op == ARY)
+ goto dont_check_lvalue;
+ }
+ chklvalue(np);
+
+dont_check_lvalue:
+ if (np->sym && (np->sym->flags & SREGISTER))
+ errorp("address of register variable '%s' requested", yytext);
+ new = node(op, mktype(np->type, PTR, 0, NULL), np, NULL);
+ if (np->sym && np->sym->flags & (SGLOBAL|SLOCAL|SPRIVATE))
+ new->flags |= NCONST;
+ return new;
+}
+
+static Node *
+negation(int op, Node *np)
+{
+ if (!(np->type->prop & TARITH) && np->type->op != PTR) {
+ errorp("invalid argument of unary '!'");
+ return constnode(zero);
+ }
+ return exp2cond(np, 1);
+}
+
+static Symbol *
+notdefined(Symbol *sym)
+{
+ int isdef;
+
+ if (namespace == NS_CPP && !strcmp(sym->name, "defined")) {
+ disexpand = 1;
+ next();
+ expect('(');
+ sym = yylval.sym;
+ expect(IDEN);
+ expect(')');
+
+ isdef = (sym->flags & SDECLARED) != 0;
+ sym = newsym(NS_IDEN, NULL);
+ sym->type = inttype;
+ sym->flags |= SCONSTANT;
+ sym->u.i = isdef;
+ disexpand = 0;
+ return sym;
+ }
+ errorp("'%s' undeclared", yytext);
+ sym->type = inttype;
+ return install(sym->ns, yylval.sym);
+}
+
+static Symbol *
+adjstrings(Symbol *sym)
+{
+ char *s, *t;
+ size_t len, n;
+ Type *tp;
+
+ tp = sym->type;
+ s = sym->u.s;
+ for (len = strlen(s);; len += n) {
+ next();
+ if (yytoken != STRING)
+ break;
+ t = yylval.sym->u.s;
+ n = strlen(t);
+ s = xrealloc(s, len + n + 1);
+ memcpy(s+len, t, n);
+ s[len + n] = '\0';
+ killsym(yylval.sym);
+ }
+ ++len;
+ if (tp->n.elem != len) {
+ sym->type = mktype(chartype, ARY, len, NULL);
+ sym->u.s = s;
+ }
+ return sym;
+}
+
+/*************************************************************
+ * grammar functions *
+ *************************************************************/
+static Node *
+primary(void)
+{
+ Node *np;
+ Symbol *sym;
+ Node *(*fun)(Symbol *);
+
+ sym = yylval.sym;
+ switch (yytoken) {
+ case STRING:
+ np = constnode(adjstrings(sym));
+ sym->flags |= SHASINIT;
+ emit(ODECL, sym);
+ emit(OINIT, np);
+ return varnode(sym);
+ case BUILTIN:
+ fun = sym->u.fun;
+ next();
+ expect('(');
+ np = (*fun)(sym);
+ expect(')');
+
+ /* do not call to next */
+ return np;
+ case CONSTANT:
+ np = constnode(sym);
+ break;
+ case IDEN:
+ assert((sym->flags & SCONSTANT) == 0);
+ if ((sym->flags & SDECLARED) == 0) {
+ if (namespace == NS_CPP) {
+ np = constnode(zero);
+ break;
+ }
+ sym = notdefined(sym);
+ }
+ sym->flags |= SUSED;
+ np = varnode(sym);
+ break;
+ default:
+ unexpected();
+ }
+ next();
+
+ return np;
+}
+
+static Node *
+arguments(Node *np)
+{
+ int toomany, n, op;
+ Node *par = NULL, *arg;
+ Type *argtype, **targs, *tp = np->type, *rettype;
+
+ if (tp->op == PTR && tp->type->op == FTN) {
+ np = content(OPTR, np);
+ tp = np->type;
+ }
+ if (tp->op != FTN) {
+ targs = (Type *[]) {ellipsistype};
+ n = 1;
+ rettype = inttype;
+ errorp("function or function pointer expected");
+ } else {
+ targs = tp->p.pars;
+ n = tp->n.elem;
+ rettype = tp->type;
+ }
+
+ expect('(');
+ if (yytoken == ')')
+ goto no_pars;
+ toomany = 0;
+
+ do {
+ arg = xassign();
+ argtype = *targs;
+ if (argtype == ellipsistype) {
+ n = 0;
+ switch (arg->type->op) {
+ case INT:
+ arg = promote(arg);
+ break;
+ case FLOAT:
+ if (arg->type == floattype)
+ arg = convert(arg, doubletype, 1);
+ break;
+ }
+ par = node(OPAR, arg->type, par, arg);
+ continue;
+ }
+ if (--n < 0) {
+ if (!toomany)
+ errorp("too many arguments in function call");
+ toomany = 1;
+ continue;
+ }
+ ++targs;
+ if ((arg = convert(arg, argtype, 0)) != NULL) {
+ par = node(OPAR, arg->type, par, arg);
+ continue;
+ }
+ errorp("incompatible type for argument %d in function call",
+ tp->n.elem - n + 1);
+ } while (accept(','));
+
+no_pars:
+ expect(')');
+ if (n > 0 && *targs != ellipsistype)
+ errorp("too few arguments in function call");
+
+ op = (tp->prop&TELLIPSIS) ? OCALLE : OCALL;
+ return node(op, rettype, np, par);
+}
+
+static Node *unary(int);
+
+static Type *
+typeof(Node *np)
+{
+ Type *tp;
+
+ if (np == NULL)
+ unexpected();
+ tp = np->type;
+ freetree(np);
+ return tp;
+}
+
+static Type *
+sizeexp(void)
+{
+ Type *tp;
+
+ expect('(');
+ switch (yytoken) {
+ case TYPE:
+ case TYPEIDEN:
+ tp = typename();
+ break;
+ default:
+ tp = typeof(unary(0));
+ break;
+ }
+ expect(')');
+ return tp;
+}
+
+static Node *
+postfix(Node *lp)
+{
+ Node *rp;
+
+ for (;;) {
+ switch (yytoken) {
+ case '[':
+ case DEC:
+ case INC:
+ case INDIR:
+ case '.':
+ case '(':
+ lp = decay(lp);
+ switch (yytoken) {
+ case '[':
+ next();
+ rp = xexpr();
+ expect(']');
+ lp = array(lp, rp);
+ break;
+ case DEC:
+ case INC:
+ lp = incdec(lp, (yytoken == INC) ? OINC : ODEC);
+ next();
+ break;
+ case INDIR:
+ lp = content(OPTR, lp);
+ case '.':
+ lp = field(lp);
+ break;
+ case '(':
+ lp = arguments(lp);
+ lp->flags |= NEFFECT;
+ break;
+ }
+ break;
+ default:
+ return lp;
+ }
+ }
+}
+
+static Node *
+defined(void)
+{
+ Symbol *sym;
+ int paren;
+
+ disexpand = 1;
+ next();
+ paren = accept('(');
+ if (yytoken != IDEN && yytoken != TYPEIDEN)
+ cpperror("operator 'defined' requires an identifier");
+ if (yytoken == TYPEIDEN || !(yylval.sym->flags & SDECLARED))
+ sym = zero;
+ else
+ sym = one;
+ disexpand = 0;
+ next();
+ if (paren)
+ expect(')');
+ return constnode(sym);
+}
+
+static Node *cast(int);
+
+static Node *
+unary(int needdecay)
+{
+ Node *(*fun)(int, Node *), *np;
+ int op;
+ Type *tp;
+
+ switch (yytoken) {
+ case '!': op = 0; fun = negation; break;
+ case '+': op = OADD; fun = numericaluop; break;
+ case '-': op = OSNEG; fun = numericaluop; break;
+ case '~': op = OCPL; fun = integeruop; break;
+ case '&': op = OADDR; fun = address; break;
+ case '*': op = OPTR; fun = content; break;
+ case SIZEOF:
+ next();
+ tp = (yytoken == '(') ? sizeexp() : typeof(unary(0));
+ if (!(tp->prop & TDEFINED))
+ errorp("sizeof applied to an incomplete type");
+ return sizeofnode(tp);
+ case INC:
+ case DEC:
+ op = (yytoken == INC) ? OA_ADD : OA_SUB;
+ next();
+ np = incdec(unary(1), op);
+ goto chk_decay;
+ case IDEN:
+ case TYPEIDEN:
+ if (lexmode == CPPMODE && !strcmp(yylval.sym->name, "defined"))
+ return defined();
+ default:
+ np = postfix(primary());
+ goto chk_decay;
+ }
+
+ next();
+ np = (*fun)(op, cast(op != OADDR));
+
+chk_decay:
+ if (needdecay)
+ np = decay(np);
+ return np;
+}
+
+static Node *
+cast(int needdecay)
+{
+ Node *lp, *rp;
+ Type *tp;
+ static int nested;
+
+ if (!accept('('))
+ return unary(needdecay);
+
+ switch (yytoken) {
+ case TQUALIFIER:
+ case TYPE:
+ case TYPEIDEN:
+ tp = typename();
+ expect(')');
+
+ if (yytoken == '{')
+ return initlist(tp);
+
+ switch (tp->op) {
+ case ARY:
+ error("cast specifies an array type");
+ default:
+ lp = cast(needdecay);
+ if ((rp = convert(lp, tp, 1)) == NULL)
+ error("bad type conversion requested");
+ rp->flags &= ~NLVAL;
+ rp->flags |= lp->flags & NLVAL;
+ }
+ break;
+ default:
+ if (nested == NR_SUBEXPR)
+ error("too many expressions nested by parentheses");
+ ++nested;
+ rp = xexpr();
+ --nested;
+ expect(')');
+ rp = postfix(rp);
+ break;
+ }
+
+ return rp;
+}
+
+static Node *
+mul(void)
+{
+ Node *np, *(*fun)(int, Node *, Node *);
+ int op;
+
+ np = cast(1);
+ for (;;) {
+ switch (yytoken) {
+ case '*': op = OMUL; fun = arithmetic; break;
+ case '/': op = ODIV; fun = arithmetic; break;
+ case '%': op = OMOD; fun = integerop; break;
+ default: return np;
+ }
+ next();
+ np = (*fun)(op, np, cast(1));
+ }
+}
+
+static Node *
+add(void)
+{
+ int op;
+ Node *np;
+
+ np = mul();
+ for (;;) {
+ switch (yytoken) {
+ case '+': op = OADD; break;
+ case '-': op = OSUB; break;
+ default: return np;
+ }
+ next();
+ np = arithmetic(op, np, mul());
+ }
+}
+
+static Node *
+shift(void)
+{
+ int op;
+ Node *np;
+
+ np = add();
+ for (;;) {
+ switch (yytoken) {
+ case SHL: op = OSHL; break;
+ case SHR: op = OSHR; break;
+ default: return np;
+ }
+ next();
+ np = integerop(op, np, add());
+ }
+}
+
+static Node *
+relational(void)
+{
+ int op;
+ Node *np;
+
+ np = shift();
+ for (;;) {
+ switch (yytoken) {
+ case '<': op = OLT; break;
+ case '>': op = OGT; break;
+ case GE: op = OGE; break;
+ case LE: op = OLE; break;
+ default: return np;
+ }
+ next();
+ np = compare(op, np, shift());
+ }
+}
+
+static Node *
+eq(void)
+{
+ int op;
+ Node *np;
+
+ np = relational();
+ for (;;) {
+ switch (yytoken) {
+ case EQ: op = OEQ; break;
+ case NE: op = ONE; break;
+ default: return np;
+ }
+ next();
+ np = compare(op, np, relational());
+ }
+}
+
+static Node *
+bit_and(void)
+{
+ Node *np;
+
+ np = eq();
+ while (accept('&'))
+ np = integerop(OBAND, np, eq());
+ return np;
+}
+
+static Node *
+bit_xor(void)
+{
+ Node *np;
+
+ np = bit_and();
+ while (accept('^'))
+ np = integerop(OBXOR, np, bit_and());
+ return np;
+}
+
+static Node *
+bit_or(void)
+{
+ Node *np;
+
+ np = bit_xor();
+ while (accept('|'))
+ np = integerop(OBOR, np, bit_xor());
+ return np;
+}
+
+static Node *
+and(void)
+{
+ Node *np;
+
+ np = bit_or();
+ while (accept(AND))
+ np = logic(OAND, np, bit_or());
+ return np;
+}
+
+static Node *
+or(void)
+{
+ Node *np;
+
+ np = and();
+ while (accept(OR))
+ np = logic(OOR, np, and());
+ return np;
+}
+
+static Node *
+ternary(void)
+{
+ Node *cond;
+
+ cond = or();
+ while (accept('?')) {
+ Node *ifyes, *ifno, *np;
+
+ cond = exp2cond(cond, 0);
+ ifyes = xexpr();
+ expect(':');
+ ifno = ternary();
+ np = chkternary(ifyes, ifno);
+ cond = node(OASK, np->type, cond, np);
+ }
+ return cond;
+}
+
+static Node *
+xassign(void)
+{
+ Node *np, *(*fun)(int , Node *, Node *);
+ int op;
+
+ np = ternary();
+ for (;;) {
+ switch (yytoken) {
+ case '=': op = OASSIGN; fun = assignop; break;
+ case MUL_EQ: op = OA_MUL; fun = arithmetic; break;
+ case DIV_EQ: op = OA_DIV; fun = arithmetic; break;
+ case MOD_EQ: op = OA_MOD; fun = integerop; break;
+ case ADD_EQ: op = OA_ADD; fun = arithmetic; break;
+ case SUB_EQ: op = OA_SUB; fun = arithmetic; break;
+ case SHL_EQ: op = OA_SHL; fun = integerop; break;
+ case SHR_EQ: op = OA_SHR; fun = integerop; break;
+ case AND_EQ: op = OA_AND; fun = integerop; break;
+ case XOR_EQ: op = OA_XOR; fun = integerop; break;
+ case OR_EQ: op = OA_OR; fun = integerop; break;
+ default: return np;
+ }
+ chklvalue(np);
+ np->flags |= NEFFECT;
+ next();
+ np = (fun)(op, np, assign());
+ }
+}
+
+static Node *
+xexpr(void)
+{
+ Node *lp, *rp;
+
+ lp = xassign();
+ while (accept(',')) {
+ rp = xassign();
+ lp = node(OCOMMA, rp->type, lp, rp);
+ }
+ return lp;
+}
+
+Node *
+assign(void)
+{
+ return simplify(xassign());
+}
+
+Node *
+constexpr(void)
+{
+ Node *np;
+
+ np = ternary();
+ if (np && np->type->op == INT) {
+ np = simplify(convert(np, inttype, 0));
+ if (np->flags & NCONST)
+ return np;
+ }
+ freetree(np);
+ return NULL;
+}
+
+Node *
+expr(void)
+{
+ return simplify(xexpr());
+}
+
+Node *
+condexpr(int neg)
+{
+ Node *np;
+
+ np = exp2cond(xexpr(), neg);
+ if (np->flags & NCONST)
+ warn("conditional expression is constant");
+ return simplify(np);
+}
--- /dev/null
+++ b/src/cmd/cc1/fold.c
@@ -1,0 +1,685 @@
+static char sccsid[] = "@(#) ./cc1/fold.c";
+#include <assert.h>
+#include <stdlib.h>
+
+#include <scc/scc.h>
+#include "cc1.h"
+
+
+TUINT
+ones(int nbytes)
+{
+ return (nbytes == 8) ? -1 : ~(-1ull << nbytes * 8);
+}
+
+static int
+addi(TINT l, TINT r, Type *tp)
+{
+ struct limits *lim = getlimits(tp);
+ TINT max = lim->max.i, min = -lim->min.i;
+
+ if (l < 0 && r < 0 && l >= min - r ||
+ l == 0 ||
+ r == 0 ||
+ l < 0 && r > 0 ||
+ l > 0 && r < 0 ||
+ l > 0 && r > 0 && l <= max - r) {
+ return 1;
+ }
+ warn("overflow in constant expression");
+ return 0;
+}
+
+static int
+addf(TFLOAT l, TFLOAT r, Type *tp)
+{
+ struct limits *lim = getlimits(tp);
+ TFLOAT max = lim->max.f, min = lim->min.f;
+
+ if (l < 0 && r < 0 && l >= min - r ||
+ l == 0 ||
+ r == 0 ||
+ l < 0 && r > 0 ||
+ l > 0 && r < 0 ||
+ l > 0 && r > 0 && l <= max - r) {
+ return 1;
+ }
+ warn("overflow in constant expression");
+ return 0;
+}
+
+static int
+subi(TINT l, TINT r, Type *tp)
+{
+ return addi(l, -r, tp);
+}
+
+static int
+subf(TFLOAT l, TFLOAT r, Type *tp)
+{
+ return addf(l, -r, tp);
+}
+
+static int
+muli(TINT l, TINT r, Type *tp)
+{
+ struct limits *lim = getlimits(tp);
+ TINT max = lim->max.i, min = -lim->min.i;
+
+ if (l > -1 && l <= 1 ||
+ r > -1 && r <= 1 ||
+ l < 0 && r < 0 && -l <= max/-r ||
+ l < 0 && r > 0 && l >= min/r ||
+ l > 0 && r < 0 && r >= min/l ||
+ l > 0 && r > 0 && l <= max/r) {
+ return 1;
+ }
+ warn("overflow in constant expression");
+ return 0;
+}
+
+static int
+mulf(TFLOAT l, TFLOAT r, Type *tp)
+{
+ struct limits *lim = getlimits(tp);
+ TFLOAT max = lim->max.f, min = lim->min.f;
+
+ if (l > -1 && l <= 1 ||
+ r > -1 && r <= 1 ||
+ l < 0 && r < 0 && -l <= max/-r ||
+ l < 0 && r > 0 && l >= min/r ||
+ l > 0 && r < 0 && r >= min/l ||
+ l > 0 && r > 0 && l <= max/r) {
+ return 1;
+ }
+ warn("overflow in constant expression");
+ return 0;
+}
+
+static int
+divi(TINT l, TINT r, Type *tp)
+{
+ struct limits *lim = getlimits(tp);
+
+ if (r == 0 || l == -lim->min.i && r == -1) {
+ warn("overflow in constant expression");
+ return 0;
+ }
+ return 1;
+}
+
+static int
+divf(TFLOAT l, TFLOAT r, Type *tp)
+{
+ struct limits *lim = getlimits(tp);
+
+ if (l < 0) l = -l;
+ if (r < 0) r = -r;
+
+ if (r == 0.0 || r < 1.0 && l > lim->max.f * r) {
+ warn("overflow in constant expression");
+ return 0;
+ }
+ return 1;
+}
+
+static int
+lshi(TINT l, TINT r, Type *tp)
+{
+ if (r < 0 || r >= tp->size * 8) {
+ warn("shifting %d bits is undefined", r);
+ return 0;
+ }
+ return muli(l, 1 << r, tp);
+}
+
+static int
+rshi(TINT l, TINT r, Type *tp)
+{
+ if (r < 0 || r >= tp->size * 8) {
+ warn("shifting %d bits is undefined", r);
+ return 0;
+ }
+ return 1;
+}
+
+static int
+foldint(int op, Symbol *res, TINT l, TINT r)
+{
+ TINT i;
+ Type *tp = res->type;
+ int (*validate)(TINT, TINT, Type *tp);
+
+ switch (op) {
+ case OADD: validate = addi; break;
+ case OSUB: validate = subi; break;
+ case OMUL: validate = muli; break;
+ case ODIV: validate = divi; break;
+ case OSHL: validate = lshi; break;
+ case OSHR: validate = rshi; break;
+ case OMOD: validate = divi; break;
+ default: validate = NULL; break;
+ }
+
+ if (validate && !(*validate)(l, r, tp))
+ return 0;
+
+ switch (op) {
+ case OADD: i = l + r; break;
+ case OSUB: i = l - r; break;
+ case OMUL: i = l * r; break;
+ case ODIV: i = l / r; break;
+ case OMOD: i = l % r; break;
+ case OSHL: i = l << r; break;
+ case OSHR: i = l >> r; break;
+ case OBAND: i = l & r; break;
+ case OBXOR: i = l ^ r; break;
+ case OBOR: i = l | r; break;
+ case OAND: i = l && r; break;
+ case OOR: i = l || r; break;
+ case OLT: i = l < r; break;
+ case OGT: i = l > r; break;
+ case OGE: i = l >= r; break;
+ case OLE: i = l <= r; break;
+ case OEQ: i = l == r; break;
+ case ONE: i = l != r; break;
+ case ONEG: i = !l; break;
+ case OSNEG: i = -l; break;
+ case OCPL: i = ~l; break;
+ default: return 0;
+ }
+ res->u.i = i;
+
+ DBG("FOLD i l=%lld %d r=%lld = %lld", l, op, r, i);
+ return 1;
+}
+
+static int
+folduint(int op, Symbol *res, TUINT l, TUINT r)
+{
+ TINT i;
+ TUINT u;
+
+ switch (op) {
+ case OADD: u = l + r; break;
+ case OSUB: u = l - r; break;
+ case OMUL: u = l * r; break;
+ case ODIV: u = l / r; break;
+ case OMOD: u = l % r; break;
+ case OSHL: u = l << r; break;
+ case OSHR: u = l >> r; break;
+ case OBAND: u = l & r; break;
+ case OBXOR: u = l ^ r; break;
+ case OBOR: u = l | r; break;
+ case ONEG: u = !l; break;
+ case OSNEG: u = -l; break;
+ case OCPL: u = ~l; break;
+ case OAND: i = l && r; goto sign;
+ case OOR: i = l || r; goto sign;
+ case OLT: i = l < r; goto sign;
+ case OGT: i = l > r; goto sign;
+ case OGE: i = l >= r; goto sign;
+ case OLE: i = l <= r; goto sign;
+ case OEQ: i = l == r; goto sign;
+ case ONE: i = l != r; goto sign;
+ default: return 0;
+ }
+ res->u.u = u & ones(res->type->size);
+
+ DBG("FOLD ui l=%llu %d r=%llu = %llu", l, op, r, u);
+ return 1;
+
+sign:
+ res->u.i = i;
+
+ DBG("FOLD sui %llu %d %llu = %llu", l, op, r, i);
+ return 1;
+}
+
+static int
+foldfloat(int op, Symbol *res, TFLOAT l, TFLOAT r)
+{
+ TFLOAT f;
+ TINT i;
+ int (*validate)(TFLOAT, TFLOAT, Type *tp);
+
+ switch (op) {
+ case OADD: validate = addf; break;
+ case OSUB: validate = subf; break;
+ case OMUL: validate = mulf; break;
+ case ODIV: validate = divf; break;
+ default: validate = NULL; break;
+ }
+
+ if (validate && !(*validate)(l, r, res->type))
+ return 0;
+
+ switch (op) {
+ case OADD: f = l + r; break;
+ case OSUB: f = l - r; break;
+ case OMUL: f = l * r; break;
+ case ODIV: f = l / r; break;
+ case OLT: i = l < r; goto comparison;
+ case OGT: i = l > r; goto comparison;
+ case OGE: i = l >= r; goto comparison;
+ case OLE: i = l <= r; goto comparison;
+ case OEQ: i = l == r; goto comparison;
+ case ONE: i = l != r; goto comparison;
+ default: return 0;
+ }
+ res->u.f = f;
+
+ DBG("FOLD f l=%lf %d r=%lf = %lf", l, op, r, f);
+ return 1;
+
+comparison:
+ res->u.i = i;
+
+ DBG("FOLD if l=%lf %d r=%lf = %lld", l, op, r, i);
+ return 1;
+}
+
+static Node *
+foldconst(int type, int op, Type *tp, Symbol *ls, Symbol *rs)
+{
+ Symbol *sym, aux;
+ TINT i;
+ TUINT u;
+ TFLOAT f;
+
+ aux.type = tp;
+ switch (type) {
+ case INT:
+ i = (rs) ? rs->u.i : 0;
+ if (!foldint(op, &aux, ls->u.i, i))
+ return NULL;
+ break;
+ case UNSIGNED:
+ u = (rs) ? rs->u.u : 0u;
+ if (!folduint(op, &aux, ls->u.u, u))
+ return NULL;
+ break;
+ case FLOAT:
+ f = (rs) ? rs->u.f : 0.0;
+ if (!foldfloat(op, &aux, ls->u.f, f))
+ return NULL;
+ break;
+ }
+ sym = newsym(NS_IDEN, NULL);
+ sym->flags |= SCONSTANT;
+ sym->type = tp;
+ sym->u = aux.u;
+ return constnode(sym);
+}
+
+static Node *
+foldcast(Node *np, Node *l)
+{
+ TUINT negmask, mask, u;
+ Type *newtp = np->type, *oldtp = l->type;
+ Symbol aux, *sym, *osym = l->sym;
+
+ if (!(l->flags & NCONST))
+ return np;
+
+ switch (newtp->op) {
+ case PTR:
+ case INT:
+ case ENUM:
+ switch (oldtp->op) {
+ case PTR:
+ case INT:
+ case ENUM:
+ u = (oldtp->prop & TSIGNED) ? osym->u.i : osym->u.u;
+ break;
+ case FLOAT:
+ oldtp = newtp;
+ u = osym->u.f;
+ break;
+ default:
+ return np;
+ }
+ mask = ones(newtp->size);
+ if (newtp->prop & TSIGNED) {
+ negmask = ~mask;
+ if (u & (negmask >> 1) & mask)
+ u |= negmask;
+ aux.u.i = u;
+ } else {
+ aux.u.u = u & mask;
+ }
+ break;
+ case FLOAT:
+ /* FIXME: The cast can be from another float type */
+ aux.u.f = (oldtp->prop & TSIGNED) ? osym->u.i : osym->u.u;
+ break;
+ default:
+ return np;
+ }
+ DBG("FOLD cast %c->%c", oldtp->letter, newtp->letter);
+ freetree(np);
+ sym = newsym(NS_IDEN, NULL);
+ sym->flags |= SCONSTANT;
+ sym->type = newtp;
+ sym->u = aux.u;
+ return constnode(sym);
+}
+
+static Node *
+foldunary(Node *np, Node *l)
+{
+ int op = l->op;
+ Node *aux;
+
+ switch (np->op) {
+ case ONEG:
+ if (l->op == ONEG)
+ break;
+ return NULL;
+ case OADD:
+ DBG("FOLD unary delete %d", np->op);
+ np->left = NULL;
+ freetree(np);
+ return l;
+ case OCAST:
+ if (op != OCAST)
+ return foldcast(np, l);
+ /* TODO: This is wrong: (float)(int) 7.2 */
+ DBG("FOLD unary collapse %d", np->op);
+ np->left = l->left;
+ l->left = NULL;
+ freetree(l);
+ return np;
+ case OSNEG:
+ case OCPL:
+ if (op != np->op)
+ return NULL;
+ break;
+ case OPTR:
+ if (op != OADDR || np->type != l->left->type)
+ return NULL;
+ break;
+ case OADDR:
+ if (op != OPTR)
+ return NULL;
+ break;
+ default:
+ return NULL;
+ }
+ DBG("FOLD unary cancel %d", np->op);
+ aux = l->left;
+ l->left = NULL;
+ freetree(np);
+ return aux;
+}
+
+static Node *
+fold(Node *np)
+{
+ Symbol *rs, *ls;
+ Type *optype;
+ int type;
+ int op = np->op;
+ Node *p, *lp = np->left, *rp = np->right;
+ Type *tp = np->type;
+
+ assert(lp && rp);
+ if ((op == ODIV || op == OMOD) && cmpnode(rp, 0)) {
+ warn("division by 0");
+ return NULL;
+ }
+ /*
+ * Return if any of the children is no constant,
+ * or it is a constant generated when
+ * the address of a static variable is taken
+ * (when we don't know the physical address so
+ * we cannot fold it)
+ */
+ if (!rp) {
+ rs = NULL;
+ } else {
+ if (!(rp->flags & NCONST) || !rp->sym)
+ return NULL;
+ rs = rp->sym;
+ }
+
+ if (!(lp->flags & NCONST) || !lp->sym)
+ return NULL;
+ optype = lp->type;
+ ls = lp->sym;
+
+ switch (type = optype->op) {
+ case ENUM:
+ case INT:
+ if (!(optype->prop & TSIGNED))
+ type = UNSIGNED;
+ case PTR:
+ case FLOAT:
+ if ((p = foldconst(type, op, tp, ls, rs)) == NULL)
+ return NULL;
+ freetree(np);
+ return p;
+ default:
+ return NULL;
+ }
+}
+
+static void
+commutative(Node *np, Node *l, Node *r)
+{
+ int op = np->op;
+
+ if (r == NULL || r->flags&NCONST || !(l->flags&NCONST))
+ return;
+
+ switch (op) {
+ case OLT:
+ case OGT:
+ case OGE:
+ case OLE:
+ DBG("FOLD neg commutative %d", np->op);
+ np->op = negop(op);
+ case OEQ:
+ case ONE:
+ case OADD:
+ case OMUL:
+ case OBAND:
+ case OBXOR:
+ case OBOR:
+ DBG("FOLD commutative %d", np->op);
+ np->left = r;
+ np->right = l;
+ break;
+ }
+}
+
+static Node *
+identity(Node *np)
+{
+ int iszeror, isoner;
+ int iszerol, isonel;
+ Node *lp = np->left, *rp = np->right;
+
+ if (!rp)
+ return NULL;
+
+ iszeror = cmpnode(rp, 0);
+ isoner = cmpnode(rp, 1),
+ iszerol = cmpnode(lp, 0);
+ isonel = cmpnode(lp, 1);
+
+ switch (np->op) {
+ case OOR:
+ /*
+ * 1 || i => 1 (free right)
+ * i || 0 => i (free right)
+ * 0 || i => i (free left)
+ * i || 1 => i,1 (comma)
+ */
+ if (isonel | iszeror)
+ goto free_right;
+ if (iszerol)
+ goto free_left;
+ if (isoner)
+ goto change_to_comma;
+ return NULL;
+ case OAND:
+ /*
+ * 0 && i => 0 (free right)
+ * i && 1 => i (free right)
+ * 1 && i => i (free left)
+ * i && 0 => i,0 (comma)
+ */
+ if (iszerol | isoner)
+ goto free_right;
+ if (isonel)
+ goto free_left;
+ if (iszeror)
+ goto change_to_comma;
+ return NULL;
+ case OSHL:
+ case OSHR:
+ /*
+ * i >> 0 => i (free right)
+ * i << 0 => i (free right)
+ * 0 >> i => 0 (free right)
+ * 0 << i => 0 (free right)
+ */
+ if (iszeror | iszerol)
+ goto free_right;
+ return NULL;
+ case OBXOR:
+ case OADD:
+ case OBOR:
+ case OSUB:
+ /*
+ * i + 0 => i
+ * i - 0 => i
+ * i | 0 => i
+ * i ^ 0 => i
+ */
+ if (iszeror)
+ goto free_right;
+ return NULL;
+ case OMUL:
+ /*
+ * i * 0 => i,0
+ * i * 1 => i
+ */
+ if (iszeror)
+ goto change_to_comma;
+ if (isoner)
+ goto free_right;
+ return NULL;
+ case ODIV:
+ /* i / 1 => i */
+ if (isoner)
+ goto free_right;
+ return NULL;
+ case OBAND:
+ /* i & ~0 => i */
+ if (cmpnode(rp, -1))
+ goto free_right;
+ return NULL;
+ case OMOD:
+ /* i % 1 => i,1 */
+ /* TODO: i % 2^n => i & n-1 */
+ if (isoner)
+ goto change_to_comma;
+ default:
+ return NULL;
+ }
+
+free_right:
+ DBG("FOLD identity %d", np->op);
+ np->left = NULL;
+ freetree(np);
+ return lp;
+
+free_left:
+ DBG("FOLD identity %d", np->op);
+ np->right = NULL;
+ freetree(np);
+ return rp;
+
+change_to_comma:
+ DBG("FOLD identity %d", np->op);
+ np->op = OCOMMA;
+ return np;
+}
+
+static Node *
+foldternary(Node *np, Node *cond, Node *body)
+{
+ if (!(cond->flags & NCONST))
+ return np;
+ if (cmpnode(cond, 0)) {
+ np = body->right;
+ freetree(body->left);
+ } else {
+ np = body->left;
+ freetree(body->right);
+ }
+
+ DBG("FOLD ternary");
+ body->left = NULL;
+ body->right = NULL;
+ freetree(cond);
+ free(body);
+ return np;
+}
+
+/* TODO: fold OCOMMA */
+
+Node *
+simplify(Node *np)
+{
+ Node *p, *l, *r;
+
+ if (!np)
+ return NULL;
+ if (debug)
+ prtree(np);
+
+ l = np->left = simplify(np->left);
+ r = np->right = simplify(np->right);
+
+ switch (np->op) {
+ case OASK:
+ return foldternary(np, l, r);
+ case OCALL:
+ case OPAR:
+ case OSYM:
+ case OASSIGN:
+ case OA_MUL:
+ case OA_DIV:
+ case OA_MOD:
+ case OA_ADD:
+ case OA_SUB:
+ case OA_SHL:
+ case OA_SHR:
+ case OA_AND:
+ case OA_XOR:
+ case OA_OR:
+ return np;
+ case OSNEG:
+ case OCPL:
+ case OADDR:
+ case OPTR:
+ case INC:
+ case DEC:
+ case OCAST:
+ case ONEG:
+ assert(!r);
+ if ((p = foldunary(np, l)) != NULL)
+ return p;
+ return np;
+ default:
+ commutative(np, l, r);
+ if ((p = fold(np)) != NULL)
+ return p;
+ if ((p = identity(np)) != NULL)
+ return p;
+ return np;
+ }
+}
--- /dev/null
+++ b/src/cmd/cc1/init.c
@@ -1,0 +1,378 @@
+static char sccsid[] = "@(#) ./cc1/init.c";
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <scc/cstd.h>
+#include <scc/scc.h>
+#include "cc1.h"
+
+
+typedef struct init Init;
+
+struct designator {
+ TINT pos;
+ Node *expr;
+ struct designator *next;
+};
+
+struct init {
+ TUINT pos;
+ TUINT max;
+ struct designator *tail;
+ struct designator *head;
+};
+
+static TINT
+arydesig(Type *tp, Init *ip)
+{
+ TINT npos;
+ Node *np;
+
+ if (tp->op != ARY)
+ errorp("array index in non-array initializer");
+ next();
+ np = constexpr();
+ npos = np->sym->u.i;
+ if (npos < 0 || (tp->prop & TDEFINED) && npos >= tp->n.elem) {
+ errorp("array index in initializer exceeds array bounds");
+ npos = 0;
+ }
+ freetree(np);
+ expect(']');
+ return npos;
+}
+
+static TINT
+fielddesig(Type *tp, Init *ip)
+{
+ int ons;
+ Symbol *sym, **p;
+
+ if (!(tp->prop & TAGGREG))
+ errorp("field name not in record or union initializer");
+ ons = namespace;
+ namespace = tp->ns;
+ next();
+ namespace = ons;
+ if (yytoken != IDEN)
+ unexpected();
+ sym = yylval.sym;
+ next();
+ if ((sym->flags & SDECLARED) == 0) {
+ errorp("unknown field '%s' specified in initializer",
+ sym->name);
+ return 0;
+ }
+ for (p = tp->p.fields; *p != sym; ++p)
+ ;
+ return p - tp->p.fields;
+}
+
+static Init *
+init(Init *ip)
+{
+ ip->tail = ip->head = NULL;
+ ip->pos = ip->max = 0;
+ return ip;
+}
+
+static Node *
+str2ary(Type *tp)
+{
+ Node *np;
+ Type *btp = tp->type;;
+ Symbol *sym;
+ size_t len;
+ char *s;
+
+ np = assign();
+ sym = np->left->sym;
+ if (btp != chartype && btp != uchartype && btp != schartype) {
+ errorp("array of inappropriate type initialized from string constant");
+ return constnode(zero);
+ }
+
+ len = sym->type->n.elem-1;
+ if (!(tp->prop & TDEFINED)) {
+ tp->n.elem = len+1;
+ deftype(tp);
+ } else if (tp->n.elem < len) {
+ warn("initializer-string for array of chars is too long");
+ }
+
+ len = tp->n.elem;
+ s = sym->u.s;
+ sym = newstring(NULL, len);
+ strncpy(sym->u.s, s, len);
+ np->sym = sym;
+ np->type = sym->type;
+
+ return np;
+}
+
+static Node *
+initialize(Type *tp)
+{
+ Node *np;
+ Symbol *sym;
+
+ if (tp->op == ARY && yytoken == STRING)
+ return str2ary(tp);
+
+ if (yytoken == '{' || tp->op == STRUCT || tp->op == ARY)
+ return initlist(tp);
+
+ np = assign();
+ if (eqtype(tp, np->type, 1))
+ return np;
+
+ np = convert(decay(np), tp, 0);
+ if (!np) {
+ errorp("incorrect initializer");
+ return constnode(zero);
+ }
+
+ return simplify(np);
+}
+
+static Node *
+mkcompound(Init *ip, Type *tp)
+{
+ Node **v, **p;
+ size_t n;
+ struct designator *dp, *next;
+ Symbol *sym;
+
+ if (tp->op == UNION) {
+ Node *np = NULL;
+
+ v = xmalloc(sizeof(*v));
+ for (dp = ip->head; dp; dp = next) {
+ freetree(np);
+ np = dp->expr;
+ next = dp->next;
+ free(dp);
+ }
+ *v = np;
+ } else {
+ n = (tp->prop&TDEFINED) ? tp->n.elem : ip->max;
+ if (n == 0) {
+ v = NULL;
+ } else if (n > SIZE_MAX / sizeof(*v)) {
+ errorp("compound literal too big");
+ return constnode(zero);
+ } else {
+ n *= sizeof(*v);
+ v = memset(xmalloc(n), 0, n);
+
+ for (dp = ip->head; dp; dp = next) {
+ p = &v[dp->pos];
+ freetree(*p);
+ *p = dp->expr;
+ next = dp->next;
+ free(dp);
+ }
+ }
+ }
+
+ sym = newsym(NS_IDEN, NULL);
+ sym->u.init = v;
+ sym->type = tp;
+ sym->flags |= SINITLST;
+
+ return constnode(sym);
+}
+
+static void
+newdesig(Init *ip, Node *np)
+{
+ struct designator *dp;
+
+ dp = xmalloc(sizeof(*dp));
+ dp->pos = ip->pos;
+ dp->expr = np;
+ dp->next = NULL;
+
+ if (ip->head == NULL) {
+ ip->head = ip->tail = dp;
+ } else {
+ ip->tail->next = dp;
+ ip->tail = dp;
+ }
+
+ if (ip->pos+1 > ip->max)
+ ip->max = ip->pos+1;
+}
+
+Node *
+initlist(Type *tp)
+{
+ Init in;
+ Node *np;
+ Type *curtp;
+ int braces, scalar, toomany, outbound;
+ TINT nelem = tp->n.elem;
+ static int depth;
+
+ if (depth == NR_SUBTYPE)
+ error("too many nested initializers");
+ ++depth;
+ init(&in);
+ braces = scalar = toomany = 0;
+
+ if (accept('{'))
+ braces = 1;
+
+ do {
+ curtp = inttype;
+ switch (yytoken) {
+ case '[':
+ in.pos = arydesig(tp, &in);
+ curtp = tp->type;
+ goto desig_list;
+ case '.':
+ in.pos = fielddesig(tp, &in);
+ if (in.pos < nelem)
+ curtp = tp->p.fields[in.pos]->type;
+ desig_list:
+ if (yytoken == '[' || yytoken == '.') {
+ np = initlist(curtp);
+ goto new_desig;
+ }
+ expect('=');
+ default:
+ outbound = 0;
+
+ switch (tp->op) {
+ case ARY:
+ curtp = tp->type;
+ if (!(tp->prop & TDEFINED) || in.pos < tp->n.elem)
+ break;
+ if (!toomany)
+ warn("excess elements in array initializer");
+ toomany = 1;
+ outbound = 1;
+ break;
+ case UNION:
+ case STRUCT:
+ if (in.pos < nelem) {
+ curtp = tp->p.fields[in.pos]->type;
+ break;
+ }
+ if (!toomany)
+ warn("excess elements in struct initializer");
+ toomany = 1;
+ outbound = 1;
+ break;
+ default:
+ curtp = tp;
+ if (!scalar)
+ warn("braces around scalar initializer");
+ scalar = 1;
+ if (in.pos == 0)
+ break;
+ if (!toomany)
+ warn("excess elements in scalar initializer");
+ toomany = 1;
+ outbound = 1;
+ break;
+ }
+ np = initialize(curtp);
+ if (outbound) {
+ freetree(np);
+ np = NULL;
+ }
+ }
+
+new_desig:
+ if (np)
+ newdesig(&in, np);
+ if (++in.pos == 0)
+ errorp("compound literal too big");
+ if (nelem == in.pos && !braces)
+ break;
+ } while (accept(','));
+
+ if (braces)
+ expect('}');
+
+
+ if (tp->op == ARY && !(tp->prop & TDEFINED)) {
+ tp->n.elem = in.max;
+ deftype(tp);
+ }
+ if (in.max == 0) {
+ errorp("empty braced initializer");
+ return constnode(zero);
+ }
+
+ return mkcompound(&in, tp);
+}
+
+static void
+autoinit(Symbol *sym, Node *np)
+{
+ Symbol *hidden;
+ Type *tp = sym->type;
+ size_t n; /* FIXME: It should be SIZET */
+
+repeat:
+ switch (tp->op) {
+ case UNION:
+ np = np->sym->u.init[0];
+ tp = np->type;
+ goto repeat;
+ case ARY:
+ case STRUCT:
+ if (!(np->flags & NCONST))
+ abort(); /* TODO */
+ hidden = newsym(NS_IDEN, NULL);
+ hidden->type = sym->type;
+ hidden->flags |= SLOCAL | SHASINIT;
+ emit(ODECL, hidden);
+ emit(OINIT, np);
+ emit(ODECL, sym);
+ emit(OEXPR,
+ node(OASSIGN, tp, varnode(sym), varnode(hidden)));
+ break;
+ default:
+ emit(ODECL, sym);
+ np = node(OASSIGN, tp, varnode(sym), np);
+ emit(OEXPR, np);
+ break;
+ }
+}
+
+void
+initializer(Symbol *sym, Type *tp)
+{
+ Node *np;
+ int flags = sym->flags;
+
+ if (tp->op == FTN) {
+ errorp("function '%s' initialized like a variable",
+ sym->name);
+ tp = inttype;
+ }
+ np = initialize(tp);
+
+ if (flags & SDEFINED) {
+ errorp("redeclaration of '%s'", sym->name);
+ } else if ((flags & (SGLOBAL|SLOCAL|SPRIVATE)) != 0) {
+ if (!(np->flags & NCONST)) {
+ errorp("initializer element is not constant");
+ return;
+ }
+ sym->flags |= SHASINIT;
+ sym->flags &= ~SEMITTED;
+ emit(ODECL, sym);
+ emit(OINIT, np);
+ sym->flags |= SDEFINED;
+ } else if ((flags & (SEXTERN|STYPEDEF)) != 0) {
+ errorp("'%s' has both '%s' and initializer",
+ sym->name, (flags&SEXTERN) ? "extern" : "typedef");
+ } else {
+ autoinit(sym, np);
+ }
+}
--- /dev/null
+++ b/src/cmd/cc1/ir.md
@@ -1,0 +1,443 @@
+# scc intermediate representation #
+
+The scc IR tries to be be a simple and easily parseable intermediate
+representation, and it makes it a bit terse and cryptic. The main
+characteristic of the IR is that all the types and operations are
+represented with only one letter, so parsing tables can be used
+to parse it.
+
+The language is composed of lines, representing statements.
+Each statement is composed of tab-separated fields.
+Declaration statements begin in column 0, expressions and
+control flow begin with a tabulator.
+When the frontend detects an error, it closes the output stream.
+
+## Types ##
+
+Types are represented with uppercase letters:
+
+* C -- signed 8-Bit integer
+* I -- signed 16-Bit integer
+* W -- signed 32-Bit integer
+* Q -- signed 64-Bit integer
+* K -- unsigned 8-Bit integer
+* N -- unsigned 16-Bit integer
+* Z -- unsigned 32-Bit integer
+* O -- unsigned 64-Bit integer
+* 0 -- void
+* P -- pointer
+* F -- function
+* V -- vector
+* U -- union
+* S -- struct
+* B -- bool
+* J -- float
+* D -- double
+* H -- long double
+
+This list has been built for the original Z80 backend, where 'int'
+has the same size as 'short'. Several types (S, F, V, U and others) need
+an identifier after the type letter for better differentiation
+between multiple structs, functions, vectors and unions (S1, V12 ...)
+naturally occuring in a C-program.
+
+## Storage classes ##
+
+The storage classes are represented using uppercase letters:
+
+* A -- automatic
+* R -- register
+* G -- public (global variable declared in the module)
+* X -- extern (global variable declared in another module)
+* Y -- private (variable in file-scope)
+* T -- local (static variable in function-scope)
+* M -- member (struct/union member)
+* L -- label
+
+## Declarations/definitions ##
+
+Variable names are composed of a storage class and an identifier
+(e.g. A1, R2, T3).
+Declarations and definitions are composed of a variable
+name, a type and the name of the variable:
+
+ A1 I maxweight
+ R2 C flag
+ A3 S4 statstruct
+
+### Type declarations ###
+
+Some declarations (e.g. structs) involve the declaration of member
+variables.
+Struct members are declared normally after the type declaration in
+parentheses.
+
+For example the struct declaration
+
+ struct foo {
+ int i;
+ long c;
+ } var1;
+
+generates
+
+ S2 foo (
+ M3 I i
+ M4 W c
+ )
+ G5 S2 var1
+
+## Functions ##
+
+A function prototype
+
+ int printf(char *cmd, int flag, void *data);
+
+will generate a type declaration and a variable declaration
+
+ F5 P I P
+ X1 F5 printf
+
+The first line gives the function-type specification 'F' with
+an identifier '5' and subsequently lists the types of the
+function parameters.
+The second line declares the 'printf' function as a publicly
+scoped variable.
+
+Analogously, a statically declared function in file scope
+
+ static int printf(char *cmd, int flag, void *data);
+
+generates
+
+ F5 P I P
+ T1 F5 printf
+
+Thus, the 'printf' variable went into local scope ('T').
+
+A '{' in the first column starts the body of the previously
+declared function:
+
+ int printf(char *cmd, int flag, void *data) {}
+
+generates
+
+ F5 P I P
+ G1 F5 printf
+ {
+ A2 P cmd
+ A3 I flag
+ A4 P data
+ -
+ }
+
+Again, the frontend must ensure that '{' appears only after the
+declaration of a function. The character '-' marks the separation
+between parameters and local variables:
+
+ int printf(register char *cmd, int flag, void *data) {int i;};
+
+generates
+
+ F5 P I P
+ G1 F5 printf
+ {
+ R2 P cmd
+ A3 I flag
+ A4 P data
+ -
+ A6 I i
+ }
+
+### Expressions ###
+
+Expressions are emitted in reverse polish notation, simplifying
+parsing and converting into a tree representation.
+
+#### Operators ####
+
+Operators allowed in expressions are:
+
+* \+ -- addition
+* \- -- substraction
+* \* -- multiplication
+* % -- modulo
+* / -- division
+* l -- left shift
+* r -- right shift
+* < -- less than
+* > -- greather than
+* ] -- greather or equal than
+* [ -- less or equal than
+* = -- equal than
+* ! -- different than
+* & -- bitwise and
+* | -- bitwise or
+* ^ -- bitwise xor
+* ~ -- bitwise complement
+* : -- asignation
+* _ -- unary negation
+* c -- function call
+* p -- parameter
+* . -- field
+* , -- comma operator
+* ? -- ternary operator
+* ' -- take address
+* a -- logical shortcut and
+* o -- logical shortcut or
+* @ -- content of pointer
+
+Assignation has some suboperators:
+
+* :/ -- divide and assign
+* :% -- modulo and assign
+* :+ -- addition and assign
+* :- -- substraction and assign
+* :l -- left shift and assign
+* :r -- right shift and assign
+* :& -- bitwise and and assign
+* :^ -- bitwise xor and assign
+* :| -- bitwise or and assign
+* :i -- post increment
+* :d -- post decrement
+
+Every operator in an expression has a type descriptor.
+
+#### Constants ####
+
+Constants are introduced with the character '#'. For instance, 10 is
+translated to #IA (all constants are emitted in hexadecimal),
+where I indicates that it is an integer constant.
+Strings are a special case because they are represented with
+the " character.
+The constant "hello" is emitted as "68656C6C6F. For example
+
+ int
+ main(void)
+ {
+ int i, j;
+
+ i = j+2*3;
+ }
+
+generates
+
+ F1
+ G1 F1 main
+ {
+ -
+ A2 I i
+ A3 I j
+ A2 A3 #I6 +I :I
+ }
+
+Type casts are expressed with a tuple denoting the
+type conversion
+
+ int
+ main(void)
+ {
+ int i;
+ long j;
+
+ j = (long)i;
+ }
+
+generates
+
+ F1
+ G1 F1 main
+ {
+ -
+ A2 I i
+ A3 W j
+ A2 A3 WI :I
+ }
+
+### Statements ###
+#### Jumps #####
+
+Jumps have the following form:
+
+ j L# [expression]
+
+the optional expression field indicates some condition which
+must be satisfied to jump. Example:
+
+ int
+ main(void)
+ {
+ int i;
+
+ goto label;
+ label:
+ i -= i;
+ }
+
+generates
+
+ F1
+ G1 F1 main
+ {
+ -
+ A2 I i
+ j L3
+ L3
+ A2 A2 :-I
+ }
+
+Another form of jump is the return statement, which uses the
+letter 'y' followed by a type identifier.
+Depending on the type, an optional expression follows.
+
+ int
+ main(void)
+ {
+ return 16;
+ }
+
+generates
+
+ F1
+ G1 F1 main
+ {
+ -
+ yI #I10
+ }
+
+
+#### Loops ####
+
+There are two special characters that are used to indicate
+to the backend that the following statements are part of
+a loop body.
+
+* b -- beginning of loop
+* e -- end of loop
+
+#### Switch statement ####
+
+Switches are represented using a table, in which the labels
+where to jump for each case are indicated. Common cases are
+represented with 'v' and default with 'f'.
+The switch statement itself is represented with 's' followed
+by the label where the jump table is located, and the
+expression of the switch:
+
+ int
+ func(int n)
+ {
+ switch (n+1) {
+ case 1:
+ case 2:
+ case 3:
+ default:
+ ++n;
+ }
+ }
+
+generates
+
+ F2 I
+ G1 F2 func
+ {
+ A1 I n
+ -
+ s L4 A1 #I1 +I
+ L5
+ L6
+ L7
+ L8
+ A1 #I1 :+I
+ j L3
+ L4
+ t #4
+ v L7 #I3
+ v L6 #I2
+ v L5 #I1
+ f L8
+ L3
+ }
+
+The beginning of the jump table is indicated by the the letter 't',
+followed by the number of cases (including default case) of the
+switch.
+
+## Resumen ##
+
+* C -- signed 8-Bit integer
+* I -- signed 16-Bit integer
+* W -- signed 32-Bit integer
+* O -- signed 64-Bit integer
+* M -- unsigned 8-Bit integer
+* N -- unsigned 16-Bit integer
+* Z -- unsigned 32-Bit integer
+* Q -- unsigned 64-Bit integer
+* 0 -- void
+* P -- pointer
+* F -- function
+* V -- vector
+* U -- union
+* S -- struct
+* B -- bool
+* J -- float
+* D -- double
+* H -- long double
+* A -- automatic
+* R -- register
+* G -- public (global variable declared in the module)
+* X -- extern (global variable declared in another module)
+* Y -- private (variable in file-scope)
+* T -- local (static variable in function-scope)
+* M -- member (struct/union member)
+* L -- label
+* { -- beginning of function body
+* } -- end of function body
+* \\ -- end of function parameters
+* \+ -- addition
+* \- -- substraction
+* \* -- multiplication
+* % -- modulo
+* / -- division
+* l -- left shift
+* r -- right shift
+* < -- less than
+* > -- greather than
+* ] -- greather or equal than
+* [ -- less or equal than
+* = -- equal than
+* ! -- different than
+* & -- bitwise and
+* | -- bitwise or
+* ^ -- bitwise xor
+* ~ -- bitwise complement
+* : -- asignation
+* _ -- unary negation
+* c -- function call
+* p -- parameter
+* . -- field
+* , -- comma operator
+* ? -- ternary operator
+* ' -- take address
+* a -- logical shortcut and
+* o -- logical shortcut or
+* @ -- content of pointer
+* :/ -- divide and assign
+* :% -- modulo and assign
+* :+ -- addition and assign
+* :- -- substraction and assign
+* :l -- left shift and assign
+* :r -- right shift and assign
+* :& -- bitwise and and assign
+* :^ -- bitwise xor and assign
+* :| -- bitwise or and assign
+* ;+ -- post increment
+* ;- -- post decrement
+* j -- jump
+* y -- return
+* b -- begin of loop
+* d -- end of loop
+* s -- switch statement
+* t -- switch table
+* v -- case entry in switch table
+* f -- default entry in switch table
--- /dev/null
+++ b/src/cmd/cc1/lex.c
@@ -1,0 +1,801 @@
+static char sccsid[] = "@(#) ./cc1/lex.c";
+#include <assert.h>
+#include <ctype.h>
+#include <errno.h>
+#include <limits.h>
+#include <setjmp.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <scc/cstd.h>
+#include <scc/scc.h>
+#include "cc1.h"
+
+int yytoken;
+struct yystype yylval;
+char yytext[STRINGSIZ+3];
+unsigned short yylen;
+int lexmode = CCMODE;
+unsigned lineno;
+char filenam[FILENAME_MAX];
+
+int namespace = NS_IDEN;
+static int safe;
+Input *input;
+
+void
+ilex(void)
+{
+ static struct keyword keys[] = {
+ {"auto", SCLASS, AUTO},
+ {"break", BREAK, BREAK},
+ {"_Bool", TYPE, BOOL},
+ {"__builtin_va_list", TYPE, VA_LIST},
+ {"case", CASE, CASE},
+ {"char", TYPE, CHAR},
+ {"const", TQUALIFIER, CONST},
+ {"continue", CONTINUE, CONTINUE},
+ {"default", DEFAULT, DEFAULT},
+ {"do", DO, DO},
+ {"double", TYPE, DOUBLE},
+ {"else", ELSE, ELSE},
+ {"enum", TYPE, ENUM},
+ {"extern", SCLASS, EXTERN},
+ {"float", TYPE, FLOAT},
+ {"for", FOR, FOR},
+ {"goto", GOTO, GOTO},
+ {"if", IF, IF},
+ {"inline", TQUALIFIER, INLINE},
+ {"int", TYPE, INT},
+ {"long", TYPE, LONG},
+ {"register", SCLASS, REGISTER},
+ {"restrict", TQUALIFIER, RESTRICT},
+ {"return", RETURN, RETURN},
+ {"short", TYPE, SHORT},
+ {"signed", TYPE, SIGNED},
+ {"sizeof", SIZEOF, SIZEOF},
+ {"static", SCLASS, STATIC},
+ {"struct", TYPE, STRUCT},
+ {"switch", SWITCH, SWITCH},
+ {"typedef", SCLASS, TYPEDEF},
+ {"union", TYPE, UNION},
+ {"unsigned", TYPE, UNSIGNED},
+ {"void", TYPE, VOID},
+ {"volatile", TQUALIFIER, VOLATILE},
+ {"while", WHILE, WHILE},
+ {NULL, 0, 0},
+ };
+ keywords(keys, NS_KEYWORD);
+}
+
+void
+setloc(char *fname, unsigned line)
+{
+ size_t len;
+
+ if ((len = strlen(fname)) >= FILENAME_MAX)
+ die("cc1: %s: file name too long", fname);
+ memmove(filenam, fname, len);
+ filenam[len] = '\0';
+
+ free(input->filenam);
+ input->filenam = xstrdup(fname);
+ lineno = input->lineno = line;
+}
+
+void
+addinput(char *fname, Symbol *hide, char *buffer)
+{
+ FILE *fp;
+ char *extp;
+ unsigned flags;
+ int infileln;
+ Input *newip, *curip = input;
+
+ if (hide) {
+ /* this is a macro expansion */
+ fp = NULL;
+ if (hide->hide == UCHAR_MAX)
+ die("cc1: too many macro expansions");
+ ++hide->hide;
+ flags = IMACRO;
+ } else if (fname) {
+ /* a new file */
+ if ((fp = fopen(fname, "r")) == NULL)
+ die("cc1: %s: %s", fname, strerror(errno));
+ flags = IFILE;
+ if (curip && onlyheader) {
+ infileln = strlen(infile);
+ if (extp = strrchr(infile, '.'))
+ infileln -= strlen(extp);
+ printf("%.*s.o: %s %s\n",
+ infileln, infile, infile, fname);
+ }
+ } else {
+ /* reading from stdin */
+ fp = stdin;
+ fname = "<stdin>";
+ flags = ISTDIN;
+ }
+
+ newip = xmalloc(sizeof(*newip));
+
+ if (!buffer) {
+ buffer = xmalloc(INPUTSIZ);
+ buffer[0] = '\0';
+ }
+
+ if (curip)
+ curip->lineno = lineno;
+
+ newip->p = newip->begin = newip->line = buffer;
+ newip->filenam = NULL;
+ newip->lineno = 0;
+ newip->next = curip;
+ newip->fp = fp;
+ newip->hide = hide;
+ newip->flags = flags;
+ input = newip;
+
+ setloc(fname, (curip) ? curip->lineno : newip->lineno);
+}
+
+void
+delinput(void)
+{
+ Input *ip = input;
+ Symbol *hide = ip->hide;
+
+ switch (ip->flags & ITYPE) {
+ case IFILE:
+ if (fclose(ip->fp))
+ die("cc1: %s: %s", ip->filenam, strerror(errno));
+ break;
+ case IMACRO:
+ assert(hide->hide == 1);
+ --hide->hide;
+ break;
+ }
+ input = ip->next;
+ free(ip->filenam);
+ free(ip->line);
+ if (input) {
+ lineno = input->lineno;
+ strcpy(filenam, input->filenam);
+ }
+}
+
+static void
+newline(void)
+{
+ if (++lineno == 0)
+ die("cc1: %s: file too long", filenam);
+}
+
+/*
+ * Read the next character from the input file, counting number of lines
+ * and joining lines escaped with \
+ */
+static int
+readchar(void)
+{
+ FILE *fp = input->fp;
+ int c;
+
+repeat:
+ switch (c = getc(fp)) {
+ case '\\':
+ if ((c = getc(fp)) == '\n') {
+ newline();
+ goto repeat;
+ }
+ ungetc(c, fp);
+ c = '\\';
+ break;
+ case '\n':
+ newline();
+ break;
+ default:
+ if (!isprint(c) && !ispunct(c) && !isspace(c))
+ warn("invalid input character. The shame of UB is yours");
+ break;
+ }
+
+ return c;
+}
+
+/*
+ * discard a C comment. This function is only called from readline
+ * because it is impossible to have a comment in a macro, because
+ * comments are always discarded before processing any cpp directive
+ */
+static void
+comment(int type)
+{
+ int c;
+
+repeat:
+ while ((c = readchar()) != EOF && c != type)
+ ;
+
+ if (c == EOF) {
+ errorp("unterminated comment");
+ return;
+ }
+
+ if (type == '*' && (c = readchar()) != '/')
+ goto repeat;
+}
+
+/*
+ * readline is used to read a full logic line from a file.
+ * It discards comments and check that the line fits in
+ * the input buffer
+ */
+static int
+readline(void)
+{
+ char *bp, *lim;
+ int c, peekc = 0;
+
+ if (feof(input->fp)) {
+ input->flags |= IEOF;
+ return 0;
+ }
+
+ *input->line = '\0';
+ lim = &input->line[INPUTSIZ-1];
+ for (bp = input->line; bp < lim-1; *bp++ = c) {
+ c = (peekc) ? peekc : readchar();
+ peekc = 0;
+ if (c == '\n' || c == EOF)
+ break;
+ if (c != '/')
+ continue;
+
+ /* check for /* or // */
+ peekc = readchar();
+ if (peekc != '*' && peekc != '/')
+ continue;
+ comment((peekc == '/') ? '\n' : '*');
+ peekc = 0;
+ c = ' ';
+ }
+
+ input->begin = input->p = input->line;
+ if (bp == lim-1) {
+ errorp("line too long");
+ --bp;
+ }
+ *bp++ = '\n';
+ *bp = '\0';
+
+ return 1;
+}
+
+/*
+ * moreinput gets more bytes to be passed to the lexer.
+ * It can take more bytes from macro expansions or
+ * directly reading from files. When a cpp directive
+ * is processed the line is discarded because it must not
+ * be passed to the lexer
+ */
+static int
+moreinput(void)
+{
+ int wasexpand = 0;
+
+repeat:
+ if (!input)
+ return 0;
+
+ if (*input->p == '\0') {
+ if ((input->flags&ITYPE) == IMACRO) {
+ wasexpand = 1;
+ input->flags |= IEOF;
+ }
+ if (input->flags & IEOF) {
+ delinput();
+ goto repeat;
+ }
+ if (!readline() || cpp()) {
+ *input->p = '\0';
+ goto repeat;
+ }
+ }
+
+ if (onlycpp && !wasexpand)
+ ppragmaln();
+ return 1;
+}
+
+static void
+tok2str(void)
+{
+ if ((yylen = input->p - input->begin) > INTIDENTSIZ)
+ error("token too big");
+ memcpy(yytext, input->begin, yylen);
+ yytext[yylen] = '\0';
+ input->begin = input->p;
+}
+
+static Symbol *
+readint(char *s, int base, int sign, Symbol *sym)
+{
+ Type *tp = sym->type;
+ struct limits *lim;
+ TUINT u, val, max;
+ int c;
+
+ lim = getlimits(tp);
+ max = lim->max.i;
+ if (*s == '0')
+ ++s;
+ if (toupper(*s) == 'X')
+ ++s;
+
+ for (u = 0; isxdigit(c = *s++); u = u*base + val) {
+ static char letters[] = "0123456789ABCDEF";
+ val = strchr(letters, toupper(c)) - letters;
+ repeat:
+ if (u <= max/base && u*base <= max - val)
+ continue;
+ if (tp->prop & TSIGNED) {
+ if (tp == inttype)
+ tp = (base==10) ? longtype : uinttype;
+ else if (tp == longtype)
+ tp = (base==10) ? llongtype : ulongtype;
+ else
+ goto overflow;
+ } else {
+ if (tp == uinttype)
+ tp = (sign==UNSIGNED) ? ulongtype : longtype;
+ else if (tp == ulongtype)
+ tp = (sign==UNSIGNED) ? ullongtype : llongtype;
+ else
+ goto overflow;
+ }
+ sym->type = tp;
+ lim = getlimits(tp);
+ max = lim->max.i;
+ goto repeat;
+ }
+
+ if (tp->prop & TSIGNED)
+ sym->u.i = u;
+ else
+ sym->u.u = u;
+
+ return sym;
+
+overflow:
+ errorp("overflow in integer constant");
+ return sym;
+}
+
+static int
+integer(char *s, int base)
+{
+ Type *tp;
+ Symbol *sym;
+ unsigned size, sign;
+
+ for (size = sign = 0; ; ++input->p) {
+ switch (toupper(*input->p)) {
+ case 'L':
+ if (size == LLONG)
+ goto wrong_type;
+ size = (size == LONG) ? LLONG : LONG;
+ continue;
+ case 'U':
+ if (sign == UNSIGNED)
+ goto wrong_type;
+ sign = UNSIGNED;
+ continue;
+ default:
+ goto convert;
+ wrong_type:
+ error("invalid suffix in integer constant");
+ }
+ }
+
+convert:
+ tp = ctype(INT, sign, size);
+ sym = newsym(NS_IDEN, NULL);
+ sym->type = tp;
+ sym->flags |= SCONSTANT;
+ yylval.sym = readint(s, base, sign, sym);
+ return CONSTANT;
+}
+
+static char *
+digits(int base)
+{
+ char *p;
+ int c;
+
+ for (p = input->p; c = *p; ++p) {
+ switch (base) {
+ case 8:
+ if (!strchr("01234567", c))
+ goto end;
+ break;
+ case 10:
+ if (!isdigit(c))
+ goto end;
+ break;
+ case 16:
+ if (!isxdigit(c))
+ goto end;
+ break;
+ }
+ }
+end:
+ input->p = p;
+ tok2str();
+ return yytext;
+}
+
+static int
+number(void)
+{
+ int base;
+
+ if (*input->p != '0') {
+ base = 10;
+ } else {
+ if (toupper(*++input->p) == 'X') {
+ ++input->p;
+ base = 16;
+ } else {
+ base = 8;
+ }
+ }
+
+ return integer(digits(base), base);
+}
+
+static int
+escape(void)
+{
+ int c, base;
+
+ switch (*++input->p) {
+ case 'a': return '\a';
+ case 'f': return '\f';
+ case 'n': return '\n';
+ case 'r': return '\r';
+ case 't': return '\t';
+ case 'v': return '\v';
+ case '"': return '"';
+ case '\'': return '\'';
+ case '\\': return '\\';
+ case '\?': return '\?';
+ case 'u':
+ /*
+ * FIXME: universal constants are not correctly handled
+ */
+ if (!isdigit(*++input->p))
+ warn("incorrect digit for numerical character constant");
+ base = 10;
+ break;
+ case 'x':
+ if (!isxdigit(*++input->p))
+ warn("\\x used with no following hex digits");
+ base = 16;
+ break;
+ case '0':
+ if (!strchr("01234567", *++input->p))
+ warn("\\0 used with no following octal digits");
+ base = 8;
+ break;
+ default:
+ warn("unknown escape sequence");
+ return ' ';
+ }
+ errno = 0;
+ c = strtoul(input->p, &input->p, base);
+ if (errno || c > 255)
+ warn("character constant out of range");
+ --input->p;
+ return c;
+}
+
+static int
+character(void)
+{
+ int c;
+ Symbol *sym;
+
+ if ((c = *++input->p) == '\\')
+ c = escape();
+ else
+ c = *input->p;
+ ++input->p;
+ if (*input->p != '\'')
+ errorp("invalid character constant");
+ else
+ ++input->p;
+
+ sym = newsym(NS_IDEN, NULL);
+ sym->u.i = c;
+ sym->type = inttype;
+ yylval.sym = sym;
+ tok2str();
+ return CONSTANT;
+}
+
+static int
+string(void)
+{
+ char *bp = yytext;
+ int c;
+
+ *bp++ = '"';
+ for (++input->p; (c = *input->p) != '"'; ++input->p) {
+ if (c == '\0') {
+ errorp("missing terminating '\"' character");
+ break;
+ }
+ if (c == '\\')
+ c = escape();
+ if (bp == &yytext[STRINGSIZ+1]) {
+ /* TODO: proper error handling here */
+ error("string too long");
+ }
+ *bp++ = c;
+ }
+
+ input->begin = ++input->p;
+ *bp = '\0';
+
+ yylen = bp - yytext + 1;
+ yylval.sym = newstring(yytext+1, yylen-1);
+ *bp++ = '"';
+ *bp = '\0';
+ return STRING;
+}
+
+static int
+iden(void)
+{
+ Symbol *sym;
+ char *p, *begin;
+
+ begin = input->p;
+ for (p = begin; isalnum(*p) || *p == '_'; ++p)
+ ;
+ input->p = p;
+ tok2str();
+ if ((sym = lookup(NS_CPP, yytext, NOALLOC)) != NULL) {
+ if (!disexpand && !sym->hide && expand(begin, sym))
+ return next();
+ }
+ sym = lookup(namespace, yytext, ALLOC);
+ yylval.sym = sym;
+ if (sym->flags & SCONSTANT)
+ return CONSTANT;
+ if (sym->token != IDEN)
+ yylval.token = sym->u.token;
+ return sym->token;
+}
+
+static int
+follow(int expect, int ifyes, int ifno)
+{
+ if (*input->p++ == expect)
+ return ifyes;
+ --input->p;
+ return ifno;
+}
+
+static int
+minus(void)
+{
+ switch (*input->p++) {
+ case '-': return DEC;
+ case '>': return INDIR;
+ case '=': return SUB_EQ;
+ default: --input->p; return '-';
+ }
+}
+
+static int
+plus(void)
+{
+ switch (*input->p++) {
+ case '+': return INC;
+ case '=': return ADD_EQ;
+ default: --input->p; return '+';
+ }
+}
+
+static int
+relational(int op, int equal, int shift, int assig)
+{
+ int c;
+
+ if ((c = *input->p++) == '=')
+ return equal;
+ if (c == op)
+ return follow('=', assig, shift);
+ --input->p;
+ return op;
+}
+
+static int
+logic(int op, int equal, int logic)
+{
+ int c;
+
+ if ((c = *input->p++) == '=')
+ return equal;
+ if (c == op)
+ return logic;
+ --input->p;
+ return op;
+}
+
+static int
+dot(void)
+{
+ int c;
+
+ if ((c = *input->p) != '.')
+ return '.';
+ if ((c = *++input->p) != '.')
+ error("incorrect token '..'");
+ ++input->p;
+ return ELLIPSIS;
+}
+
+static int
+operator(void)
+{
+ int t;
+
+ switch (t = *input->p++) {
+ case '<': t = relational('<', LE, SHL, SHL_EQ); break;
+ case '>': t = relational('>', GE, SHR, SHR_EQ); break;
+ case '&': t = logic('&', AND_EQ, AND); break;
+ case '|': t = logic('|', OR_EQ, OR); break;
+ case '=': t = follow('=', EQ, '='); break;
+ case '^': t = follow('=', XOR_EQ, '^'); break;
+ case '*': t = follow('=', MUL_EQ, '*'); break;
+ case '/': t = follow('=', DIV_EQ, '/'); break;
+ case '!': t = follow('=', NE, '!'); break;
+ case '#': t = follow('#', '$', '#'); break;
+ case '-': t = minus(); break;
+ case '+': t = plus(); break;
+ case '.': t = dot(); break;
+ }
+ tok2str();
+ return t;
+}
+
+/* TODO: Ensure that namespace is NS_IDEN after a recovery */
+
+/*
+ * skip all the spaces until the next token. When we are in
+ * CPPMODE \n is not considered a whitespace
+ */
+static int
+skipspaces(void)
+{
+ int c;
+
+ for (;;) {
+ switch (c = *input->p) {
+ case '\n':
+ if (lexmode == CPPMODE)
+ goto return_byte;
+ ++input->p;
+ case '\0':
+ if (!moreinput())
+ return EOF;
+ break;
+ case ' ':
+ case '\t':
+ case '\v':
+ case '\r':
+ case '\f':
+ ++input->p;
+ break;
+ default:
+ goto return_byte;
+ }
+ }
+
+return_byte:
+ input->begin = input->p;
+ return c;
+}
+
+int
+next(void)
+{
+ int c;
+
+ if ((c = skipspaces()) == EOF)
+ yytoken = EOFTOK;
+ else if (isalpha(c) || c == '_')
+ yytoken = iden();
+ else if (isdigit(c))
+ yytoken = number();
+ else if (c == '"')
+ yytoken = string();
+ else if (c == '\'')
+ yytoken = character();
+ else
+ yytoken = operator();
+
+ if (yytoken == EOF) {
+ strcpy(yytext, "<EOF>");
+ if (cppctx)
+ errorp("#endif expected");
+ }
+
+ DBG("TOKEN %s", yytext);
+ return yytoken;
+}
+
+void
+expect(int tok)
+{
+ if (yytoken != tok) {
+ if (isgraph(tok))
+ errorp("expected '%c' before '%s'", tok, yytext);
+ else
+ errorp("unexpected '%s'", yytext);
+ } else {
+ next();
+ }
+}
+
+int
+ahead(void)
+{
+ skipspaces();
+ return *input->begin;
+}
+
+void
+setsafe(int type)
+{
+ safe = type;
+}
+
+void
+discard(void)
+{
+ extern jmp_buf recover;
+ int c;
+
+ input->begin = input->p;
+ for (c = yytoken; ; c = *input->begin++) {
+ switch (safe) {
+ case END_COMP:
+ if (c == '}')
+ goto jump;
+ goto semicolon;
+ case END_COND:
+ if (c == ')')
+ goto jump;
+ break;
+ case END_LDECL:
+ if (c == ',')
+ goto jump;
+ case END_DECL:
+ semicolon:
+ if (c == ';')
+ goto jump;
+ break;
+ }
+ if (c == '\0' && !moreinput())
+ exit(1);
+ }
+jump:
+ yytoken = c;
+ longjmp(recover, 1);
+}
--- /dev/null
+++ b/src/cmd/cc1/main.c
@@ -1,0 +1,102 @@
+static char sccsid[] = "@(#) ./cc1/main.c";
+#include <setjmp.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+
+#include <scc/arg.h>
+#include <scc/scc.h>
+#include "cc1.h"
+
+char *argv0, *infile;
+
+int warnings;
+jmp_buf recover;
+
+static struct items uflags;
+int onlycpp, onlyheader;
+
+
+extern int failure;
+
+static void
+defmacro(char *macro)
+{
+ char *p = strchr(macro, '=');
+
+ if (p)
+ *p++ = '\0';
+ else
+ p = "1";
+
+ defdefine(macro, p, "command-line");
+}
+
+static void
+usage(void)
+{
+ fputs("usage: cc1 [-Ewd] [-D def[=val]]... [-U def]... "
+ "[-I dir]... [-o output] [input]\n", stderr);
+ exit(1);
+}
+
+int
+main(int argc, char *argv[])
+{
+ int i;
+
+ ilex();
+ icpp();
+ icode();
+ ibuilts();
+
+ ARGBEGIN {
+ case 'D':
+ defmacro(EARGF(usage()));
+ break;
+ case 'M':
+ onlyheader = 1;
+ break;
+ case 'E':
+ onlycpp = 1;
+ break;
+ case 'I':
+ incdir(EARGF(usage()));
+ break;
+ case 'U':
+ newitem(&uflags, EARGF(usage()));
+ break;
+ case 'd':
+ DBGON();
+ break;
+ case 'w':
+ warnings = 1;
+ break;
+ default:
+ usage();
+ } ARGEND
+
+ if (argc > 1)
+ usage();
+
+ for (i = 0; i < uflags.n; ++i)
+ undefmacro(uflags.s[i]);
+
+ infile = (*argv) ? *argv : "<stdin>";
+ addinput(*argv, NULL, NULL);
+
+ /*
+ * we cannot initialize arch until we have an
+ * output stream, because we maybe want to emit new types
+ */
+ iarch();
+ if (onlycpp || onlyheader) {
+ outcpp();
+ } else {
+ for (next(); yytoken != EOFTOK; decl())
+ ;
+ }
+
+ return failure;
+}
--- /dev/null
+++ b/src/cmd/cc1/stmt.c
@@ -1,0 +1,386 @@
+static char sccsid[] = "@(#) ./cc1/stmt.c";
+#include <stddef.h>
+#include <setjmp.h>
+
+#include <scc/cstd.h>
+#include <scc/scc.h>
+#include "cc1.h"
+
+#define NEGATE 1
+#define NONEGATE 0
+
+Symbol *curfun;
+
+static void stmt(Symbol *lbreak, Symbol *lcont, Switch *lswitch);
+
+static void
+label(void)
+{
+ Symbol *sym;
+
+ switch (yytoken) {
+ case IDEN:
+ case TYPEIDEN:
+ sym = lookup(NS_LABEL, yytext, ALLOC);
+ if (sym->flags & SDEFINED)
+ error("label '%s' already defined", yytext);
+ if ((sym->flags & SDECLARED) == 0)
+ sym = install(NS_LABEL, sym);
+ sym->flags |= SDEFINED;
+ emit(OLABEL, sym);
+ next();
+ expect(':');
+ break;
+ default:
+ unexpected();
+ }
+}
+
+static void
+stmtexp(Symbol *lbreak, Symbol *lcont, Switch *lswitch)
+{
+ Node *np;
+
+ if (accept(';'))
+ return;
+ if (yytoken == IDEN && ahead() == ':') {
+ label();
+ stmt(lbreak, lcont, lswitch);
+ return;
+ }
+ np = expr();
+ if ((np->flags & NEFFECT) == 0)
+ warn("expression without side effects");
+ emit(OEXPR, np);
+ expect(';');
+}
+
+static Node *
+condition(int neg)
+{
+ Node *np;
+
+ expect('(');
+ np = condexpr(neg);
+ expect(')');
+
+ return np;
+}
+
+static void
+While(Symbol *lbreak, Symbol *lcont, Switch *lswitch)
+{
+ Symbol *begin;
+ Node *np;
+
+ begin = newlabel();
+ lcont = newlabel();
+ lbreak = newlabel();
+
+ expect(WHILE);
+ np = condition(NONEGATE);
+
+ emit(OJUMP, lcont);
+
+ emit(OBLOOP, NULL);
+ emit(OLABEL, begin);
+ stmt(lbreak, lcont, lswitch);
+ emit(OLABEL, lcont);
+ emit(OBRANCH, begin);
+ emit(OEXPR, np);
+ emit(OELOOP, NULL);
+
+ emit(OLABEL, lbreak);
+}
+
+static void
+For(Symbol *lbreak, Symbol *lcont, Switch *lswitch)
+{
+ Symbol *begin, *cond;
+ Node *econd, *einc;
+
+ begin = newlabel();
+ lcont = newlabel();
+ cond = newlabel();
+ lbreak = newlabel();
+
+ pushctx();
+
+ expect(FOR);
+ expect('(');
+ switch (yytoken) {
+ case TYPE:
+ case TYPEIDEN:
+ case TQUALIFIER:
+ case SCLASS:
+ decl();
+ break;
+ default:
+ emit(OEXPR, expr());
+ case ';':
+ expect(';');
+ break;
+ }
+ econd = (yytoken != ';') ? condexpr(NONEGATE) : NULL;
+ expect(';');
+ einc = (yytoken != ')') ? expr() : NULL;
+ expect(')');
+
+ emit(OJUMP, cond);
+
+ emit(OBLOOP, NULL);
+ emit(OLABEL, begin);
+ stmt(lbreak, lcont, lswitch);
+ emit(OLABEL, lcont);
+ emit(OEXPR, einc);
+ emit(OLABEL, cond);
+ emit((econd) ? OBRANCH : OJUMP, begin);
+ emit(OEXPR, econd);
+ emit(OELOOP, NULL);
+
+ emit(OLABEL, lbreak);
+
+ popctx();
+}
+
+static void
+Dowhile(Symbol *lbreak, Symbol *lcont, Switch *lswitch)
+{
+ Symbol *begin;
+ Node *np;
+
+ begin = newlabel();
+ lcont = newlabel();
+ lbreak = newlabel();
+
+ expect(DO);
+
+ emit(OBLOOP, NULL);
+ emit(OLABEL, begin);
+ stmt(lbreak, lcont, lswitch);
+ expect(WHILE);
+ np = condition(NONEGATE);
+ emit(OLABEL, lcont);
+ emit(OBRANCH, begin);
+ emit(OEXPR, np);
+ emit(OELOOP, NULL);
+
+ emit(OLABEL, lbreak);
+}
+
+static void
+Return(Symbol *lbreak, Symbol *lcont, Switch *lswitch)
+{
+ Node *np;
+ Type *tp = curfun->type->type;
+
+ expect(RETURN);
+ np = (yytoken != ';') ? decay(expr()) : NULL;
+ expect(';');
+ if (!np) {
+ if (tp != voidtype)
+ warn("function returning non void returns no value");
+ tp = voidtype;
+ } else if (np->type != tp) {
+ if (tp == voidtype)
+ warn("function returning void returns a value");
+ else if ((np = convert(np, tp, 0)) == NULL)
+ errorp("incorrect type in return");
+ }
+ emit(ORET, NULL);
+ emit(OEXPR, np);
+}
+
+static void
+Break(Symbol *lbreak, Symbol *lcont, Switch *lswitch)
+{
+ expect(BREAK);
+ if (!lbreak) {
+ errorp("break statement not within loop or switch");
+ } else {
+ emit(OJUMP, lbreak);
+ expect(';');
+ }
+}
+
+static void
+Continue(Symbol *lbreak, Symbol *lcont, Switch *lswitch)
+{
+ expect(CONTINUE);
+ if (!lcont) {
+ errorp("continue statement not within loop");
+ } else {
+ emit(OJUMP, lcont);
+ expect(';');
+ }
+}
+
+static void
+Goto(Symbol *lbreak, Symbol *lcont, Switch *lswitch)
+{
+ Symbol *sym;
+
+ namespace = NS_LABEL;
+ next();
+ namespace = NS_IDEN;
+
+ if (yytoken != IDEN)
+ unexpected();
+ sym = yylval.sym;
+ if ((sym->flags & SDECLARED) == 0)
+ sym = install(NS_LABEL, sym);
+ sym->flags |= SUSED;
+ emit(OJUMP, sym);
+ next();
+ expect(';');
+}
+
+static void
+Swtch(Symbol *obr, Symbol *lcont, Switch *osw)
+{
+ Switch sw = {0};
+ Node *cond;
+ Symbol *lbreak;
+
+ expect(SWITCH);
+
+ expect ('(');
+ if ((cond = convert(expr(), inttype, 0)) == NULL) {
+ errorp("incorrect type in switch statement");
+ cond = constnode(zero);
+ }
+ expect (')');
+
+ lbreak = newlabel();
+ emit(OBSWITCH, NULL);
+ emit(OEXPR, cond);
+ stmt(lbreak, lcont, &sw);
+ emit(OESWITCH, lbreak);
+ emit(OLABEL, lbreak);
+}
+
+static void
+Case(Symbol *lbreak, Symbol *lcont, Switch *sw)
+{
+ Node *np;
+ Symbol *label;
+
+ expect(CASE);
+ if ((np = constexpr()) == NULL)
+ errorp("case label does not reduce to an integer constant");
+ if (!sw) {
+ errorp("case label not within a switch statement");
+ } else if (sw->nr >= 0 && ++sw->nr == NR_SWITCH) {
+ errorp("too many case labels for a switch statement");
+ sw->nr = -1;
+ }
+ expect(':');
+
+ label = newlabel();
+ emit(OCASE, label);
+ emit(OEXPR, np);
+ emit(OLABEL, label);
+ stmt(lbreak, lcont, sw);
+}
+
+static void
+Default(Symbol *lbreak, Symbol *lcont, Switch *sw)
+{
+ Symbol *label = newlabel();
+
+ if (sw->hasdef)
+ errorp("multiple default labels in one switch");
+ sw->hasdef = 1;
+ expect(DEFAULT);
+ expect(':');
+ emit(ODEFAULT, label);
+ emit(OLABEL, label);
+ stmt(lbreak, lcont, sw);
+}
+
+static void
+If(Symbol *lbreak, Symbol *lcont, Switch *lswitch)
+{
+ Symbol *end, *lelse;
+ Node *np;
+
+ lelse = newlabel();
+ expect(IF);
+ np = condition(NEGATE);
+ emit(OBRANCH, lelse);
+ emit(OEXPR, np);
+ stmt(lbreak, lcont, lswitch);
+ if (accept(ELSE)) {
+ end = newlabel();
+ emit(OJUMP, end);
+ emit(OLABEL, lelse);
+ stmt(lbreak, lcont, lswitch);
+ emit(OLABEL, end);
+ } else {
+ emit(OLABEL, lelse);
+ }
+}
+
+static void
+blockit(Symbol *lbreak, Symbol *lcont, Switch *lswitch)
+{
+ switch (yytoken) {
+ case TYPEIDEN:
+ if (ahead() == ':')
+ goto parse_stmt;
+ case TYPE:
+ case TQUALIFIER:
+ case SCLASS:
+ decl();
+ return;
+ default:
+ parse_stmt:
+ stmt(lbreak, lcont, lswitch);
+ }
+}
+
+void
+compound(Symbol *lbreak, Symbol *lcont, Switch *lswitch)
+{
+ static int nested;
+
+ pushctx();
+ expect('{');
+
+ if (nested == NR_BLOCK)
+ error("too many nesting levels of compound statements");
+
+ ++nested;
+ for (;;) {
+ if (yytoken == '}')
+ break;
+ blockit(lbreak, lcont, lswitch);
+ }
+ --nested;
+
+ popctx();
+ expect('}');
+}
+
+static void
+stmt(Symbol *lbreak, Symbol *lcont, Switch *lswitch)
+{
+ void (*fun)(Symbol *, Symbol *, Switch *);
+
+ switch (yytoken) {
+ case '{': fun = compound; break;
+ case RETURN: fun = Return; break;
+ case WHILE: fun = While; break;
+ case FOR: fun = For; break;
+ case DO: fun = Dowhile; break;
+ case IF: fun = If; break;
+ case BREAK: fun = Break; break;
+ case CONTINUE: fun = Continue; break;
+ case GOTO: fun = Goto; break;
+ case SWITCH: fun = Swtch; break;
+ case CASE: fun = Case; break;
+ case DEFAULT: fun = Default; break;
+ default: fun = stmtexp; break;
+ }
+ (*fun)(lbreak, lcont, lswitch);
+}
--- /dev/null
+++ b/src/cmd/cc1/symbol.c
@@ -1,0 +1,353 @@
+static char sccsid[] = "@(#) ./cc1/symbol.c";
+#include <assert.h>
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <scc/cstd.h>
+#include <scc/scc.h>
+#include "cc1.h"
+
+#define NR_SYM_HASH 64
+#define NR_CPP_HASH 32
+#define NR_LBL_HASH 16
+
+unsigned curctx;
+static unsigned short counterid;
+
+static Symbol *head, *labels;
+static Symbol *htab[NR_SYM_HASH];
+static Symbol *htabcpp[NR_CPP_HASH];
+static Symbol *htablbl[NR_LBL_HASH];
+
+#ifndef NDEBUG
+void
+dumpstab(Symbol **tbl, char *msg)
+{
+ Symbol **bp, *sym;
+ unsigned size;
+
+ fprintf(stderr, "Symbol Table dump at ctx=%u\n%s\n", curctx, msg);
+ if (tbl == htab)
+ size = NR_SYM_HASH;
+ else if (tbl == htabcpp)
+ size = NR_CPP_HASH;
+ else if (tbl == htablbl)
+ size = NR_LBL_HASH;
+ else
+ abort();
+
+ for (bp = tbl; bp < &tbl[size]; ++bp) {
+ if (*bp == NULL)
+ continue;
+ fprintf(stderr, "%d", (int) (bp - htab));
+ for (sym = *bp; sym; sym = sym->hash)
+ fprintf(stderr, "->[%d,%d:'%s'=%p]",
+ sym->ns, sym->ctx, sym->name, (void *) sym);
+ putc('\n', stderr);
+ }
+ fputs("head:", stderr);
+ for (sym = head; sym; sym = sym->next) {
+ fprintf(stderr, "->[%d,%d:'%s'=%p]",
+ sym->ns, sym->ctx,
+ (sym->name) ? sym->name : "", (void *) sym);
+ }
+ fputs("\nlabels:", stderr);
+ for (sym = labels; sym; sym = sym->next) {
+ fprintf(stderr, "->[%d,%d:'%s'=%p]",
+ sym->ns, sym->ctx,
+ (sym->name) ? sym->name : "", (void *) sym);
+ }
+ putc('\n', stderr);
+}
+#endif
+
+static Symbol **
+hash(char *s, int ns)
+{
+ unsigned c, h, size;
+ Symbol **tab;
+
+ for (h = 0; c = *s; ++s)
+ h = h*33 ^ c;
+
+ switch (ns) {
+ case NS_CPP:
+ tab = htabcpp;
+ size = NR_CPP_HASH-1;
+ break;
+ case NS_LABEL:
+ tab = htablbl;
+ size = NR_LBL_HASH-1;
+ break;
+ default:
+ tab = htab;
+ size = NR_SYM_HASH-1;
+ break;
+ }
+ return &tab[h & size];
+}
+
+static void
+unlinkhash(Symbol *sym)
+{
+ Symbol **h;
+
+ if ((sym->flags & SDECLARED) == 0)
+ return;
+ h = hash(sym->name, sym->ns);
+ assert(sym->ns == NS_CPP || *h == sym);
+ while (*h != sym)
+ h = &(*h)->hash;
+ *h = sym->hash;
+}
+
+void
+pushctx(void)
+{
+ DBG("SYM: pushed context %d", curctx+1);
+ if (++curctx == NR_BLOCK+1)
+ error("too many nested blocks");
+}
+
+void
+killsym(Symbol *sym)
+{
+ short f;
+ char *name;
+
+ if (!sym)
+ return;
+ f = sym->flags;
+ if (f & SSTRING)
+ free(sym->u.s);
+ if (sym->ns == NS_TAG)
+ sym->type->prop &= ~TDEFINED;
+ unlinkhash(sym);
+ if ((name = sym->name) != NULL) {
+ switch (sym->ns) {
+ case NS_LABEL:
+ if ((f & SDEFINED) == 0)
+ errorp("label '%s' is not defined", name);
+ case NS_IDEN:
+ if ((f & (SUSED|SGLOBAL|SDECLARED)) == SDECLARED)
+ warn("'%s' defined but not used", name);
+ break;
+ }
+ }
+ free(name);
+ free(sym);
+}
+
+void
+popctx(void)
+{
+ Symbol *next, *sym;
+ int ns, dangling = 0;
+
+ DBG("SYM: poped context %d", curctx);
+ /*
+ * we have to be careful before popping the current
+ * context, because since the parser is one token
+ * ahead it may already have read an identifier at
+ * this point, and yylval.sym is a pointer to
+ * the symbol associated to such token. If that
+ * symbol is from the context that we are popping
+ * then we are going to generate a dangling pointer.
+ * We can detect this situation and call again to
+ * lookup.
+ */
+ if ((yytoken == IDEN || yytoken == TYPEIDEN) &&
+ yylval.sym->ctx == curctx) {
+ ns = yylval.sym->ns;
+ dangling = 1;
+ }
+
+ for (sym = head; sym && sym->ctx == curctx; sym = next) {
+ /*
+ * Since we are unlinking them in the inverse order
+ * we do know that sym is always the head of the
+ * collision list
+ */
+ next = sym->next;
+ killsym(sym);
+ }
+ head = sym;
+
+ if (--curctx == GLOBALCTX) {
+ for (sym = labels; sym; sym = next) {
+ next = sym->next;
+ killsym(sym);
+ }
+ labels = NULL;
+ }
+
+ if (dangling) {
+ yylval.sym = lookup(ns, yytext, ALLOC);
+ yytoken = yylval.sym->token;
+ }
+}
+
+unsigned
+newid(void)
+{
+ unsigned short id;
+
+ if (lexmode == CPPMODE)
+ return 0;
+ id = ++counterid;
+ if (id == 0) {
+ die("cc1: overflow in %s identifiers",
+ (curctx) ? "internal" : "external");
+ }
+ return id;
+}
+
+Symbol *
+newsym(int ns, char *name)
+{
+ Symbol *sym;
+
+ sym = xmalloc(sizeof(*sym));
+ if (name)
+ name = xstrdup(name);
+ sym->name = name;
+ sym->id = 0;
+ sym->hide = 0;
+ sym->ns = ns;
+ sym->ctx = curctx;
+ sym->token = IDEN;
+ sym->flags = 0;
+ sym->u.s = NULL;
+ sym->type = NULL;
+ sym->hash = NULL;
+
+ if (ns == NS_LABEL) {
+ sym->next = labels;
+ labels = sym;
+ } else if (ns != NS_CPP) {
+ sym->next = head;
+ head = sym;
+ }
+ return sym;
+}
+
+static Symbol *
+linkhash(Symbol *sym)
+{
+ Symbol **h;
+
+ h = hash(sym->name, sym->ns);
+ sym->hash = *h;
+ *h = sym;
+
+ if (sym->ns != NS_CPP)
+ sym->id = newid();
+ sym->flags |= SDECLARED;
+ return sym;
+}
+
+Symbol *
+newstring(char *s, size_t len)
+{
+ Symbol *sym = newsym(NS_IDEN, NULL);
+
+ if (lexmode != CPPMODE)
+ sym->type = mktype(chartype, ARY, len, NULL);
+ sym->id = newid();
+ sym->flags |= SSTRING | SCONSTANT | SPRIVATE;
+ sym->u.s = xmalloc(len);
+ if (s)
+ memcpy(sym->u.s, s, len);
+
+ return sym;
+}
+
+Symbol *
+newlabel(void)
+{
+ Symbol *sym = newsym(NS_LABEL, NULL);
+ sym->id = newid();
+ return sym;
+}
+
+Symbol *
+lookup(int ns, char *name, int alloc)
+{
+ Symbol *sym;
+ int sns, c;
+ char *t;
+
+ c = *name;
+ for (sym = *hash(name, ns); sym; sym = sym->hash) {
+ t = sym->name;
+ if (*t != c || strcmp(t, name))
+ continue;
+ sns = sym->ns;
+ if (sns == ns)
+ return sym;
+ /*
+ * When a lookup is done in a namespace associated
+ * to a struct we also want symbols of NS_IDEN which
+ * are typedef, because in other case we cannot declare
+ * fields of such types.
+ * TODO: Remove this trick
+ */
+ if (sns == NS_KEYWORD ||
+ (sym->flags & STYPEDEF) && ns >= NS_STRUCTS) {
+ return sym;
+ }
+ }
+ return (alloc == ALLOC) ? newsym(ns, name) : NULL;
+}
+
+Symbol *
+install(int ns, Symbol *sym)
+{
+ if (sym->flags & SDECLARED || sym->ctx != curctx) {
+ if (sym->ctx == curctx && ns == sym->ns)
+ return NULL;
+ sym = newsym(ns, sym->name);
+ }
+ return linkhash(sym);
+}
+
+void
+keywords(struct keyword *key, int ns)
+{
+ Symbol *sym;
+
+ for ( ; key->str; ++key) {
+ sym = linkhash(newsym(ns, key->str));
+ sym->token = key->token;
+ sym->u.token = key->value;
+ }
+ /*
+ * Remove all the predefined symbols from * the symbol list. It
+ * will make faster some operations. There is no problem of memory
+ * leakeage because this memory is not ever freed
+ */
+ counterid = 0;
+ head = NULL;
+}
+
+void
+builtins(struct builtin *built)
+{
+ Symbol *sym;
+ struct builtin *bp;
+
+ for (bp = built; bp->str; ++bp) {
+ sym = linkhash(newsym(NS_KEYWORD, bp->str));
+ sym->token = BUILTIN;
+ sym->u.fun = bp->fun;
+ }
+ /*
+ * Remove all the predefined symbols from * the symbol list. It
+ * will make faster some operations. There is no problem of memory
+ * leakeage because this memory is not ever freed
+ */
+ counterid = 0;
+ head = NULL;
+}
--- /dev/null
+++ b/src/cmd/cc1/target/amd64-sysv/arch.c
@@ -1,0 +1,220 @@
+static char sccsid[] = "@(#) ./cc1/arch/amd64-sysv/arch.c";
+
+#include <scc/scc.h>
+#include "../../cc1.h"
+
+#define RANK_BOOL 0
+#define RANK_SCHAR 1
+#define RANK_UCHAR 1
+#define RANK_CHAR 1
+#define RANK_SHORT 2
+#define RANK_USHORT 2
+#define RANK_INT 3
+#define RANK_UINT 3
+#define RANK_LONG 4
+#define RANK_ULONG 4
+#define RANK_LLONG 5
+#define RANK_ULLONG 5
+#define RANK_FLOAT 6
+#define RANK_DOUBLE 7
+#define RANK_LDOUBLE 8
+
+/*
+ * Initializaion of type pointers were done with
+ * a C99 initilizator '... = &(Type) {...', but
+ * c compiler in Plan9 gives error with this
+ * syntax, so I have switched it to this ugly form
+ * I hope I will change it again in the future
+ */
+
+static Type types[] = {
+ { /* 0 = voidtype */
+ .op = VOID,
+ .letter = L_VOID,
+ },
+ { /* 1 = pvoidtype */
+ .op = PTR,
+ .letter = L_POINTER,
+ .prop = TDEFINED,
+ .type = &types[5], /* chartype */
+ .size = 8,
+ .align = 8,
+ },
+ { /* 2 = booltype */
+ .op = INT,
+ .letter = L_BOOL,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 1,
+ .align = 1,
+ .n.rank = RANK_BOOL,
+ },
+ { /* 3 = schartype */
+ .op = INT,
+ .letter = L_INT8,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 1,
+ .align = 1,
+ .n.rank = RANK_SCHAR,
+ },
+ { /* 4 = uchartype */
+ .op = INT,
+ .letter = L_UINT8,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 1,
+ .align = 1,
+ .n.rank = RANK_UCHAR,
+ },
+ { /* 5 = chartype */
+ .op = INT,
+ .letter = L_INT8,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 1,
+ .align = 1,
+ .n.rank = RANK_CHAR,
+ },
+ { /* 6 = ushortype */
+ .op = INT,
+ .letter = L_UINT16,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 2,
+ .align = 2,
+ .n.rank = RANK_USHORT,
+ },
+ { /* 7 = shortype */
+ .op = INT,
+ .letter = L_INT16,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 2,
+ .align = 2,
+ .n.rank = RANK_SHORT,
+ },
+ { /* 8 = uinttype */
+ .op = INT,
+ .letter = L_UINT32,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 4,
+ .align = 4,
+ .n.rank = RANK_UINT,
+ },
+ { /* 9 = inttype */
+ .op = INT,
+ .letter = L_INT32,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 4,
+ .align = 4,
+ .n.rank = RANK_INT,
+ },
+ { /* 10 = longtype */
+ .op = INT,
+ .letter = L_INT64,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 8,
+ .align = 8,
+ .n.rank = RANK_LONG,
+ },
+ { /* 11 = ulongtype */
+ .op = INT,
+ .letter = L_UINT64,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 8,
+ .align = 8,
+ .n.rank = RANK_ULONG,
+ },
+ { /* 12 = ullongtype */
+ .op = INT,
+ .letter = L_UINT64,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 8,
+ .align = 8,
+ .n.rank = RANK_ULLONG,
+ },
+ { /* 13 = llongtype */
+ .op = INT,
+ .letter = L_INT64,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 8,
+ .align = 8,
+ .n.rank = RANK_LLONG,
+ },
+ { /* 14 = floattype */
+ .op = FLOAT,
+ .letter = L_FLOAT,
+ .prop = TDEFINED | TARITH,
+ .size = 4,
+ .align = 4,
+ .n.rank = RANK_FLOAT,
+ },
+ { /* 15 = doubletype */
+ .op = FLOAT,
+ .letter = L_DOUBLE,
+ .prop = TDEFINED | TARITH,
+ .size = 8,
+ .align = 8,
+ .n.rank = RANK_DOUBLE,
+ },
+ { /* 16 = ldoubletype */
+ .op = FLOAT,
+ .letter = L_LDOUBLE,
+ .prop = TDEFINED | TARITH,
+ .size = 16,
+ .align = 16,
+ .n.rank = RANK_LDOUBLE,
+ },
+ { /* 17 = sizettype */
+ .op = INT,
+ .letter = L_UINT64,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 8,
+ .align = 8,
+ .n.rank = RANK_UINT,
+ },
+ { /* 18 = ellipsis */
+ .op = ELLIPSIS,
+ .letter = L_ELLIPSIS,
+ .prop = TDEFINED,
+ },
+ { /* 19 = pdifftype */
+ .op = INT,
+ .letter = L_INT64,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 8,
+ .align = 8,
+ .n.rank = RANK_LONG,
+ },
+ { /* 20 = va_type */
+ .op = STRUCT,
+ .letter = L_VA_ARG,
+ .prop = TDEFINED,
+ .size = 24,
+ .align = 8,
+ },
+};
+
+Type *voidtype = &types[0], *pvoidtype = &types[1],
+ *booltype = &types[2], *schartype = &types[3],
+ *uchartype = &types[4], *chartype = &types[5],
+ *ushortype = &types[6], *shortype = &types[7],
+ *uinttype = &types[8], *inttype = &types[9],
+ *longtype = &types[10], *ulongtype = &types[11],
+ *ullongtype = &types[12], *llongtype = &types[13],
+ *floattype = &types[14], *doubletype = &types[15],
+ *ldoubletype = &types[16],
+ *sizettype = &types[17], *pdifftype = &types[19],
+ *ellipsistype = &types[18], *va_type = &types[20],
+ *va_list_type;
+
+static Symbol dummy0 = {.u.i = 0, .type = &types[9]},
+ dummy1 = {.u.i = 1, .type = &types[9]};
+Symbol *zero = &dummy0, *one = &dummy1;
+
+void
+iarch(void)
+{
+ va_list_type = mktype(va_type, ARY, 1, NULL);
+}
+
+int
+valid_va_list(Type *tp)
+{
+ return tp->op == PTR && eqtype(tp->type, va_type, 1);
+}
--- /dev/null
+++ b/src/cmd/cc1/target/amd64-sysv/arch.mk
@@ -1,0 +1,4 @@
+OBJ-amd64-sysv= $(OBJS) target/amd64-sysv/arch.o
+
+$(LIBEXEC)/cc1-amd64-sysv: $(OBJ-amd64-sysv)
+ $(CC) $(SCC_LDFLAGS) $(OBJ-amd64-sysv) -lscc -o $@
--- /dev/null
+++ b/src/cmd/cc1/target/arm64-sysv/arch.c
@@ -1,0 +1,220 @@
+static char sccsid[] = "@(#) ./cc1/arch/arm64-sysv/arch.c";
+
+#include <scc/scc.h>
+#include "../../cc1.h"
+
+#define RANK_BOOL 0
+#define RANK_SCHAR 1
+#define RANK_UCHAR 1
+#define RANK_CHAR 1
+#define RANK_SHORT 2
+#define RANK_USHORT 2
+#define RANK_INT 3
+#define RANK_UINT 3
+#define RANK_LONG 4
+#define RANK_ULONG 4
+#define RANK_LLONG 5
+#define RANK_ULLONG 5
+#define RANK_FLOAT 6
+#define RANK_DOUBLE 7
+#define RANK_LDOUBLE 8
+
+/*
+ * Initializaion of type pointers were done with
+ * a C99 initilizator '... = &(Type) {...', but
+ * c compiler in Plan9 gives error with this
+ * syntax, so I have switched it to this ugly form
+ * I hope I will change it again in the future
+ */
+
+static Type types[] = {
+ { /* 0 = voidtype */
+ .op = VOID,
+ .letter = L_VOID,
+ },
+ { /* 1 = pvoidtype */
+ .op = PTR,
+ .letter = L_POINTER,
+ .prop = TDEFINED,
+ .type = &types[5], /* chartype */
+ .size = 8,
+ .align = 8,
+ },
+ { /* 2 = booltype */
+ .op = INT,
+ .letter = L_BOOL,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 1,
+ .align = 1,
+ .n.rank = RANK_BOOL,
+ },
+ { /* 3 = schartype */
+ .op = INT,
+ .letter = L_INT8,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 1,
+ .align = 1,
+ .n.rank = RANK_SCHAR,
+ },
+ { /* 4 = uchartype */
+ .op = INT,
+ .letter = L_UINT8,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 1,
+ .align = 1,
+ .n.rank = RANK_UCHAR,
+ },
+ { /* 5 = chartype */
+ .op = INT,
+ .letter = L_INT8,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 1,
+ .align = 1,
+ .n.rank = RANK_CHAR,
+ },
+ { /* 6 = ushortype */
+ .op = INT,
+ .letter = L_UINT16,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 2,
+ .align = 2,
+ .n.rank = RANK_USHORT,
+ },
+ { /* 7 = shortype */
+ .op = INT,
+ .letter = L_INT16,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 2,
+ .align = 2,
+ .n.rank = RANK_SHORT,
+ },
+ { /* 8 = uinttype */
+ .op = INT,
+ .letter = L_UINT32,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 4,
+ .align = 4,
+ .n.rank = RANK_UINT,
+ },
+ { /* 9 = inttype */
+ .op = INT,
+ .letter = L_INT32,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 4,
+ .align = 4,
+ .n.rank = RANK_INT,
+ },
+ { /* 10 = longtype */
+ .op = INT,
+ .letter = L_INT64,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 8,
+ .align = 8,
+ .n.rank = RANK_LONG,
+ },
+ { /* 11 = ulongtype */
+ .op = INT,
+ .letter = L_UINT64,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 8,
+ .align = 8,
+ .n.rank = RANK_ULONG,
+ },
+ { /* 12 = ullongtype */
+ .op = INT,
+ .letter = L_UINT64,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 8,
+ .align = 8,
+ .n.rank = RANK_ULLONG,
+ },
+ { /* 13 = llongtype */
+ .op = INT,
+ .letter = L_INT64,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 8,
+ .align = 8,
+ .n.rank = RANK_LLONG,
+ },
+ { /* 14 = floattype */
+ .op = FLOAT,
+ .letter = L_FLOAT,
+ .prop = TDEFINED | TARITH,
+ .size = 4,
+ .align = 4,
+ .n.rank = RANK_FLOAT,
+ },
+ { /* 15 = doubletype */
+ .op = FLOAT,
+ .letter = L_DOUBLE,
+ .prop = TDEFINED | TARITH,
+ .size = 8,
+ .align = 8,
+ .n.rank = RANK_DOUBLE,
+ },
+ { /* 16 = ldoubletype */
+ .op = FLOAT,
+ .letter = L_LDOUBLE,
+ .prop = TDEFINED | TARITH,
+ .size = 16,
+ .align = 16,
+ .n.rank = RANK_LDOUBLE,
+ },
+ { /* 17 = sizettype */
+ .op = INT,
+ .letter = L_UINT64,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 8,
+ .align = 8,
+ .n.rank = RANK_UINT,
+ },
+ { /* 18 = ellipsis */
+ .op = ELLIPSIS,
+ .letter = L_ELLIPSIS,
+ .prop = TDEFINED,
+ },
+ { /* 19 = pdifftype */
+ .op = INT,
+ .letter = L_INT64,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 8,
+ .align = 8,
+ .n.rank = RANK_LONG,
+ },
+ { /* 20 = va_type */
+ .op = STRUCT,
+ .letter = L_VA_ARG,
+ .prop = TDEFINED,
+ .size = 24,
+ .align = 8,
+ },
+};
+
+Type *voidtype = &types[0], *pvoidtype = &types[1],
+ *booltype = &types[2], *schartype = &types[3],
+ *uchartype = &types[4], *chartype = &types[5],
+ *ushortype = &types[6], *shortype = &types[7],
+ *uinttype = &types[8], *inttype = &types[9],
+ *longtype = &types[10], *ulongtype = &types[11],
+ *ullongtype = &types[12], *llongtype = &types[13],
+ *floattype = &types[14], *doubletype = &types[15],
+ *ldoubletype = &types[16],
+ *sizettype = &types[17], *pdifftype = &types[19],
+ *ellipsistype = &types[18], *va_type = &types[20],
+ *va_list_type;
+
+static Symbol dummy0 = {.u.i = 0, .type = &types[9]},
+ dummy1 = {.u.i = 1, .type = &types[9]};
+Symbol *zero = &dummy0, *one = &dummy1;
+
+void
+iarch(void)
+{
+ va_list_type = mktype(va_type, ARY, 1, NULL);
+}
+
+int
+valid_va_list(Type *tp)
+{
+ return tp->op == PTR && eqtype(tp->type, va_type, 1);
+}
--- /dev/null
+++ b/src/cmd/cc1/target/arm64-sysv/arch.mk
@@ -1,0 +1,4 @@
+OBJ-arm64-sysv= $(OBJS) target/arm64-sysv/arch.o
+
+$(LIBEXEC)/cc1-arm64-sysv: $(OBJ-arm64-sysv)
+ $(CC) $(SCC_LDFLAGS) $(OBJ-arm64-sysv) -lscc -o $@
--- /dev/null
+++ b/src/cmd/cc1/target/i386-sysv/arch.c
@@ -1,0 +1,221 @@
+static char sccsid[] = "@(#) ./cc1/arch/i386-sysv/arch.c";
+
+#include <scc/scc.h>
+#include "../../cc1.h"
+
+#define RANK_BOOL 0
+#define RANK_SCHAR 1
+#define RANK_UCHAR 1
+#define RANK_CHAR 1
+#define RANK_SHORT 2
+#define RANK_USHORT 2
+#define RANK_INT 3
+#define RANK_UINT 3
+#define RANK_LONG 4
+#define RANK_ULONG 4
+#define RANK_LLONG 5
+#define RANK_ULLONG 5
+#define RANK_FLOAT 6
+#define RANK_DOUBLE 7
+#define RANK_LDOUBLE 8
+
+/*
+ * Initializaion of type pointers were done with
+ * a C99 initilizator '... = &(Type) {...', but
+ * c compiler in Plan9 gives error with this
+ * syntax, so I have switched it to this ugly form
+ * I hope I will change it again in the future
+ */
+
+static Type types[] = {
+ { /* 0 = voidtype */
+ .op = VOID,
+ .letter = L_VOID,
+ },
+ { /* 1 = pvoidtype */
+ .op = PTR,
+ .letter = L_POINTER,
+ .prop = TDEFINED,
+ .type = &types[5], /* chartype */
+ .size = 4,
+ .align = 4,
+ },
+ { /* 2 = booltype */
+ .op = INT,
+ .letter = L_BOOL,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 1,
+ .align = 1,
+ .n.rank = RANK_BOOL,
+ },
+ { /* 3 = schartype */
+ .op = INT,
+ .letter = L_INT8,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 1,
+ .align = 1,
+ .n.rank = RANK_SCHAR,
+ },
+ { /* 4 = uchartype */
+ .op = INT,
+ .letter = L_UINT8,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 1,
+ .align = 1,
+ .n.rank = RANK_UCHAR,
+ },
+ { /* 5 = chartype */
+ .op = INT,
+ .letter = L_INT8,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 1,
+ .align = 1,
+ .n.rank = RANK_CHAR,
+ },
+ { /* 6 = ushortype */
+ .op = INT,
+ .letter = L_UINT16,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 2,
+ .align = 2,
+ .n.rank = RANK_USHORT,
+ },
+ { /* 7 = shortype */
+ .op = INT,
+ .letter = L_INT16,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 2,
+ .align = 2,
+ .n.rank = RANK_SHORT,
+ },
+ { /* 8 = uinttype */
+ .op = INT,
+ .letter = L_UINT32,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 4,
+ .align = 4,
+ .n.rank = RANK_UINT,
+ },
+ { /* 9 = inttype */
+ .op = INT,
+ .letter = L_INT32,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 4,
+ .align = 4,
+ .n.rank = RANK_INT,
+ },
+ { /* 10 = longtype */
+ .op = INT,
+ .letter = L_INT32,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 4,
+ .align = 4,
+ .n.rank = RANK_LONG,
+ },
+ { /* 11 = ulongtype */
+ .op = INT,
+ .letter = L_UINT32,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 4,
+ .align = 4,
+ .n.rank = RANK_ULONG,
+ },
+ { /* 12 = ullongtype */
+ .op = INT,
+ .letter = L_UINT64,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 8,
+ .align = 4,
+ .n.rank = RANK_ULLONG,
+ },
+ { /* 13 = llongtype */
+ .op = INT,
+ .letter = L_INT64,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 8,
+ .align = 4,
+ .n.rank = RANK_LLONG,
+ },
+ { /* 14 = floattype */
+ .op = FLOAT,
+ .letter = L_FLOAT,
+ .prop = TDEFINED | TARITH,
+ .size = 4,
+ .align = 4,
+ .n.rank = RANK_FLOAT,
+ },
+ { /* 15 = doubletype */
+ .op = FLOAT,
+ .letter = L_DOUBLE,
+ .prop = TDEFINED | TARITH,
+ .size = 8,
+ .align = 4,
+ .n.rank = RANK_DOUBLE,
+ },
+ { /* 16 = ldoubletype */
+ .op = FLOAT,
+ .letter = L_LDOUBLE,
+ .prop = TDEFINED | TARITH,
+ .size = 12,
+ .align = 4,
+ .n.rank = RANK_LDOUBLE,
+ },
+ { /* 17 = sizettype */
+ .op = INT,
+ .letter = L_UINT32,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 4,
+ .align = 4,
+ .n.rank = RANK_UINT,
+ },
+ { /* 18 = ellipsis */
+ .op = ELLIPSIS,
+ .letter = L_ELLIPSIS,
+ .prop = TDEFINED,
+ },
+ { /* 19 = pdifftype */
+ .op = INT,
+ .letter = L_INT32,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 4,
+ .align = 4,
+ .n.rank = RANK_INT,
+ },
+ { /* 20 = va_list_type */
+ .op = PTR,
+ .letter = L_POINTER,
+ .prop = TDEFINED,
+ .size = 4,
+ .align = 4,
+ },
+};
+
+
+Type *voidtype = &types[0], *pvoidtype = &types[1],
+ *booltype = &types[2], *schartype = &types[3],
+ *uchartype = &types[4], *chartype = &types[5],
+ *ushortype = &types[6], *shortype = &types[7],
+ *uinttype = &types[8], *inttype = &types[9],
+ *longtype = &types[10], *ulongtype = &types[11],
+ *ullongtype = &types[12], *llongtype = &types[13],
+ *floattype = &types[14], *doubletype = &types[15],
+ *ldoubletype = &types[16],
+ *sizettype = &types[17], *pdifftype = &types[19],
+ *ellipsistype = &types[18], *va_list_type = &types[20];
+
+
+
+static Symbol dummy0 = {.u.i = 0, .type = &types[9]},
+ dummy1 = {.u.i = 1, .type = &types[9]};
+Symbol *zero = &dummy0, *one = &dummy1;
+
+void
+iarch(void)
+{
+}
+
+int
+valid_va_list(Type *tp)
+{
+ return eqtype(tp, va_list_type, 1);
+}
--- /dev/null
+++ b/src/cmd/cc1/target/i386-sysv/arch.mk
@@ -1,0 +1,4 @@
+OBJ-i386-sysv= $(OBJS) target/i386-sysv/arch.o
+
+$(LIBEXEC)/cc1-i386-sysv: $(OBJ-i386-sysv)
+ $(CC) $(SCC_LDFLAGS) $(OBJ-i386-sysv) -lscc -o $@
--- /dev/null
+++ b/src/cmd/cc1/target/z80-scc/arch.c
@@ -1,0 +1,219 @@
+static char sccsid[] = "@(#) ./cc1/arch/z80/arch.c";
+
+#include <scc/scc.h>
+#include "../../cc1.h"
+
+#define RANK_BOOL 0
+#define RANK_SCHAR 1
+#define RANK_UCHAR 1
+#define RANK_CHAR 1
+#define RANK_SHORT 2
+#define RANK_USHORT 2
+#define RANK_INT 3
+#define RANK_UINT 3
+#define RANK_LONG 4
+#define RANK_ULONG 4
+#define RANK_LLONG 5
+#define RANK_ULLONG 5
+#define RANK_FLOAT 6
+#define RANK_DOUBLE 7
+#define RANK_LDOUBLE 8
+
+/*
+ * Initializaion of type pointers were done with
+ * a C99 initilizator '... = &(Type) {...', but
+ * c compiler in Plan9 gives error with this
+ * syntax, so I have switched it to this ugly form
+ * I hope I will change it again in the future
+ */
+
+static Type types[] = {
+ { /* 0 = voidtype */
+ .op = VOID,
+ .letter = L_VOID,
+ },
+ { /* 1 = pvoidtype */
+ .op = PTR,
+ .letter = L_POINTER,
+ .prop = TDEFINED,
+ .type = &types[5], /* char type */
+ .size = 2,
+ .align = 2,
+ },
+ { /* 2 = booltype */
+ .op = INT,
+ .letter = L_BOOL,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 1,
+ .align = 1,
+ .n.rank = RANK_BOOL,
+ },
+ { /* 3 = schartype */
+ .op = INT,
+ .letter = L_INT8,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 1,
+ .align = 1,
+ .n.rank = RANK_SCHAR,
+ },
+ { /* 4 = uchartype */
+ .op = INT,
+ .letter = L_UINT8,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 1,
+ .align = 1,
+ .n.rank = RANK_UCHAR,
+ },
+ { /* 5 = chartype */
+ .op = INT,
+ .letter = L_UINT8,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 1,
+ .align = 1,
+ .n.rank = RANK_CHAR,
+ },
+ { /* 6 = ushortype */
+ .op = INT,
+ .letter = L_UINT16,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 2,
+ .align = 1,
+ .n.rank = RANK_USHORT,
+ },
+ { /* 7 = shortype */
+ .op = INT,
+ .letter = L_INT16,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 2,
+ .align = 1,
+ .n.rank = RANK_SHORT,
+ },
+ { /* 8 = uinttype */
+ .op = INT,
+ .letter = L_UINT16,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 2,
+ .align = 1,
+ .n.rank = RANK_UINT,
+ },
+ { /* 9 = inttype */
+ .op = INT,
+ .letter = L_INT16,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 2,
+ .align = 1,
+ .n.rank = RANK_INT,
+ },
+ { /* 10 = longtype */
+ .op = INT,
+ .letter = L_INT32,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 4,
+ .align = 1,
+ .n.rank = RANK_LONG,
+ },
+ { /* 11 = ulongtype */
+ .op = INT,
+ .letter = L_UINT32,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 4,
+ .align = 1,
+ .n.rank = RANK_ULONG,
+ },
+ { /* 12 = ullongtype */
+ .op = INT,
+ .letter = L_UINT64,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 8,
+ .align = 1,
+ .n.rank = RANK_ULLONG,
+ },
+ { /* 13 = llongtype */
+ .op = INT,
+ .letter = L_INT64,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 8,
+ .align = 1,
+ .n.rank = RANK_LLONG,
+ },
+ { /* 14 = floattype */
+ .op = FLOAT,
+ .letter = L_FLOAT,
+ .prop = TDEFINED | TARITH,
+ .size = 4,
+ .align = 1,
+ .n.rank = RANK_FLOAT,
+ },
+ { /* 15 = doubletype */
+ .op = FLOAT,
+ .letter = L_DOUBLE,
+ .prop = TDEFINED | TARITH,
+ .size = 8,
+ .align = 1,
+ .n.rank = RANK_DOUBLE,
+ },
+ { /* 16 = ldoubletype */
+ .op = FLOAT,
+ .letter = L_LDOUBLE,
+ .prop = TDEFINED | TARITH,
+ .size = 16,
+ .align = 1,
+ .n.rank = RANK_LDOUBLE,
+ },
+ { /* 17 = sizettype */
+ .op = INT,
+ .letter = L_UINT16,
+ .prop = TDEFINED | TINTEGER | TARITH,
+ .size = 2,
+ .align = 1,
+ .n.rank = RANK_UINT,
+ },
+ { /* 18 = ellipsis */
+ .op = ELLIPSIS,
+ .letter = L_ELLIPSIS,
+ .prop = TDEFINED,
+ },
+ { /* 7 = pdifftype */
+ .op = INT,
+ .letter = L_INT16,
+ .prop = TDEFINED | TINTEGER | TARITH | TSIGNED,
+ .size = 2,
+ .align = 1,
+ .n.rank = RANK_SHORT,
+ },
+ { /* 20 = va_list_type */
+ .op = PTR,
+ .letter = L_POINTER,
+ .prop = TDEFINED,
+ .size = 2,
+ .align = 1,
+ }
+};
+
+Type *voidtype = &types[0], *pvoidtype = &types[1],
+ *booltype = &types[2], *schartype = &types[3],
+ *uchartype = &types[4], *chartype = &types[5],
+ *ushortype = &types[6], *shortype = &types[7],
+ *uinttype = &types[8], *inttype = &types[9],
+ *longtype = &types[10], *ulongtype = &types[11],
+ *ullongtype = &types[12], *llongtype = &types[13],
+ *floattype = &types[14], *doubletype = &types[15],
+ *ldoubletype = &types[16],
+ *sizettype = &types[17], *pdifftype = &types[19],
+ *ellipsistype = &types[18], *va_list_type = &types[20];
+
+
+static Symbol dummy0 = {.u.i = 0, .type = &types[9]},
+ dummy1 = {.u.i = 1, .type = &types[9]};
+Symbol *zero = &dummy0, *one = &dummy1;
+
+void
+iarch(void)
+{
+}
+
+int
+valid_va_list(Type *tp)
+{
+ return eqtype(tp, va_list_type, 1);
+}
--- /dev/null
+++ b/src/cmd/cc1/target/z80-scc/arch.mk
@@ -1,0 +1,4 @@
+OBJ-z80-scc= $(OBJS) target/z80-scc/arch.o
+
+$(LIBEXEC)/cc1-z80-scc: $(OBJ-z80-scc)
+ $(CC) $(SCC_LDFLAGS) $(OBJ-z80-scc) -lscc -o $@
--- /dev/null
+++ b/src/cmd/cc1/types.c
@@ -1,0 +1,438 @@
+static char sccsid[] = "@(#) ./cc1/types.c";
+#include <assert.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <scc/cstd.h>
+#include <scc/scc.h>
+#include "cc1.h"
+
+#define NR_TYPE_HASH 16
+#define HASH(t) (((t)->op ^ (uintptr_t) (t)->type>>3) & NR_TYPE_HASH-1)
+
+static Type *typetab[NR_TYPE_HASH], *localtypes;
+
+/* FIXME:
+ * Compiler can generate warnings here if the ranges of TINT,
+ * TUINT and TFLOAT are smaller than any of the constants in this
+ * array. Ignore them if you know that the target types are correct
+ */
+static struct limits limits[][4] = {
+ {
+ { /* 0 = unsigned 1 byte */
+ .min.i = 0,
+ .max.i = 0xff
+ },
+ { /* 1 = unsigned 2 bytes */
+ .min.i = 0,
+ .max.i = 0xffff
+ },
+ { /* 2 = unsigned 4 bytes */
+ .min.i = 0,
+ .max.i = 0xffffffff
+ },
+ { /* 3 = unsigned 8 bytes */
+ .min.i = 0,
+ .max.i = 0xffffffffffffffff
+ }
+ },
+ {
+ { /* 0 = signed 1 byte */
+ .min.i = -0x7f-1,
+ .max.i = 0x7f
+ },
+ { /* 1 = signed 2 byte */
+ .min.i = -0x7fff-1,
+ .max.i = 0x7fff
+ },
+ { /* 2 = signed 4 byte */
+ .min.i = -0x7fffffff-1,
+ .max.i = 0x7fffffff
+ },
+ { /* 3 = signed 8 byte */
+ .min.i = -0x7fffffffffffffff-1,
+ .max.i = 0x7fffffffffffffff,
+ }
+ },
+ {
+ {
+ /* 0 = float 4 bytes */
+ .min.f = -1,
+ .max.f = 2
+ },
+ {
+ /* 1 = float 8 bytes */
+ .min.f = -1,
+ .max.f = 2,
+ },
+ {
+ /* 2 = float 16 bytes */
+ .min.f = -1,
+ .max.f = 2,
+ }
+ }
+};
+
+struct limits *
+getlimits(Type *tp)
+{
+ int ntable, ntype;
+
+ switch (tp->op) {
+ case ENUM:
+ case INT:
+ ntable = ((tp->prop & TSIGNED) != 0);
+ switch (tp->size) {
+ case 1: ntype = 0; break;
+ case 2: ntype = 1; break;
+ case 4: ntype = 2; break;
+ case 8: ntype = 3; break;
+ }
+ break;
+ case FLOAT:
+ ntable = 2;
+ switch (tp->size) {
+ case 4: ntype = 0; break;
+ case 8: ntype = 1; break;
+ case 16: ntype = 2; break;
+ }
+ break;
+ default:
+ abort();
+ }
+
+ return &limits[ntable][ntype];
+}
+
+Type *
+ctype(int type, int sign, int size)
+{
+ switch (type) {
+ case CHAR:
+ if (size)
+ goto invalid_type;
+ switch (sign) {
+ case 0:
+ return chartype;
+ case SIGNED:
+ return schartype;
+ case UNSIGNED:
+ return uchartype;
+ }
+ break;
+ case VA_LIST:
+ if (size || sign)
+ goto invalid_type;
+ return va_list_type;
+ case VOID:
+ if (size || sign)
+ goto invalid_type;
+ return voidtype;
+ case BOOL:
+ if (size || sign)
+ goto invalid_type;
+ return booltype;
+ case 0:
+ case INT:
+ switch (size) {
+ case 0:
+ return (sign == UNSIGNED) ? uinttype : inttype;
+ case SHORT:
+ return (sign == UNSIGNED) ? ushortype : shortype;
+ case LONG:
+ return (sign == UNSIGNED) ? ulongtype : longtype;
+ case LLONG:
+ return (sign == UNSIGNED) ? ullongtype : llongtype;
+ }
+ break;
+ case DOUBLE:
+ if (size == LLONG)
+ goto invalid_type;
+ if (size == LONG)
+ size = LLONG;
+ else
+ size = LONG;
+ goto floating;
+ case FLOAT:
+ if (size == LLONG)
+ goto invalid_type;
+ floating:
+ if (sign)
+ goto invalid_type;
+ switch (size) {
+ case 0:
+ return floattype;
+ case LONG:
+ return doubletype;
+ case LLONG:
+ return ldoubletype;
+ }
+ break;
+ }
+
+invalid_type:
+ error("invalid type specification");
+}
+
+void
+typesize(Type *tp)
+{
+ Symbol **sp;
+ Type *type;
+ unsigned long size, offset;
+ int align, a;
+ TINT n;
+
+ switch (tp->op) {
+ case ARY:
+ /* FIXME: Control overflow */
+ tp->size = tp->n.elem * tp->type->size;
+ tp->align = tp->type->align;
+ return;
+ case PTR:
+ tp->size = pvoidtype->size;
+ tp->align = pvoidtype->align;
+ return;
+ case STRUCT:
+ case UNION:
+ /* FIXME: Control overflow */
+ /*
+ * The alignment of the struct/union is
+ * he alignment of the largest included type.
+ * The size of an union is the size of the largest
+ * field, and the size of a struct is the sum
+ * of the size of every field plus padding bits.
+ */
+ offset = align = size = 0;
+ n = tp->n.elem;
+ for (sp = tp->p.fields; n--; ++sp) {
+ (*sp)->u.i = offset;
+ type = (*sp)->type;
+ a = type->align;
+ if (a > align)
+ align = a;
+ if (tp->op == STRUCT) {
+ if (--a != 0)
+ size = (size + a) & ~a;
+ size += type->size;
+ offset = size;
+ } else {
+ if (type->size > size)
+ size = type->size;
+ }
+ }
+
+ tp->align = align;
+ /*
+ * We have to add the padding bits to
+ * ensure next struct in an array is well
+ * alignment.
+ */
+ if (tp->op == STRUCT && align-- > 1)
+ size += size+align & ~align;
+ tp->size = size;
+ return;
+ case ENUM:
+ tp->size = inttype->size;
+ tp->align = inttype->align;
+ return;
+ case FTN:
+ return;
+ default:
+ abort();
+ }
+}
+
+Type *
+deftype(Type *tp)
+{
+ tp->prop |= TDEFINED;
+ typesize(tp);
+ emit(OTYP, tp);
+ return tp;
+}
+
+static Type *
+newtype(Type *base)
+{
+ Type *tp;
+ size_t siz;
+
+ tp = xmalloc(sizeof(*tp));
+ *tp = *base;
+ tp->id = newid();
+
+ if (tp->op == FTN) {
+ siz = tp->n.elem * sizeof(Type *);
+ tp->p.pars = memcpy(xmalloc(siz), tp->p.pars, siz);
+ }
+
+ if (curfun) {
+ /* it is a type defined in the body of a function */
+ tp->next = localtypes;
+ localtypes = tp;
+ }
+ if (tp->prop & TDEFINED)
+ deftype(tp);
+ return tp;
+}
+
+Type *
+mktype(Type *tp, int op, TINT nelem, Type *pars[])
+{
+ Type **tbl, type;
+ Type *bp;
+
+ if (op == PTR && tp == voidtype)
+ return pvoidtype;
+
+ memset(&type, 0, sizeof(type));
+ type.type = tp;
+ type.op = op;
+ type.p.pars = pars;
+ type.n.elem = nelem;
+
+ switch (op) {
+ case ARY:
+ if (tp == voidtype) {
+ errorp("declaration of array of voids type");
+ tp = inttype;
+ }
+ type.letter = L_ARRAY;
+ if (nelem != 0)
+ type.prop |= TDEFINED;
+ break;
+ case KRFTN:
+ type.prop |= TDEFINED | TK_R;
+ type.op = FTN;
+ type.letter = L_FUNCTION;
+ break;
+ case FTN:
+ if (nelem > 0 && pars[nelem-1] == ellipsistype)
+ type.prop |= TELLIPSIS;
+ type.letter = L_FUNCTION;
+ type.prop |= TDEFINED;
+ break;
+ case PTR:
+ type.letter = L_POINTER;
+ type.prop |= TDEFINED;
+ break;
+ case ENUM:
+ type.letter = inttype->letter;
+ type.prop |= TINTEGER | TARITH;
+ type.n.rank = inttype->n.rank;
+ goto create_type;
+ case STRUCT:
+ type.letter = L_STRUCT;
+ type.prop |= TAGGREG;
+ goto create_type;
+ case UNION:
+ type.letter = L_UNION;
+ type.prop |= TAGGREG;
+ create_type:
+ return newtype(&type);
+ default:
+ abort();
+ }
+
+ tbl = &typetab[HASH(&type)];
+ for (bp = *tbl; bp; bp = bp->h_next) {
+ if (eqtype(bp, &type, 0))
+ return bp;
+ }
+
+ bp = newtype(&type);
+ bp->h_next = *tbl;
+ *tbl = bp;
+
+ return bp;
+}
+
+int
+eqtype(Type *tp1, Type *tp2, int equiv)
+{
+ TINT n;
+ Type **p1, **p2;
+ Symbol **s1, **s2;
+
+ if (tp1 == tp2)
+ return 1;
+ if (!tp1 || !tp2)
+ return 0;
+ if (tp1->op != tp2->op)
+ return 0;
+
+ switch (tp1->op) {
+ case UNION:
+ case STRUCT:
+ if (tp1->letter != tp2->letter)
+ return 0;
+ if (tp1->tag->name || tp2->tag->name)
+ return tp1->tag == tp2->tag;
+ if (tp1->n.elem != tp2->n.elem)
+ return 0;
+ s1 = tp1->p.fields, s2 = tp2->p.fields;
+ for (n = tp1->n.elem; n > 0; --n, ++s1, ++s2) {
+ if (strcmp((*s1)->name, (*s2)->name))
+ return 0;
+ if (!eqtype((*s1)->type, (*s2)->type, equiv))
+ return 0;
+ }
+ return 1;
+ case FTN:
+ if (tp1->n.elem != tp2->n.elem)
+ return 0;
+ p1 = tp1->p.pars, p2 = tp2->p.pars;
+ for (n = tp1->n.elem; n > 0; --n) {
+ if (!eqtype(*p1++, *p2++, equiv))
+ return 0;
+ }
+ goto check_base;
+ case ARY:
+ if (equiv && (tp1->n.elem == 0 || tp2->n.elem == 0))
+ goto check_base;
+ if (tp1->n.elem != tp2->n.elem)
+ return 0;
+ case PTR:
+ check_base:
+ return eqtype(tp1->type, tp2->type, equiv);
+ case VOID:
+ case ENUM:
+ return 0;
+ case INT:
+ case FLOAT:
+ return tp1->letter == tp2->letter;
+ default:
+ abort();
+ }
+}
+
+void
+flushtypes(void)
+{
+ Type *tp, *next, **h;
+
+ for (tp = localtypes; tp; tp = next) {
+ next = tp->next;
+ switch (tp->op) {
+ default:
+ /*
+ * All the local types are linked after
+ * global types, and since we are
+ * unlinking them in the inverse order
+ * we do know that tp is always the head
+ * of the collision list
+ */
+ h = &typetab[HASH(tp)];
+ assert(*h == tp);
+ *h = tp->h_next;
+ case STRUCT:
+ case UNION:
+ case ENUM:
+ free(tp);
+ break;
+ }
+ }
+ localtypes = NULL;
+}
--- /dev/null
+++ b/src/cmd/cc2/.gitignore
@@ -1,0 +1,1 @@
+error.h
--- /dev/null
+++ b/src/cmd/cc2/Makefile
@@ -1,0 +1,40 @@
+.POSIX:
+
+PROJECTDIR = ../../..
+include $(PROJECTDIR)/scripts/rules.mk
+
+MORECFLAGS = -I$(INCDIR)/$(STD)
+
+OBJS = main.o \
+ parser.o \
+ peep.o \
+ symbol.o \
+ node.o \
+ code.o \
+ optm.o \
+
+TARGET = $(LIBEXEC)/cc2-amd64-sysv \
+ $(LIBEXEC)/cc2-i386-sysv \
+ $(LIBEXEC)/cc2-qbe_amd64-sysv \
+ $(LIBEXEC)/cc2-z80-scc \
+
+all: $(TARGET)
+
+$(TARGET): error.h
+
+error.h: cc2.h
+ rm -f $@;\
+ trap 'r=$?;rm -f $$$$.h;exit $r' EXIT INT QUIT ;\
+ awk -f generror.awk cc2.h > $$$$.h && mv $$$$.h $@
+
+dep: inc-dep
+
+clean:
+ rm -f target/*/*.o error.h
+
+include target/amd64-sysv/target.mk
+include target/i386-sysv/target.mk
+include target/qbe_amd64-sysv/target.mk
+include target/qbe_arm64-sysv/target.mk
+include target/z80-scc/target.mk
+include deps.mk
--- /dev/null
+++ b/src/cmd/cc2/cc2.h
@@ -1,0 +1,256 @@
+enum iflags {
+ BBENTRY = 1, /* basic block entry */
+};
+
+enum tflags {
+ SIGNF = 1 << 0, /* Signed type */
+ INTF = 1 << 1, /* integer type */
+ FLOATF = 1 << 2, /* float type */
+ STRF = 1 << 3, /* string */
+ AGGRF = 1 << 4, /* aggregate */
+ FUNF = 1 << 5, /* function */
+ PARF = 1 << 6, /* parameter */
+ INITF = 1 << 7, /* initializer flag */
+ ELLIPS = 1 << 8, /* vararg function */
+};
+
+enum sclass {
+ SAUTO = 'A',
+ SREG = 'R',
+ SLABEL = 'L',
+ SINDEX = 'I',
+ STMP = 'N',
+ SGLOB = 'G',
+ SEXTRN = 'X',
+ SPRIV = 'Y',
+ SLOCAL = 'T',
+ SMEMB = 'M',
+ SCONST = '#',
+ STRING = '"',
+ SNONE = 0 /* cc2 relies on SNONE being 0 in nextpc() */
+};
+
+enum types {
+ ELLIPSIS = 'E',
+ INT8 = 'C',
+ INT16 = 'I',
+ INT32 = 'W',
+ INT64 = 'Q',
+ UINT8 = 'K',
+ UINT16 = 'N',
+ UINT32 = 'Z',
+ UINT64 = 'O',
+ POINTER = 'P',
+ FUNCTION = 'F',
+ VECTOR = 'V',
+ UNION = 'U',
+ STRUCT = 'S',
+ BOOL = 'B',
+ FLOAT = 'J',
+ DOUBLE = 'D',
+ LDOUBLE = 'H',
+ VOID = '0'
+};
+
+enum op {
+ /* kind of operand */
+ /* operands */
+ OMEM = 'M',
+ OTMP = 'N',
+ OAUTO = 'A',
+ OREG = 'R',
+ OCONST = '#',
+ OSTRING = '"',
+ OLOAD = 'D',
+ OLABEL = 'L',
+ OADD = '+',
+ OSUB = '-',
+ OMUL = '*',
+ OMOD = '%',
+ ODIV = '/',
+ OSHL = 'l',
+ OSHR = 'r',
+ OLT = '<',
+ OGT = '>',
+ OLE = '[',
+ OGE = ']',
+ OEQ = '=',
+ ONE = '!',
+ OBAND = '&',
+ OBOR = '|',
+ OBXOR = '^',
+ OCPL = '~',
+ OASSIG = ':',
+ OSNEG = '_',
+ OCALL = 'c',
+ OCALLE = 'z',
+ OPAR = 'p',
+ OFIELD = '.',
+ OCOMMA = ',',
+ OASK = '?',
+ OCOLON = ' ',
+ OADDR = '\'',
+ OAND = 'a',
+ OOR = 'o',
+ ONEG = 'n',
+ OPTR = '@',
+ OCAST = 'g',
+ OINC = 'i',
+ ODEC = 'd',
+ OBUILTIN = 'm',
+ /*statements */
+ ONOP = 'q',
+ OJMP = 'j',
+ OBRANCH = 'y',
+ ORET = 'h',
+ OBLOOP = 'b',
+ OELOOP = 'e',
+ OCASE = 'v',
+ ODEFAULT = 'f',
+ OBSWITCH = 's',
+ OESWITCH = 't',
+ OBFUN = 'x',
+ OEFUN = 'k',
+};
+
+enum builtins {
+ BVA_START = 's',
+ BVA_END = 'e',
+ BVA_ARG = 'a',
+ BVA_COPY = 'c',
+};
+
+enum nerrors {
+ EEOFFUN, /* EOF while parsing function */
+ ENLABEL, /* label without statement */
+ EIDOVER, /* identifier overflow */
+ EOUTPAR, /* out pf params */
+ ESYNTAX, /* syntax error */
+ ESTACKA, /* stack unaligned */
+ ESTACKO, /* stack overflow */
+ ESTACKU, /* stack underflow */
+ ELNLINE, /* line too long */
+ ELNBLNE, /* line without new line */
+ EFERROR, /* error reading from file:%s */
+ EBADID, /* incorrect symbol id */
+ EWTACKO, /* switch stack overflow */
+ EWTACKU, /* switch stack underflow */
+ ENOSWTC, /* Out of switch statement */
+ EBBUILT, /* Unknown builtin */
+ ENUMERR
+};
+
+typedef struct node Node;
+typedef struct type Type;
+typedef struct symbol Symbol;
+typedef struct addr Addr;
+typedef struct inst Inst;
+
+struct type {
+ unsigned long size;
+ unsigned long align;
+ short flags;
+};
+
+struct symbol {
+ Type type;
+ Type rtype;
+ unsigned short id;
+ unsigned short numid;
+ char *name;
+ char kind;
+ union {
+ unsigned long off;
+ Node *stmt;
+ Inst *inst;
+ } u;
+ Symbol *next;
+ Symbol *h_next;
+};
+
+struct node {
+ char op;
+ Type type;
+ char complex;
+ char address;
+ unsigned char flags;
+ union {
+ TUINT i;
+ TFLOAT f;
+ char reg;
+ char *s;
+ Symbol *sym;
+ char subop;
+ } u;
+ Symbol *label;
+ Node *left, *right;
+ Node *next, *prev;
+};
+
+struct addr {
+ char kind;
+ union {
+ char reg;
+ TUINT i;
+ Symbol *sym;
+ } u;
+};
+
+struct inst {
+ unsigned char op;
+ unsigned char flags;
+ Symbol *label;
+ Inst *next, *prev;
+ Addr from1, from2, to;
+};
+
+/* main.c */
+extern void error(unsigned nerror, ...);
+
+/* parse.c */
+extern void parse(void);
+
+/* optm.c */
+extern Node *optm_dep(Node *np), *optm_ind(Node *np);
+
+/* cgen.c */
+extern Node *sethi(Node *np);
+extern Node *cgen(Node *np);
+
+/* peep.c */
+extern void peephole(void);
+
+/* code.c */
+extern void data(Node *np);
+extern void writeout(void), endinit(void), newfun(void);
+extern void code(int op, Node *to, Node *from1, Node *from2);
+extern void defvar(Symbol *), defpar(Symbol *), defglobal(Symbol *);
+extern void setlabel(Symbol *sym), getbblocks(void);
+extern Node *label2node(Node *np, Symbol *sym);
+extern Node *constnode(Node *np, TUINT n, Type *tp);
+extern Symbol *newlabel(void);
+
+/* node.c */
+#define SETCUR 1
+#define KEEPCUR 0
+extern void apply(Node *(*fun)(Node *));
+extern void cleannodes(void);
+extern void delnode(Node *np);
+extern void deltree(Node *np);
+extern void prtree(Node *np), prforest(char *msg);
+extern Node *node(int op);
+extern Node *addstmt(Node *np, int flags);
+extern Node *delstmt(void);
+extern Node *nextstmt(void);
+
+/* symbol.c */
+#define TMPSYM 0
+extern Symbol *getsym(unsigned id);
+extern void popctx(void);
+extern void pushctx(void);
+extern void freesym(Symbol *sym);
+
+/* globals */
+extern Symbol *curfun;
+extern Symbol *locals;
+extern Inst *pc, *prog;
--- /dev/null
+++ b/src/cmd/cc2/code.c
@@ -1,0 +1,133 @@
+static char sccsid[] = "@(#) ./cc2/code.c";
+#include <stdlib.h>
+#include <string.h>
+
+#include <scc/scc.h>
+#include "cc2.h"
+
+Inst *pc, *prog;
+
+static void
+nextpc(void)
+{
+ Inst *new;
+
+ new = xcalloc(1, sizeof(*new)); /* TODO: create an arena */
+
+ if (!pc) {
+ prog = new;
+ } else {
+ new->next = pc->next;
+ pc->next = new;
+ }
+
+ /* SNONE being 0, calloc initialized {from1,from2,to}.kind for us */
+ new->prev = pc;
+ pc = new;
+}
+
+static void
+addr(Node *np, Addr *addr)
+{
+ Symbol *sym;
+
+ switch (np->op) {
+ case OREG:
+ /* TODO:
+ * At this moment this op is used also for register variables
+ */
+ addr->kind = SREG;
+ addr->u.reg = np->u.reg;
+ break;
+ case OCONST:
+ addr->kind = SCONST;
+ /* TODO: Add support for more type of constants */
+ addr->u.i = np->u.i;
+ break;
+ case OTMP:
+ case OLABEL:
+ case OAUTO:
+ case OMEM:
+ sym = np->u.sym;
+ addr->kind = sym->kind;
+ addr->u.sym = sym;
+ break;
+ default:
+ abort();
+ }
+}
+
+Symbol *
+newlabel(void)
+{
+ Symbol *sym = getsym(TMPSYM);
+
+ sym->kind = SLABEL;
+ return sym;
+}
+
+Node *
+label2node(Node *np, Symbol *sym)
+{
+ if(!sym)
+ sym = newlabel();
+ if (!np)
+ np = node(OLABEL);
+ np->op = OLABEL;
+ np->u.sym = sym;
+
+ return np;
+}
+
+Node *
+constnode(Node *np, TUINT n, Type *tp)
+{
+ if (!np)
+ np = node(OCONST);
+ np->op = OCONST;
+ np->left = NULL;
+ np->right = NULL;
+ np->type = *tp;
+ np->u.i = n;
+ return np;
+}
+
+void
+setlabel(Symbol *sym)
+{
+ if (!sym)
+ return;
+ code(0, NULL, NULL, NULL);
+ pc->label = sym;
+ sym->u.inst = pc;
+}
+
+void
+code(int op, Node *to, Node *from1, Node *from2)
+{
+ nextpc();
+ if (from1)
+ addr(from1, &pc->from1);
+ if (from2)
+ addr(from2, &pc->from2);
+ if (to)
+ addr(to, &pc->to);
+ pc->op = op;
+}
+
+void
+delcode(void)
+{
+ Inst *prev = pc->prev, *next = pc->next;
+
+ free(pc);
+ if (!prev) {
+ pc = next;
+ prog = NULL;
+ } else {
+ pc = prev;
+ prev->next = next;
+ if (next)
+ next->prev = prev;
+ }
+}
--- /dev/null
+++ b/src/cmd/cc2/deps.mk
@@ -1,0 +1,61 @@
+#deps
+code.o: $(INCDIR)/scc/scc/scc.h
+code.o: cc2.h
+main.o: $(INCDIR)/scc/scc/arg.h
+main.o: $(INCDIR)/scc/scc/scc.h
+main.o: cc2.h
+main.o: error.h
+node.o: $(INCDIR)/scc/scc/scc.h
+node.o: cc2.h
+optm.o: $(INCDIR)/scc/scc/scc.h
+optm.o: cc2.h
+parser.o: $(INCDIR)/scc/scc/cstd.h
+parser.o: $(INCDIR)/scc/scc/scc.h
+parser.o: cc2.h
+peep.o: $(INCDIR)/scc/scc/scc.h
+peep.o: cc2.h
+symbol.o: $(INCDIR)/scc/scc/scc.h
+symbol.o: cc2.h
+target/amd64-sysv/cgen.o: $(INCDIR)/scc/scc/scc.h
+target/amd64-sysv/cgen.o: target/amd64-sysv/../../cc2.h
+target/amd64-sysv/cgen.o: target/amd64-sysv/arch.h
+target/amd64-sysv/code.o: $(INCDIR)/scc/scc/cstd.h
+target/amd64-sysv/code.o: $(INCDIR)/scc/scc/scc.h
+target/amd64-sysv/code.o: target/amd64-sysv/../../cc2.h
+target/amd64-sysv/code.o: target/amd64-sysv/arch.h
+target/amd64-sysv/optm.o: $(INCDIR)/scc/scc/scc.h
+target/amd64-sysv/optm.o: target/amd64-sysv/../../cc2.h
+target/amd64-sysv/types.o: $(INCDIR)/scc/scc/scc.h
+target/amd64-sysv/types.o: target/amd64-sysv/../../cc2.h
+target/i386-sysv/cgen.o: $(INCDIR)/scc/scc/scc.h
+target/i386-sysv/cgen.o: target/i386-sysv/../../cc2.h
+target/i386-sysv/cgen.o: target/i386-sysv/arch.h
+target/i386-sysv/code.o: $(INCDIR)/scc/scc/cstd.h
+target/i386-sysv/code.o: $(INCDIR)/scc/scc/scc.h
+target/i386-sysv/code.o: target/i386-sysv/../../cc2.h
+target/i386-sysv/code.o: target/i386-sysv/arch.h
+target/i386-sysv/optm.o: $(INCDIR)/scc/scc/scc.h
+target/i386-sysv/optm.o: target/i386-sysv/../../cc2.h
+target/i386-sysv/types.o: $(INCDIR)/scc/scc/scc.h
+target/i386-sysv/types.o: target/i386-sysv/../../cc2.h
+target/qbe/cgen.o: $(INCDIR)/scc/scc/cstd.h
+target/qbe/cgen.o: $(INCDIR)/scc/scc/scc.h
+target/qbe/cgen.o: target/qbe/../../cc2.h
+target/qbe/cgen.o: target/qbe/arch.h
+target/qbe/code.o: $(INCDIR)/scc/scc/cstd.h
+target/qbe/code.o: $(INCDIR)/scc/scc/scc.h
+target/qbe/code.o: target/qbe/../../cc2.h
+target/qbe/code.o: target/qbe/arch.h
+target/qbe/optm.o: $(INCDIR)/scc/scc/scc.h
+target/qbe/optm.o: target/qbe/../../cc2.h
+target/z80-scc/cgen.o: $(INCDIR)/scc/scc/scc.h
+target/z80-scc/cgen.o: target/z80-scc/../../cc2.h
+target/z80-scc/cgen.o: target/z80-scc/arch.h
+target/z80-scc/code.o: $(INCDIR)/scc/scc/cstd.h
+target/z80-scc/code.o: $(INCDIR)/scc/scc/scc.h
+target/z80-scc/code.o: target/z80-scc/../../cc2.h
+target/z80-scc/code.o: target/z80-scc/arch.h
+target/z80-scc/optm.o: $(INCDIR)/scc/scc/scc.h
+target/z80-scc/optm.o: target/z80-scc/../../cc2.h
+target/z80-scc/types.o: $(INCDIR)/scc/scc/scc.h
+target/z80-scc/types.o: target/z80-scc/../../cc2.h
--- /dev/null
+++ b/src/cmd/cc2/generror.awk
@@ -1,0 +1,9 @@
+/^enum nerrors \{/ {print "char *errlist[] = {"; inhome = 1}
+
+inhome && /E[A-Z]*, / {sub(/,/, "", $1)
+ printf("\t[%s] = \"", $1)
+ for (i = 3; i <= NF-1; ++i)
+ printf("%s%s", $i, (i == NF-1) ? "\"" : " ")
+ print ","}
+
+inhome && /^}/ {print "};" ; inhome = 0}
--- /dev/null
+++ b/src/cmd/cc2/main.c
@@ -1,0 +1,70 @@
+static char sccsid[] = "@(#) ./cc2/main.c";
+
+#include <errno.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <scc/arg.h>
+#include <scc/scc.h>
+#include "cc2.h"
+#include "error.h"
+
+char *argv0;
+
+void
+error(unsigned nerror, ...)
+{
+ va_list va;
+ va_start(va, nerror);
+ vfprintf(stderr, errlist[nerror], va);
+ va_end(va);
+ putc('\n', stderr);
+ exit(1);
+}
+
+static int
+moreinput(void)
+{
+ int c;
+
+repeat:
+ if (feof(stdin))
+ return 0;
+ if ((c = getchar()) == '\n' || c == EOF)
+ goto repeat;
+ ungetc(c, stdin);
+ return 1;
+}
+
+static void
+usage(void)
+{
+ fputs("usage: cc2 [irfile]\n", stderr);
+ exit(1);
+}
+
+int
+main(int argc, char *argv[])
+{
+ ARGBEGIN {
+ default:
+ usage();
+ } ARGEND
+
+ if (argv[0] && !freopen(argv[0], "r", stdin))
+ die("cc2: %s: %s", argv[0], strerror(errno));
+
+ while (moreinput()) {
+ parse();
+ apply(optm_ind);
+ apply(optm_dep);
+ apply(sethi);
+ apply(cgen);
+ getbblocks(); /* TODO: run apply over asm ins too */
+ peephole();
+ writeout();
+ }
+ return 0;
+}
--- /dev/null
+++ b/src/cmd/cc2/node.c
@@ -1,0 +1,142 @@
+static char sccsid[] = "@(#) ./cc2/node.c";
+#include <stdlib.h>
+#include <string.h>
+
+#include <scc/scc.h>
+
+#include "cc2.h"
+
+#define NNODES 32
+
+Node *curstmt;
+Symbol *curfun;
+
+static Alloc *arena;
+
+
+Node *
+node(int op)
+{
+ struct arena *ap;
+ Node *np;
+
+ if (!arena)
+ arena = alloc(sizeof(Node), NNODES);
+ np = memset(new(arena), 0, sizeof(*np));
+ np->op = op;
+
+ return np;
+}
+
+#ifndef NDEBUG
+#include <stdio.h>
+
+static void
+prnode(Node *np)
+{
+ if (np->left)
+ prnode(np->left);
+ if (np->right)
+ prnode(np->right);
+ fprintf(stderr, "\t%c%lu", np->op, np->type.size);
+}
+
+void
+prtree(Node *np)
+{
+ prnode(np);
+ putc('\n', stderr);
+}
+
+void
+prforest(char *msg)
+{
+ Node *np;
+
+ if (!curfun)
+ return;
+
+ fprintf(stderr, "%s {\n", msg);
+ for (np = curfun->u.stmt; np; np = np->next)
+ prtree(np);
+ fputs("}\n", stderr);
+}
+#endif
+
+Node *
+addstmt(Node *np, int flag)
+{
+ if (curstmt)
+ np->next = curstmt->next;
+ np->prev = curstmt;
+
+ if (!curfun->u.stmt)
+ curfun->u.stmt = np;
+ else
+ curstmt->next = np;
+
+ if (flag == SETCUR)
+ curstmt = np;
+
+ return np;
+}
+
+Node *
+delstmt(void)
+{
+ Node *next, *prev;
+
+ next = curstmt->next;
+ prev = curstmt->prev;
+ if (next)
+ next->prev = prev;
+ if (prev)
+ prev->next = next;
+ else
+ curfun->u.stmt = next;
+ deltree(curstmt);
+
+ return curstmt = next;
+}
+
+Node *
+nextstmt(void)
+{
+ return curstmt = curstmt->next;
+}
+
+void
+delnode(Node *np)
+{
+ delete(arena, np);
+}
+
+void
+deltree(Node *np)
+{
+ if (!np)
+ return;
+ deltree(np->left);
+ deltree(np->right);
+ delnode(np);
+}
+
+void
+cleannodes(void)
+{
+ if (arena) {
+ dealloc(arena);
+ arena = NULL;
+ }
+ curstmt = NULL;
+}
+
+void
+apply(Node *(*fun)(Node *))
+{
+ if (!curfun)
+ return;
+ curstmt = curfun->u.stmt;
+ while (curstmt)
+ (*fun)(curstmt) ? nextstmt() : delstmt();
+}
--- /dev/null
+++ b/src/cmd/cc2/optm.c
@@ -1,0 +1,9 @@
+#include <scc/scc.h>
+#include "cc2.h"
+
+Node *
+optm_ind(Node *np)
+{
+ return np;
+}
+
--- /dev/null
+++ b/src/cmd/cc2/parser.c
@@ -1,0 +1,722 @@
+static char sccsid[] = "@(#) ./cc2/parser.c";
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <scc/cstd.h>
+#include <scc/scc.h>
+
+#include "cc2.h"
+
+#define STACKSIZ 50
+
+extern Type int8type, int16type, int32type, int64type,
+ uint8type, uint16type, uint32type, uint64type,
+ float32type, float64type, float80type,
+ booltype,
+ ptrtype,
+ voidtype,
+ arg_type;
+
+Type funetype = {
+ .flags = FUNF | ELLIPS
+};
+
+Type funtype = {
+ .flags = FUNF
+};
+
+union tokenop {
+ void *arg;
+ unsigned op;
+};
+
+struct swtch {
+ int nr;
+ Node *first;
+ Node *last;
+};
+
+static struct swtch swtbl[NR_BLOCK], *swp = swtbl;
+static Symbol *lastfun;
+
+typedef void parsefun(char *, union tokenop);
+static parsefun type, symbol, getname, unary, binary, ternary, call,
+ constant, composed, binit, einit,
+ jump, oreturn, loop, assign,
+ ocase, bswitch, eswitch, builtin;
+
+typedef void evalfun(void);
+static evalfun vardecl, beginfun, endfun, endpars, stmt,
+ array, aggregate, flddecl, labeldcl;
+
+static struct decoc {
+ void (*eval)(void);
+ void (*parse)(char *token, union tokenop);
+ union tokenop u;
+} optbl[] = { /* eval parse args */
+ ['A'] = { vardecl, symbol, .u.op = SAUTO<<8 | OAUTO},
+ ['R'] = { vardecl, symbol, .u.op = SREG<<8 | OREG},
+ ['G'] = { vardecl, symbol, .u.op = SGLOB<<8 | OMEM},
+ ['X'] = { vardecl, symbol, .u.op = SEXTRN<<8 | OMEM},
+ ['Y'] = { vardecl, symbol, .u.op = SPRIV<<8 | OMEM},
+ ['T'] = { vardecl, symbol, .u.op = SLOCAL<<8 | OMEM},
+ ['M'] = { flddecl, symbol, .u.op = SMEMB<<8 | OMEM},
+ ['L'] = { labeldcl, symbol, .u.op = SLABEL<<8 | OLABEL},
+
+ ['C'] = { NULL, type, .u.arg = &int8type},
+ ['I'] = { NULL, type, .u.arg = &int16type},
+ ['W'] = { NULL, type, .u.arg = &int32type},
+ ['Q'] = { NULL, type, .u.arg = &int64type},
+ ['K'] = { NULL, type, .u.arg = &uint8type},
+ ['N'] = { NULL, type, .u.arg = &uint16type},
+ ['Z'] = { NULL, type, .u.arg = &uint32type},
+ ['O'] = { NULL, type, .u.arg = &uint64type},
+ ['J'] = { NULL, type, .u.arg = &float32type},
+ ['D'] = { NULL, type, .u.arg = &float64type},
+ ['H'] = { NULL, type, .u.arg = &float80type},
+ ['0'] = { NULL, type, .u.arg = &voidtype},
+ ['B'] = { NULL, type, .u.arg = &booltype},
+ ['P'] = { NULL, type, .u.arg = &ptrtype},
+ ['E'] = { NULL, type, .u.arg = &funetype},
+ ['1'] = { NULL, type, .u.arg = &arg_type},
+
+ ['F'] = { NULL, type, .u.arg = &funtype},
+ ['V'] = { array,composed, 0},
+ ['U'] = {aggregate,composed, 0},
+ ['S'] = {aggregate,composed, 0},
+
+ ['"'] = { NULL, getname, 0},
+ ['{'] = { beginfun, NULL, 0},
+ ['}'] = { endfun, NULL, 0},
+ ['('] = { NULL, binit, 0},
+ [')'] = { NULL, einit, 0},
+ ['\\'] = { endpars, NULL, 0},
+ ['\t'] = { stmt, NULL, 0},
+
+ ['~'] = { NULL, unary, .u.op = OCPL},
+ ['_'] = { NULL, unary, .u.op = OSNEG},
+ ['\''] = { NULL, unary, .u.op = OADDR},
+ ['@'] = { NULL, unary, .u.op = OPTR},
+ ['g'] = { NULL, unary, .u.op = OCAST},
+ ['p'] = { NULL, unary, .u.op = OPAR},
+ ['n'] = { NULL, unary, .u.op = ONEG},
+
+ ['a'] = { NULL, binary, .u.op = OAND},
+ ['o'] = { NULL, binary, .u.op = OOR},
+ ['.'] = { NULL, binary, .u.op = OFIELD},
+ ['+'] = { NULL, binary, .u.op = OADD},
+ ['-'] = { NULL, binary, .u.op = OSUB},
+ ['*'] = { NULL, binary, .u.op = OMUL},
+ ['%'] = { NULL, binary, .u.op = OMOD},
+ ['/'] = { NULL, binary, .u.op = ODIV},
+ ['l'] = { NULL, binary, .u.op = OSHL},
+ ['r'] = { NULL, binary, .u.op = OSHR},
+ ['<'] = { NULL, binary, .u.op = OLT},
+ ['>'] = { NULL, binary, .u.op = OGT},
+ ['['] = { NULL, binary, .u.op = OLE},
+ [']'] = { NULL, binary, .u.op = OGE},
+ ['='] = { NULL, binary, .u.op = OEQ},
+ ['!'] = { NULL, binary, .u.op = ONE},
+ ['&'] = { NULL, binary, .u.op = OBAND},
+ ['|'] = { NULL, binary, .u.op = OBOR},
+ ['^'] = { NULL, binary, .u.op = OBXOR},
+ [','] = { NULL, binary, .u.op = OCOMMA},
+ ['m'] = { NULL, builtin,.u.op = OBUILTIN},
+
+ [':'] = { NULL, assign, .u.op = OASSIG},
+ ['?'] = { NULL, ternary, .u.op = OASK},
+ ['c'] = { NULL, call, .u.op = OCALL},
+ ['z'] = { NULL, call, .u.op = OCALLE},
+
+ ['#'] = { NULL,constant, .u.op = OCONST},
+
+ ['j'] = { NULL, jump, .u.op = OJMP},
+ ['y'] = { NULL, jump, .u.op = OBRANCH},
+ ['h'] = { NULL, oreturn, .u.op = ORET},
+ ['i'] = { NULL, NULL, .u.op = OINC},
+ ['d'] = { NULL, NULL, .u.op = ODEC},
+
+ ['b'] = { NULL, loop, .u.op = OBLOOP},
+ ['e'] = { NULL, loop, .u.op = OELOOP},
+
+ ['v'] = { NULL, ocase, .u.op = OCASE},
+ ['f'] = { NULL, ocase, .u.op = ODEFAULT},
+ ['t'] = { NULL, eswitch, .u.op = OESWITCH},
+ ['s'] = { NULL, bswitch, .u.op = OBSWITCH},
+};
+
+static int sclass, inpars, ininit, endf, lineno;
+static void *stack[STACKSIZ], **sp = stack;
+
+static Node *
+push(void *elem)
+{
+ if (sp == &stack[STACKSIZ])
+ error(ESTACKO);
+ return *sp++ = elem;
+}
+
+static void *
+pop(void)
+{
+ if (sp == stack)
+ error(ESTACKU);
+ return *--sp;
+}
+
+static int
+empty(void)
+{
+ return sp == stack;
+}
+
+static void
+type(char *token, union tokenop u)
+{
+ push(u.arg);
+}
+
+static void
+composed(char *token, union tokenop u)
+{
+ Symbol *sym;
+
+ sym = getsym(atoi(token+1));
+ push(&sym->type);
+}
+
+static void
+getname(char *t, union tokenop u)
+{
+ push((*++t) ? xstrdup(t) : NULL);
+}
+
+static void
+symbol(char *token, union tokenop u)
+{
+ Node *np = node(u.op & 0xFF);
+ Symbol *sym = getsym(atoi(token+1));
+
+ sclass = u.op >> 8;
+ np->u.sym = sym;
+ np->type = sym->type;
+ push(np);
+}
+
+static Type *
+gettype(char *token)
+{
+ struct decoc *dp;
+
+ dp = &optbl[*token];
+ if (!dp->parse)
+ error(ESYNTAX);
+ (*dp->parse)(token, dp->u);
+ return pop();
+}
+
+static void
+constant(char *token, union tokenop u)
+{
+ static char letters[] = "0123456789ABCDEF";
+ Node *np;
+ TUINT v;
+ unsigned c;
+
+ ++token;
+ if (*token == '"') {
+ ++token;
+ np = node(OSTRING);
+ np->type.flags = STRF;
+ np->type.size = strlen(token);
+ np->type.align = int8type.align;
+ np->u.s = xstrdup(token);
+ } else {
+ np = node(OCONST);
+ np->type = *gettype(token++);
+ for (v = 0; c = *token++; v += c) {
+ v <<= 4;
+ c = strchr(letters, c) - letters;
+ }
+ np->u.i = v;
+ }
+ push(np);
+}
+
+static void
+assign(char *token, union tokenop u)
+{
+ int subop;
+ Node *np = node(u.op);
+
+ switch (subop = *++token) {
+ case '+':
+ case '-':
+ case '*':
+ case '%':
+ case '/':
+ case 'l':
+ case 'r':
+ case '&':
+ case '|':
+ case '^':
+ case 'i':
+ case 'd':
+ ++token;
+ subop = optbl[subop].u.op;
+ break;
+ default:
+ subop = 0;
+ break;
+ }
+
+ np->u.subop = subop;
+ np->type = *gettype(token);
+ np->right = pop();
+ np->left = pop();
+ push(np);
+}
+
+static void
+ternary(char *token, union tokenop u)
+{
+ Node *ask = node(OASK), *colon = node(OCOLON);
+ Type *tp = gettype(token+1);
+
+ colon->right = pop();
+ colon->left = pop();
+
+ ask->type = *tp;
+ ask->left = pop();
+ ask->right = colon;
+ push(ask);
+}
+
+static void
+eval(char *tok)
+{
+ struct decoc *dp;
+
+ do {
+ dp = &optbl[*tok];
+ if (!dp->parse)
+ break;
+ (*dp->parse)(tok, dp->u);
+ } while (tok = strtok(NULL, "\t\n"));
+}
+
+static int
+nextline(void)
+{
+ static char line[LINESIZ];
+ size_t len;
+ int c;
+ void (*fun)(void);
+
+repeat:
+ ++lineno;
+ if (!fgets(line, sizeof(line), stdin))
+ return 0;
+ if ((len = strlen(line)) == 0 || line[0] == '\n')
+ goto repeat;
+ if (line[len-1] != '\n')
+ error(len < sizeof(line)-1 ? ELNBLNE : ELNLINE);
+ line[len-1] = '\0';
+
+ c = *line;
+ eval(strtok(line, "\t\n"));
+ if ((fun = *optbl[c].eval) != NULL)
+ (*fun)();
+ if (sp != stack)
+ error(ESTACKA);
+ return 1;
+}
+
+static void
+oreturn(char *token, union tokenop u)
+{
+ Node *np = node(u.op);
+
+ if (token = strtok(NULL, "\t\n"))
+ eval(token);
+ if (!empty())
+ np->left = pop();
+ push(np);
+}
+
+/*
+ * Move np (which is a OCASE/ODEFAULT/OESWITCH) to be contigous with
+ * the last switch table. It is a bit ugly to touch directly curstmt
+ * here, but moving this function to node.c is worse, because we are
+ * putting knowledge of how the text is parsed into the node
+ * represtation module.
+ */
+static void
+waft(Node *np)
+{
+ Node *lastcase, *next;;
+ struct swtch *cur;
+ extern Node *curstmt;
+
+ if (swp == swtbl)
+ error(EWTACKU);
+
+ cur = swp - 1;
+ lastcase = cur->last;
+ next = lastcase->next;
+
+ np->next = next;
+ np->prev = lastcase;
+
+ if (next)
+ next->prev = np;
+ lastcase->next = np;
+
+ if (curstmt == cur->last)
+ curstmt = np;
+ cur->last = np;
+ cur->nr++;
+}
+
+static void
+bswitch(char *token, union tokenop u)
+{
+ struct swtch *cur;
+ Node *np = node(u.op);
+
+ if (swp == &swtbl[NR_BLOCK])
+ error(EWTACKO);
+ cur = swp++;
+ cur->nr = 0;
+
+ eval(strtok(NULL, "\t\n"));
+ np->left = pop();
+
+ push(cur->first = cur->last = np);
+}
+
+static void
+eswitch(char *token, union tokenop u)
+{
+ struct swtch *cur;
+
+ if (swp == swtbl)
+ error(EWTACKU);
+ jump(token, u);
+ waft(pop());
+ cur = --swp;
+ cur->first->u.i = cur->nr;
+}
+
+static void
+ocase(char *token, union tokenop u)
+{
+ jump(token, u);
+ waft(pop());
+}
+
+static void
+jump(char *token, union tokenop u)
+{
+ Node *aux, *np = node(u.op);
+
+ eval(strtok(NULL, "\t\n"));
+
+ if (u.op == OBRANCH || u.op == OCASE)
+ np->left = pop();
+ aux = pop();
+ np->u.sym = aux->u.sym;
+ delnode(aux);
+ push(np);
+}
+
+static void
+loop(char *token, union tokenop u)
+{
+ push(node(u.op));
+}
+
+static void
+unary(char *token, union tokenop u)
+{
+ Node *np = node(u.op);
+
+ np->type = *gettype(token+1);
+ np->left = pop();
+ np->right = NULL;
+ push(np);
+}
+
+static void
+call(char *token, union tokenop u)
+{
+ Node *np, *par, *fun = node(u.op);
+
+ for (par = NULL;; par = np) {
+ np = pop();
+ if (np->op != OPAR)
+ break;
+ np->right = par;
+ }
+
+ fun->type = *gettype(token+1);
+ fun->left = np;
+ fun->right = par;
+ push(fun);
+}
+
+static void
+builtin(char *token, union tokenop u)
+{
+ Node *np = node(u.op);
+ char *name;
+ unsigned subop, nchilds;
+
+ np->type = *gettype(token+1);
+ name = pop();
+
+ if (!strcmp("__builtin_va_arg", name)) {
+ nchilds = 1;
+ subop = BVA_ARG;
+ } else if (!strcmp("__builtin_va_start", name)) {
+ nchilds = 2;
+ subop = BVA_START;
+ } else if (!strcmp("__builtin_va_end", name)) {
+ nchilds = 1;
+ subop = BVA_END;
+ } else if (!strcmp("__builtin_va_copy", name)) {
+ nchilds = 2;
+ subop = BVA_COPY;
+ } else {
+ error(EBBUILT);;
+ }
+
+ np->u.subop = subop;
+ np->right = (nchilds == 2) ? pop() : NULL;
+ np->left = (nchilds != 0) ? pop() : NULL;
+
+ free(name);
+ push(np);
+}
+
+static void
+binary(char *token, union tokenop u)
+{
+ Node *np = node(u.op);
+
+ np->type = *gettype(token+1);
+ np->right = pop();
+ np->left = pop();
+ push(np);
+}
+
+static void
+binit(char *token, union tokenop u)
+{
+ ininit = 1;
+}
+
+static void
+einit(char *token, union tokenop u)
+{
+ ininit = 0;
+ endinit();
+}
+
+static void
+endpars(void)
+{
+ if (!curfun || !inpars)
+ error(ESYNTAX);
+ inpars = 0;
+}
+
+static void
+aggregate(void)
+{
+ Node *align, *size;
+ char *name;
+ Type *tp;
+ Symbol *sym;
+
+ align = pop();
+ size = pop();
+ name = pop();
+ tp = pop();
+
+ tp->size = size->u.i;
+ tp->align = align->u.i;
+ tp->flags = AGGRF;
+ /*
+ * type is the first field of Symbol so we can obtain the
+ * address of the symbol from the address of the type.
+ * We have to do this because composed returns the pointer
+ * to the type, but in this function we also need the
+ * symbol to store the name.
+ */
+ sym = (Symbol *) tp;
+ sym->name = name;
+
+ delnode(align);
+ delnode(size);
+}
+
+static void
+array(void)
+{
+ Type *tp, *base;
+ Node *size;
+
+ size = pop();
+ base = pop();
+ tp = pop();
+ tp->size = size->u.i * base->size; /* FIXME check for overflow */
+ tp->align = base->align;
+
+ delnode(size);
+}
+
+static void
+decl(Symbol *sym)
+{
+ Type *tp = &sym->type;
+
+ if (tp->flags & FUNF) {
+ lastfun = sym;
+ } else {
+ switch (sym->kind) {
+ case SEXTRN:
+ case SGLOB:
+ case SPRIV:
+ case SLOCAL:
+ defglobal(sym);
+ break;
+ case SAUTO:
+ case SREG:
+ if (!curfun)
+ error(ESYNTAX);
+ ((inpars) ? defpar : defvar)(sym);
+ break;
+ default:
+ abort();
+ }
+ }
+}
+
+static void
+vardecl(void)
+{
+ Type *tp, *rp;
+ Node *np;
+ Symbol *sym;
+ char *name;
+
+ name = pop();
+ tp = pop();
+ if (tp->flags & FUNF)
+ rp = pop();
+ np = pop();
+
+ sym = np->u.sym;
+ /*
+ * We have to free sym->name because in tentative declarations
+ * we can have multiple declarations of the same symbol, and in
+ * this case our parser will allocate twice the memory
+ */
+ free(sym->name);
+ sym->name = name;
+ sym->type = *tp;
+ if (tp->flags & FUNF)
+ sym->rtype = *rp;
+ sym->kind = sclass;
+
+ if (ininit)
+ sym->type.flags |= INITF;
+ decl(sym);
+ delnode(np);
+}
+
+static void
+flddecl(void)
+{
+ Node *off, *np;
+ char *name;
+ Type *tp;
+ Symbol *sym;
+
+ off = pop();
+ name = pop();
+ tp = pop();
+ np = pop();
+
+ sym = np->u.sym;
+ sym->u.off = off->u.i;
+ sym->name = name;
+ sym->type = *tp;
+
+ delnode(np);
+ delnode(off);
+}
+
+static void
+labeldcl(void)
+{
+ Node *np;
+ Symbol *sym;
+
+ np = pop();
+ np->op = ONOP;
+ sym = np->u.sym;
+ sym->kind = SLABEL;
+ sym->u.stmt = np;
+ np->label = sym;
+ addstmt(np, SETCUR);
+}
+
+static void
+stmt(void)
+{
+ Node *np;
+
+ if (empty())
+ return;
+ np = pop();
+ if (ininit) {
+ data(np);
+ deltree(np);
+ return;
+ }
+ addstmt(np, SETCUR);
+}
+
+static void
+beginfun(void)
+{
+ curfun = lastfun;
+ inpars = 1;
+ pushctx();
+ addstmt(node(OBFUN), SETCUR);
+}
+
+static void
+endfun(void)
+{
+ endf = 1;
+ addstmt(node(OEFUN), SETCUR);
+}
+
+void
+parse(void)
+{
+ cleannodes(); /* remove code of previous function */
+ popctx(); /* remove context of previous function */
+ curfun = NULL;
+ endf = 0;
+
+ while (!endf && nextline())
+ ;
+ if (ferror(stdin))
+ error(EFERROR, strerror(errno));
+}
--- /dev/null
+++ b/src/cmd/cc2/peep.c
@@ -1,0 +1,8 @@
+static char sccsid[] = "@(#) ./cc2/peep.c";
+#include <scc/scc.h>
+#include "cc2.h"
+
+void
+peephole(void)
+{
+}
--- /dev/null
+++ b/src/cmd/cc2/symbol.c
@@ -1,0 +1,92 @@
+static char sccsid[] = "@(#) ./cc2/symbol.c";
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <scc/scc.h>
+
+#include "cc2.h"
+
+#define NR_SYMHASH 64
+
+Symbol *locals;
+
+static Symbol *symtab[NR_SYMHASH], *curlocal;
+static int infunction;
+
+
+void
+freesym(Symbol *sym)
+{
+ free(sym->name);
+ free(sym);
+}
+
+void
+pushctx(void)
+{
+ infunction = 1;
+}
+
+void
+popctx(void)
+{
+ Symbol *sym, *next;
+
+ infunction = 0;
+ for (sym = locals; sym; sym = next) {
+ next = sym->next;
+ /*
+ * Symbols are inserted in the hash in the inverted
+ * order they are found in locals and it is impossible
+ * to have a global over a local, because a local is
+ * any symbol defined in the body of a function,
+ * even if it has extern linkage.
+ * For this reason when we reach a symbol in the
+ * locals list we know that it is the head of it
+ * collision list and we can remove it assigning
+ * it h_next to the hash table position
+ */
+ if (sym->id != TMPSYM)
+ symtab[sym->id & NR_SYMHASH-1] = sym->h_next;
+ freesym(sym);
+ }
+ curlocal = locals = NULL;
+}
+
+Symbol *
+getsym(unsigned id)
+{
+ Symbol **htab, *sym;
+ static unsigned short num;
+
+ if (id >= USHRT_MAX)
+ error(EBADID);
+
+ if (id != TMPSYM) {
+ htab = &symtab[id & NR_SYMHASH-1];
+ for (sym = *htab; sym; sym = sym->h_next) {
+ if (sym->id == id)
+ return sym;
+ }
+ }
+
+ sym = xcalloc(1, sizeof(*sym));
+ sym->id = id;
+ if (infunction) {
+ if (!locals)
+ locals = sym;
+ if (curlocal)
+ curlocal->next = sym;
+ curlocal = sym;
+ }
+ if (id != TMPSYM) {
+ sym->h_next = *htab;
+ *htab = sym;
+ }
+ if ((sym->numid = ++num) == 0)
+ error(EIDOVER);
+
+ return sym;
+}
--- /dev/null
+++ b/src/cmd/cc2/target/amd64-sysv/cgen.c
@@ -1,0 +1,15 @@
+static char sccsid[] = "@(#) ./cc2/arch/amd64-sysv/cgen.c";
+
+#include "arch.h"
+#include <scc/scc.h>
+#include "../../cc2.h"
+
+Node *
+cgen(Node *np)
+{
+}
+
+Node *
+sethi(Node *np)
+{
+}
--- /dev/null
+++ b/src/cmd/cc2/target/amd64-sysv/code.c
@@ -1,0 +1,211 @@
+static char sccsid[] = "@(#) ./cc2/arch/amd64-sysv/code.c";
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <scc/cstd.h>
+#include <scc/scc.h>
+
+#include "arch.h"
+#include "../../cc2.h"
+
+enum segment {
+ CODESEG,
+ DATASEG,
+ BSSSEG,
+ NOSEG
+};
+
+static int curseg = NOSEG;
+
+static void
+segment(int seg)
+{
+ static char *txt[] = {
+ [CODESEG] = "\t.text\n",
+ [DATASEG] = "\t.data\n",
+ [BSSSEG] = "\t.bss\n",
+ };
+
+ if (seg == curseg)
+ return;
+ fputs(txt[seg], stdout);
+ curseg = seg;
+}
+
+static char *
+symname(Symbol *sym)
+{
+ static char name[INTIDENTSIZ+1];
+
+ if (sym->name) {
+ switch (sym->kind) {
+ case SEXTRN:
+ case SGLOB:
+ case SPRIV:
+ return sym->name;
+ }
+ }
+
+ sprintf(name, ".L%d", sym->numid);
+
+ return name;
+}
+
+static void
+emitconst(Node *np)
+{
+ switch (np->type.size) {
+ case 1:
+ printf("%d", (int) np->u.i & 0xFF);
+ break;
+ case 2:
+ printf("%d", (int) np->u.i & 0xFFFF);
+ break;
+ case 4:
+ printf("%ld", (long) np->u.i & 0xFFFFFFFF);
+ break;
+ case 8:
+ printf("%lld", (long long) np->u.i & 0xFFFFFFFF);
+ break;
+ default:
+ abort();
+ }
+}
+
+static void
+emittree(Node *np)
+{
+ if (!np)
+ return;
+
+ switch (np->op) {
+ case OSTRING:
+ printf("\"%s\"", np->u.s);
+ free(np->u.s);
+ np->u.s = NULL;
+ break;
+ case OCONST:
+ emitconst(np);
+ break;
+ case OADDR:
+ emittree(np->left);
+ break;
+ case OMEM:
+ fputs(symname(np->u.sym), stdout);
+ break;
+ default:
+ emittree(np->left);
+ printf(" %c ", np->op);
+ emittree(np->right);
+ break;
+ }
+}
+static void
+size2asm(Type *tp)
+{
+ char *s;
+
+ if (tp->flags & STRF) {
+ s = "\t.ascii\t";
+ } else {
+ switch (tp->size) {
+ case 1:
+ s = "\t.byte\t";
+ break;
+ case 2:
+ s = "\t.short\t";
+ break;
+ case 4:
+ s = "\t.long\t";
+ break;
+ case 8:
+ s = "\t.quad\t";
+ break;
+ default:
+ s = "\t.space\t%lu,";
+ break;
+ }
+ }
+ printf(s, tp->size);
+}
+
+
+void
+data(Node *np)
+{
+ size2asm(&np->type);
+ emittree(np);
+ putchar('\n');
+}
+
+static void
+label(Symbol *sym)
+{
+ int seg;
+ char *name = symname(sym);
+ Type *tp = &sym->type;
+
+ if (sym->type.flags & FUNF)
+ seg = CODESEG;
+ else if (sym->type.flags & INITF)
+ seg = DATASEG;
+ else
+ seg = BSSSEG;
+ segment(seg);
+
+ switch (sym->kind) {
+ case SEXTRN:
+ printf("\t.extern\t%s\n", name);
+ case SLOCAL:
+ return;
+ case SGLOB:
+ printf("\t.global\t%s\n", name);
+ if (seg == BSSSEG)
+ printf("\t.comm\t%s,%lu\n", name, tp->size);
+ break;
+ }
+ if (sym->type.align != 1)
+ printf("\t.align\t%lu\n", sym->type.align );
+ printf("%s:\n", name);
+}
+
+void
+defglobal(Symbol *sym)
+{
+ label(sym);
+ if (sym->kind == SEXTRN || (sym->type.flags & INITF))
+ return;
+ size2asm(&sym->type);
+ puts("0");
+}
+
+void
+defvar(Symbol *sym)
+{
+}
+
+void
+defpar(Symbol *sym)
+{
+}
+
+void
+newfun(void)
+{
+}
+
+void
+writeout(void)
+{
+}
+
+void
+endinit(void)
+{
+}
+
+void
+getbblocks(void)
+{
+}
--- /dev/null
+++ b/src/cmd/cc2/target/amd64-sysv/optm.c
@@ -1,0 +1,11 @@
+static char sccsid[] = "@(#) ./cc2/arch/amd64-sysv/optm.c";
+
+#include <scc/scc.h>
+
+#include "../../cc2.h"
+
+Node *
+optm_dep(Node *np)
+{
+ return np;
+}
--- /dev/null
+++ b/src/cmd/cc2/target/amd64-sysv/target.mk
@@ -1,0 +1,8 @@
+OBJ-amd64-sysv = $(OBJS) \
+ target/amd64-sysv/cgen.o \
+ target/amd64-sysv/optm.o \
+ target/amd64-sysv/code.o \
+ target/amd64-sysv/types.o
+
+$(LIBEXEC)/cc2-amd64-sysv: $(OBJ-amd64-sysv)
+ $(CC) $(SCC_LDFLAGS) $(OBJ-amd64-sysv) -lscc -o $@
--- /dev/null
+++ b/src/cmd/cc2/target/amd64-sysv/types.c
@@ -1,0 +1,94 @@
+static char sccsid[] = "@(#) ./cc2/arch/amd64-sysv/types.c";
+
+#include <scc/scc.h>
+
+#include "../../cc2.h"
+
+
+Type int8type = {
+ .flags = SIGNF | INTF,
+ .size = 1,
+ .align = 1
+};
+
+Type int16type = {
+ .flags = SIGNF | INTF,
+ .size = 2,
+ .align = 2
+};
+
+Type int32type = {
+ .flags = SIGNF | INTF,
+ .size = 4,
+ .align = 4
+};
+
+Type int64type = {
+ .flags = SIGNF | INTF,
+ .size = 8,
+ .align = 8
+};
+
+Type uint8type = {
+ .flags = INTF,
+ .size = 1,
+ .align = 1
+};
+
+Type uint16type = {
+ .flags = INTF,
+ .size = 2,
+ .align = 2
+};
+
+Type uint32type = {
+ .flags = INTF,
+ .size = 4,
+ .align = 4
+};
+
+Type uint64type = {
+ .flags = INTF,
+ .size = 8,
+ .align = 2
+};
+
+Type ptrtype = {
+ .flags = INTF,
+ .size = 8,
+ .align = 8
+};
+
+Type booltype = {
+ .flags = INTF,
+ .size = 1,
+ .align = 1
+};
+
+Type float32type = {
+ .flags = FLOATF,
+ .size = 4,
+ .align = 4
+};
+
+Type float64type = {
+ .flags = FLOATF,
+ .size = 8,
+ .align = 8
+};
+
+Type float80type = {
+ .flags = FLOATF,
+ .size = 16,
+ .align = 16
+};
+
+Type voidtype = {
+ .size = 0,
+ .align = 0
+};
+
+Type arg_type = {
+ .size = 24,
+ .align = 8
+};
--- /dev/null
+++ b/src/cmd/cc2/target/i386-sysv/cgen.c
@@ -1,0 +1,16 @@
+static char sccsid[] = "@(#) ./cc2/arch/i386-sysv/cgen.c";
+
+#include <scc/scc.h>
+
+#include "arch.h"
+#include "../../cc2.h"
+
+Node *
+cgen(Node *np)
+{
+}
+
+Node *
+sethi(Node *np)
+{
+}
--- /dev/null
+++ b/src/cmd/cc2/target/i386-sysv/code.c
@@ -1,0 +1,209 @@
+static char sccsid[] = "@(#) ./cc2/arch/i386-sysv/code.c";
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <scc/cstd.h>
+#include <scc/scc.h>
+
+#include "arch.h"
+#include "../../cc2.h"
+
+enum segment {
+ CODESEG,
+ DATASEG,
+ BSSSEG,
+ NOSEG
+};
+
+static int curseg = NOSEG;
+
+static void
+segment(int seg)
+{
+ static char *txt[] = {
+ [CODESEG] = "\t.text\n",
+ [DATASEG] = "\t.data\n",
+ [BSSSEG] = "\t.bss\n",
+ };
+
+ if (seg == curseg)
+ return;
+ fputs(txt[seg], stdout);
+ curseg = seg;
+}
+
+static char *
+symname(Symbol *sym)
+{
+ static char name[INTIDENTSIZ+1];
+
+ if (sym->name) {
+ switch (sym->kind) {
+ case SEXTRN:
+ case SGLOB:
+ case SPRIV:
+ return sym->name;
+ }
+ }
+
+ sprintf(name, ".L%d", sym->numid);
+
+ return name;
+}
+
+static void
+emitconst(Node *np)
+{
+ switch (np->type.size) {
+ case 1:
+ printf("%d", (int) np->u.i & 0xFF);
+ break;
+ case 2:
+ printf("%d", (int) np->u.i & 0xFFFF);
+ break;
+ case 4:
+ printf("%ld", (long) np->u.i & 0xFFFFFFFF);
+ break;
+ case 8:
+ printf("%lld", (long long) np->u.i & 0xFFFFFFFF);
+ break;
+ default:
+ abort();
+ }
+}
+
+static void
+emittree(Node *np)
+{
+ if (!np)
+ return;
+
+ switch (np->op) {
+ case OSTRING:
+ printf("\"%s\"", np->u.s);
+ free(np->u.s);
+ np->u.s = NULL;
+ break;
+ case OCONST:
+ emitconst(np);
+ break;
+ case OADDR:
+ emittree(np->left);
+ break;
+ case OMEM:
+ fputs(symname(np->u.sym), stdout);
+ break;
+ default:
+ emittree(np->left);
+ printf(" %c ", np->op);
+ emittree(np->right);
+ break;
+ }
+}
+static void
+size2asm(Type *tp)
+{
+ char *s;
+
+ if (tp->flags & STRF) {
+ s = "\t.ascii\t";
+ } else {
+ switch (tp->size) {
+ case 1:
+ s = "\t.byte\t";
+ break;
+ case 2:
+ s = "\t.short\t";
+ break;
+ case 4:
+ s = "\t.long\t";
+ break;
+ case 8:
+ s = "\t.quad\t";
+ break;
+ default:
+ s = "\t.space\t%lu,";
+ break;
+ }
+ }
+ printf(s, tp->size);
+}
+
+void
+data(Node *np)
+{
+ size2asm(&np->type);
+ emittree(np);
+ putchar('\n');
+}
+
+static void
+label(Symbol *sym)
+{
+ int seg;
+ char *name = symname(sym);
+ Type *tp = &sym->type;
+
+ if (sym->type.flags & FUNF)
+ seg = CODESEG;
+ else if (sym->type.flags & INITF)
+ seg = DATASEG;
+ else
+ seg = BSSSEG;
+ segment(seg);
+
+ switch (sym->kind) {
+ case SEXTRN:
+ printf("\t.extern\t%s\n", name);
+ case SLOCAL:
+ return;
+ case SGLOB:
+ printf("\t.global\t%s\n", name);
+ if (seg == BSSSEG)
+ printf("\t.comm\t%s,%lu\n", name, tp->size);
+ break;
+ }
+ if (sym->type.align != 1)
+ printf("\t.align\t%lu\n", sym->type.align );
+ printf("%s:\n", name);
+}
+
+void
+defglobal(Symbol *sym)
+{
+ label(sym);
+ if (sym->kind == SEXTRN || (sym->type.flags & INITF))
+ return;
+ size2asm(&sym->type);
+ puts("0");
+}
+
+void
+defpar(Symbol *sym)
+{
+}
+
+void
+defvar(Symbol *sym)
+{
+}
+
+void
+newfun(void)
+{
+}
+
+void
+writeout(void)
+{
+}
+
+void
+endinit(void)
+{
+}
+
+void
+getbblocks(void)
+{
+}
--- /dev/null
+++ b/src/cmd/cc2/target/i386-sysv/optm.c
@@ -1,0 +1,11 @@
+static char sccsid[] = "@(#) ./cc2/arch/i386-sysv/optm.c";
+
+#include <scc/scc.h>
+
+#include "../../cc2.h"
+
+Node *
+optm_dep(Node *np)
+{
+ return np;
+}
--- /dev/null
+++ b/src/cmd/cc2/target/i386-sysv/target.mk
@@ -1,0 +1,8 @@
+OBJ-i386-sysv = $(OBJS) \
+ target/i386-sysv/cgen.o \
+ target/i386-sysv/optm.o \
+ target/i386-sysv/code.o \
+ target/i386-sysv/types.o
+
+$(LIBEXEC)/cc2-i386-sysv: $(OBJ-i386-sysv)
+ $(CC) $(SCC_LDFLAGS) $(OBJ-i386-sysv) -lscc -o $@
--- /dev/null
+++ b/src/cmd/cc2/target/i386-sysv/types.c
@@ -1,0 +1,95 @@
+static char sccsid[] = "@(#) ./cc2/arch/i386-sysv/types.c";
+
+#include <scc/scc.h>
+
+#include "../../cc2.h"
+
+
+Type int8type = {
+ .flags = SIGNF | INTF,
+ .size = 1,
+ .align = 1
+};
+
+Type int16type = {
+ .flags = SIGNF | INTF,
+ .size = 2,
+ .align = 2
+};
+
+Type int32type = {
+ .flags = SIGNF | INTF,
+ .size = 4,
+ .align = 4
+};
+
+Type int64type = {
+ .flags = SIGNF | INTF,
+ .size = 8,
+ .align = 4
+};
+
+Type uint8type = {
+ .flags = INTF,
+ .size = 1,
+ .align = 1
+};
+
+Type uint16type = {
+ .flags = INTF,
+ .size = 2,
+ .align = 2
+};
+
+Type uint32type = {
+ .flags = INTF,
+ .size = 4,
+ .align = 2
+};
+
+Type uint64type = {
+ .flags = INTF,
+ .size = 8,
+ .align = 4
+};
+
+Type ptrtype = {
+ .flags = INTF,
+ .size = 4,
+ .align = 4
+};
+
+Type booltype = {
+ .flags = INTF,
+ .size = 1,
+ .align = 1
+};
+
+Type float32type = {
+ .flags = FLOATF,
+ .size = 4,
+ .align = 4
+};
+
+Type float64type = {
+ .flags = FLOATF,
+ .size = 8,
+ .align = 4
+};
+
+Type float80type = {
+ .flags = FLOATF,
+ .size = 12,
+ .align = 4
+};
+
+Type voidtype = {
+ .size = 0,
+ .align = 0
+};
+
+/* this type is not used in this architecture */
+Type arg_type = {
+ .size = 0,
+ .align = 0
+};
--- /dev/null
+++ b/src/cmd/cc2/target/qbe/arch.h
@@ -1,0 +1,135 @@
+enum asmop {
+ ASNOP = 0,
+ ASSTB,
+ ASSTH,
+ ASSTW,
+ ASSTL,
+ ASSTM,
+ ASSTS,
+ ASSTD,
+
+ ASLDSB,
+ ASLDUB,
+ ASLDSH,
+ ASLDUH,
+ ASLDSW,
+ ASLDUW,
+ ASLDL,
+ ASLDS,
+ ASLDD,
+
+ ASADDW,
+ ASSUBW,
+ ASMULW,
+ ASMODW,
+ ASUMODW,
+ ASDIVW,
+ ASUDIVW,
+ ASSHLW,
+ ASSHRW,
+ ASUSHRW,
+ ASLTW,
+ ASULTW,
+ ASGTW,
+ ASUGTW,
+ ASLEW,
+ ASULEW,
+ ASGEW,
+ ASUGEW,
+ ASEQW,
+ ASNEW,
+ ASBANDW,
+ ASBORW,
+ ASBXORW,
+
+ ASADDL,
+ ASSUBL,
+ ASMULL,
+ ASMODL,
+ ASUMODL,
+ ASDIVL,
+ ASUDIVL,
+ ASSHLL,
+ ASSHRL,
+ ASUSHRL,
+ ASLTL,
+ ASULTL,
+ ASGTL,
+ ASUGTL,
+ ASLEL,
+ ASULEL,
+ ASGEL,
+ ASUGEL,
+ ASEQL,
+ ASNEL,
+ ASBANDL,
+ ASBORL,
+ ASBXORL,
+
+ ASADDS,
+ ASSUBS,
+ ASMULS,
+ ASDIVS,
+ ASLTS,
+ ASGTS,
+ ASLES,
+ ASGES,
+ ASEQS,
+ ASNES,
+
+ ASADDD,
+ ASSUBD,
+ ASMULD,
+ ASDIVD,
+ ASLTD,
+ ASGTD,
+ ASLED,
+ ASGED,
+ ASEQD,
+ ASNED,
+
+ ASEXTBW,
+ ASUEXTBW,
+ ASEXTBL,
+ ASUEXTBL,
+ ASEXTHW,
+ ASUEXTHW,
+ ASEXTHL,
+ ASUEXTHL,
+ ASEXTWL,
+ ASUEXTWL,
+
+ ASSTOL,
+ ASSTOW,
+ ASDTOL,
+ ASDTOW,
+
+ ASSWTOD,
+ ASSWTOS,
+ ASSLTOD,
+ ASSLTOS,
+
+ ASEXTS,
+ ASTRUNCD,
+
+ ASJMP,
+ ASBRANCH,
+ ASRET,
+ ASCALL,
+ ASCALLE,
+ ASCALLEX,
+ ASPAR,
+ ASPARE,
+ ASALLOC,
+ ASFORM,
+
+ ASCOPYB,
+ ASCOPYH,
+ ASCOPYW,
+ ASCOPYL,
+ ASCOPYS,
+ ASCOPYD,
+
+ ASVSTAR,
+ ASVARG,
+};
--- /dev/null
+++ b/src/cmd/cc2/target/qbe/cgen.c
@@ -1,0 +1,729 @@
+static char sccsid[] = "@(#) ./cc2/arch/qbe/cgen.c";
+
+#include <assert.h>
+#include <stdlib.h>
+
+#include <scc/cstd.h>
+#include <scc/scc.h>
+
+#include "arch.h"
+#include "../../cc2.h"
+
+enum sflags {
+ ISTMP = 1,
+ ISCONS = 2
+};
+
+static char opasmw[] = {
+ [OADD] = ASADDW,
+ [OSUB] = ASSUBW,
+ [OMUL] = ASMULW,
+ [OMOD] = ASMODW,
+ [ODIV] = ASDIVW,
+ [OSHL] = ASSHLW,
+ [OSHR] = ASSHRW,
+ [OLT] = ASLTW,
+ [OGT] = ASGTW,
+ [OLE] = ASLEW,
+ [OGE] = ASGEW,
+ [OEQ] = ASEQW,
+ [ONE] = ASNEW,
+ [OBAND] = ASBANDW,
+ [OBOR] = ASBORW,
+ [OBXOR] = ASBXORW,
+};
+
+static char opasml[] = {
+ [OADD] = ASADDL,
+ [OSUB] = ASSUBL,
+ [OMUL] = ASMULL,
+ [OMOD] = ASMODL,
+ [ODIV] = ASDIVL,
+ [OSHL] = ASSHLL,
+ [OSHR] = ASSHRL,
+ [OLT] = ASLTL,
+ [OGT] = ASGTL,
+ [OLE] = ASLEL,
+ [OGE] = ASGEL,
+ [OEQ] = ASEQL,
+ [ONE] = ASNEL,
+ [OBAND] = ASBANDL,
+ [OBOR] = ASBORL,
+ [OBXOR] = ASBXORL,
+};
+
+static char opasms[] = {
+ [OADD] = ASADDS,
+ [OSUB] = ASSUBS,
+ [OMUL] = ASMULS,
+ [ODIV] = ASDIVS,
+ [OLT] = ASLTS,
+ [OGT] = ASGTS,
+ [OLE] = ASLES,
+ [OGE] = ASGES,
+ [OEQ] = ASEQS,
+ [ONE] = ASNES,
+};
+static char opasmd[] = {
+ [OADD] = ASADDD,
+ [OSUB] = ASSUBD,
+ [OMUL] = ASMULD,
+ [ODIV] = ASDIVD,
+ [OLT] = ASLTD,
+ [OGT] = ASGTD,
+ [OLE] = ASLED,
+ [OGE] = ASGED,
+ [OEQ] = ASEQD,
+ [ONE] = ASNED,
+};
+
+extern Type int32type, uint32type, ptrtype;
+
+static Node *
+tmpnode(Node *np, Type *tp)
+{
+ char flags;
+ Symbol *sym;
+
+ if (!np)
+ np = node(OTMP);
+ sym = getsym(TMPSYM);
+ sym->type = np->type = *tp;
+ flags = tp->flags & ~(PARF|INITF);
+ sym->type.flags = np->type.flags = flags;
+ sym->kind = STMP;
+ np->left = np->right = NULL;
+ np->u.sym = sym;
+ np->op = OTMP;
+ np->flags |= ISTMP;
+ return np;
+}
+
+static Node *
+load(Type *tp, Node *np, Node *new)
+{
+ int op;
+ int flags = tp->flags;
+
+ if (flags & (AGGRF|FUNF)) {
+ *new = *np;
+ return new;
+ }
+ switch (tp->size) {
+ case 1:
+ op = ASLDSB;
+ break;
+ case 2:
+ op = ASLDSH;
+ break;
+ case 4:
+ op = (flags & FLOATF) ? ASLDS : ASLDSW;
+ break;
+ case 8:
+ op = (flags & FLOATF) ? ASLDD : ASLDL;
+ break;
+ default:
+ abort();
+ }
+ /*
+ * unsigned version of operations are always +1 the
+ * signed version
+ */
+ if ((flags & (INTF|SIGNF)) == INTF && tp->size < 8)
+ ++op;
+
+ code(op, tmpnode(new, tp), np, NULL);
+
+ return new;
+}
+
+static Node *rhs(Node *np, Node *new);
+
+static Node *
+cast(Type *td, Node *ns, Node *nd)
+{
+ Type *ts;
+ Node aux1, aux2;
+ int op, d_isint, s_isint;
+
+ ts = &ns->type;
+ d_isint = (td->flags & INTF) != 0;
+ s_isint = (ts->flags & INTF) != 0;
+
+ if (d_isint && s_isint) {
+ if (td->size <= ts->size) {
+ *nd = *ns;
+ return nd;
+ }
+ assert(td->size == 4 || td->size == 8);
+ switch (ts->size) {
+ case 1:
+ op = (td->size == 4) ? ASEXTBW : ASEXTBL;
+ break;
+ case 2:
+ op = (td->size == 4) ? ASEXTHW : ASEXTHL;
+ break;
+ case 4:
+ op = ASEXTWL;
+ break;
+ default:
+ abort();
+ }
+ /*
+ * unsigned version of operations are always +1 the
+ * signed version
+ */
+ op += (ts->flags & SIGNF) == 0;
+ } else if (d_isint) {
+ /* conversion from float to int */
+ switch (ts->size) {
+ case 4:
+ op = (td->size == 8) ? ASSTOL : ASSTOW;
+ break;
+ case 8:
+ op = (td->size == 8) ? ASDTOL : ASDTOW;
+ break;
+ default:
+ abort();
+ }
+ /* TODO: Add signess */
+ } else if (s_isint) {
+ /* conversion from int to float */
+ switch (ts->size) {
+ case 1:
+ case 2:
+ ts = (ts->flags&SIGNF) ? &int32type : &uint32type;
+ ns = cast(ts, ns, tmpnode(&aux2, ts));
+ case 4:
+ op = (td->size == 8) ? ASSWTOD : ASSWTOS;
+ break;
+ case 8:
+ op = (td->size == 8) ? ASSLTOD : ASSLTOS;
+ break;
+ default:
+ abort();
+ }
+ /* TODO: Add signess */
+ } else {
+ /* conversion from float to float */
+ op = (td->size == 4) ? ASEXTS : ASTRUNCD;
+ }
+
+ code(op, tmpnode(nd, td), ns, NULL);
+ return nd;
+}
+
+static Node *
+call(Node *np, Node *fun, Node *ret)
+{
+ int n, op;
+ Type *tp;
+ Node aux, **q, *p, *pars[NR_FUNPARAM];
+
+ for (n = 0, p = np->right; p; p = p->right)
+ pars[n++] = rhs(p->left, node(OTMP));
+
+ tp = &np->type;
+ code(ASCALL, tmpnode(ret, tp), fun, NULL);
+
+ for (q = pars; q < &pars[n]; ++q) {
+ op = (q == &pars[n-1]) ? ASPARE : ASPAR;
+ tmpnode(&aux, &(*q)->type);
+ code(op, NULL, *q, &aux);
+ }
+ code((np->op == OCALL) ? ASCALLE : ASCALLEX, NULL, NULL, NULL);
+
+ return ret;
+}
+
+static Node *
+assign(Type *tp, Node *to, Node *from)
+{
+ int op;
+
+ switch (tp->size) {
+ case 1:
+ op = ASSTB;
+ break;
+ case 2:
+ op = ASSTH;
+ break;
+ case 4:
+ op = (tp->flags & FLOATF) ? ASSTS : ASSTW;
+ break;
+ case 8:
+ op = (tp->flags & FLOATF) ? ASSTD : ASSTL;
+ break;
+ default:
+ op = ASSTM;
+ break;
+ }
+ code(op, to, from, NULL);
+ return from;
+}
+
+static Node *
+copy(Type *tp, Node *to, Node *from)
+{
+ int op;
+
+ switch (tp->size) {
+ case 1:
+ op = ASCOPYB;
+ break;
+ case 2:
+ op = ASCOPYH;
+ break;
+ case 4:
+ op = (tp->flags & FLOATF) ? ASCOPYS : ASCOPYW;
+ break;
+ case 8:
+ op = (tp->flags & FLOATF) ? ASCOPYD : ASCOPYL;
+ break;
+ default:
+ /* TODO: Need to handle the general case */
+ abort();
+ }
+ code(op, to, from, NULL);
+ return from;
+}
+
+/* TODO: Do field() transformation in sethi */
+
+static Node *
+field(Node *np, Node *ret, int islhs)
+{
+ Node base, node, off, add, *addr;
+ TUINT offset = np->right->u.sym->u.off;
+
+ addr = rhs(np->left, &base);
+
+ if (offset != 0) {
+ node.op = OADD;
+ node.type = ptrtype;
+ node.left = addr;
+ node.right = constnode(&off, offset, &ptrtype);
+ addr = rhs(&node, &add);
+ }
+
+ if (islhs)
+ *ret = *addr;
+ else
+ load(&np->type, addr, ret);
+
+ return ret;
+}
+
+static Node *
+lhs(Node *np, Node *new)
+{
+ switch (np->op) {
+ case OMEM:
+ case OAUTO:
+ *new = *np;
+ return new;
+ case OPTR:
+ return rhs(np->left, new);
+ case OFIELD:
+ return field(np, new, 1);
+ default:
+ abort();
+ }
+}
+
+static void
+bool(Node *np, Symbol *true, Symbol *false)
+{
+ Node *l = np->left, *r = np->right;
+ Node ret, ifyes, ifno;
+ Symbol *label;
+
+ switch (np->op) {
+ case ONEG:
+ bool(l, false, true);
+ break;
+ case OAND:
+ label = newlabel();
+ bool(l, label, false);
+ setlabel(label);
+ bool(r, true, false);
+ break;
+ case OOR:
+ label = newlabel();
+ bool(l, true, label);
+ setlabel(label);
+ bool(r, true, false);
+ break;
+ default:
+ label2node(&ifyes, true);
+ label2node(&ifno, false);
+ code(ASBRANCH, rhs(np, &ret), &ifyes, &ifno);
+ break;
+ }
+}
+
+static Node *
+ternary(Node *np, Node *ret)
+{
+ Node ifyes, ifno, phi, *colon, aux1, aux2, aux3;
+
+ tmpnode(ret, &np->type);
+ label2node(&ifyes, NULL);
+ label2node(&ifno, NULL);
+ label2node(&phi, NULL);
+
+ colon = np->right;
+ code(ASBRANCH, rhs(np->left, &aux1), &ifyes, &ifno);
+
+ setlabel(ifyes.u.sym);
+ copy(&ret->type, ret, rhs(colon->left, &aux2));
+ code(ASJMP, NULL, &phi, NULL);
+
+ setlabel(ifno.u.sym);
+ copy(&ret->type, ret, rhs(colon->right, &aux3));
+ setlabel(phi.u.sym);
+
+ return ret;
+}
+
+static Node *
+function(void)
+{
+ Node aux;
+ Symbol *p;
+
+ /* allocate stack space for parameters */
+ for (p = locals; p && (p->type.flags & PARF) != 0; p = p->next)
+ code(ASALLOC, label2node(&aux, p), NULL, NULL);
+
+ /* allocate stack space for local variables) */
+ for ( ; p && p->id != TMPSYM; p = p->next) {
+ if (p->kind != SAUTO)
+ continue;
+ code(ASALLOC, label2node(&aux, p), NULL, NULL);
+ }
+ /* store formal parameters in parameters */
+ for (p = locals; p; p = p->next) {
+ if ((p->type.flags & PARF) == 0)
+ break;
+ code(ASFORM, label2node(&aux, p), NULL, NULL);
+ }
+ return NULL;
+}
+
+static void
+swtch_if(Node *idx)
+{
+ Node aux1, aux2, *np;
+ Symbol *deflabel = NULL;
+
+ for (;;) {
+ np = delstmt();
+ setlabel(np->label);
+
+ switch (np->op) {
+ case OESWITCH:
+ if (!deflabel)
+ deflabel = np->u.sym;
+ aux1.op = OJMP;
+ aux1.label = NULL;
+ aux1.u.sym = deflabel;
+ cgen(&aux1);
+ return;
+ case OCASE:
+ aux1 = *np;
+ aux1.op = OBRANCH;
+ aux1.label = NULL;
+ aux1.left = &aux2;
+
+ aux2.op = OEQ;
+ aux2.type = idx->type;
+ aux2.left = np->left;
+ aux2.right = idx;
+
+ cgen(&aux1);
+ break;
+ case ODEFAULT:
+ deflabel = np->u.sym;
+ break;
+ default:
+ abort();
+ }
+ }
+}
+
+static Node *
+rhs(Node *np, Node *ret)
+{
+ Node aux1, aux2, *phi, *l = np->left, *r = np->right;
+ Type *tp;
+ int off, op;
+ char *tbl;
+ Symbol *true, *false;
+
+ tp = &np->type;
+
+ switch (np->op) {
+ case OBFUN:
+ return function();
+ case ONOP:
+ case OBLOOP:
+ case OELOOP:
+ case OEFUN:
+ return NULL;
+ case OTMP:
+ case OCONST:
+ *ret = *np;
+ return np;
+ case OMEM:
+ case OAUTO:
+ return load(tp, np, ret);
+ case ONEG:
+ case OAND:
+ case OOR:
+ true = newlabel();
+ false = newlabel();
+ phi = label2node(&aux1, NULL);
+ tmpnode(ret, &int32type);
+
+ bool(np, true, false);
+
+ setlabel(true);
+ code(ASCOPYW, ret, constnode(&aux2, 1, &int32type), NULL);
+ code(ASJMP, NULL, phi, NULL);
+
+ setlabel(false);
+ code(ASCOPYW, ret, constnode(&aux2, 0, &int32type), NULL);
+
+ setlabel(phi->u.sym);
+ return ret;
+ case OMOD:
+ case OSHR:
+ assert(tp->flags & INTF);
+ case ODIV:
+ case OLT:
+ case OGT:
+ case OLE:
+ case OGE:
+ /*
+ * unsigned version of operations are always +1 the
+ * signed version
+ */
+ off = (tp->flags & SIGNF) == 0;
+ goto binary;
+ case OSHL:
+ case OBAND:
+ case OBOR:
+ case OBXOR:
+ assert(tp->flags & INTF);
+ case OADD:
+ case OSUB:
+ case OMUL:
+ case OEQ:
+ case ONE:
+ off = 0;
+ binary:
+ if (l->complex >= r->complex) {
+ rhs(l, &aux1);
+ rhs(r, &aux2);
+ } else {
+ rhs(r, &aux2);
+ rhs(l, &aux1);
+ }
+ switch (tp->size) {
+ case 4:
+ tbl = (tp->flags & FLOATF) ? opasms : opasmw;
+ break;
+ case 8:
+ tbl = (tp->flags & FLOATF) ? opasmd : opasml;
+ break;
+ default:
+ abort();
+ }
+ op = tbl[np->op] + off;
+ tmpnode(ret, tp);
+ code(op, ret, &aux1, &aux2);
+ return ret;
+ case OCALL:
+ case OCALLE:
+ if (l->op == OPTR)
+ l = rhs(l, &aux1);
+ return call(np, l, ret);
+ case OCAST:
+ return cast(tp, rhs(l, &aux1), ret);
+ case OASSIG:
+ /* TODO: Do this transformations in sethi */
+ switch (np->u.subop) {
+ case OINC:
+ op = OADD;
+ goto post_oper;
+ case ODEC:
+ op = OSUB;
+ post_oper:
+ aux1.op = op;
+ aux1.left = rhs(l, ret);
+ aux1.right = r;
+ aux1.type = np->type;
+ rhs(&aux1, &aux2);
+ lhs(l, &aux1);
+ assign(tp, &aux1, &aux2);
+ break;
+ default:
+ aux2.type = np->type;
+ aux2.op = np->u.subop;
+ aux2.right = np->right;
+ aux2.left = np->left;
+ r = rhs(&aux2, &aux1);
+ Node aux3;
+ if (l->op == OCAST) {
+ aux3.type = l->left->type;
+ aux3.op = OCAST;
+ aux3.left = r;
+ aux3.right = NULL;
+ r = &aux3;
+ l = l->left;
+ }
+ case 0:
+ /* TODO: see what is the most difficult */
+ lhs(l, &aux2);
+ rhs(r, ret);
+ return assign(tp, &aux2, ret);
+ }
+ return ret;
+ case OASK:
+ return ternary(np, ret);
+ case OCOMMA:
+ rhs(l, &aux1);
+ return rhs(r, ret);
+ case OPTR:
+ return load(tp, rhs(l, &aux1), ret);
+ case OADDR:
+ lhs(l, ret);
+ ret->type = *tp;
+ return ret;
+ case OFIELD:
+ return field(np, ret, 0);
+ case OBUILTIN:
+ switch (np->u.subop) {
+ case BVA_START:
+ l = rhs(l, &aux1);
+ code(ASVSTAR, NULL, l, NULL);
+ return NULL;
+ case BVA_END:
+ return NULL;
+ case BVA_ARG:
+ l = rhs(l, &aux1);
+ code(ASVARG, tmpnode(ret, tp), l, NULL);
+ return ret;
+ case BVA_COPY:
+ /* TODO */
+ default:
+ abort();
+ }
+ default:
+ abort();
+ }
+ abort();
+}
+
+Node *
+cgen(Node *np)
+{
+ Node aux, *p, *next;
+
+ setlabel(np->label);
+ switch (np->op) {
+ case OJMP:
+ label2node(&aux, np->u.sym);
+ code(ASJMP, NULL, &aux, NULL);
+ break;
+ case OBRANCH:
+ next = np->next;
+ if (!next->label)
+ next->label = newlabel();
+ bool(np->left, np->u.sym, next->label);
+ break;
+ case ORET:
+ p = (np->left) ? rhs(np->left, &aux) : NULL;
+ code(ASRET, NULL, p, NULL);
+ break;
+ case OBSWITCH:
+ p = rhs(np->left, &aux);
+ swtch_if(p);
+ break;
+ default:
+ rhs(np, &aux);
+ break;
+ }
+ return NULL;
+}
+
+/*
+ * This is strongly influenced by
+ * http://plan9.bell-labs.com/sys/doc/compiler.ps (/sys/doc/compiler.ps)
+ * calculate addresability as follows
+ * AUTO => 11 value+fp
+ * REG => 11 reg
+ * STATIC => 11 (value)
+ * CONST => 11 $value
+ * These values of addressability are not used in the code generation.
+ * They are only used to calculate the Sethi-Ullman numbers. Since
+ * QBE is AMD64 targered we could do a better job there, and try to
+ * detect some of the complex addressing modes of these processors.
+ */
+Node *
+sethi(Node *np)
+{
+ Node *lp, *rp;
+
+ if (!np)
+ return np;
+
+ np->complex = 0;
+ np->address = 0;
+ lp = np->left;
+ rp = np->right;
+
+ switch (np->op) {
+ case OAUTO:
+ case OREG:
+ case OMEM:
+ case OCONST:
+ np->address = 11;
+ break;
+ case OCPL:
+ assert(np->type.flags & INTF);
+ np->op = OBXOR;
+ rp = constnode(NULL, ~(TUINT) 0, &np->type);
+ goto binary;
+ case OSNEG:
+ np->op = OSUB;
+ rp = lp;
+ lp = constnode(NULL, 0, &np->type);
+ if ((np->type.flags & INTF) == 0)
+ lp->u.f = 0.0;
+ default:
+ binary:
+ lp = sethi(lp);
+ rp = sethi(rp);
+ break;
+ }
+ np->left = lp;
+ np->right = rp;
+
+ if (np->address > 10)
+ return np;
+ if (lp)
+ np->complex = lp->complex;
+ if (rp) {
+ int d = np->complex - rp->complex;
+
+ if (d == 0)
+ ++np->complex;
+ else if (d < 0)
+ np->complex = rp->complex;
+ }
+ if (np->complex == 0)
+ ++np->complex;
+ return np;
+}
--- /dev/null
+++ b/src/cmd/cc2/target/qbe/code.c
@@ -1,0 +1,569 @@
+static char sccsid[] = "@(#) ./cc2/arch/qbe/code.c";
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <scc/cstd.h>
+#include <scc/scc.h>
+
+#include "arch.h"
+#include "../../cc2.h"
+
+#define ADDR_LEN (INTIDENTSIZ+64)
+
+static void binary(void), unary(void), store(void), jmp(void), ret(void),
+ branch(void), call(void), ecall(void), param(void),
+ asalloc(void), form2local(void), ldir(void), vastart(void),
+ vaarg(void);
+
+static struct opdata {
+ void (*fun)(void);
+ char *txt;
+ char letter;
+} optbl [] = {
+ [ASLDSB] = {.fun = unary, .txt = "loadsb", .letter = 'w'},
+ [ASLDUB] = {.fun = unary, .txt = "loadub", .letter = 'w'},
+ [ASLDSH] = {.fun = unary, .txt = "loadsh", .letter = 'w'},
+ [ASLDUH] = {.fun = unary, .txt = "loaduh", .letter = 'w'},
+ [ASLDSW] = {.fun = unary, .txt = "loadsw", .letter = 'w'},
+ [ASLDUW] = {.fun = unary, .txt = "loaduw", .letter = 'w'},
+ [ASLDL] = {.fun = unary, .txt = "loadl", .letter = 'l'},
+ [ASLDS] = {.fun = unary, .txt = "loads", .letter = 's'},
+ [ASLDD] = {.fun = unary, .txt = "loadd", .letter = 'd'},
+
+ [ASCOPYB] = {.fun = unary, .txt = "copy", .letter = 'b'},
+ [ASCOPYH] = {.fun = unary, .txt = "copy", .letter = 'h'},
+ [ASCOPYW] = {.fun = unary, .txt = "copy", .letter = 'w'},
+ [ASCOPYL] = {.fun = unary, .txt = "copy", .letter = 'l'},
+ [ASCOPYS] = {.fun = unary, .txt = "copy", .letter = 's'},
+ [ASCOPYD] = {.fun = unary, .txt = "copy", .letter = 'd'},
+
+ [ASSTB] = {.fun = store, .txt = "store", .letter = 'b'},
+ [ASSTH] = {.fun = store, .txt = "store", .letter = 'h'},
+ [ASSTW] = {.fun = store, .txt = "store", .letter = 'w'},
+ [ASSTL] = {.fun = store, .txt = "store", .letter = 'l'},
+ [ASSTM] = {.fun = ldir},
+ [ASSTS] = {.fun = store, .txt = "store", .letter = 's'},
+ [ASSTD] = {.fun = store, .txt = "store", .letter = 'd'},
+
+ [ASADDW] = {.fun = binary, .txt = "add", .letter = 'w'},
+ [ASSUBW] = {.fun = binary, .txt = "sub", .letter = 'w'},
+ [ASMULW] = {.fun = binary, .txt = "mul", .letter = 'w'},
+ [ASMODW] = {.fun = binary, .txt = "rem", .letter = 'w'},
+ [ASUMODW] = {.fun = binary, .txt = "urem", .letter = 'w'},
+ [ASDIVW] = {.fun = binary, .txt = "div", .letter = 'w'},
+ [ASUDIVW] = {.fun = binary, .txt = "udiv", .letter = 'w'},
+ [ASSHLW] = {.fun = binary, .txt = "shl", .letter = 'w'},
+ [ASSHRW] = {.fun = binary, .txt = "sar", .letter = 'w'},
+ [ASUSHRW] = {.fun = binary, .txt = "shr", .letter = 'w'},
+ [ASLTW] = {.fun = binary, .txt = "csltw", .letter = 'w'},
+ [ASULTW] = {.fun = binary, .txt = "cultw", .letter = 'w'},
+ [ASGTW] = {.fun = binary, .txt = "csgtw", .letter = 'w'},
+ [ASUGTW] = {.fun = binary, .txt = "cugtw", .letter = 'w'},
+ [ASLEW] = {.fun = binary, .txt = "cslew", .letter = 'w'},
+ [ASULEW] = {.fun = binary, .txt = "culew", .letter = 'w'},
+ [ASGEW] = {.fun = binary, .txt = "csgew", .letter = 'w'},
+ [ASUGEW] = {.fun = binary, .txt = "cugew", .letter = 'w'},
+ [ASEQW] = {.fun = binary, .txt = "ceqw", .letter = 'w'},
+ [ASNEW] = {.fun = binary, .txt = "cnew", .letter = 'w'},
+ [ASBANDW] = {.fun = binary, .txt = "and", .letter = 'w'},
+ [ASBORW] = {.fun = binary, .txt = "or", .letter = 'w'},
+ [ASBXORW] = {.fun = binary, .txt = "xor", .letter = 'w'},
+
+ [ASADDL] = {.fun = binary, .txt = "add", .letter = 'l'},
+ [ASSUBL] = {.fun = binary, .txt = "sub", .letter = 'l'},
+ [ASMULL] = {.fun = binary, .txt = "mul", .letter = 'l'},
+ [ASMODL] = {.fun = binary, .txt = "rem", .letter = 'l'},
+ [ASUMODL] = {.fun = binary, .txt = "urem", .letter = 'l'},
+ [ASDIVL] = {.fun = binary, .txt = "div", .letter = 'l'},
+ [ASUDIVL] = {.fun = binary, .txt = "udiv", .letter = 'l'},
+ [ASSHLL] = {.fun = binary, .txt = "shl", .letter = 'l'},
+ [ASSHRL] = {.fun = binary, .txt = "sar", .letter = 'l'},
+ [ASUSHRL] = {.fun = binary, .txt = "shr", .letter = 'l'},
+ [ASLTL] = {.fun = binary, .txt = "csltl", .letter = 'w'},
+ [ASULTL] = {.fun = binary, .txt = "cultl", .letter = 'w'},
+ [ASGTL] = {.fun = binary, .txt = "csgtl", .letter = 'w'},
+ [ASUGTL] = {.fun = binary, .txt = "cugtl", .letter = 'w'},
+ [ASLEL] = {.fun = binary, .txt = "cslel", .letter = 'w'},
+ [ASULEL] = {.fun = binary, .txt = "culel", .letter = 'w'},
+ [ASGEL] = {.fun = binary, .txt = "csgel", .letter = 'w'},
+ [ASUGEL] = {.fun = binary, .txt = "cugel", .letter = 'w'},
+ [ASEQL] = {.fun = binary, .txt = "ceql", .letter = 'w'},
+ [ASNEL] = {.fun = binary, .txt = "cnel", .letter = 'w'},
+ [ASBANDL] = {.fun = binary, .txt = "and", .letter = 'l'},
+ [ASBORL] = {.fun = binary, .txt = "or", .letter = 'l'},
+ [ASBXORL] = {.fun = binary, .txt = "xor", .letter = 'l'},
+
+ [ASADDS] = {.fun = binary, .txt = "add", .letter = 's'},
+ [ASSUBS] = {.fun = binary, .txt = "sub", .letter = 's'},
+ [ASMULS] = {.fun = binary, .txt = "mul", .letter = 's'},
+ [ASDIVS] = {.fun = binary, .txt = "div", .letter = 's'},
+ [ASLTS] = {.fun = binary, .txt = "clts", .letter = 'w'},
+ [ASGTS] = {.fun = binary, .txt = "cgts", .letter = 'w'},
+ [ASLES] = {.fun = binary, .txt = "cles", .letter = 'w'},
+ [ASGES] = {.fun = binary, .txt = "cges", .letter = 'w'},
+ [ASEQS] = {.fun = binary, .txt = "ceqs", .letter = 'w'},
+ [ASNES] = {.fun = binary, .txt = "cnes", .letter = 'w'},
+
+ [ASADDD] = {.fun = binary, .txt = "add", .letter = 'd'},
+ [ASSUBD] = {.fun = binary, .txt = "sub", .letter = 'd'},
+ [ASMULD] = {.fun = binary, .txt = "mul", .letter = 'd'},
+ [ASDIVD] = {.fun = binary, .txt = "div", .letter = 'd'},
+ [ASLTD] = {.fun = binary, .txt = "cltd", .letter = 'w'},
+ [ASGTD] = {.fun = binary, .txt = "cgtd", .letter = 'w'},
+ [ASLED] = {.fun = binary, .txt = "cled", .letter = 'w'},
+ [ASGED] = {.fun = binary, .txt = "cged", .letter = 'w'},
+ [ASEQD] = {.fun = binary, .txt = "ceqd", .letter = 'w'},
+ [ASNED] = {.fun = binary, .txt = "cned", .letter = 'w'},
+
+ [ASEXTBW] = {.fun = unary, .txt = "extsb", .letter = 'w'},
+ [ASUEXTBW]= {.fun = unary, .txt = "extub", .letter = 'w'},
+ [ASEXTBL] = {.fun = unary, .txt = "extsb", .letter = 'l'},
+ [ASUEXTBL]= {.fun = unary, .txt = "extub", .letter = 'l'},
+ [ASEXTHW] = {.fun = unary, .txt = "extsh", .letter = 'w'},
+ [ASUEXTHW]= {.fun = unary, .txt = "extuh", .letter = 'w'},
+ [ASEXTWL] = {.fun = unary, .txt = "extsw", .letter = 'l'},
+ [ASUEXTWL]= {.fun = unary, .txt = "extuw", .letter = 'l'},
+
+ [ASSTOL] = {.fun = unary, .txt = "stosi", .letter = 'l'},
+ [ASSTOW] = {.fun = unary, .txt = "stosi", .letter = 'w'},
+ [ASDTOL] = {.fun = unary, .txt = "dtosi", .letter = 'l'},
+ [ASDTOW] = {.fun = unary, .txt = "dtosi", .letter = 'w'},
+
+ [ASSWTOD] = {.fun = unary, .txt = "swtof", .letter = 'd'},
+ [ASSWTOS] = {.fun = unary, .txt = "swtof", .letter = 's'},
+ [ASSLTOD] = {.fun = unary, .txt = "sltof", .letter = 'd'},
+ [ASSLTOS] = {.fun = unary, .txt = "sltof", .letter = 's'},
+
+ [ASEXTS] = {.fun = unary, .txt = "exts", .letter = 'd'},
+ [ASTRUNCD] = {.fun = unary, .txt = "truncd", .letter = 's'},
+
+ [ASBRANCH] = {.fun = branch},
+ [ASJMP] = {.fun = jmp},
+ [ASRET] = {.fun = ret},
+ [ASCALL] = {.fun = call},
+ [ASCALLE] = {.fun = ecall, .txt = ")"},
+ [ASCALLEX] = {.fun = ecall, .txt = ", ...)"},
+ [ASPAR] = {.fun = param, .txt = "%s %s, "},
+ [ASPARE] = {.fun = param, .txt = "%s %s"},
+ [ASALLOC] = {.fun = asalloc},
+ [ASFORM] = {.fun = form2local},
+
+ [ASVSTAR] = {.fun = vastart},
+ [ASVARG] = {.fun = vaarg},
+};
+
+static char buff[ADDR_LEN];
+/*
+ * : is for user-defined Aggregate Types
+ * $ is for globals (represented by a pointer)
+ * % is for function-scope temporaries
+ * @ is for block labels
+ */
+static char
+sigil(Symbol *sym)
+{
+ switch (sym->kind) {
+ case SEXTRN:
+ case SGLOB:
+ case SPRIV:
+ case SLOCAL:
+ return '$';
+ case SAUTO:
+ case STMP:
+ return '%';
+ case SLABEL:
+ return '@';
+ default:
+ abort();
+ }
+}
+
+static char *
+symname(Symbol *sym)
+{
+ char c = sigil(sym);
+
+ if (sym->name) {
+ switch (sym->kind) {
+ case SEXTRN:
+ case SGLOB:
+ sprintf(buff, "%c%s", c, sym->name);
+ return buff;
+ case SLOCAL:
+ case SPRIV:
+ case SAUTO:
+ sprintf(buff, "%c%s.%u", c, sym->name, sym->id);
+ return buff;
+ default:
+ abort();
+ }
+ }
+ sprintf(buff, "%c.%u", c, sym->numid);
+
+ return buff;
+}
+
+static void
+emitconst(Node *np)
+{
+ switch (np->type.size) {
+ case 1:
+ printf("%d", (int) np->u.i & 0xFF);
+ break;
+ case 2:
+ printf("%d", (int) np->u.i & 0xFFFF);
+ break;
+ case 4:
+ printf("%ld", (long) np->u.i & 0xFFFFFFFF);
+ break;
+ case 8:
+ printf("%lld", (long long) np->u.i);
+ break;
+ default:
+ abort();
+ }
+}
+
+static void
+emittree(Node *np)
+{
+ if (!np)
+ return;
+
+ switch (np->op) {
+ case OSTRING:
+ printf("\"%s\"", np->u.s);
+ free(np->u.s);
+ np->u.s = NULL;
+ break;
+ case OCONST:
+ emitconst(np);
+ break;
+ case OADDR:
+ emittree(np->left);
+ break;
+ case OMEM:
+ fputs(symname(np->u.sym), stdout);
+ break;
+ default:
+ emittree(np->left);
+ printf(" %c ", np->op);
+ emittree(np->right);
+ break;
+ }
+}
+
+static char *
+size2asm(Type *tp)
+{
+ if (tp->flags & STRF) {
+ return "b";
+ } else if (tp->flags & INTF) {
+ switch (tp->size) {
+ case 1:
+ return "b";
+ case 2:
+ return "h";
+ case 4:
+ return "w";
+ case 8:
+ return "l";
+ }
+ } else if (tp->flags & FLOATF) {
+ if (tp->size == 4)
+ return "s";
+ else if (tp->size == 8)
+ return "d";
+ }
+ abort();
+}
+
+void
+defglobal(Symbol *sym)
+{
+ if (sym->kind == SEXTRN)
+ return;
+ if (sym->kind == SGLOB)
+ fputs("export ", stdout);
+ printf("data %s = {\n", symname(sym));
+ if (sym->type.flags & INITF)
+ return;
+ printf("\tz\t%lu\n}\n", sym->type.size);
+}
+
+void
+defpar(Symbol *sym)
+{
+ sym->type.flags |= PARF;
+}
+
+void
+defvar(Symbol *sym)
+{
+ if (sym->kind == SREG)
+ sym->kind = SAUTO;
+}
+
+void
+data(Node *np)
+{
+ printf("\t%s\t", size2asm(&np->type));
+ emittree(np);
+ putchar(',');
+ putchar('\n');
+}
+
+static char *
+size2stack(Type *tp)
+{
+ if (tp->flags & INTF) {
+ switch (tp->size) {
+ case 1:
+ case 2:
+ case 4:
+ return "w";
+ case 8:
+ return "l";
+ }
+ } else if (tp->flags & FLOATF) {
+ if (tp->size == 4)
+ return "s";
+ else if (tp->size == 8)
+ return "d";
+ } else if (tp->size == 0) {
+ return "w";
+ }
+ abort();
+}
+
+void
+writeout(void)
+{
+ Symbol *p;
+ Type *tp;
+ char *sep, *name;
+ int haslabel = 0;
+
+ if (!curfun)
+ return;
+ if (curfun->kind == SGLOB)
+ fputs("export ", stdout);
+ printf("function %s %s(", size2stack(&curfun->rtype), symname(curfun));
+
+ /* declare formal parameters */
+ for (sep = "", p = locals; p; p = p->next, sep = ",") {
+ if ((p->type.flags & PARF) == 0)
+ break;
+ printf("%s%s %s.val", sep, size2stack(&p->type), symname(p));
+ }
+ printf("%s)\n{\n", (curfun->type.flags&ELLIPS) ? ", ..." : "");
+
+ /* emit assembler instructions */
+ for (pc = prog; pc; pc = pc->next) {
+ if (pc->label) {
+ haslabel = 1;
+ printf("%s\n", symname(pc->label));
+ }
+ if (!pc->op)
+ continue;
+ if (pc->flags&BBENTRY && !haslabel)
+ printf("%s\n", symname(newlabel()));
+ (*optbl[pc->op].fun)();
+ if (!pc->label)
+ haslabel = 0;
+ }
+
+ puts("}");
+}
+
+static char *
+addr2txt(Addr *a)
+{
+ switch (a->kind) {
+ case SCONST:
+ sprintf(buff, "%llu", (unsigned long long) a->u.i);
+ return buff;
+ case SAUTO:
+ case SLABEL:
+ case STMP:
+ case SGLOB:
+ case SEXTRN:
+ case SPRIV:
+ case SLOCAL:
+ return symname(a->u.sym);
+ default:
+ abort();
+ }
+}
+
+static void
+binary(void)
+{
+ struct opdata *p = &optbl[pc->op];
+ char to[ADDR_LEN], from1[ADDR_LEN], from2[ADDR_LEN];
+
+ strcpy(to, addr2txt(&pc->to));
+ strcpy(from1, addr2txt(&pc->from1));
+ strcpy(from2, addr2txt(&pc->from2));
+ printf("\t%s =%c\t%s\t%s,%s\n", to, p->letter, p->txt, from1, from2);
+}
+
+static void
+ldir(void)
+{
+ struct opdata *p = &optbl[pc->op];
+ char to[ADDR_LEN], from[ADDR_LEN];
+ /* TODO: what type do we use for the size? */
+
+ /* TODO: it is pending */
+}
+
+static void
+store(void)
+{
+ struct opdata *p = &optbl[pc->op];
+ char to[ADDR_LEN], from[ADDR_LEN];
+
+ strcpy(to, addr2txt(&pc->to));
+ strcpy(from, addr2txt(&pc->from1));
+ printf("\t\t%s%c\t%s,%s\n", p->txt, p->letter, from, to);
+}
+
+static void
+unary(void)
+{
+ struct opdata *p = &optbl[pc->op];
+ char to[ADDR_LEN], from[ADDR_LEN];
+
+ strcpy(to, addr2txt(&pc->to));
+ strcpy(from, addr2txt(&pc->from1));
+ printf("\t%s =%c\t%s\t%s\n", to, p->letter, p->txt, from);
+}
+
+static void
+call(void)
+{
+ struct opdata *p = &optbl[pc->op];
+ char to[ADDR_LEN], from[ADDR_LEN];
+ Symbol *sym = pc->to.u.sym;
+
+ strcpy(to, addr2txt(&pc->to));
+ strcpy(from, addr2txt(&pc->from1));
+ printf("\t%s =%s\tcall\t%s(",
+ to, size2stack(&sym->type), from);
+}
+
+static void
+param(void)
+{
+ Symbol *sym = pc->from2.u.sym;
+
+ printf(optbl[pc->op].txt,
+ size2stack(&sym->type), addr2txt(&pc->from1));
+}
+
+static void
+ecall(void)
+{
+ struct opdata *p = &optbl[pc->op];
+
+ puts(p->txt);
+}
+
+static void
+ret(void)
+{
+ if (pc->from1.kind == SNONE)
+ puts("\t\tret");
+ else
+ printf("\t\tret\t%s\n", addr2txt(&pc->from1));
+}
+
+static void
+jmp(void)
+{
+ printf("\t\tjmp\t%s\n", addr2txt(&pc->from1));
+}
+
+static void
+branch(void)
+{
+ char to[ADDR_LEN], from1[ADDR_LEN], from2[ADDR_LEN];
+
+ strcpy(to, addr2txt(&pc->to));
+ strcpy(from1, addr2txt(&pc->from1));
+ strcpy(from2, addr2txt(&pc->from2));
+ printf("\t\tjnz\t%s,%s,%s\n", to, from1, from2);
+}
+
+static void
+vastart(void)
+{
+ printf("\t\tvastart %s\n", addr2txt(&pc->from1));
+}
+
+static void
+vaarg(void)
+{
+ Symbol *sym = pc->to.u.sym;
+ Type *tp = &sym->type;
+ char to[ADDR_LEN], from[ADDR_LEN];
+
+ strcpy(to, addr2txt(&pc->to));
+ strcpy(from, addr2txt(&pc->from1));
+ printf("\t\t%s =%s vaarg %s\n", to, size2asm(tp), from);
+}
+
+static void
+asalloc(void)
+{
+ Symbol *sym = pc->to.u.sym;
+ Type *tp = &sym->type;
+ extern Type ptrtype;
+
+ printf("\t%s =%s\talloc%lu\t%lu\n",
+ symname(sym), size2asm(&ptrtype), tp->align+3 & ~3, tp->size);
+}
+
+static void
+form2local(void)
+{
+ Symbol *sym = pc->to.u.sym;
+ Type *tp = &sym->type;
+ char *name = symname(sym);
+
+ printf("\t\tstore%s\t%s.val,%s\n", size2asm(tp), name, name);
+}
+
+void
+endinit(void)
+{
+ puts("}");
+}
+
+void
+getbblocks(void)
+{
+ Inst *i;
+
+ if (!prog)
+ return;
+
+ prog->flags |= BBENTRY;
+ for (pc = prog; pc; pc = pc->next) {
+ switch (pc->op) {
+ case ASBRANCH:
+ i = pc->from2.u.sym->u.inst;
+ i->flags |= BBENTRY;
+ case ASJMP:
+ i = pc->from1.u.sym->u.inst;
+ i->flags |= BBENTRY;
+ case ASRET:
+ if (pc->next)
+ pc->next->flags |= BBENTRY;
+ break;
+ }
+ }
+}
--- /dev/null
+++ b/src/cmd/cc2/target/qbe/optm.c
@@ -1,0 +1,58 @@
+static char sccsid[] = "@(#) ./cc2/arch/qbe/optm.c";
+
+#include <stddef.h>
+
+#include <scc/scc.h>
+
+#include "../../cc2.h"
+
+Node *
+optm_dep(Node *np)
+{
+ int op = np->op;
+ Node *p, *dst, *next = np->next;
+ Symbol *sym, *osym;
+
+ switch (op) {
+ case OEFUN:
+ /*
+ * In QBE we need at the end of a basic block
+ * a jump, so we have to ensure that the last
+ * statement of the function is a ret, a jmp
+ * or a branch. In the same way, QBE does
+ * not accept labels at the end of a function
+ * (ONOP is used for labels) so we have to add
+ * a ret there, and in the case of branches
+ * we need a label for the next statement
+ */
+ op = (np->prev) ? np->prev->op : 0;
+ if (!op || op == ONOP || op == OBRANCH || (op != ORET && op != OJMP))
+ addstmt(node(ORET), KEEPCUR);
+ break;
+ case OBRANCH:
+ if (!next->label) {
+ sym = getsym(TMPSYM);
+ sym->kind = SLABEL;
+ next->label = sym;
+ }
+ case OJMP:
+ for (;;) {
+ dst = np->u.sym->u.stmt;
+ if (dst->op != OJMP)
+ break;
+ np->u.sym = dst->u.sym;
+ }
+ for (p = np->next; p; p = p->next) {
+ if (p == dst)
+ return NULL;
+ if (p->op == ONOP ||
+ p->op == OBLOOP ||
+ p->op == OELOOP) {
+ continue;
+ }
+ break;
+ }
+ break;
+ }
+ return np;
+}
--- /dev/null
+++ b/src/cmd/cc2/target/qbe_amd64-sysv/target.mk
@@ -1,0 +1,8 @@
+OBJ-qbe_amd64-sysv = $(OBJS) \
+ target/qbe/cgen.o \
+ target/qbe/optm.o \
+ target/qbe/code.o \
+ target/amd64-sysv/types.o
+
+$(LIBEXEC)/cc2-qbe_amd64-sysv: $(OBJ-qbe_amd64-sysv)
+ $(CC) $(SCC_LDFLAGS) $(OBJ-qbe_amd64-sysv) -lscc -o $@
--- /dev/null
+++ b/src/cmd/cc2/target/qbe_arm64-sysv/target.mk
@@ -1,0 +1,5 @@
+OBJ-qbe_arm64-sysv = $(OBJS) \
+ target/qbe/cgen.o \
+ target/qbe/optm.o \
+ target/qbe/code.o \
+ target/arm64-sysv/types.o \
--- /dev/null
+++ b/src/cmd/cc2/target/z80-scc/arch.h
@@ -1,0 +1,5 @@
+enum asmop {
+ ASJMP = 0,
+ ASRET,
+ ASBRANCH,
+};
--- /dev/null
+++ b/src/cmd/cc2/target/z80-scc/cgen.c
@@ -1,0 +1,161 @@
+static char sccsid[] = "@(#) ./cc2/arch/z80/cgen.c";
+
+#include <stdlib.h>
+
+#include <scc/scc.h>
+
+#include "arch.h"
+#include "../../cc2.h"
+
+static void
+swtch(Node *idx)
+{
+}
+
+static Node *
+rhs(Node *np, Node *ret)
+{
+}
+
+static Node *
+field(Node *np, Node *ret, int islhs)
+{
+}
+
+static Node *
+lhs(Node *np, Node *new)
+{
+ switch (np->op) {
+ case OMEM:
+ case OAUTO:
+ *new = *np;
+ return new;
+ case OPTR:
+ return rhs(np->left, new);
+ case OFIELD:
+ return field(np, new, 1);
+ default:
+ abort();
+ }
+}
+
+static void
+bool(Node *np, Symbol *true, Symbol *false)
+{
+ Node *l = np->left, *r = np->right;
+ Node ret, ifyes, ifno;
+ Symbol *label;
+
+ switch (np->op) {
+ case ONEG:
+ bool(l, false, true);
+ break;
+ case OAND:
+ label = newlabel();
+ bool(l, label, false);
+ setlabel(label);
+ bool(r, true, false);
+ break;
+ case OOR:
+ label = newlabel();
+ bool(l, true, label);
+ setlabel(label);
+ bool(r, true, false);
+ break;
+ default:
+ label2node(&ifyes, true);
+ label2node(&ifno, false);
+ code(ASBRANCH, rhs(np, &ret), &ifyes, &ifno);
+ break;
+ }
+}
+
+Node *
+cgen(Node *np)
+{
+ Node aux, *p, *next;
+
+ setlabel(np->label);
+ switch (np->op) {
+ case OJMP:
+ label2node(&aux, np->u.sym);
+ code(ASJMP, NULL, &aux, NULL);
+ break;
+ case OBRANCH:
+ next = np->next;
+ if (!next->label)
+ next->label = newlabel();
+ bool(np->left, np->u.sym, next->label);
+ break;
+ case ORET:
+ p = np->left;
+ if (p)
+ p = rhs(np->left, &aux);
+ code(ASRET, NULL, p, NULL);
+ break;
+ case OBSWITCH:
+ swtch(rhs(np->left, &aux));
+ break;
+ default:
+ rhs(np, &aux);
+ break;
+ }
+ return NULL;
+}
+
+/*
+ * This is strongly influenced by
+ * http://plan9.bell-labs.com/sys/doc/compiler.ps (/sys/doc/compiler.ps)
+ * calculate addresability as follows
+ * AUTO => 11 value+fp
+ * REG => 13 reg
+ * STATIC => 12 (value)
+ * CONST => 20 $value
+ */
+Node *
+sethi(Node *np)
+{
+ Node *lp, *rp;
+
+ if (!np)
+ return np;
+
+ np->complex = 0;
+ np->address = 0;
+ lp = np->left;
+ rp = np->right;
+ switch (np->op) {
+ case OAUTO:
+ np->address = 11;
+ break;
+ case OREG:
+ np->address = 13;
+ break;
+ case OMEM:
+ np->address = 12;
+ break;
+ case OCONST:
+ np->address = 20;
+ break;
+ default:
+ sethi(lp);
+ sethi(rp);
+ break;
+ }
+
+ if (np->address > 10)
+ return np;
+ if (lp)
+ np->complex = lp->complex;
+ if (rp) {
+ int d = np->complex - rp->complex;
+
+ if (d == 0)
+ ++np->complex;
+ else if (d < 0)
+ np->complex = rp->complex;
+ }
+ if (np->complex == 0)
+ ++np->complex;
+ return np;
+}
--- /dev/null
+++ b/src/cmd/cc2/target/z80-scc/code.c
@@ -1,0 +1,229 @@
+static char sccsid[] = "@(#) ./cc2/arch/z80/code.c";
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <scc/cstd.h>
+#include <scc/scc.h>
+
+#include "arch.h"
+#include "../../cc2.h"
+
+enum segment {
+ CODESEG,
+ DATASEG,
+ BSSSEG,
+ NOSEG
+};
+
+static int curseg = NOSEG;
+static unsigned long offpar, offvar;
+
+static void
+segment(int seg)
+{
+ static char *txt[] = {
+ [CODESEG] = "\tCSEG\n",
+ [DATASEG] = "\tDSEG\n",
+ [BSSSEG] = "\tASEG\n",
+ };
+
+ if (seg == curseg)
+ return;
+ fputs(txt[seg], stdout);
+ curseg = seg;
+}
+
+static char *
+symname(Symbol *sym)
+{
+ static char name[INTIDENTSIZ+1];
+
+ if (sym->name) {
+ switch (sym->kind) {
+ case SGLOB:
+ case SEXTRN:
+ snprintf(name, sizeof(name), "_%s", sym->name);
+ return name;
+ case SPRIV:
+ return sym->name;
+ }
+ }
+
+ sprintf(name, ".%d", sym->numid);
+
+ return name;
+}
+
+static void
+label(Symbol *sym)
+{
+ int seg;
+ char *name = symname(sym);
+
+ if (sym->type.flags & FUNF)
+ seg = CODESEG;
+ else if (sym->type.flags & INITF)
+ seg = DATASEG;
+ else
+ seg = BSSSEG;
+ segment(seg);
+
+ switch (sym->kind) {
+ case SEXTRN:
+ printf("\tEXTRN\t%s\n", name);
+ return;
+ case SGLOB:
+ printf("\tPUBLIC\t%s\n", name);
+ break;
+ }
+
+ printf("%s:\n", name);
+}
+
+static void
+emitconst(Node *np)
+{
+ switch (np->type.size) {
+ case 1:
+ printf("%d", (int) np->u.i & 0xFF);
+ break;
+ case 2:
+ printf("%d", (int) np->u.i & 0xFFFF);
+ break;
+ case 4:
+ printf("%ld", (long) np->u.i & 0xFFFFFFFF);
+ break;
+ default:
+ abort();
+ }
+}
+
+static void
+emittree(Node *np)
+{
+ if (!np)
+ return;
+
+ switch (np->op) {
+ case OSTRING:
+ printf("\"%s\"", np->u.s);
+ free(np->u.s);
+ np->u.s = NULL;
+ break;
+ case OCONST:
+ emitconst(np);
+ break;
+ case OADDR:
+ emittree(np->left);
+ break;
+ case OMEM:
+ fputs(symname(np->u.sym), stdout);
+ break;
+ default:
+ emittree(np->left);
+ printf(" %c ", np->op);
+ emittree(np->right);
+ break;
+ }
+}
+
+static void
+size2asm(Type *tp)
+{
+ char *s;
+
+ /*
+ * In z80 we can ignore the alignment
+ */
+ if (tp->flags & STRF) {
+ s = "\tDB\t";
+ } else {
+ switch (tp->size) {
+ case 1:
+ s = "\tDB\t";
+ break;
+ case 2:
+ s = "\tDW\t";
+ break;
+ case 4:
+ s = "\tDD\t";
+ break;
+ default:
+ s = "\tDS\t%lu,";
+ break;
+ }
+ }
+ printf(s, tp->size);
+}
+
+void
+newfun()
+{
+ offpar = offvar = 0;
+}
+
+void
+defpar(Symbol *sym)
+{
+ unsigned long align, size;
+
+ if (sym->kind != SREG && sym->kind != SAUTO)
+ return;
+ align = sym->type.align;
+ size = sym->type.size;
+
+ offpar -= align-1 & ~align;
+ sym->u.off = offpar;
+ offpar -= size;
+ sym->kind = SAUTO;
+}
+
+void
+defvar(Symbol *sym)
+{
+ unsigned long align, size;
+
+ if (sym->kind != SREG && sym->kind != SAUTO)
+ return;
+ align = sym->type.align;
+ size = sym->type.size;
+
+ offvar += align-1 & ~align;
+ sym->u.off = offvar;
+ offvar += size;
+ sym->kind = SAUTO;
+}
+
+void
+defglobal(Symbol *sym)
+{
+ label(sym);
+ if (sym->kind == SEXTRN || (sym->type.flags & INITF))
+ return;
+ size2asm(&sym->type);
+ puts("0");
+}
+
+void
+data(Node *np)
+{
+ size2asm(&np->type);
+ emittree(np);
+ putchar('\n');
+}
+
+void
+writeout(void)
+{
+}
+
+void
+endinit(void)
+{
+}
+
+void
+getbblocks(void)
+{
+}
--- /dev/null
+++ b/src/cmd/cc2/target/z80-scc/optm.c
@@ -1,0 +1,11 @@
+static char sccsid[] = "@(#) ./cc2/arch/z80/optm.c";
+
+#include <scc/scc.h>
+
+#include "../../cc2.h"
+
+Node *
+optm_dep(Node *np)
+{
+ return np;
+}
--- /dev/null
+++ b/src/cmd/cc2/target/z80-scc/target.mk
@@ -1,0 +1,8 @@
+OBJ-z80-scc = $(OBJS) \
+ target/z80-scc/cgen.o \
+ target/z80-scc/optm.o \
+ target/z80-scc/code.o \
+ target/z80-scc/types.o \
+
+$(LIBEXEC)/cc2-z80-scc: $(OBJ-z80-scc)
+ $(CC) $(SCC_LDFLAGS) $(OBJ-z80-scc) -lscc -o $@
--- /dev/null
+++ b/src/cmd/cc2/target/z80-scc/types.c
@@ -1,0 +1,95 @@
+static char sccsid[] = "@(#) ./cc2/arch/z80/types.c";
+
+#include <scc/scc.h>
+
+#include "../../cc2.h"
+
+
+Type int8type = {
+ .flags = SIGNF | INTF,
+ .size = 1,
+ .align = 1
+};
+
+Type int16type = {
+ .flags = SIGNF | INTF,
+ .size = 2,
+ .align = 1
+};
+
+Type int32type = {
+ .flags = SIGNF | INTF,
+ .size = 4,
+ .align = 1
+};
+
+Type int64type = {
+ .flags = SIGNF | INTF,
+ .size = 8,
+ .align = 1
+};
+
+Type uint8type = {
+ .flags = INTF,
+ .size = 1,
+ .align = 1
+};
+
+Type uint16type = {
+ .flags = INTF,
+ .size = 2,
+ .align = 1
+};
+
+Type uint32type = {
+ .flags = INTF,
+ .size = 4,
+ .align = 1
+};
+
+Type uint64type = {
+ .flags = INTF,
+ .size = 8,
+ .align = 1
+};
+
+Type ptrtype = {
+ .flags = INTF,
+ .size = 2,
+ .align = 1
+};
+
+Type booltype = {
+ .flags = INTF,
+ .size = 1,
+ .align = 1
+};
+
+Type float32type = {
+ .flags = FLOATF,
+ .size = 4,
+ .align = 1
+};
+
+Type float64type = {
+ .flags = FLOATF,
+ .size = 4,
+ .align = 1
+};
+
+Type float80type = {
+ .flags = FLOATF,
+ .size = 4,
+ .align = 1
+};
+
+Type voidtype = {
+ .size = 0,
+ .align = 0
+};
+
+/* this types is not going to be used in this arch */
+Type arg_type = {
+ .size = 0,
+ .align = 0
+};
--- /dev/null
+++ b/src/cmd/ld/Makefile
@@ -1,0 +1,20 @@
+.POSIX:
+
+PROJECTDIR = ../../..
+include $(PROJECTDIR)/scripts/rules.mk
+
+OBJS = main.o \
+ obj.o \
+
+TARGET = $(BINDIR)/ld
+
+all: $(TARGET)
+
+$(TARGET): $(LIBDIR)/libscc.a
+
+$(TARGET): $(OBJS)
+ $(CC) $(SCC_LDFLAGS) $(OBJS) -lscc -o $@
+
+dep: inc-dep
+
+include deps.mk
--- /dev/null
+++ b/src/cmd/ld/deps.mk
@@ -1,0 +1,8 @@
+
+#deps
+main.o: $(INCDIR)/scc/scc/ar.h
+main.o: $(INCDIR)/scc/scc/scc.h
+main.o: $(INCDIR)/scc/scc/syslibs.h
+main.o: ld.h
+obj.o: $(INCDIR)/scc/scc/scc.h
+obj.o: ld.h
--- /dev/null
+++ b/src/cmd/ld/ld.h
@@ -1,0 +1,84 @@
+#define INSTALL 1
+#define NOINSTALL 0
+
+typedef struct obj Obj;
+typedef struct symbol Symbol;
+typedef struct section Section;
+
+struct obj {
+ char *fname;
+ char *member;
+ FILE *fp;
+ long offset;
+
+ void *filhdr;
+ void *scnhdr;
+ void *enthdr;
+
+ char *strtbl;
+ size_t strsiz;
+
+ int (*unpack)(unsigned char *, char *, ...);
+ int align;
+
+ struct obj *next;
+};
+
+enum symflg {
+ SDEFINED = 1 << 1,
+};
+
+struct symbol {
+ char *name;
+ unsigned char flags;
+ long size;
+ TUINT base;
+ TUINT value;
+ Section *section;
+ Obj *where;
+ struct symbol *hash, *next;
+};
+
+struct section {
+ char *name;
+ TUINT base;
+ TUINT size;
+ struct section *next;
+};
+
+/* obj.c */
+extern Obj *newobj(char *fname, char *member, FILE *fp);
+extern Obj *add(Obj *obj);
+extern void delobj(Obj *obj);
+extern Section *slookup(char *name);
+extern Symbol *lookup(char *name, int install);
+
+/* main.c */
+extern void outmem(void);
+extern void corrupted(char *fname, char *member);
+extern void redefined(Obj *obj, Symbol *sym);
+
+/* object format */
+extern Obj *probe(char *fname, char *member, FILE *fp);
+extern Obj *load(Obj *obj);
+extern void writeout(FILE *fp);
+
+
+/*
+ * Definition of globals variables
+ */
+extern int pass;
+extern int sflag;
+extern int xflag;
+extern int Xflag;
+extern int rflag;
+extern int dflag;
+extern int gflag;
+extern Obj *objlst;
+extern Section *sectlst;
+extern long numsects;
+extern long numsymbols;
+extern TUINT tsize, dsize, bsize;
+extern char *output;
+extern char *entry;
+extern char *datasiz;
--- /dev/null
+++ b/src/cmd/ld/main.c
@@ -1,0 +1,303 @@
+static char sccsid[] = "@(#) ./ld/main.c";
+
+#include <ctype.h>
+#include <errno.h>
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <scc/scc.h>
+#include <scc/ar.h>
+#include <scc/syslibs.h>
+#include "ld.h"
+
+char *output = "a.out", *entry = "start", *datasiz;
+int pass;
+int sflag; /* discard all the symbols */
+int xflag; /* discard local symbols */
+int Xflag; /* discard locals starting with 'L' */
+int rflag; /* preserve relocation bits */
+int dflag; /* define common even with rflag */
+int gflag; /* preserve debug symbols */
+
+static int done;
+
+Obj *
+probe(char *fname, char *member, FILE *fp)
+{
+}
+
+Obj *
+load(Obj *obj)
+{
+}
+
+void
+writeout(FILE *fp)
+{
+}
+
+void
+redefined(Obj *obj, Symbol *sym)
+{
+ /* TODO: add infotmation about where it is defined */
+ fprintf(stderr,
+ "ld: %s: redifinition of symbol '%s'\n",
+ obj->fname, sym->name);
+}
+
+void
+corrupted(char *fname, char *member)
+{
+ char *fmt;
+
+ fmt = (member) ?
+ "ld: %s(%s): corrupted file\n" : "ld: %s: corrupted file\n";
+ fprintf(stderr, fmt, fname, member);
+ exit(EXIT_FAILURE);
+}
+
+void
+outmem(void)
+{
+ fputs("ld: out of memory\n", stderr);
+ exit(EXIT_FAILURE);
+}
+
+static void
+cleanup(void)
+{
+ if (!done)
+ remove(output);
+}
+
+static int
+object(char *fname, char *member, FILE *fp)
+{
+ Obj *obj;
+
+ obj = probe(fname, member, fp);
+ if (!obj)
+ return 0;
+ load(obj);
+
+ return 1;
+}
+
+static char *
+getfname(struct ar_hdr *hdr, char *dst)
+{
+ char *p;
+ int i;
+
+ memcpy(dst, hdr->ar_name, SARNAM);
+ dst[SARNAM] = '\0';
+
+ for (i = SARNAM-1; i >= 0; i--) {
+ if (dst[i] != ' ' && dst[i] != '/')
+ break;
+ dst[i] = '\0';
+ }
+ return dst;
+}
+
+static void
+ar(char *fname, FILE *fp)
+{
+ struct ar_hdr hdr;
+ long pos, siz;
+ char member[SARNAM+1];
+
+ if (fseek(fp, SARMAG, SEEK_SET) == EOF)
+ goto file_error;
+
+ while (fread(&hdr, sizeof(hdr), 1, fp) == 1) {
+ if (strncmp(hdr.ar_fmag, ARFMAG, sizeof(hdr.ar_fmag)))
+ corrupted(fname, NULL);
+
+ siz = 0;
+ sscanf(hdr.ar_size, "%10ld", &siz);
+ if (siz & 1)
+ siz++;
+ if (siz == 0)
+ corrupted(fname, NULL);
+
+ pos = ftell(fp);
+ if (pos == -1 || pos > LONG_MAX - siz) {
+ fprintf(stderr,
+ "ld: %s(%s): overflow in size of archive",
+ fname, member);
+ exit(EXIT_FAILURE);
+ }
+ pos += siz;
+
+ getfname(&hdr, member);
+ object(fname, member, fp);
+ if (fseek(fp, pos, SEEK_SET) == EOF)
+ break;
+ }
+
+file_error:
+ if (ferror(fp)) {
+ fprintf(stderr, "ld: %s: %s\n", fname, strerror(errno));
+ exit(EXIT_FAILURE);
+ }
+}
+
+static int
+archive(char *fname, FILE *fp)
+{
+ char magic[SARMAG];
+ fpos_t pos;
+
+ fgetpos(fp, &pos);
+ fread(magic, SARMAG, 1, fp);
+ fsetpos(fp, &pos);
+
+ if (ferror(fp))
+ return 0;
+ if (strncmp(magic, ARMAG, SARMAG) != 0)
+ return 0;
+
+ ar(fname, fp);
+ return 1;
+}
+
+static void
+pass1(int argc, char *argv[])
+{
+ FILE *fp;
+ char *s;
+
+ while ((s = *argv++) != NULL) {
+ if ((fp = fopen(s, "rb")) == NULL) {
+ fprintf(stderr, "ld: %s: %s\n", s, strerror(errno));
+ exit(EXIT_FAILURE);
+ }
+ if (!object(s, NULL, fp) && !archive(s, fp)) {
+ fprintf(stderr, "ld: %s: File format not recognized\n", s);
+ exit(EXIT_FAILURE);
+ }
+ fclose(fp);
+ }
+}
+
+static void
+pass2(int argc, char *argv[])
+{
+ FILE *fp;
+
+ if ((fp = fopen(output, "wb")) != NULL) {
+ writeout(fp);
+ if (fclose(fp) != EOF)
+ return;
+ }
+
+ fprintf(stderr, "ld: %s: %s\n", output, strerror(errno));
+ exit(EXIT_FAILURE);
+}
+
+static void
+usage(void)
+{
+ fputs("usage: ld [options] file ...\n", stderr);
+ exit(1);
+}
+
+static void
+Lpath(char *path)
+{
+ char **bp;
+
+ for (bp = syslibs; bp < &syslibs[MAX_LIB_PATHS] && *bp; ++bp)
+ ;
+ if (bp == &syslibs[MAX_LIB_PATHS]) {
+ fputs("ld: too many -L options\n", stderr);
+ exit(1);
+ }
+ *bp = path;
+}
+
+int
+main(int argc, char *argv[])
+{
+ char *cp, **p;
+
+ for (--argc; *++argv; --argc) {
+ if (argv[0][0] != '-' || argv[0][1] == 'l')
+ break;
+ if (argv[0][1] == '-') {
+ --argc, ++argv;
+ break;
+ }
+ for (cp = &argv[0][1]; *cp; ++cp) {
+ switch (*cp) {
+ case 's':
+ sflag = 1;
+ break;
+ case 'x':
+ xflag = 1;
+ break;
+ case 'X':
+ Xflag = 1;
+ break;
+ case 'r':
+ rflag = 1;
+ break;
+ case 'd':
+ dflag = 1;
+ break;
+ case 'i':
+ case 'n':
+ /* TODO */
+ break;
+ case 'L':
+ if (argc == 0)
+ goto usage;
+ ++argv, --argc;
+ Lpath(*argv);
+ break;
+ case 'u':
+ if (argc == 0)
+ goto usage;
+ ++argv, --argc;
+ lookup(*argv, INSTALL);
+ break;
+ case 'o':
+ if (argc == 0)
+ goto usage;
+ ++argv, --argc;
+ output = *argv;
+ break;
+ case 'e':
+ if (argc == 0)
+ goto usage;
+ ++argv, --argc;
+ entry = *argv;
+ break;
+ case 'D':
+ if (argc == 0)
+ goto usage;
+ ++argv, --argc;
+ datasiz = *argv;
+ break;
+ default:
+ usage:
+ usage();
+ }
+ }
+ }
+
+ if (argc == 0)
+ usage();
+
+ atexit(cleanup);
+
+ pass1(argc, argv);
+ pass2(argc, argv);
+
+ done = 1;
+
+ return 0;
+}
--- /dev/null
+++ b/src/cmd/ld/obj.c
@@ -1,0 +1,153 @@
+static char sccsid[] = "@(#) ./ld/obj.c";
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <scc/scc.h>
+#include "ld.h"
+
+#define NR_SYM_HASH 64
+
+TUINT tsize, dsize, bsize;
+
+Obj *objlst;
+static Obj *objtail;
+
+long numsects, numsymbols;
+static Symbol *secttail;
+static Symbol *symtbl[NR_SYM_HASH];
+
+Section *sectlst;
+
+Obj *
+add(Obj *obj)
+{
+ obj->next = NULL;
+
+ if (!objlst) {
+ objtail = objlst = obj;
+ } else {
+ objtail->next = obj;
+ objtail = obj;
+ }
+}
+
+void
+delobj(Obj *obj)
+{
+ free(obj->strtbl);
+ free(obj->scnhdr);
+ free(obj->filhdr);
+ free(obj->fname);
+ free(obj->member);
+ free(obj);
+}
+
+Obj *
+newobj(char *fname, char *member, FILE *fp)
+{
+ Obj *obj;
+ char *s, *t;
+ size_t len;
+
+ len = strlen(fname);
+ obj = malloc(sizeof(*obj));
+ s = malloc(len) + 1;
+ if (!obj || !s)
+ outmem();
+ memset(obj, 0, sizeof(*obj));
+ obj->fname = memcpy(s, fname, len);
+
+ if (!member) {
+ obj->member = NULL;
+ } else {
+ len = strlen(member) + 1;
+ if ((s = malloc(len)) == NULL)
+ outmem();
+ obj->member = memcpy(s, member, len);
+ }
+
+ obj->fp = fp;
+ if ((obj->offset = ftell(fp)) == EOF) {
+ fprintf(stderr, "ld: %s: %s\n", fname, strerror(errno));
+ exit(1);
+ }
+
+ return obj;
+}
+
+Section *
+slookup(char *name)
+{
+ char *s;
+ Section *prev, *sp;
+ size_t len = strlen(name);
+
+ for (prev = sp = sectlst; sp; prev = sp, sp = sp->next) {
+ if (!memcmp(sp->name, name, len))
+ return sp;
+ }
+
+ sp = malloc(sizeof(*sp));
+ s = malloc(len);
+ if (!sp || !s)
+ outmem();
+ sp->name = s;
+ sp->base = 0;
+ sp->size = 0;
+ sp->next = NULL;
+
+ if (!prev)
+ sectlst = sp;
+ else
+ prev->next = sp;
+ numsects++;
+
+ return sp;
+}
+
+static unsigned
+hash(char *s)
+{
+ unsigned h, c;
+
+ for (h = 0; c = *s; ++s)
+ h = h*33 ^ c;
+ return h & NR_SYM_HASH-1;
+}
+
+Symbol *
+lookup(char *name, int install)
+{
+ unsigned h;
+ char *s;
+ size_t len;
+ Symbol *sym;
+
+ h = hash(name);
+ for (sym = symtbl[h]; sym; sym = sym->hash) {
+ s = sym->name;
+ if (*name == *s && !strcmp(name, s))
+ return sym;
+ }
+
+ if (!install)
+ return NULL;
+
+ len = strlen(name) + 1;
+ sym = malloc(sizeof(*sym));
+ s = malloc(len);
+ if (!sym || !s)
+ outmem();
+ memset(sym, 0, sizeof(*sym));
+ memcpy(s, name, len);
+
+ sym->hash = symtbl[h];
+ symtbl[h] = sym;
+ sym->name = s;
+ numsymbols++;
+
+ return sym;
+}
--- a/src/ld/Makefile
+++ /dev/null
@@ -1,20 +1,0 @@
-.POSIX:
-
-PROJECTDIR = ../..
-include $(PROJECTDIR)/scripts/rules.mk
-
-OBJS = main.o \
- obj.o \
-
-TARGET = $(BINDIR)/ld
-
-all: $(TARGET)
-
-$(TARGET): $(LIBDIR)/libscc.a
-
-$(TARGET): $(OBJS)
- $(CC) $(SCC_LDFLAGS) $(OBJS) -lscc -o $@
-
-dep: inc-dep
-
-include deps.mk
--- a/src/ld/deps.mk
+++ /dev/null
@@ -1,8 +1,0 @@
-
-#deps
-main.o: $(INCDIR)/scc/scc/ar.h
-main.o: $(INCDIR)/scc/scc/scc.h
-main.o: $(INCDIR)/scc/scc/syslibs.h
-main.o: ld.h
-obj.o: $(INCDIR)/scc/scc/scc.h
-obj.o: ld.h
--- a/src/ld/ld.h
+++ /dev/null
@@ -1,84 +1,0 @@
-#define INSTALL 1
-#define NOINSTALL 0
-
-typedef struct obj Obj;
-typedef struct symbol Symbol;
-typedef struct section Section;
-
-struct obj {
- char *fname;
- char *member;
- FILE *fp;
- long offset;
-
- void *filhdr;
- void *scnhdr;
- void *enthdr;
-
- char *strtbl;
- size_t strsiz;
-
- int (*unpack)(unsigned char *, char *, ...);
- int align;
-
- struct obj *next;
-};
-
-enum symflg {
- SDEFINED = 1 << 1,
-};
-
-struct symbol {
- char *name;
- unsigned char flags;
- long size;
- TUINT base;
- TUINT value;
- Section *section;
- Obj *where;
- struct symbol *hash, *next;
-};
-
-struct section {
- char *name;
- TUINT base;
- TUINT size;
- struct section *next;
-};
-
-/* obj.c */
-extern Obj *newobj(char *fname, char *member, FILE *fp);
-extern Obj *add(Obj *obj);
-extern void delobj(Obj *obj);
-extern Section *slookup(char *name);
-extern Symbol *lookup(char *name, int install);
-
-/* main.c */
-extern void outmem(void);
-extern void corrupted(char *fname, char *member);
-extern void redefined(Obj *obj, Symbol *sym);
-
-/* object format */
-extern Obj *probe(char *fname, char *member, FILE *fp);
-extern Obj *load(Obj *obj);
-extern void writeout(FILE *fp);
-
-
-/*
- * Definition of globals variables
- */
-extern int pass;
-extern int sflag;
-extern int xflag;
-extern int Xflag;
-extern int rflag;
-extern int dflag;
-extern int gflag;
-extern Obj *objlst;
-extern Section *sectlst;
-extern long numsects;
-extern long numsymbols;
-extern TUINT tsize, dsize, bsize;
-extern char *output;
-extern char *entry;
-extern char *datasiz;
--- a/src/ld/main.c
+++ /dev/null
@@ -1,303 +1,0 @@
-static char sccsid[] = "@(#) ./ld/main.c";
-
-#include <ctype.h>
-#include <errno.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <scc/scc.h>
-#include <scc/ar.h>
-#include <scc/syslibs.h>
-#include "ld.h"
-
-char *output = "a.out", *entry = "start", *datasiz;
-int pass;
-int sflag; /* discard all the symbols */
-int xflag; /* discard local symbols */
-int Xflag; /* discard locals starting with 'L' */
-int rflag; /* preserve relocation bits */
-int dflag; /* define common even with rflag */
-int gflag; /* preserve debug symbols */
-
-static int done;
-
-Obj *
-probe(char *fname, char *member, FILE *fp)
-{
-}
-
-Obj *
-load(Obj *obj)
-{
-}
-
-void
-writeout(FILE *fp)
-{
-}
-
-void
-redefined(Obj *obj, Symbol *sym)
-{
- /* TODO: add infotmation about where it is defined */
- fprintf(stderr,
- "ld: %s: redifinition of symbol '%s'\n",
- obj->fname, sym->name);
-}
-
-void
-corrupted(char *fname, char *member)
-{
- char *fmt;
-
- fmt = (member) ?
- "ld: %s(%s): corrupted file\n" : "ld: %s: corrupted file\n";
- fprintf(stderr, fmt, fname, member);
- exit(EXIT_FAILURE);
-}
-
-void
-outmem(void)
-{
- fputs("ld: out of memory\n", stderr);
- exit(EXIT_FAILURE);
-}
-
-static void
-cleanup(void)
-{
- if (!done)
- remove(output);
-}
-
-static int
-object(char *fname, char *member, FILE *fp)
-{
- Obj *obj;
-
- obj = probe(fname, member, fp);
- if (!obj)
- return 0;
- load(obj);
-
- return 1;
-}
-
-static char *
-getfname(struct ar_hdr *hdr, char *dst)
-{
- char *p;
- int i;
-
- memcpy(dst, hdr->ar_name, SARNAM);
- dst[SARNAM] = '\0';
-
- for (i = SARNAM-1; i >= 0; i--) {
- if (dst[i] != ' ' && dst[i] != '/')
- break;
- dst[i] = '\0';
- }
- return dst;
-}
-
-static void
-ar(char *fname, FILE *fp)
-{
- struct ar_hdr hdr;
- long pos, siz;
- char member[SARNAM+1];
-
- if (fseek(fp, SARMAG, SEEK_SET) == EOF)
- goto file_error;
-
- while (fread(&hdr, sizeof(hdr), 1, fp) == 1) {
- if (strncmp(hdr.ar_fmag, ARFMAG, sizeof(hdr.ar_fmag)))
- corrupted(fname, NULL);
-
- siz = 0;
- sscanf(hdr.ar_size, "%10ld", &siz);
- if (siz & 1)
- siz++;
- if (siz == 0)
- corrupted(fname, NULL);
-
- pos = ftell(fp);
- if (pos == -1 || pos > LONG_MAX - siz) {
- fprintf(stderr,
- "ld: %s(%s): overflow in size of archive",
- fname, member);
- exit(EXIT_FAILURE);
- }
- pos += siz;
-
- getfname(&hdr, member);
- object(fname, member, fp);
- if (fseek(fp, pos, SEEK_SET) == EOF)
- break;
- }
-
-file_error:
- if (ferror(fp)) {
- fprintf(stderr, "ld: %s: %s\n", fname, strerror(errno));
- exit(EXIT_FAILURE);
- }
-}
-
-static int
-archive(char *fname, FILE *fp)
-{
- char magic[SARMAG];
- fpos_t pos;
-
- fgetpos(fp, &pos);
- fread(magic, SARMAG, 1, fp);
- fsetpos(fp, &pos);
-
- if (ferror(fp))
- return 0;
- if (strncmp(magic, ARMAG, SARMAG) != 0)
- return 0;
-
- ar(fname, fp);
- return 1;
-}
-
-static void
-pass1(int argc, char *argv[])
-{
- FILE *fp;
- char *s;
-
- while ((s = *argv++) != NULL) {
- if ((fp = fopen(s, "rb")) == NULL) {
- fprintf(stderr, "ld: %s: %s\n", s, strerror(errno));
- exit(EXIT_FAILURE);
- }
- if (!object(s, NULL, fp) && !archive(s, fp)) {
- fprintf(stderr, "ld: %s: File format not recognized\n", s);
- exit(EXIT_FAILURE);
- }
- fclose(fp);
- }
-}
-
-static void
-pass2(int argc, char *argv[])
-{
- FILE *fp;
-
- if ((fp = fopen(output, "wb")) != NULL) {
- writeout(fp);
- if (fclose(fp) != EOF)
- return;
- }
-
- fprintf(stderr, "ld: %s: %s\n", output, strerror(errno));
- exit(EXIT_FAILURE);
-}
-
-static void
-usage(void)
-{
- fputs("usage: ld [options] file ...\n", stderr);
- exit(1);
-}
-
-static void
-Lpath(char *path)
-{
- char **bp;
-
- for (bp = syslibs; bp < &syslibs[MAX_LIB_PATHS] && *bp; ++bp)
- ;
- if (bp == &syslibs[MAX_LIB_PATHS]) {
- fputs("ld: too many -L options\n", stderr);
- exit(1);
- }
- *bp = path;
-}
-
-int
-main(int argc, char *argv[])
-{
- char *cp, **p;
-
- for (--argc; *++argv; --argc) {
- if (argv[0][0] != '-' || argv[0][1] == 'l')
- break;
- if (argv[0][1] == '-') {
- --argc, ++argv;
- break;
- }
- for (cp = &argv[0][1]; *cp; ++cp) {
- switch (*cp) {
- case 's':
- sflag = 1;
- break;
- case 'x':
- xflag = 1;
- break;
- case 'X':
- Xflag = 1;
- break;
- case 'r':
- rflag = 1;
- break;
- case 'd':
- dflag = 1;
- break;
- case 'i':
- case 'n':
- /* TODO */
- break;
- case 'L':
- if (argc == 0)
- goto usage;
- ++argv, --argc;
- Lpath(*argv);
- break;
- case 'u':
- if (argc == 0)
- goto usage;
- ++argv, --argc;
- lookup(*argv, INSTALL);
- break;
- case 'o':
- if (argc == 0)
- goto usage;
- ++argv, --argc;
- output = *argv;
- break;
- case 'e':
- if (argc == 0)
- goto usage;
- ++argv, --argc;
- entry = *argv;
- break;
- case 'D':
- if (argc == 0)
- goto usage;
- ++argv, --argc;
- datasiz = *argv;
- break;
- default:
- usage:
- usage();
- }
- }
- }
-
- if (argc == 0)
- usage();
-
- atexit(cleanup);
-
- pass1(argc, argv);
- pass2(argc, argv);
-
- done = 1;
-
- return 0;
-}
--- a/src/ld/obj.c
+++ /dev/null
@@ -1,153 +1,0 @@
-static char sccsid[] = "@(#) ./ld/obj.c";
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <scc/scc.h>
-#include "ld.h"
-
-#define NR_SYM_HASH 64
-
-TUINT tsize, dsize, bsize;
-
-Obj *objlst;
-static Obj *objtail;
-
-long numsects, numsymbols;
-static Symbol *secttail;
-static Symbol *symtbl[NR_SYM_HASH];
-
-Section *sectlst;
-
-Obj *
-add(Obj *obj)
-{
- obj->next = NULL;
-
- if (!objlst) {
- objtail = objlst = obj;
- } else {
- objtail->next = obj;
- objtail = obj;
- }
-}
-
-void
-delobj(Obj *obj)
-{
- free(obj->strtbl);
- free(obj->scnhdr);
- free(obj->filhdr);
- free(obj->fname);
- free(obj->member);
- free(obj);
-}
-
-Obj *
-newobj(char *fname, char *member, FILE *fp)
-{
- Obj *obj;
- char *s, *t;
- size_t len;
-
- len = strlen(fname);
- obj = malloc(sizeof(*obj));
- s = malloc(len) + 1;
- if (!obj || !s)
- outmem();
- memset(obj, 0, sizeof(*obj));
- obj->fname = memcpy(s, fname, len);
-
- if (!member) {
- obj->member = NULL;
- } else {
- len = strlen(member) + 1;
- if ((s = malloc(len)) == NULL)
- outmem();
- obj->member = memcpy(s, member, len);
- }
-
- obj->fp = fp;
- if ((obj->offset = ftell(fp)) == EOF) {
- fprintf(stderr, "ld: %s: %s\n", fname, strerror(errno));
- exit(1);
- }
-
- return obj;
-}
-
-Section *
-slookup(char *name)
-{
- char *s;
- Section *prev, *sp;
- size_t len = strlen(name);
-
- for (prev = sp = sectlst; sp; prev = sp, sp = sp->next) {
- if (!memcmp(sp->name, name, len))
- return sp;
- }
-
- sp = malloc(sizeof(*sp));
- s = malloc(len);
- if (!sp || !s)
- outmem();
- sp->name = s;
- sp->base = 0;
- sp->size = 0;
- sp->next = NULL;
-
- if (!prev)
- sectlst = sp;
- else
- prev->next = sp;
- numsects++;
-
- return sp;
-}
-
-static unsigned
-hash(char *s)
-{
- unsigned h, c;
-
- for (h = 0; c = *s; ++s)
- h = h*33 ^ c;
- return h & NR_SYM_HASH-1;
-}
-
-Symbol *
-lookup(char *name, int install)
-{
- unsigned h;
- char *s;
- size_t len;
- Symbol *sym;
-
- h = hash(name);
- for (sym = symtbl[h]; sym; sym = sym->hash) {
- s = sym->name;
- if (*name == *s && !strcmp(name, s))
- return sym;
- }
-
- if (!install)
- return NULL;
-
- len = strlen(name) + 1;
- sym = malloc(sizeof(*sym));
- s = malloc(len);
- if (!sym || !s)
- outmem();
- memset(sym, 0, sizeof(*sym));
- memcpy(s, name, len);
-
- sym->hash = symtbl[h];
- symtbl[h] = sym;
- sym->name = s;
- numsymbols++;
-
- return sym;
-}