Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/seed/ng/a64/tests/oir/eloop.oir # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / seed / ng / a64 / tests / oir / eloop.oir` 75 lines ยท 1413 bytes Raw Blame History 1 omegair 1 2 type %t32 = array u8 8 3 type %t33 = ref edit host %t32 4 global @g0 %t32 zero 5 fn @f0 flags 0 %1:u64 -> void 6 block ^0 7 %2 = gaddr %t33 @g0 8 %3 = const u64 0 9 br ^1 %0 %3 %1 10 block ^1 %4:tok %5:u64 %6:u64 11 %7 = const u64 8 12 %8 = lt bool %5 %7 13 cbr %4 %8 ^2 ^3 14 block ^2 %9:tok 15 %10 = const u64 1 16 %11 = chk.bounds 3 %9 %2 %5 %10 17 %12 = conv u8 0 %6 18 %13 = store %11 %2 %5 %12 19 %14 = const u64 8 20 %15 = shr u64 %6 %14 21 %16 = add u64 %5 %10 22 br ^1 %13 %16 %15 23 block ^3 %17:tok 24 %18 = const i32 1 25 %19 = const u64 0 26 %20 = chk.slice 3 %17 %2 %19 %7 27 %21 %22 = host i64 54 %20 %18 %2 %19 %7 28 ret %21 29 end 30 fn @f1 flags 0 %1:u64 -> u64 31 block ^0 32 %2 = const u64 0 33 %3 = eq bool %1 %2 34 cbr %0 %3 ^1 ^2 35 block ^1 %4:tok 36 %5 = const u64 0 37 retv %4 %5 38 block ^2 %6:tok 39 %7 = const u64 1 40 %8 = sub u64 %1 %7 41 %9 %10 = call u64 %6 @f1 %8 42 %11 = add u64 %1 %10 43 retv %9 %11 44 end 45 fn @f2 flags 0 %1:u32 -> u32 46 block ^0 47 %2 = const u32 0 48 %3 = eq bool %1 %2 49 cbr %0 %3 ^1 ^2 50 block ^1 %4:tok 51 %5 = const u32 7 52 retv %4 %5 53 block ^2 %6:tok 54 %7 = const u32 1 55 %8 = sub u32 %1 %7 56 %9 %10 = call u32 %6 @f2 %8 57 %11 = const u32 `2654435761` 58 %12 = mul u32 %1 %11 59 %13 = add u32 %10 %12 60 retv %9 %13 61 end 62 export @f3 flags 0 -> i32 63 block ^0 64 %1 = const u64 50000 65 %2 %3 = call u64 %0 @f1 %1 66 %4 = call void %2 @f0 %3 67 %5 = const u32 60000 68 %6 %7 = call u32 %4 @f2 %5 69 %8 = conv u64 0 %7 70 %9 = call void %6 @f0 %8 71 %10 = const u64 255 72 %11 = and u64 %3 %10 73 %12 = conv i32 0 %11 74 retv %9 %12 75 end