diff options
-rw-r--r-- | usr.bin/oasm/include/oasm/lex.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/usr.bin/oasm/include/oasm/lex.h b/usr.bin/oasm/include/oasm/lex.h index 6688348..9e293e6 100644 --- a/usr.bin/oasm/include/oasm/lex.h +++ b/usr.bin/oasm/include/oasm/lex.h @@ -31,7 +31,8 @@ #define _OASM_LEX_H_ #include <stdint.h> -#include <oasm/state.h> + +struct oasm_state; #define __XN_REGS \ TT_X0, \ @@ -94,15 +95,16 @@ typedef enum { TT_DIV, /* 'div' */ /* Register ops */ - TT_MOV, - TT_INC, - TT_DEC, + TT_MOV, /* 'mov' */ + TT_INC, /* 'inc' */ + TT_DEC, /* 'dec' */ + TT_IMM, /* #<n> */ /* Register sets */ - __XN_REGS, - __FN_REGS, - __DN_REGS, - __VN_REGS, + __XN_REGS, /* x0-x15 */ + __FN_REGS, /* f0-f7 */ + __DN_REGS, /* d0-d7 */ + __VN_REGS, /* v0-v7 */ /* Symbols */ TT_COMMA, /* ',' */ @@ -110,6 +112,7 @@ typedef enum { struct oasm_token { tt_t type; + uint8_t is_reg : 1; char *raw; }; |