From 0bdc05e791144c07c4fabd1b6eda6d998869562d Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Mon, 19 Feb 2024 17:49:24 +0100 Subject: [PATCH] Moved asmspetok enum to arch --- src/archs.h | 21 +++++++++++++++++++++ src/ulas.h | 11 ----------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/src/archs.h b/src/archs.h index 7a5342c..83b4e41 100644 --- a/src/archs.h +++ b/src/archs.h @@ -1,6 +1,13 @@ #ifndef ARCHS_H_ #define ARCHS_H_ +/** + * Insturction table: + * It is simply a table of all possible instructions for + * the architecture. + * 0 means the list has ended + */ + enum ulas_asmregs_sm83 { // r8 ULAS_REGSM83_B = 1, @@ -37,6 +44,20 @@ enum ulas_asmregs_sm83 { ULAS_SM83_REGS_LEN }; +// special asm tokens for instr enum +// TODO: add more expressions types such as e8, e16, e24, e32, e64 +// as well as the corresponding addresses +// Use ULAS_DATZERO if an actual byte is expected to appear in the assembly +// output (since 0 denotes the end of the list) +enum ulas_asmspetok { + ULAS_E8 = -1, + ULAS_E16 = -2, + // A8 is like E8, but it will not emit an overflow warning + // because it is commont to pass a 16-bit label as a value + ULAS_A8 = -3, + ULAS_DATZERO = 0xFF00 +}; + enum ulas_archs { ULAS_ARCH_SM83 }; struct ulas_arch { diff --git a/src/ulas.h b/src/ulas.h index 98b823d..747c5e1 100644 --- a/src/ulas.h +++ b/src/ulas.h @@ -422,17 +422,6 @@ enum ulas_asmdir { ULAS_ASMDIR_REP, }; -// special asm tokens for instr enum -// TODO: add more expressions types such as e8, e16, e24, e32, e64 -// as well as the corresponding addresses -enum ulas_asmspetok { - ULAS_E8 = -1, - ULAS_E16 = -2, - // A8 is like E8, but it will not emit an overflow warning - // because it is commont to pass a 16-bit label as a value - ULAS_A8 = -3, - ULAS_DATZERO = 0xFF00 -}; #define ULAS_INSTRTOKMAX 16 #define ULAS_INSTRDATMAX 16 -- 2.30.2