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
CUDApp / om / codegen / qm_host.om
| 1 | note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 2 | note op 0 mark predicate; 1 little-endian read; >=2 packed selftest counts plus 2. |
| 3 | note a,b,c,d,e are insn op, immediate, word0, word1, word2 for verification. |
| 4 | fn qm_host op ulong a ulong b ulong c ulong d ulong e ulong to ulong |
| 5 | if eq op 0 |
| 6 | if and eq a 16 eq b 1362114610 |
| 7 | ret 1 |
| 8 | end |
| 9 | ret 0 |
| 10 | end |
| 11 | if eq op 1 |
| 12 | ret or or a shl b 8 or shl c 16 shl d 24 |
| 13 | end |
| 14 | if eq a 37 |
| 15 | if ne and c 65535 29246 |
| 16 | ret 18446744073709551615 |
| 17 | end |
| 18 | if ne and d 4294967040 0 |
| 19 | ret 18446744073709551615 |
| 20 | end |
| 21 | if ne e 75526399 |
| 22 | ret 18446744073709551615 |
| 23 | end |
| 24 | ret add op 65536 |
| 25 | end |
| 26 | if ne a 16 |
| 27 | ret op |
| 28 | end |
| 29 | if eq b 1362114610 |
| 30 | if ne and c 65535 29306 |
| 31 | ret 18446744073709551615 |
| 32 | end |
| 33 | if ne and d 4294967040 0 |
| 34 | ret 18446744073709551615 |
| 35 | end |
| 36 | if ne and e 4294967040 11264 |
| 37 | ret 18446744073709551615 |
| 38 | end |
| 39 | ret add op 1 |
| 40 | end |
| 41 | if or ne and c 65535 29244 ne and e 4294967040 268288 |
| 42 | ret 18446744073709551615 |
| 43 | end |
| 44 | ret add op 256 |
| 45 | end |