diff options
Diffstat (limited to 'src/cmd/6a/lex.c')
-rw-r--r-- | src/cmd/6a/lex.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/cmd/6a/lex.c b/src/cmd/6a/lex.c index b4c7d0c2c..42f4b1d11 100644 --- a/src/cmd/6a/lex.c +++ b/src/cmd/6a/lex.c @@ -29,9 +29,10 @@ // THE SOFTWARE. #define EXTERN +#include <u.h> +#include <libc.h> #include "a.h" #include "y.tab.h" -#include <ctype.h> enum { @@ -169,6 +170,13 @@ assemble(char *file) struct { char *name; + /* + * type is the lexical type to return. It dictates what kind of + * operands 6a allows to follow it (in a.y) as the possible operand + * types are handled by a grammar. How do you know which LTYPE? + * Either read a.y or think of an instruction that has the same + * possible operands and look up what it takes. + */ ushort type; ushort value; } itab[] = @@ -519,6 +527,7 @@ struct "OUTSB", LTYPE0, AOUTSB, "OUTSL", LTYPE0, AOUTSL, "OUTSW", LTYPE0, AOUTSW, + "PAUSE", LTYPEN, APAUSE, "POPAL", LTYPE0, APOPAL, "POPAW", LTYPE0, APOPAW, "POPFL", LTYPE0, APOPFL, @@ -985,6 +994,8 @@ struct "UNPCKLPS", LTYPE3, AUNPCKLPS, "XORPD", LTYPE3, AXORPD, "XORPS", LTYPE3, AXORPS, + "CRC32B", LTYPE4, ACRC32B, + "CRC32Q", LTYPE4, ACRC32Q, 0 }; |