arch refactor + backend ir start
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user