GitLab will be upgraded to the 12.10.14-ce.0 on 28 Sept 2020 at 2.00pm (AEDT) to 2.30pm (AEDT). During the update, GitLab and Mattermost services will not be available. If you have any concerns with this, please talk to us at N110 (b) CSIT building.

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,
......
This diff is collapsed.
This diff is collapsed.
// Copyright 2017 The Australian National University
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <stdio.h>
#include <stdlib.h>
......@@ -28,58 +14,58 @@
#endif
#define LIB_FILE_NAME(name) "lib" name LIB_EXT
int main(int argc, char** argv) {
MuVM* mu_57;
MuCtx* ctx_57;
MuIRBuilder* bldr_57;
MuID id_808;
MuID id_809;
MuID id_810;
MuID id_811;
MuID id_812;
MuID id_813;
MuID id_814;
MuID id_815;
MuID id_816;
MuID id_817;
MuID id_818;
MuID id_819;
MuID id_820;
MuID id_821;
MuID id_822;
MuID id_823;
mu_57 = mu_fastimpl_new_with_opts("init_mu --log-level=none --aot-emit-dir=emit");
ctx_57 = mu_57->new_context(mu_57);
bldr_57 = ctx_57->new_ir_builder(ctx_57);
id_808 = bldr_57->gen_sym(bldr_57, "@i1");
bldr_57->new_type_int(bldr_57, id_808, 0x00000001ull);
id_809 = bldr_57->gen_sym(bldr_57, "@i8");
bldr_57->new_type_int(bldr_57, id_809, 0x00000008ull);
id_810 = bldr_57->gen_sym(bldr_57, "@i64");
bldr_57->new_type_int(bldr_57, id_810, 0x00000040ull);
id_811 = bldr_57->gen_sym(bldr_57, "@10_i64");
bldr_57->new_const_int(bldr_57, id_811, id_810, 0x000000000000000aull);
id_812 = bldr_57->gen_sym(bldr_57, "@20_i64");
bldr_57->new_const_int(bldr_57, id_812, id_810, 0x0000000000000014ull);
id_813 = bldr_57->gen_sym(bldr_57, "@TRUE");
bldr_57->new_const_int(bldr_57, id_813, id_809, 0x0000000000000001ull);
id_814 = bldr_57->gen_sym(bldr_57, "@sig_i8_i64");
bldr_57->new_funcsig(bldr_57, id_814, (MuTypeNode [1]){id_809}, 1, (MuTypeNode [1]){id_810}, 1);
id_815 = bldr_57->gen_sym(bldr_57, "@test_fnc");
bldr_57->new_func(bldr_57, id_815, id_814);
id_816 = bldr_57->gen_sym(bldr_57, "@test_fnc.v1");
id_817 = bldr_57->gen_sym(bldr_57, "@test_fnc.v1.blk0");
id_818 = bldr_57->gen_sym(bldr_57, "@test_fnc.v1.blk0.flag");
id_819 = bldr_57->gen_sym(bldr_57, "@test_fnc.v1.blk0.cmpres");
id_820 = bldr_57->gen_sym(bldr_57, "@test_fnc.v1.blk0.res");
id_821 = bldr_57->gen_sym(bldr_57, NULL);
bldr_57->new_cmp(bldr_57, id_821, id_819, MU_CMP_EQ, id_810, id_818, id_813);
id_822 = bldr_57->gen_sym(bldr_57, NULL);
bldr_57->new_select(bldr_57, id_822, id_820, id_808, id_810, id_819, id_811, id_812);
id_823 = bldr_57->gen_sym(bldr_57, NULL);
bldr_57->new_ret(bldr_57, id_823, (MuVarNode [1]){id_820}, 1);
bldr_57->new_bb(bldr_57, id_817, (MuID [1]){id_818}, (MuTypeNode [1]){id_809}, 1, MU_NO_ID, (MuInstNode [3]){id_821, id_822, id_823}, 3);
bldr_57->new_func_ver(bldr_57, id_816, id_815, (MuBBNode [1]){id_817}, 1);
bldr_57->load(bldr_57);
mu_57->compile_to_sharedlib(mu_57, LIB_FILE_NAME("test_select"), NULL, 0);
MuVM* mu_59;
MuCtx* ctx_59;
MuIRBuilder* bldr_59;
MuID id_911;
MuID id_912;
MuID id_913;
MuID id_914;
MuID id_915;
MuID id_916;
MuID id_917;
MuID id_918;
MuID id_919;
MuID id_920;
MuID id_921;
MuID id_922;
MuID id_923;
MuID id_924;
MuID id_925;
MuID id_926;
mu_59 = mu_fastimpl_new_with_opts("init_mu --log-level=none --aot-emit-dir=emit");
ctx_59 = mu_59->new_context(mu_59);
bldr_59 = ctx_59->new_ir_builder(ctx_59);
id_911 = bldr_59->gen_sym(bldr_59, "@i1");
bldr_59->new_type_int(bldr_59, id_911, 0x00000001ull);
id_912 = bldr_59->gen_sym(bldr_59, "@i8");
bldr_59->new_type_int(bldr_59, id_912, 0x00000008ull);
id_913 = bldr_59->gen_sym(bldr_59, "@i64");
bldr_59->new_type_int(bldr_59, id_913, 0x00000040ull);
id_914 = bldr_59->gen_sym(bldr_59, "@10_i64");
bldr_59->new_const_int(bldr_59, id_914, id_913, 0x000000000000000aull);
id_915 = bldr_59->gen_sym(bldr_59, "@20_i64");
bldr_59->new_const_int(bldr_59, id_915, id_913, 0x0000000000000014ull);
id_916 = bldr_59->gen_sym(bldr_59, "@TRUE");
bldr_59->new_const_int(bldr_59, id_916, id_912, 0x0000000000000001ull);
id_917 = bldr_59->gen_sym(bldr_59, "@sig_i8_i64");
bldr_59->new_funcsig(bldr_59, id_917, (MuTypeNode [1]){id_912}, 1, (MuTypeNode [1]){id_913}, 1);
id_918 = bldr_59->gen_sym(bldr_59, "@test_fnc");
bldr_59->new_func(bldr_59, id_918, id_917);
id_919 = bldr_59->gen_sym(bldr_59, "@test_fnc.v1");
id_920 = bldr_59->gen_sym(bldr_59, "@test_fnc.v1.blk0");
id_921 = bldr_59->gen_sym(bldr_59, "@test_fnc.v1.blk0.flag");
id_922 = bldr_59->gen_sym(bldr_59, "@test_fnc.v1.blk0.cmpres");
id_923 = bldr_59->gen_sym(bldr_59, "@test_fnc.v1.blk0.res");
id_924 = bldr_59->gen_sym(bldr_59, NULL);
bldr_59->new_cmp(bldr_59, id_924, id_922, MU_CMP_EQ, id_912, id_921, id_916);
id_925 = bldr_59->gen_sym(bldr_59, NULL);
bldr_59->new_select(bldr_59, id_925, id_923, id_911, id_913, id_922, id_914, id_915);
id_926 = bldr_59->gen_sym(bldr_59, NULL);
bldr_59->new_ret(bldr_59, id_926, (MuVarNode [1]){id_923}, 1);
bldr_59->new_bb(bldr_59, id_920, (MuID [1]){id_921}, (MuTypeNode [1]){id_912}, 1, MU_NO_ID, (MuInstNode [3]){id_924, id_925, id_926}, 3);
bldr_59->new_func_ver(bldr_59, id_919, id_918, (MuBBNode [1]){id_920}, 1);
bldr_59->load(bldr_59);
mu_59->compile_to_sharedlib(mu_59, LIB_FILE_NAME("test_select"), NULL, 0);
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment