Generate register bank descriptions.

Use the information in the ISA's registers.py files to generate a
RegInfo Rust data structure.
This commit is contained in:
Jakob Stoklund Olesen
2016-11-22 10:51:42 -08:00
parent fd412b49e1
commit 353caf23cd
11 changed files with 232 additions and 2 deletions

View File

@@ -41,12 +41,14 @@
//! concurrent function compilations.
pub use isa::encoding::Encoding;
pub use isa::registers::{RegUnit, RegBank, RegInfo};
use settings;
use ir::{InstructionData, DataFlowGraph};
pub mod riscv;
mod encoding;
mod enc_tables;
mod registers;
/// Look for a supported ISA with the given `name`.
/// Return a builder that can create a corresponding `TargetIsa`.
@@ -108,6 +110,9 @@ pub trait TargetIsa {
/// Get the ISA-independent flags that were used to make this trait object.
fn flags(&self) -> &settings::Flags;
/// Get a data structure describing the registers in this ISA.
fn register_info(&self) -> &RegInfo;
/// Encode an instruction after determining it is legal.
///
/// If `inst` can legally be encoded in this ISA, produce the corresponding `Encoding` object.