Move encoding-related information into an EncInfo struct.
The tables returned by recipe_names() and recipe_constraints() are now collected into an EncInfo struct that is available from TargetIsa::encoding_info(). This is equivalent to the register bank tables available fro TargetIsa::register_info(). This cleans of the TargetIsa interface and makes it easier to add encoding-related information.
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
//! Encoding tables for RISC-V.
|
||||
|
||||
use ir::condcodes::IntCC;
|
||||
use ir::{Opcode, InstructionData};
|
||||
use ir::types;
|
||||
use predicates;
|
||||
use isa::enc_tables::{Level1Entry, Level2Entry};
|
||||
use ir::{Opcode, InstructionData};
|
||||
use isa::EncInfo;
|
||||
use isa::constraints::*;
|
||||
use isa::enc_tables::{Level1Entry, Level2Entry};
|
||||
use predicates;
|
||||
use super::registers::*;
|
||||
|
||||
// Include the generated encoding tables:
|
||||
@@ -13,4 +14,5 @@ use super::registers::*;
|
||||
// - `LEVEL1_RV64`
|
||||
// - `LEVEL2`
|
||||
// - `ENCLIST`
|
||||
// - `INFO`
|
||||
include!(concat!(env!("OUT_DIR"), "/encoding-riscv.rs"));
|
||||
|
||||
Reference in New Issue
Block a user