From 61f9cb8c58aac0fcc283b2c352c7cc328bd62b8d Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Tue, 22 Jul 2025 15:23:28 -0400 Subject: oasm: Add encoding for BR instruction Signed-off-by: Ian Moffett --- usr.bin/oasm/include/oasm/emit.h | 1 + usr.bin/oasm/include/oasm/lex.h | 1 + 2 files changed, 2 insertions(+) (limited to 'usr.bin/oasm/include') 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' */ -- cgit v1.2.3