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-feel/blob/main/tests/round40/adapter.om # omega-feel This project has not described itself yet. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-feel / tests / round40 / adapter.om` 87 lines ยท 1420 bytes Raw Blame History 1 global fready ulong 1 2 global fshape ulong 2 3 global fsaved ulong * 4 fn fscalar z ulong po ulong n ulong d ulong to void 5 for c ulong n 6 put oa add po c kdot1 z add z d mul c d 7 end 8 end 9 fn farm a ulong z ulong po ulong n ulong d ulong to void 10 if eq a 0 11 klogit z po n d 12 else 13 fscalar z po n d 14 end 15 end 16 fn fshadow candidate ulong z ulong po ulong n ulong d ulong to ulong 17 for c ulong n 18 put fsaved c bitcast ulong get oa add po c 19 end 20 farm candidate z po n d 21 equal = ulong 1 22 for c ulong n 23 bits = get fsaved c 24 if ne bits bitcast ulong get oa add po c 25 equal = 0 26 end 27 put oa add po c bitcast f64 bits 28 end 29 ret equal 30 end 31 fn fkernel z ulong po ulong n ulong d ulong to void 32 if eq get fready 0 0 33 if ne setup 0 2 0 34 exit 84 35 end 36 allocrc = enlarge fsaved n 37 if ne allocrc 0 38 exit 89 39 end 40 put fshape 0 n 41 put fshape 1 d 42 put fready 0 1 43 end 44 if or ne get fshape 0 n ne get fshape 1 d 45 exit 85 46 end 47 r = choose 0 48 if ge r ERR 49 exit 86 50 end 51 arm = and r 65535 52 owed = and shr r 32 3 53 elapsed = ulong 0 54 mask = ulong 3 55 if eq owed 2 56 before = onsnow 57 farm arm z po n d 58 elapsed = sub onsnow before 59 if ne observe 0 elapsed 0 60 exit 87 61 end 62 else 63 farm arm z po n d 64 if eq owed 1 65 equal = fshadow and shr r 16 65535 z po n d 66 if eq equal 0 67 mask = 1 68 end 69 if ne verdict 0 equal 0 70 exit 88 71 end 72 end 73 end 74 note Log the measured arm only. Zero fills the unused timing column for replay. 75 ochr 116 76 osn 0 77 if eq arm 0 78 osn elapsed 79 osn 0 80 else 81 osn 0 82 osn elapsed 83 end 84 osn mask 85 ochr 10 86 fflush 2 87 end