summaryrefslogtreecommitdiff
path: root/usr.bin/oasm/include
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-07-21 09:17:30 -0400
committerIan Moffett <ian@osmora.org>2025-07-21 09:17:30 -0400
commit3ab5f07bac34bc9de5b9038407353c707f3f4c2f (patch)
tree57b028642f4fc81d839994132eda2859d6255162 /usr.bin/oasm/include
parent60c8f4c34194fcec0e9e7d8da9cd1ad8b38707e7 (diff)
oasm: Parse and encode the "HLT" instruction
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'usr.bin/oasm/include')
-rw-r--r--usr.bin/oasm/include/oasm/emit.h1
-rw-r--r--usr.bin/oasm/include/oasm/lex.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/usr.bin/oasm/include/oasm/emit.h b/usr.bin/oasm/include/oasm/emit.h
index f4b4f77..b0a2fd1 100644
--- a/usr.bin/oasm/include/oasm/emit.h
+++ b/usr.bin/oasm/include/oasm/emit.h
@@ -60,6 +60,7 @@
#define OSMX64_SLL 0x11 /* Shift left logical operation */
#define OSMX64_SRL 0x12 /* Shift right logical operation */
#define OSMX64_MOV_IMM 0x13 /* Data move operation from IMM */
+#define OSMX64_HLT 0x14 /* Halt the processor */
/*
* OSMX64 register definitions
diff --git a/usr.bin/oasm/include/oasm/lex.h b/usr.bin/oasm/include/oasm/lex.h
index 28ad52c..6ffaf79 100644
--- a/usr.bin/oasm/include/oasm/lex.h
+++ b/usr.bin/oasm/include/oasm/lex.h
@@ -95,6 +95,7 @@ typedef enum {
TT_SUB, /* 'sub' */
TT_MUL, /* 'mul' */
TT_DIV, /* 'div' */
+ TT_HLT, /* 'hlt' */
/* Register ops */
TT_MOV, /* 'mov' */