arch refactor + backend ir start

This commit is contained in:
2026-06-06 21:00:39 -04:00
parent 0ac7c5cc02
commit 4587f687b9
22 changed files with 547 additions and 661 deletions
+25
View File
@@ -0,0 +1,25 @@
mod asm;
mod encode;
mod reg;
#[cfg(test)]
mod test;
use crate::{
arch::Arch,
backend::{LinkedProgram, Program},
io::CompilerMsg,
};
pub use asm::*;
pub use encode::*;
pub use reg::*;
pub struct X86_64;
impl Arch for X86_64 {
const NAME: &str = "x86_64";
type Asm = Asm;
fn compile(p: &Program<Self>) -> Result<LinkedProgram, CompilerMsg> {
encode_program(p)
}
}