Commit 571c48a6 authored by Zixian Cai's avatar Zixian Cai

Merge branch 'fib_fix' into 'master'

Fib fix

See merge request !6
parents 42a9e648 015a9eb3
......@@ -235,9 +235,9 @@ void build_func_fib_fast(MuIRBuilder *irbuilder)
G(0, int32) = irbuilder->gen_sym(irbuilder, "@int32");
irbuilder->new_type_int(irbuilder, G(0, int32), 32);
fib = irbuilder->gen_sym(irbuilder, "@fib");
G(2) = irbuilder->gen_sym(irbuilder, "@__2");
irbuilder->new_funcsig(irbuilder, G(2), (MuTypeNode[]){G(0, int32)}, 1, (MuTypeNode[]){G(0, int32)}, 1);
G(2) = sig_fib;
// G(2) = irbuilder->gen_sym(irbuilder, "@__2");
// irbuilder->new_funcsig(irbuilder, G(2), (MuTypeNode[]){G(0, int32)}, 1, (MuTypeNode[]){G(0, int32)}, 1);
irbuilder->new_func(irbuilder, fib, G(2));
MuID L(0, fib.__3) = irbuilder->gen_sym(irbuilder, "@fib.__3");
MuID L(1, fib.__3.1) = irbuilder->gen_sym(irbuilder, "@fib.__3.1");
......@@ -268,7 +268,7 @@ void build_func_fib_fast(MuIRBuilder *irbuilder)
MuID L(15) = irbuilder->gen_sym(irbuilder, NULL);
MuID L(16, fib.__3.5.8) = irbuilder->gen_sym(irbuilder, "@fib.__3.5.8");
G(5) = irbuilder->gen_sym(irbuilder, "@__5");
irbuilder->new_const_int(irbuilder, G(5), G(0, int32), -1);
irbuilder->new_const_int(irbuilder, G(5), G(0, int32), (uint32_t)(-1));
irbuilder->new_binop(irbuilder, L(15), L(16, fib.__3.5.8), MU_BINOP_ADD, G(0, int32), L(13, fib.__3.5.6), G(5), MU_NO_ID);
MuID L(17) = irbuilder->gen_sym(irbuilder, NULL);
......@@ -278,7 +278,7 @@ void build_func_fib_fast(MuIRBuilder *irbuilder)
MuID L(19) = irbuilder->gen_sym(irbuilder, NULL);
MuID L(20, fib.__3.5.10) = irbuilder->gen_sym(irbuilder, "@fib.__3.5.10");
G(6) = irbuilder->gen_sym(irbuilder, "@__6");
irbuilder->new_const_int(irbuilder, G(6), G(0, int32), -2);
irbuilder->new_const_int(irbuilder, G(6), G(0, int32), (uint32_t)(-2));
irbuilder->new_binop(irbuilder, L(19), L(20, fib.__3.5.10), MU_BINOP_ADD, G(0, int32), L(13, fib.__3.5.6), G(6), MU_NO_ID);
MuID L(21) = irbuilder->gen_sym(irbuilder, NULL);
......
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