mod.rs 942 Bytes
Newer Older
1
pub mod inst_sel;
2
pub mod reg_alloc;
3
pub mod code_emission;
4

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

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

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

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

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

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