mod.rs 919 Bytes
Newer Older
1
pub mod inst_sel;
2
pub mod reg_alloc;
3

qinsoon's avatar
qinsoon committed
4 5 6
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum RegGroup {GPR, FPR}

7
#[cfg(target_arch = "x86_64")]
8
#[path = "arch/x86_64/mod.rs"]
9 10
mod x86_64;

qinsoon's avatar
qinsoon committed
11
#[cfg(target_arch = "x86_64")]
qinsoon's avatar
qinsoon committed
12
pub use compiler::backend::x86_64::init_machine_regs_for_func;
qinsoon's avatar
qinsoon committed
13 14

#[cfg(target_arch = "x86_64")]
qinsoon's avatar
qinsoon committed
15
pub use compiler::backend::x86_64::number_of_regs_in_group;
qinsoon's avatar
qinsoon committed
16
#[cfg(target_arch = "x86_64")]
qinsoon's avatar
qinsoon committed
17 18 19
pub use compiler::backend::x86_64::number_of_all_regs;
#[cfg(target_arch = "x86_64")]
pub use compiler::backend::x86_64::all_regs;
20
#[cfg(target_arch = "x86_64")]
21 22
pub use compiler::backend::x86_64::all_usable_regs;
#[cfg(target_arch = "x86_64")]
23
pub use compiler::backend::x86_64::pick_group_for_reg;
qinsoon's avatar
qinsoon committed
24 25 26 27

#[cfg(target_arch = "arm")]
#[path = "arch/arm/mod.rs"]
mod arm;
qinsoon's avatar
qinsoon committed
28 29 30 31 32

#[cfg(target_arch = "arm")]
pub use compiler::backend::arm::GPR_COUNT;
#[cfg(target_arch = "arm")]
pub use compiler::backend::arm::FPR_COUNT;