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/gpu/amd/tests/amd-exec/semantics-probe.om # 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 / gpu / amd / tests / amd-exec / semantics-probe.om` 78 lines ยท 1212 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 note Test adapter only: invokes production step, without reimplementing an instruction. 3 note argv RAW_TEXT MEMORY STATE; STATE has masks/SCC, sparse register seeds, then queries. 4 global ps ulong 3 5 fn pword to ulong 6 v = rdword int get ps 0 get ps 1 get ps 2 7 put ps 1 add get ps 1 4 8 ret v 9 end 10 fn pwide to ulong 11 a = pword 12 ret or a shl pword 32 13 end 14 fn pout v ulong to void 15 for j ulong 2 16 for i ulong 4 17 put io i uchar and shr v add mul j 32 mul i 8 255 18 end 19 n = ulong 0 20 while lt n 4 bound 999999 21 r = write 1 io n sub 4 n 22 if le r 0 23 fail 74 24 end 25 n = add n ulong r 26 end 27 end 28 end 29 fn seeds to void 30 n = pword 31 for i ulong n 32 b = pword 33 r = pword 34 v = pword 35 if eq b 0 36 put sr r v 37 else 38 put vr r v 39 end 40 end 41 end 42 fn queries to void 43 n = pword 44 for i ulong n 45 b = pword 46 r = pword 47 v = ulong 0 48 if eq b 0 49 v = get sr r 50 end 51 if eq b 1 52 v = get vr r 53 end 54 if eq b 2 55 v = get st r 56 end 57 pout v 58 end 59 end 60 fn main to int 61 if ne argcnt 4 62 ret 64 63 end 64 put st 0 openarg 1 0 65 put st 1 filesize get st 0 66 put st 2 openarg 2 2 67 put st 3 filesize get st 2 68 put ps 0 openarg 3 0 69 put ps 2 filesize get ps 0 70 put st 14 pwide 71 put st 15 pwide 72 put st 16 pword 73 seeds 74 running = step 0 75 pout fmbool running 76 queries 77 ret 0 78 end