diff options
author | Ian Moffett <ian@osmora.org> | 2025-07-22 15:23:28 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-07-22 15:23:28 -0400 |
commit | 61f9cb8c58aac0fcc283b2c352c7cc328bd62b8d (patch) | |
tree | 96779b4c4b9fa7e0c86c256df0840b8f453078f4 /usr.bin/oasm/include | |
parent | ff5a77f6f2ee9e7086b0f2c16cf0752a2d105d33 (diff) |
oasm: Add encoding for BR 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.h | 1 | ||||
-rw-r--r-- | usr.bin/oasm/include/oasm/lex.h | 1 |
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 d289adb..dab63d0 100644 --- a/usr.bin/oasm/include/oasm/emit.h +++ b/usr.bin/oasm/include/oasm/emit.h @@ -61,6 +61,7 @@ #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 */ +#define OSMX64_BR 0x15 /* Branch */ /* * OSMX64 register definitions diff --git a/usr.bin/oasm/include/oasm/lex.h b/usr.bin/oasm/include/oasm/lex.h index 6ffaf79..62183e0 100644 --- a/usr.bin/oasm/include/oasm/lex.h +++ b/usr.bin/oasm/include/oasm/lex.h @@ -96,6 +96,7 @@ typedef enum { TT_MUL, /* 'mul' */ TT_DIV, /* 'div' */ TT_HLT, /* 'hlt' */ + TT_BR, /* 'br' */ /* Register ops */ TT_MOV, /* 'mov' */ |