Generate binemit::emit_inst() functions.

Use the meta language encoding recipes to generate an emit_inst()
function for each ISA. The generated calls into recipe_*() functions
that must be implemented by hand.

Implement recipe_*() functions for the RISC-V recipes.

Add the TargetIsa::emit_inst() entry point which emits an instruction to
a CodeSink trait object.
This commit is contained in:
Jakob Stoklund Olesen
2017-03-27 16:11:54 -07:00
parent 19710af5b7
commit 0619d6f827
13 changed files with 183 additions and 9 deletions

View File

@@ -0,0 +1,6 @@
//! Emitting binary Intel machine code.
use binemit::{CodeSink, bad_encoding};
use ir::{Function, Inst};
include!(concat!(env!("OUT_DIR"), "/binemit-intel.rs"));