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 abi::BuiltinLibrary;pub use abi::BuiltinOverrideError;pub use regalloc::Allocation;pub use regalloc::GraphColorAllocator;pub use regalloc::LinearScanAllocator;pub use regalloc::LiveInterval;pub use regalloc::LocalRegisterAllocator;pub use regalloc::LocalRegisterAllocatorDyn;pub use regalloc::PhysRegConvertible;pub use regalloc::PhysRegHandle;pub use regalloc::RegisterAllocator;pub use regalloc::RegisterAllocatorDyn;pub use regalloc::intervals_interfere;pub use target_support::is_assembly_emission_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 aarch64::A64RegAlloc;pub use aarch64::AArch64ABI;pub use aarch64::FrameMap;pub use powerpc::Ppc64Abi;pub use powerpc::Ppc64Frame;pub use powerpc::Ppc64RegAlloc;pub use riscv::RiscVAbi;pub use riscv::RiscVFrame;pub use riscv::RiscVRegAlloc;pub use wasm::WasmABI;pub use wasm::WasmRegAlloc;pub use x86_64::X64RegAlloc;pub use x86_64::X86ABI;pub use x86_64::X86Frame;