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

@@ -2,6 +2,7 @@ use capstone::prelude::*;
use error::Error;
use std::fmt::Write;
#[allow(dead_code)]
pub fn disassemble(mem: &[u8]) -> Result<(), Error> {
let mut cs = Capstone::new()
.x86()