Expand description
lamina-codegen - Codegen utilities for Lamina
This crate provides code generation utilities including register allocation, ABI handling, and frame management for various target architectures.
Cross-compilation is supported: pass the desired target (arch, OS) when creating ABI or regalloc; the generated code will follow that target’s ABI.
§Usage
use lamina_codegen::x86_64::{X64RegAlloc, X86ABI, X86Frame};
use lamina_platform::TargetOperatingSystem;
let abi = X86ABI::new(TargetOperatingSystem::Linux);
let regalloc = X64RegAlloc::new(TargetOperatingSystem::Windows);Re-exports§
pub use abi::Abi;pub use regalloc::Allocation;pub use regalloc::GraphColorAllocator;pub use regalloc::LinearScanAllocator;pub use regalloc::LiveInterval;pub use regalloc::PhysRegConvertible;pub use regalloc::PhysRegHandle;pub use regalloc::RegisterAllocator;pub use regalloc::intervals_interfere;pub use target_support::is_assembly_supported;pub use target_support::os_uses_coff;pub use target_support::os_uses_elf;pub use target_support::os_uses_macho;pub use target_support::supported_assembly_targets_hint;pub use x86_64::X64RegAlloc;pub use x86_64::X86ABI;pub use x86_64::X86Frame;