midenc-codegen-masm 0.7.2

Miden Assembly backend for the Miden compiler
1
2
3
4
5
6
7
8
9
10
11
12
builtin.function public extern("C") @util_emit_if_test(%0: u32, %1: u32) -> u32 {
    %2 = arith.constant 0 : u32;
    %3 = arith.eq %0, %1;
    %4 = scf.if %3 then {
        %5 = arith.constant 1 : u32;
        scf.yield %5 : (u32);
    } else {
        %6 = arith.mul %0, %2 <{ overflow = #builtin.overflow<checked> }>;
        scf.yield %6 : (u32);
    } : (i1) -> (u32);
    builtin.ret %4 : (u32);
};