decoder/tools: Generate arm64 instruction size constant

Signed-off-by: Ronald Caesar <github43132@proton.me>
This commit is contained in:
Ronald Caesar
2025-12-08 16:03:01 -04:00
parent 4e42c9050b
commit c25abe080d
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -1,6 +1,8 @@
/* Generated header file */
#include <stdint.h>
#define BAL_DECODER_ARM64_INSTRUCTIONS_SIZE 2807
typedef struct
{
const char* mnemonic;
+1
View File
@@ -212,6 +212,7 @@ if __name__ == "__main__":
with open(out_file_header, "w") as f:
f.write(f"/* Generated header file */\n")
f.write("#include <stdint.h>\n\n")
f.write(f"#define BAL_DECODER_ARM64_INSTRUCTIONS_SIZE {len(all_instructions)}\n\n")
f.write(
"typedef struct \n{\n const char* mnemonic; \n uint32_t mask;\n uint32_t value;\n} bal_decoder_entry_t;\n"
)