ir: add initial ir translation module

Signed-off-by: Ronald Caesar <github43132@proton.me>
This commit is contained in:
Ronald Caesar
2026-01-12 18:56:01 -04:00
parent a15ed49f25
commit 35c88dd939
2 changed files with 32 additions and 0 deletions

View File

@@ -10,6 +10,7 @@
typedef uint64_t bal_instruction_t;
typedef uint16_t bal_instruction_count_t;
typedef uint16_t bal_ssa_id_t;
typedef uint8_t bal_bit_width_t;
typedef enum

31
src/bal_translator.h Normal file
View File

@@ -0,0 +1,31 @@
/** @file bal_translator.h
*
* @brief ARM to Ballistic IR Translation Interface.
*
* @details
*
* This module represents the frontend of Ballistic. It performas the following
* in a single pass:
*
* 1. Fetch
* 2. Decode
* 3. SSA Construction
*/
#ifndef BAL_TRANSLATOR_H
#define BAL_TRANSLATOR_H
#include "bal_engine.h"
#include "bal_types.h"
typedef struct
{
bal_instruction_t *instructions;
bal_bit_width_t *ssa_bit_widths;
bal_source_variable_t *source_variables;
size_t instruction_count;
} bal_translation_context_t;
#endif /* BAL_TRANSLATOR_H */
/*** end of file ***/