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/CUDApp/blob/main/om/components/artifact_elf.om # CUDApp CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit. 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 `CUDApp / om / components / artifact_elf.om` 137 lines · 2237 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 note Pull protocol: each call consumes the requested retained byte slice. 3 note result 2 requests another slice, 1 accepts, 0 refuses. No host I/O in this unit. 4 fn ae_rd b view uchar 512 p ulong n ulong to ulong 5 v = ulong 0 6 for i ulong n 7 v = or v shl ulong get b add p i mul i 8 8 end 9 ret v 10 end 11 fn ae_req s edit ulong 32 stage ulong off ulong n ulong to ulong 12 put s 0 stage 13 put s 4 off 14 put s 5 n 15 ret 2 16 end 17 fn ae_next s edit ulong 32 to ulong 18 i = add get s 13 1 19 put s 13 i 20 if ge i get s 9 21 ret 0 22 end 23 ret ae_req s 2 add get s 8 mul i 64 64 24 end 25 fn artifact_elf b view uchar 512 s edit ulong 32 to ulong 26 if eq get s 0 0 27 if lt get s 1 64 28 ret 0 29 end 30 if ne ae_rd b 0 4 `1179403647` 31 ret 0 32 end 33 if ne ae_rd b 18 2 190 34 ret 0 35 end 36 put s 8 ae_rd b 40 8 37 put s 9 ae_rd b 60 2 38 idx = ae_rd b 62 2 39 if or ne ae_rd b 58 2 64 or eq get s 9 0 ge idx get s 9 40 ret 0 41 end 42 if gt get s 8 get s 1 43 ret 0 44 end 45 if gt mul get s 9 64 sub get s 1 get s 8 46 ret 0 47 end 48 ret ae_req s 1 add get s 8 mul idx 64 64 49 end 50 if eq get s 0 1 51 put s 11 ae_rd b 24 8 52 put s 12 ae_rd b 32 8 53 if gt get s 11 get s 1 54 ret 0 55 end 56 if gt get s 12 sub get s 1 get s 11 57 ret 0 58 end 59 if ge add get s 3 6 128 60 ret 0 61 end 62 put s 13 0 63 ret ae_req s 2 get s 8 64 64 end 65 if eq get s 0 2 66 name = ae_rd b 0 4 67 if ge name get s 12 68 ret ae_next s 69 end 70 put s 15 ae_rd b 24 8 71 put s 16 ae_rd b 32 8 72 n = sub get s 12 name 73 if gt n 128 74 n = 128 75 end 76 ret ae_req s 3 add get s 11 name n 77 end 78 if eq get s 0 3 79 wl = add get s 3 6 80 if le get s 5 wl 81 ret ae_next s 82 end 83 if or ne get b 0 46 ne get b 1 116 84 ret ae_next s 85 end 86 if or ne get b 2 101 ne get b 3 120 87 ret ae_next s 88 end 89 if or ne get b 4 116 ne get b 5 46 90 ret ae_next s 91 end 92 for i ulong get s 3 93 if ne get b add i 6 get b add i 256 94 ret ae_next s 95 end 96 end 97 if ne get b wl 0 98 ret ae_next s 99 end 100 if gt get s 15 get s 1 101 ret 0 102 end 103 if ne get s 16 get s 2 104 ret 0 105 end 106 if gt get s 16 sub get s 1 get s 15 107 ret 0 108 end 109 put s 14 0 110 put s 6 1 111 n = get s 2 112 if eq n 0 113 ret 1 114 end 115 if gt n 128 116 n = 128 117 end 118 ret ae_req s 4 get s 15 n 119 end 120 if eq get s 0 4 121 for i ulong get s 5 122 if ne get b i get b add 128 i 123 ret 0 124 end 125 end 126 put s 14 add get s 14 get s 5 127 n = sub get s 2 get s 14 128 if eq n 0 129 ret 1 130 end 131 if gt n 128 132 n = 128 133 end 134 ret ae_req s 4 add get s 15 get s 14 n 135 end 136 ret 0 137 end