WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.6% of users enabled 2FA.

test_constfunc.c 1.58 KB
Newer Older
1 2 3 4 5 6 7 8 9

// Compile with flag -std=c99
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <dlfcn.h>
#include "muapi.h"
#include "mu-fastimpl.h"
int main(int argc, char** argv) {
10 11 12 13 14 15 16 17 18 19 20
    MuVM* mu_32;
    MuCtx* ctx_32;
    MuIRBuilder* bldr_32;
    MuID id_457;
    MuID id_458;
    MuID id_459;
    MuID id_460;
    MuID id_461;
    MuID id_462;
    MuID id_463;
    MuID id_464;
John Zhang's avatar
John Zhang committed
21
    mu_32 = mu_fastimpl_new_with_opts("init_mu --log-level=none --aot-emit-dir=emit");
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
    ctx_32 = mu_32->new_context(mu_32);
    bldr_32 = ctx_32->new_ir_builder(ctx_32);
    id_457 = bldr_32->gen_sym(bldr_32, "@i32");
    bldr_32->new_type_int(bldr_32, id_457, 8);
    id_458 = bldr_32->gen_sym(bldr_32, "@0_i32");
    bldr_32->new_const_int(bldr_32, id_458, id_457, 0);
    id_459 = bldr_32->gen_sym(bldr_32, "@sig__i32");
    bldr_32->new_funcsig(bldr_32, id_459, NULL, 0, (MuTypeNode [1]){id_457}, 1);
    id_460 = bldr_32->gen_sym(bldr_32, "@test_fnc");
    bldr_32->new_func(bldr_32, id_460, id_459);
    id_461 = bldr_32->gen_sym(bldr_32, "@test_fnc_v1");
    id_462 = bldr_32->gen_sym(bldr_32, "@test_fnc_v1.blk0");
    id_463 = bldr_32->gen_sym(bldr_32, "@test_fnc_v1.blk0.res");
    id_464 = bldr_32->gen_sym(bldr_32, NULL);
    bldr_32->new_ret(bldr_32, id_464, (MuVarNode [1]){id_458}, 1);
    bldr_32->new_bb(bldr_32, id_462, NULL, NULL, 0, MU_NO_ID, (MuInstNode [1]){id_464}, 1);
    bldr_32->new_func_ver(bldr_32, id_461, id_460, (MuBBNode [1]){id_462}, 1);
    bldr_32->load(bldr_32);
    mu_32->compile_to_sharedlib(mu_32, "test_constfunc.dylib", NULL, 0);
41
    printf("%s\n", "test_constfunc.dylib");
42 43
    return 0;
}