Compile a simple function (#2)

* Implement basics.

* Execute code

* Add wasm2wat test cases.

* abi_loc_for_arg for stack.

* Assert that sp_depth is 0 at the epilogue

* Do 32bit add.

* Assert that RAX can be used as a scratch register

* Reuse assembler.

* Align stack slots.
This commit is contained in:
Sergey Pepyakin
2018-11-08 22:56:27 +01:00
committed by Dan Gohman
parent d3bc26bc93
commit 08240761d5
9 changed files with 338 additions and 72 deletions

View File

@@ -8,6 +8,8 @@ extern crate wasmparser;
extern crate failure_derive;
extern crate dynasmrt;
extern crate wabt;
mod backend;
mod disassemble;
mod error;
@@ -15,4 +17,8 @@ mod function_body;
mod module;
mod translate_sections;
#[cfg(test)]
mod tests;
pub use module::translate;
pub use module::TranslatedModule;