summaryrefslogtreecommitdiff
path: root/usr.bin/oasm/include
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/oasm/include')
-rw-r--r--usr.bin/oasm/include/oasm/lex.h1
-rw-r--r--usr.bin/oasm/include/oasm/state.h4
2 files changed, 5 insertions, 0 deletions
diff --git a/usr.bin/oasm/include/oasm/lex.h b/usr.bin/oasm/include/oasm/lex.h
index 62183e0..69e50a1 100644
--- a/usr.bin/oasm/include/oasm/lex.h
+++ b/usr.bin/oasm/include/oasm/lex.h
@@ -103,6 +103,7 @@ typedef enum {
TT_INC, /* 'inc' */
TT_DEC, /* 'dec' */
TT_IMM, /* #<n> */
+ TT_LABEL, /* 'label: ...' */
/* Register sets */
__XN_REGS, /* x0-x15 */
diff --git a/usr.bin/oasm/include/oasm/state.h b/usr.bin/oasm/include/oasm/state.h
index 5f58144..6dd2435 100644
--- a/usr.bin/oasm/include/oasm/state.h
+++ b/usr.bin/oasm/include/oasm/state.h
@@ -39,6 +39,8 @@
* OASM state:
*
* @filename: Filname of unit we are parsing
+ * @pip: Pseudo instruction pointer
+ * @label_ip: IP at current label start
* @in_fd: Input file descriptor
* @out_fd: Resulting binary output file descriptor
* @line: Current line number
@@ -46,6 +48,8 @@
*/
struct oasm_state {
char *filename;
+ off_t pip;
+ off_t label_ip;
int in_fd;
int out_fd;
off_t line;