Commit 7d018fc8 authored by Isaac Oscar Gariano's avatar Isaac Oscar Gariano

Manual merge of develop into swapstack

parent 7e8bd1a4
......@@ -689,9 +689,9 @@ macro_rules! emit_test {
$ty1: ident($in1: expr), $ty2: ident($in2: expr) RET $ty3: ident($out: expr),
) => {
typedef! (($vm) int1 = mu_int(1));
typedef! (($vm) int64t = mu_int(64));
constdef! (($vm) <int64t> int64_pass = Constant::Int(0));
constdef! (($vm) <int64t> int64_fail = Constant::Int(1));
typedef! (($vm) int32t = mu_int(32));
constdef! (($vm) <int32t> int64_pass = Constant::Int(0));
constdef! (($vm) <int32t> int64_fail = Constant::Int(1));
constdef! (($vm) <$ty1> f64_0 = Constant::$Arg1Type($in1));
constdef! (($vm) <$ty2> f64_1 = Constant::$Arg2Type($in2));
constdef! (($vm) <$ty3> f64_2 = Constant::$Arg3Type($out));
......@@ -728,7 +728,7 @@ macro_rules! emit_test {
cmp_res = CMPOP (CmpOp::$CMPType) result f64_2_local
);
ssa! (($vm, $tester_name) <int64t> blk_entry_ret);
ssa! (($vm, $tester_name) <int32t> blk_entry_ret);
inst! (($vm, $tester_name) blk_entry_inst_select:
blk_entry_ret = SELECT cmp_res int64_pass_local int64_fail_local
);
......@@ -740,7 +740,7 @@ macro_rules! emit_test {
THREADEXIT
);
define_block! (($vm, $tester_name) blk_entry(a, b) {
define_block! (($vm, $tester_name) blk_entry() {
blk_entry_call,
blk_entry_cmp,
blk_entry_inst_select,
......@@ -769,9 +769,9 @@ macro_rules! emit_test {
$ty1: ident($in1: expr) RET $ty3: ident($out: expr),
) => {
typedef! (($vm) int1 = mu_int(1));
typedef! (($vm) int64t = mu_int(64));
constdef! (($vm) <int64t> int64_pass = Constant::Int(0));
constdef! (($vm) <int64t> int64_fail = Constant::Int(1));
typedef! (($vm) int32t = mu_int(32));
constdef! (($vm) <int32t> int64_pass = Constant::Int(0));
constdef! (($vm) <int32t> int64_fail = Constant::Int(1));
constdef! (($vm) <$ty1> f64_0 = Constant::$Arg1Type($in1));
constdef! (($vm) <$ty3> f64_2 = Constant::$Arg3Type($out));
......@@ -802,7 +802,7 @@ macro_rules! emit_test {
cmp_res = CMPOP (CmpOp::$CMPType) result f64_2_local
);
ssa! (($vm, $tester_name) <int64t> blk_entry_ret);
ssa! (($vm, $tester_name) <int32t> blk_entry_ret);
inst! (($vm, $tester_name) blk_entry_inst_select:
blk_entry_ret = SELECT cmp_res int64_pass_local int64_fail_local
);
......@@ -813,7 +813,7 @@ macro_rules! emit_test {
inst! (($vm, $tester_name) blk_entry_inst_exit:
THREADEXIT
);
define_block! (($vm, $tester_name) blk_entry(a) {
define_block! (($vm, $tester_name) blk_entry() {
blk_entry_call,
blk_entry_cmp,
blk_entry_inst_select,
......@@ -838,9 +838,9 @@ macro_rules! emit_test {
RET $ty1: ident($in1: expr),
) => {
typedef! (($vm) int1 = mu_int(1));
typedef! (($vm) int64t = mu_int(64));
constdef! (($vm) <int64t> int64_pass = Constant::Int(0));
constdef! (($vm) <int64t> int64_fail = Constant::Int(1));
typedef! (($vm) int32t = mu_int(32));
constdef! (($vm) <int32t> int64_pass = Constant::Int(0));
constdef! (($vm) <int32t> int64_fail = Constant::Int(1));
constdef! (($vm) <$ty1> arg_0 = Constant::$Arg1Type($in1));
funcsig! (($vm) tester_sig = () -> ());
funcdecl! (($vm) <tester_sig> $test_name);
......@@ -868,7 +868,7 @@ macro_rules! emit_test {
cmp_res = CMPOP (CmpOp::$CMPType) result arg_0_local
);
ssa! (($vm, $tester_name) <int64t> blk_entry_ret);
ssa! (($vm, $tester_name) <int32t> blk_entry_ret);
inst! (($vm, $tester_name) blk_entry_inst_select:
blk_entry_ret = SELECT cmp_res int64_pass_local int64_fail_local
);
......@@ -903,9 +903,9 @@ macro_rules! emit_test {
$test_sig: ident,
) => {
typedef! (($vm) int1 = mu_int(1));
typedef! (($vm) int64t = mu_int(64));
constdef! (($vm) <int64t> int64_pass = Constant::Int(0));
constdef! (($vm) <int64t> int64_fail = Constant::Int(1));
typedef! (($vm) int32t = mu_int(32));
constdef! (($vm) <int32t> int64_pass = Constant::Int(0));
constdef! (($vm) <int32t> int64_fail = Constant::Int(1));
funcsig! (($vm) tester_sig = () -> ());
funcdecl! (($vm) <tester_sig> $test_name);
......@@ -966,9 +966,9 @@ macro_rules! emit_test {
RET $ty7: ident($out: expr),
) => {
typedef! (($vm) int1 = mu_int(1));
typedef! (($vm) int64t = mu_int(64));
constdef! (($vm) <int64t> int64_pass = Constant::Int(0));
constdef! (($vm) <int64t> int64_fail = Constant::Int(1));
typedef! (($vm) int32t = mu_int(32));
constdef! (($vm) <int32t> int64_pass = Constant::Int(0));
constdef! (($vm) <int32t> int64_fail = Constant::Int(1));
constdef! (($vm) <$ty1> arg_0 = Constant::$Arg1Type($in1));
constdef! (($vm) <$ty2> arg_1 = Constant::$Arg2Type($in2));
constdef! (($vm) <$ty3> arg_2 = Constant::$Arg3Type($in3));
......@@ -1018,7 +1018,7 @@ macro_rules! emit_test {
cmp_res = CMPOP (CmpOp::$CMPType) result arg_6_local
);
ssa! (($vm, $tester_name) <int64t> blk_entry_ret);
ssa! (($vm, $tester_name) <int32t> blk_entry_ret);
inst! (($vm, $tester_name) blk_entry_inst_select:
blk_entry_ret = SELECT cmp_res int64_pass_local int64_fail_local
);
......@@ -1030,7 +1030,7 @@ macro_rules! emit_test {
THREADEXIT
);
define_block! (($vm, $tester_name) blk_entry(a, b, c, d, e, f) {
define_block! (($vm, $tester_name) blk_entry() {
blk_entry_call,
blk_entry_cmp,
blk_entry_inst_select,
......@@ -1058,9 +1058,9 @@ macro_rules! emit_test {
RET $ty4: ident($out: expr),
) => {
typedef! (($vm) int1 = mu_int(1));
typedef! (($vm) int64t = mu_int(64));
constdef! (($vm) <int64t> int64_pass = Constant::Int(0));
constdef! (($vm) <int64t> int64_fail = Constant::Int(1));
typedef! (($vm) int32t = mu_int(32));
constdef! (($vm) <int32t> int64_pass = Constant::Int(0));
constdef! (($vm) <int32t> int64_fail = Constant::Int(1));
constdef! (($vm) <$ty1> arg_0 = Constant::$Arg1Type($in1));
constdef! (($vm) <$ty2> arg_1 = Constant::$Arg2Type($in2));
constdef! (($vm) <$ty2> arg_2 = Constant::$Arg3Type($in3));
......@@ -1100,7 +1100,7 @@ macro_rules! emit_test {
cmp_res = CMPOP (CmpOp::$CMPType) result arg_3_local
);
ssa! (($vm, $tester_name) <int64t> blk_entry_ret);
ssa! (($vm, $tester_name) <int32t> blk_entry_ret);
inst! (($vm, $tester_name) blk_entry_inst_select:
blk_entry_ret = SELECT cmp_res int64_pass_local int64_fail_local
);
......@@ -1112,7 +1112,7 @@ macro_rules! emit_test {
THREADEXIT
);
define_block! (($vm, $tester_name) blk_entry(a, b) {
define_block! (($vm, $tester_name) blk_entry() {
blk_entry_call,
blk_entry_cmp,
blk_entry_inst_select,
......
......@@ -131,31 +131,31 @@ fn test_pass_1arg_by_stack() {
fn pass_1arg_by_stack() -> VM {
let vm = VM::new_with_opts("init_mu --disable-inline");
typedef!((vm) int64 = mu_int(64));
typedef! ((vm) int64 = mu_int(64));
constdef!((vm) <int64> int64_0 = Constant::Int(0));
constdef!((vm) <int64> int64_1 = Constant::Int(1));
constdef!((vm) <int64> int64_2 = Constant::Int(2));
constdef! ((vm) <int64> int64_0 = Constant::Int(0));
constdef! ((vm) <int64> int64_1 = Constant::Int(1));
constdef! ((vm) <int64> int64_2 = Constant::Int(2));
// foo7
funcsig!((vm) foo7_sig = (int64, int64, int64, int64, int64, int64, int64, int64, int64)
funcsig! ((vm) foo7_sig = (int64, int64, int64, int64, int64, int64, int64, int64, int64)
-> (int64));
funcdecl!((vm) <foo7_sig> foo7);
funcdef!((vm) <foo7_sig> foo7 VERSION foo7_v1);
funcdecl! ((vm) <foo7_sig> foo7);
funcdef! ((vm) <foo7_sig> foo7 VERSION foo7_v1);
// blk_entry
ssa!((vm, foo7_v1) <int64> v0);
ssa!((vm, foo7_v1) <int64> v1);
ssa!((vm, foo7_v1) <int64> v2);
ssa!((vm, foo7_v1) <int64> v3);
ssa!((vm, foo7_v1) <int64> v4);
ssa!((vm, foo7_v1) <int64> v5);
ssa!((vm, foo7_v1) <int64> v6);
ssa!((vm, foo7_v1) <int64> v7);
ssa!((vm, foo7_v1) <int64> v8);
block!((vm, foo7_v1) blk_entry);
inst!((vm, foo7_v1) blk_entry_ret:
ssa! ((vm, foo7_v1) <int64> v0);
ssa! ((vm, foo7_v1) <int64> v1);
ssa! ((vm, foo7_v1) <int64> v2);
ssa! ((vm, foo7_v1) <int64> v3);
ssa! ((vm, foo7_v1) <int64> v4);
ssa! ((vm, foo7_v1) <int64> v5);
ssa! ((vm, foo7_v1) <int64> v6);
ssa! ((vm, foo7_v1) <int64> v7);
ssa! ((vm, foo7_v1) <int64> v8);
block! ((vm, foo7_v1) blk_entry);
inst! ((vm, foo7_v1) blk_entry_ret:
RET (v8)
);
......@@ -166,20 +166,20 @@ fn pass_1arg_by_stack() -> VM {
define_func_ver!((vm) foo7_v1 (entry: blk_entry) {blk_entry});
// pass_1arg_by_stack
funcsig!((vm) sig = () -> (int64));
funcdecl!((vm) <sig> pass_1arg_by_stack);
funcdef!((vm) <sig> pass_1arg_by_stack VERSION pass_1arg_by_stack_v1);
funcsig! ((vm) sig = () -> (int64));
funcdecl! ((vm) <sig> pass_1arg_by_stack);
funcdef! ((vm) <sig> pass_1arg_by_stack VERSION pass_1arg_by_stack_v1);
typedef!((vm) type_funcref_foo7 = mu_funcref(foo7_sig));
constdef!((vm) <type_funcref_foo7> const_funcref_foo7 = Constant::FuncRef(vm.id_of("foo7")));
typedef! ((vm) type_funcref_foo7 = mu_funcref(foo7_sig));
constdef! ((vm) <type_funcref_foo7> const_funcref_foo7 = Constant::FuncRef(vm.id_of("foo7")));
// blk_entry
consta!((vm, pass_1arg_by_stack_v1) int64_0_local = int64_0);
consta!((vm, pass_1arg_by_stack_v1) int64_1_local = int64_1);
consta! ((vm, pass_1arg_by_stack_v1) int64_0_local = int64_0);
consta! ((vm, pass_1arg_by_stack_v1) int64_1_local = int64_1);
block!((vm, pass_1arg_by_stack_v1) blk_entry);
block!((vm, pass_1arg_by_stack_v1) blk_main);
inst!((vm, pass_1arg_by_stack_v1) blk_entry_branch:
block! ((vm, pass_1arg_by_stack_v1) blk_entry);
block! ((vm, pass_1arg_by_stack_v1) blk_main);
inst! ((vm, pass_1arg_by_stack_v1) blk_entry_branch:
BRANCH blk_main (
int64_0_local,
int64_0_local,
......@@ -197,25 +197,25 @@ fn pass_1arg_by_stack() -> VM {
define_block!((vm, pass_1arg_by_stack_v1) blk_entry() {blk_entry_branch});
// blk_main
ssa!((vm, pass_1arg_by_stack_v1) <int64> a0);
ssa!((vm, pass_1arg_by_stack_v1) <int64> a1);
ssa!((vm, pass_1arg_by_stack_v1) <int64> a2);
ssa!((vm, pass_1arg_by_stack_v1) <int64> a3);
ssa!((vm, pass_1arg_by_stack_v1) <int64> a4);
ssa!((vm, pass_1arg_by_stack_v1) <int64> a5);
ssa!((vm, pass_1arg_by_stack_v1) <int64> a6);
ssa!((vm, pass_1arg_by_stack_v1) <int64> a7);
ssa!((vm, pass_1arg_by_stack_v1) <int64> a8);
consta!((vm, pass_1arg_by_stack_v1) const_funcref_foo7_local = const_funcref_foo7);
ssa!((vm, pass_1arg_by_stack_v1) <int64> retval);
inst!((vm, pass_1arg_by_stack_v1) blk_main_call:
ssa! ((vm, pass_1arg_by_stack_v1) <int64> a0);
ssa! ((vm, pass_1arg_by_stack_v1) <int64> a1);
ssa! ((vm, pass_1arg_by_stack_v1) <int64> a2);
ssa! ((vm, pass_1arg_by_stack_v1) <int64> a3);
ssa! ((vm, pass_1arg_by_stack_v1) <int64> a4);
ssa! ((vm, pass_1arg_by_stack_v1) <int64> a5);
ssa! ((vm, pass_1arg_by_stack_v1) <int64> a6);
ssa! ((vm, pass_1arg_by_stack_v1) <int64> a7);
ssa! ((vm, pass_1arg_by_stack_v1) <int64> a8);
consta! ((vm, pass_1arg_by_stack_v1) const_funcref_foo7_local = const_funcref_foo7);
ssa! ((vm, pass_1arg_by_stack_v1) <int64> retval);
inst! ((vm, pass_1arg_by_stack_v1) blk_main_call:
retval =
EXPRCALL (CallConvention::Mu, is_abort: false)
const_funcref_foo7_local (a0, a1, a2, a3, a4, a5, a6, a7, a8)
);
inst!((vm, pass_1arg_by_stack_v1) blk_main_ret:
inst! ((vm, pass_1arg_by_stack_v1) blk_main_ret:
RET (retval)
);
......@@ -230,7 +230,7 @@ fn pass_1arg_by_stack() -> VM {
});
emit_test!((vm)
pass_1arg_by_stack pass_1arg_by_stack_test1 pass_1arg_by_stack_test1_v1,
pass_1arg_by_stack, pass_1arg_by_stack_test1, pass_1arg_by_stack_test1_v1,
RET Int,
EQ,
sig,
......@@ -244,28 +244,28 @@ fn pass_1arg_by_stack() -> VM {
fn pass_1arg_by_stack() -> VM {
let vm = VM::new_with_opts("init_mu --disable-inline");
typedef!((vm) int64 = mu_int(64));
typedef! ((vm) int64 = mu_int(64));
constdef!((vm) <int64> int64_0 = Constant::Int(0));
constdef!((vm) <int64> int64_1 = Constant::Int(1));
constdef!((vm) <int64> int64_2 = Constant::Int(2));
constdef! ((vm) <int64> int64_0 = Constant::Int(0));
constdef! ((vm) <int64> int64_1 = Constant::Int(1));
constdef! ((vm) <int64> int64_2 = Constant::Int(2));
// foo7
funcsig!((vm) foo7_sig = (int64, int64, int64, int64, int64, int64, int64) -> (int64));
funcdecl!((vm) <foo7_sig> foo7);
funcdef!((vm) <foo7_sig> foo7 VERSION foo7_v1);
funcsig! ((vm) foo7_sig = (int64, int64, int64, int64, int64, int64, int64) -> (int64));
funcdecl! ((vm) <foo7_sig> foo7);
funcdef! ((vm) <foo7_sig> foo7 VERSION foo7_v1);
// blk_entry
ssa!((vm, foo7_v1) <int64> v0);
ssa!((vm, foo7_v1) <int64> v1);
ssa!((vm, foo7_v1) <int64> v2);
ssa!((vm, foo7_v1) <int64> v3);
ssa!((vm, foo7_v1) <int64> v4);
ssa!((vm, foo7_v1) <int64> v5);
ssa!((vm, foo7_v1) <int64> v6);
block!((vm, foo7_v1) blk_entry);
inst!((vm, foo7_v1) blk_entry_ret:
ssa! ((vm, foo7_v1) <int64> v0);
ssa! ((vm, foo7_v1) <int64> v1);
ssa! ((vm, foo7_v1) <int64> v2);
ssa! ((vm, foo7_v1) <int64> v3);
ssa! ((vm, foo7_v1) <int64> v4);
ssa! ((vm, foo7_v1) <int64> v5);
ssa! ((vm, foo7_v1) <int64> v6);
block! ((vm, foo7_v1) blk_entry);
inst! ((vm, foo7_v1) blk_entry_ret:
RET (v6)
);
......@@ -276,20 +276,20 @@ fn pass_1arg_by_stack() -> VM {
define_func_ver!((vm) foo7_v1 (entry: blk_entry) {blk_entry});
// pass_1arg_by_stack
funcsig!((vm) sig = () -> (int64));
funcdecl!((vm) <sig> pass_1arg_by_stack);
funcdef!((vm) <sig> pass_1arg_by_stack VERSION pass_1arg_by_stack_v1);
funcsig! ((vm) sig = () -> (int64));
funcdecl! ((vm) <sig> pass_1arg_by_stack);
funcdef! ((vm) <sig> pass_1arg_by_stack VERSION pass_1arg_by_stack_v1);
typedef!((vm) type_funcref_foo7 = mu_funcref(foo7_sig));
constdef!((vm) <type_funcref_foo7> const_funcref_foo7 = Constant::FuncRef(vm.id_of("foo7")));
typedef! ((vm) type_funcref_foo7 = mu_funcref(foo7_sig));
constdef! ((vm) <type_funcref_foo7> const_funcref_foo7 = Constant::FuncRef(vm.id_of("foo7")));
// blk_entry
consta!((vm, pass_1arg_by_stack_v1) int64_0_local = int64_0);
consta!((vm, pass_1arg_by_stack_v1) int64_1_local = int64_1);
consta! ((vm, pass_1arg_by_stack_v1) int64_0_local = int64_0);
consta! ((vm, pass_1arg_by_stack_v1) int64_1_local = int64_1);
block!((vm, pass_1arg_by_stack_v1) blk_entry);
block!((vm, pass_1arg_by_stack_v1) blk_main);
inst!((vm, pass_1arg_by_stack_v1) blk_entry_branch:
block! ((vm, pass_1arg_by_stack_v1) blk_entry);
block! ((vm, pass_1arg_by_stack_v1) blk_main);
inst! ((vm, pass_1arg_by_stack_v1) blk_entry_branch:
BRANCH blk_main (
int64_0_local,
int64_0_local,
......@@ -305,23 +305,23 @@ fn pass_1arg_by_stack() -> VM {
define_block!((vm, pass_1arg_by_stack_v1) blk_entry() {blk_entry_branch});
// blk_main
ssa!((vm, pass_1arg_by_stack_v1) <int64> a0);
ssa!((vm, pass_1arg_by_stack_v1) <int64> a1);
ssa!((vm, pass_1arg_by_stack_v1) <int64> a2);
ssa!((vm, pass_1arg_by_stack_v1) <int64> a3);
ssa!((vm, pass_1arg_by_stack_v1) <int64> a4);
ssa!((vm, pass_1arg_by_stack_v1) <int64> a5);
ssa!((vm, pass_1arg_by_stack_v1) <int64> a6);
consta!((vm, pass_1arg_by_stack_v1) const_funcref_foo7_local = const_funcref_foo7);
ssa!((vm, pass_1arg_by_stack_v1) <int64> retval);
inst!((vm, pass_1arg_by_stack_v1) blk_main_call:
ssa! ((vm, pass_1arg_by_stack_v1) <int64> a0);
ssa! ((vm, pass_1arg_by_stack_v1) <int64> a1);
ssa! ((vm, pass_1arg_by_stack_v1) <int64> a2);
ssa! ((vm, pass_1arg_by_stack_v1) <int64> a3);
ssa! ((vm, pass_1arg_by_stack_v1) <int64> a4);
ssa! ((vm, pass_1arg_by_stack_v1) <int64> a5);
ssa! ((vm, pass_1arg_by_stack_v1) <int64> a6);
consta! ((vm, pass_1arg_by_stack_v1) const_funcref_foo7_local = const_funcref_foo7);
ssa! ((vm, pass_1arg_by_stack_v1) <int64> retval);
inst! ((vm, pass_1arg_by_stack_v1) blk_main_call:
retval =
EXPRCALL (CallConvention::Mu, is_abort: false)
const_funcref_foo7_local (a0, a1, a2, a3, a4, a5, a6)
);
inst!((vm, pass_1arg_by_stack_v1) blk_main_ret:
inst! ((vm, pass_1arg_by_stack_v1) blk_main_ret:
RET (retval)
);
......@@ -335,12 +335,12 @@ fn pass_1arg_by_stack() -> VM {
blk_main
});
emit_test!((vm)
pass_1arg_by_stack, pass_1arg_by_stack_test1, pass_1arg_by_stack_test1_v1,
RET Int,
EQ,
sig,
RET int64(1u64),
emit_test! ((vm)
pass_1arg_by_stack, pass_1arg_by_stack_test1, pass_1arg_by_stack_test1_v1,
RET Int,
EQ,
sig,
RET int64(1u64),
);
vm
......@@ -356,32 +356,32 @@ fn test_pass_2args_by_stack() {
fn pass_2args_by_stack() -> VM {
let vm = VM::new_with_opts("init_mu --disable-inline");
typedef!((vm) int64 = mu_int(64));
typedef! ((vm) int64 = mu_int(64));
constdef!((vm) <int64> int64_0 = Constant::Int(0));
constdef!((vm) <int64> int64_1 = Constant::Int(1));
constdef!((vm) <int64> int64_2 = Constant::Int(2));
constdef! ((vm) <int64> int64_0 = Constant::Int(0));
constdef! ((vm) <int64> int64_1 = Constant::Int(1));
constdef! ((vm) <int64> int64_2 = Constant::Int(2));
// foo8
funcsig!((vm) foo8_sig = (int64, int64, int64, int64, int64,
funcsig! ((vm) foo8_sig = (int64, int64, int64, int64, int64,
int64, int64, int64, int64, int64) -> (int64));
funcdecl!((vm) <foo8_sig> foo8);
funcdef!((vm) <foo8_sig> foo8 VERSION foo8_v1);
funcdecl! ((vm) <foo8_sig> foo8);
funcdef! ((vm) <foo8_sig> foo8 VERSION foo8_v1);
// blk_entry
ssa!((vm, foo8_v1) <int64> v0);
ssa!((vm, foo8_v1) <int64> v1);
ssa!((vm, foo8_v1) <int64> v2);
ssa!((vm, foo8_v1) <int64> v3);
ssa!((vm, foo8_v1) <int64> v4);
ssa!((vm, foo8_v1) <int64> v5);
ssa!((vm, foo8_v1) <int64> v6);
ssa!((vm, foo8_v1) <int64> v7);
ssa!((vm, foo8_v1) <int64> v8);
ssa!((vm, foo8_v1) <int64> v9);
block!((vm, foo8_v1) blk_entry);
inst!((vm, foo8_v1) blk_entry_ret:
ssa! ((vm, foo8_v1) <int64> v0);
ssa! ((vm, foo8_v1) <int64> v1);
ssa! ((vm, foo8_v1) <int64> v2);
ssa! ((vm, foo8_v1) <int64> v3);
ssa! ((vm, foo8_v1) <int64> v4);
ssa! ((vm, foo8_v1) <int64> v5);
ssa! ((vm, foo8_v1) <int64> v6);
ssa! ((vm, foo8_v1) <int64> v7);
ssa! ((vm, foo8_v1) <int64> v8);
ssa! ((vm, foo8_v1) <int64> v9);
block! ((vm, foo8_v1) blk_entry);
inst! ((vm, foo8_v1) blk_entry_ret:
RET (v9)
);
......@@ -392,21 +392,21 @@ fn pass_2args_by_stack() -> VM {
define_func_ver!((vm) foo8_v1 (entry: blk_entry) {blk_entry});
// pass_2args_by_stack
funcsig!((vm) sig = () -> (int64));
funcdecl!((vm) <sig> pass_2args_by_stack);
funcdef!((vm) <sig> pass_2args_by_stack VERSION pass_2args_by_stack_v1);
funcsig! ((vm) sig = () -> (int64));
funcdecl! ((vm) <sig> pass_2args_by_stack);
funcdef! ((vm) <sig> pass_2args_by_stack VERSION pass_2args_by_stack_v1);
typedef!((vm) type_funcref_foo8 = mu_funcref(foo8_sig));
constdef!((vm) <type_funcref_foo8> const_funcref_foo8 = Constant::FuncRef(vm.id_of("foo8")));
typedef! ((vm) type_funcref_foo8 = mu_funcref(foo8_sig));
constdef! ((vm) <type_funcref_foo8> const_funcref_foo8 = Constant::FuncRef(vm.id_of("foo8")));
// blk_entry
consta!((vm, pass_2args_by_stack_v1) int64_0_local = int64_0);
consta!((vm, pass_2args_by_stack_v1) int64_1_local = int64_1);
consta!((vm, pass_2args_by_stack_v1) int64_2_local = int64_2);
consta! ((vm, pass_2args_by_stack_v1) int64_0_local = int64_0);
consta! ((vm, pass_2args_by_stack_v1) int64_1_local = int64_1);
consta! ((vm, pass_2args_by_stack_v1) int64_2_local = int64_2);
block!((vm, pass_2args_by_stack_v1) blk_entry);
block!((vm, pass_2args_by_stack_v1) blk_main);
inst!((vm, pass_2args_by_stack_v1) blk_entry_branch:
block! ((vm, pass_2args_by_stack_v1) blk_entry);
block! ((vm, pass_2args_by_stack_v1) blk_main);
inst! ((vm, pass_2args_by_stack_v1) blk_entry_branch:
BRANCH blk_main (
int64_0_local,
int64_0_local,
......@@ -425,20 +425,20 @@ fn pass_2args_by_stack() -> VM {
define_block!((vm, pass_2args_by_stack_v1) blk_entry() {blk_entry_branch});
// blk_main
ssa!((vm, pass_2args_by_stack_v1) <int64> a0);
ssa!((vm, pass_2args_by_stack_v1) <int64> a1);
ssa!((vm, pass_2args_by_stack_v1) <int64> a2);
ssa!((vm, pass_2args_by_stack_v1) <int64> a3);
ssa!((vm, pass_2args_by_stack_v1) <int64> a4);
ssa!((vm, pass_2args_by_stack_v1) <int64> a5);
ssa!((vm, pass_2args_by_stack_v1) <int64> a6);
ssa!((vm, pass_2args_by_stack_v1) <int64> a7);
ssa!((vm, pass_2args_by_stack_v1) <int64> a8);
ssa!((vm, pass_2args_by_stack_v1) <int64> a9);
consta!((vm, pass_2args_by_stack_v1) const_funcref_foo8_local = const_funcref_foo8);
ssa!((vm, pass_2args_by_stack_v1) <int64> retval);
inst!((vm, pass_2args_by_stack_v1) blk_main_call:
ssa! ((vm, pass_2args_by_stack_v1) <int64> a0);
ssa! ((vm, pass_2args_by_stack_v1) <int64> a1);
ssa! ((vm, pass_2args_by_stack_v1) <int64> a2);
ssa! ((vm, pass_2args_by_stack_v1) <int64> a3);
ssa! ((vm, pass_2args_by_stack_v1) <int64> a4);
ssa! ((vm, pass_2args_by_stack_v1) <int64> a5);
ssa! ((vm, pass_2args_by_stack_v1) <int64> a6);
ssa! ((vm, pass_2args_by_stack_v1) <int64> a7);
ssa! ((vm, pass_2args_by_stack_v1) <int64> a8);
ssa! ((vm, pass_2args_by_stack_v1) <int64> a9);
consta! ((vm, pass_2args_by_stack_v1) const_funcref_foo8_local = const_funcref_foo8);
ssa! ((vm, pass_2args_by_stack_v1) <int64> retval);
inst! ((vm, pass_2args_by_stack_v1) blk_main_call:
retval =
EXPRCALL (CallConvention::Mu, is_abort: false)
const_funcref_foo8_local (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)
......@@ -459,7 +459,7 @@ fn pass_2args_by_stack() -> VM {
});
emit_test!((vm)
pass_2args_by_stack pass_2args_by_stack_test1 pass_2args_by_stack_test1_v1,
pass_2args_by_stack, pass_2args_by_stack_test1, pass_2args_by_stack_test1_v1,
RET Int,
EQ,
sig,
......@@ -473,30 +473,30 @@ fn pass_2args_by_stack() -> VM {
fn pass_2args_by_stack() -> VM {
let vm = VM::new_with_opts("init_mu --disable-inline");
typedef!((vm) int64 = mu_int(64));
typedef! ((vm) int64 = mu_int(64));
constdef!((vm) <int64> int64_0 = Constant::Int(0));
constdef!((vm) <int64> int64_1 = Constant::Int(1));
constdef!((vm) <int64> int64_2 = Constant::Int(2));
constdef! ((vm) <int64> int64_0 = Constant::Int(0));
constdef! ((vm) <int64> int64_1 = Constant::Int(1));
constdef! ((vm) <int64> int64_2 = Constant::Int(2));
// foo8
funcsig!((vm) foo8_sig = (int64, int64, int64, int64, int64, int64, int64, int64)
funcsig! ((vm) foo8_sig = (int64, int64, int64, int64, int64, int64, int64, int64)
-> (int64));
funcdecl!((vm) <foo8_sig> foo8);
funcdef!((vm) <foo8_sig> foo8 VERSION foo8_v1);
funcdecl! ((vm) <foo8_sig> foo8);
funcdef! ((vm) <foo8_sig> foo8 VERSION foo8_v1);
// blk_entry
ssa!((vm, foo8_v1) <int64> v0);
ssa!((vm, foo8_v1) <int64> v1);
ssa!((vm, foo8_v1) <int64> v2);
ssa!((vm, foo8_v1) <int64> v3);
ssa!((vm, foo8_v1) <int64> v4);
ssa!((vm, foo8_v1) <int64> v5);
ssa!((vm, foo8_v1) <int64> v6);
ssa!((vm, foo8_v1) <int64> v7);
block!((vm, foo8_v1) blk_entry);
inst!((vm, foo8_v1) blk_entry_ret:
ssa! ((vm, foo8_v1) <int64> v0);
ssa! ((vm, foo8_v1) <int64> v1);
ssa! ((vm, foo8_v1) <int64> v2);
ssa! ((vm, foo8_v1) <int64> v3);
ssa! ((vm, foo8_v1) <int64> v4);
ssa! ((vm, foo8_v1) <int64> v5);
ssa! ((vm, foo8_v1) <int64> v6);
ssa! ((vm, foo8_v1) <int64> v7);
block! ((vm, foo8_v1) blk_entry);
inst! ((vm, foo8_v1) blk_entry_ret:
RET (v7)
);
......@@ -507,21 +507,21 @@ fn pass_2args_by_stack() -> VM {
define_func_ver!((vm) foo8_v1 (entry: blk_entry) {blk_entry});
// pass_2args_by_stack
funcsig!((vm) sig = () -> (int64));
funcdecl!((vm) <sig> pass_2args_by_stack);
funcdef!((vm) <sig> pass_2args_by_stack VERSION pass_2args_by_stack_v1);
funcsig! ((vm) sig = () -> (int64));
funcdecl! ((vm) <sig> pass_2args_by_stack);
funcdef! ((vm) <sig> pass_2args_by_stack VERSION pass_2args_by_stack_v1);
typedef!((vm) type_funcref_foo8 = mu_funcref(foo8_sig));
constdef!((vm) <type_funcref_foo8> const_funcref_foo8 = Constant::FuncRef(vm.id_of("foo8")));
typedef! ((vm) type_funcref_foo8 = mu_funcref(foo8_sig));
constdef! ((vm) <type_funcref_foo8> const_funcref_foo8 = Constant::FuncRef(vm.id_of("foo8")));
// blk_entry
consta!((vm, pass_2args_by_stack_v1) int64_0_local = int64_0);
consta!((vm, pass_2args_by_stack_v1) int64_1_local = int64_1);
consta!((vm, pass_2args_by_stack_v1) int64_2_local = int64_2);
consta! ((vm, pass_2args_by_stack_v1) int64_0_local = int64_0);
consta! ((vm, pass_2args_by_stack_v1) int64_1_local = int64_1);
consta! ((vm, pass_2args_by_stack_v1) int64_2_local = int64_2);
block!((vm, pass_2args_by_stack_v1) blk_entry);
block!((vm, pass_2args_by_stack_v1) blk_main);
inst!((vm, pass_2args_by_stack_v1) blk_entry_branch:
block! ((vm, pass_2args_by_stack_v1) blk_entry);
block! ((vm, pass_2args_by_stack_v1) blk_main);
inst! ((vm, pass_2args_by_stack_v1) blk_entry_branch:
BRANCH blk_main (
int64_0_local,
int64_0_local,
......@@ -538,18 +538,18 @@ fn pass_2args_by_stack() -> VM {
define_block!((vm, pass_2args_by_stack_v1) blk_entry() {blk_entry_branch});
// blk_main
ssa!((vm, pass_2args_by_stack_v1) <int64> a0);
ssa!((vm, pass_2args_by_stack_v1) <int64> a1);
ssa!((vm, pass_2args_by_stack_v1) <int64> a2);
ssa!((vm, pass_2args_by_stack_v1) <int64> a3);
ssa!((vm, pass_2args_by_stack_v1) <int64> a4);
ssa!((vm, pass_2args_by_stack_v1) <int64> a5);
ssa!((vm, pass_2args_by_stack_v1) <int64> a6);
ssa!((vm, pass_2args_by_stack_v1) <int64> a7);
consta!((vm, pass_2args_by_stack_v1) const_funcref_foo8_local = const_funcref_foo8);
ssa!((vm, pass_2args_by_stack_v1) <int64> retval);
inst!((vm, pass_2args_by_stack_v1) blk_main_call:
ssa! ((vm, pass_2args_by_stack_v1) <int64> a0);
ssa! ((vm, pass_2args_by_stack_v1) <int64> a1);
ssa! ((vm, pass_2args_by_stack_v1) <int64> a2);
ssa! ((vm, pass_2args_by_stack_v1) <int64> a3);
ssa! ((vm, pass_2args_by_stack_v1) <int64> a4);
ssa! ((vm, pass_2args_by_stack_v1) <int64> a5);
ssa! ((vm, pass_2args_by_stack_v1) <int64> a6);
ssa! ((vm, pass_2args_by_stack_v1) <int64> a7);
consta! ((vm, pass_2args_by_stack_v1) const_funcref_foo8_local = const_funcref_foo8);
ssa! ((vm, pass_2args_by_stack_v1) <int64> retval);
inst! ((vm, pass_2args_by_stack_v1) blk_main_call:
retval =
EXPRCALL (CallConvention::Mu, is_abort: false)
const_funcref_foo8_local (a0, a1, a2, a3, a4, a5, a6, a7)
......@@ -589,40 +589,40 @@ fn test_pass_2_int8_args_by_stack() {
fn pass_2_int8_args_by_stack() -> VM {
let vm = VM::new_with_opts("init_mu --disable-inline");
typedef!((vm) int64 = mu_int(64));
typedef!((vm) int8 = mu_int(8));
typedef! ((vm) int64 = mu_int(64));
typedef! ((vm) int8 = mu_int(8));
constdef!((vm) <int64> int64_0 = Constant::Int(0));
constdef!((vm) <int64> int64_1 = Constant::Int(1));
constdef!((vm) <int64> int64_2 = Constant::Int(2));
constdef!((vm) <int8> int8_1 = Constant::Int(1));
constdef!((vm) <int8> int8_2 = Constant::Int(2));
constdef! ((vm) <int64> int64_0 = Constant::Int(0));
constdef! ((vm) <int64> int64_1 = Constant::Int(1));
constdef! ((vm) <int64> int64_2 = Constant::Int(2));
constdef! ((vm) <int8> int8_1 = Constant::Int(1));
constdef! ((vm) <int8> int8_2 = Constant::Int(2));
// foo8
funcsig!((vm) foo8_sig = (int64, int64, int64, int64, int64,
funcsig! ((vm) foo8_sig = (int64, int64, int64, int64, int64,
int64, int64, int64, int8, int8) -> (int64));
funcdecl!((vm) <foo8_sig> foo8);
funcdef!((vm) <foo8_sig> foo8 VERSION foo8_v1);
funcdecl! ((vm) <