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/evidence/AMD-GFX942-HOST-20261112T210312Z/gate/flipped.isa # 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 / evidence / AMD-GFX942-HOST-20261112T210312Z / gate / flipped.isa` 113 lines · 5455 bytes Raw Blame History 1 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 # vadd.isa: gfx942 (CDNA3) instruction table for the FP32 vadd kernel. DATA, read by 3 # backend/amd/gfx942/hsaco.om, which packs every instruction word from these rows. No LLVM tool 4 # reads this file; tests/amd/run.sh compares the packed words with llvm-mc-18 -mcpu=gfx942. 5 # 6 # Rows (first token; numbers are decimal or lowercase 0x hex; '#' starts a comment): 7 # F id words format id (1..8) has this many 32-bit words (1 or 2) 8 # B id word lsb width value fixed encoding bits of format id 9 # D id k word lsb width operand field k (0..63, in order) of format id 10 # I id v0 v1 ... one instruction of format id, one value per operand field 11 # L value a 32-bit literal word that follows the previous instruction 12 # T 1 the one branch label at the current code position 13 # Operand @1 is the forward SOPP word displacement to label 1 from the next instruction. 14 # Every value must fit its field; fixed bits and fields must not overlap. 15 # 16 # Field positions: LLVM 18.1.3 llvm/lib/Target/AMDGPU (SMInstructions.td SMEM_Real_vi, 17 # SOPInstructions.td SOP2_Real32 / SOP1_Real / SOPP_Real_32, VOP2Instructions.td VOP2e, 18 # VOP1Instructions.td VOP1e, VOPCInstructions.td VOPCe, FLATInstructions.td FLAT_Real + FLAT_Real_gfx940). 19 # _vi / gfx6-gfx10 / gfx9 Real definitions in the same files (gfx940 uses the GFX9 encodings). 20 # Operand codes: SGPR n = n, vcc_lo = 106, inline integer k (0..64) = 128 + k, literal = 255, 21 # VGPR n as a 9-bit source = 256 + n, VGPR n in an 8-bit field = n. 22 23 F 1 2 # SMEM 24 B 1 0 26 6 0x30 # encoding 25 D 1 0 0 0 6 # sbase (SGPR pair number / 2) 26 D 1 1 0 6 7 # sdata 27 D 1 2 0 16 1 # glc 28 D 1 3 0 17 1 # imm (offset is an immediate) 29 D 1 4 0 18 8 # op 30 D 1 5 1 0 21 # offset 31 32 F 2 1 # SOP2 33 B 2 0 30 2 2 # encoding 34 D 2 0 0 0 8 # ssrc0 35 D 2 1 0 8 8 # ssrc1 36 D 2 2 0 16 7 # sdst 37 D 2 3 0 23 7 # op 38 39 F 3 1 # SOP1 40 B 3 0 23 9 0x17d # encoding 41 D 3 0 0 0 8 # ssrc0 42 D 3 1 0 8 8 # op 43 D 3 2 0 16 7 # sdst 44 45 F 4 1 # SOPP 46 B 4 0 23 9 0x17f # encoding 47 D 4 0 0 0 16 # simm16 48 D 4 1 0 16 7 # op 49 50 F 5 1 # VOP2 (e32) 51 B 5 0 31 1 0 # encoding 52 D 5 0 0 0 9 # src0 53 D 5 1 0 9 8 # vsrc1 54 D 5 2 0 17 8 # vdst 55 D 5 3 0 25 6 # op 56 57 F 6 1 # VOPC (e32) 58 B 6 0 25 7 0x3e # encoding 59 D 6 0 0 0 9 # src0 60 D 6 1 0 9 8 # vsrc1 61 D 6 2 0 17 8 # op 62 63 F 7 2 # FLAT / GLOBAL (gfx940) 64 B 7 0 26 6 0x37 # encoding 65 D 7 0 0 0 13 # offset 66 D 7 1 0 13 1 # sve 67 D 7 2 0 14 2 # seg (2 = global) 68 D 7 3 0 16 1 # sc0 69 D 7 4 0 17 1 # nt 70 D 7 5 0 18 7 # op 71 D 7 6 0 25 1 # sc1 72 D 7 7 1 0 8 # vaddr 73 D 7 8 1 8 8 # vdata 74 D 7 9 1 16 7 # saddr 75 D 7 10 1 23 1 # acc 76 D 7 11 1 24 8 # vdst 77 78 F 8 1 # VOP1 (e32) 79 B 8 0 25 7 0x3f # encoding 80 D 8 0 0 0 9 # src0 81 D 8 1 0 9 8 # op 82 D 8 2 0 17 8 # vdst 83 84 # vadd: c[gid] = a[gid] + b[gid] for gid < count (kernarg a @0, b @8, c @16, count @24) 85 I 1 0 4 0 1 2 0 # s_load_dwordx4 s[4:7], s[0:1], 0x0 op 0x02 86 I 1 0 8 0 1 1 16 # s_load_dwordx2 s[8:9], s[0:1], 0x10 op 0x01 87 I 1 0 10 0 1 0 24 # s_load_dword s10, s[0:1], 0x18 op 0x00 88 I 5 255 0 0 0x13 # v_and_b32_e32 v0, 0x3ff, v0 op 0x13 89 L 0x3ff 90 I 2 2 134 11 0x1c # s_lshl_b32 s11, s2, 6 op 0x1c 91 I 5 11 0 1 0x34 # v_add_u32_e32 v1, s11, v0 op 0x34 (gfx9) 92 I 4 0xc07f 0x0c # s_waitcnt lgkmcnt(0) op 0x0c 93 I 6 10 1 0xcc # v_cmp_gt_u32_e32 vcc, s10, v1 op 0xcc 94 I 3 106 0x20 12 # s_and_saveexec_b64 s[12:13], vcc op 0x20 95 I 4 @1 0x08 # s_cbranch_execz label 1 op 0x08 96 I 5 130 1 2 0x12 # v_lshlrev_b32_e32 v2, 2, v1 op 0x12 97 I 5 158 1 3 0x10 # v_lshrrev_b32_e32 v3, 30, v1 98 I 8 5 1 5 # v_mov_b32_e32 v5, s5 99 I 5 4 2 6 0x19 # v_add_co_u32_e32 v6, vcc, s4, v2 100 I 5 261 3 7 0x1c # v_addc_co_u32_e32 v7, vcc, v5, v3, vcc 101 I 7 0 0 2 0 0 0x14 0 6 0 127 0 4 # global_load_dword v4, v[6:7], off 102 I 8 7 1 5 # v_mov_b32_e32 v5, s7 103 I 5 6 2 6 0x19 # v_add_co_u32_e32 v6, vcc, s6, v2 104 I 5 261 3 7 0x1c # v_addc_co_u32_e32 v7, vcc, v5, v3, vcc 105 I 7 0 0 2 0 0 0x14 0 6 0 127 0 8 # global_load_dword v8, v[6:7], off 106 I 4 0x0f70 0x0c # s_waitcnt vmcnt(0) 107 I 5 261 8 4 0x01 # v_add_f32_e32 v4, v4, v8 108 I 8 9 1 5 # v_mov_b32_e32 v5, s9 109 I 5 8 2 6 0x19 # v_add_co_u32_e32 v6, vcc, s8, v2 110 I 5 261 3 7 0x1c # v_addc_co_u32_e32 v7, vcc, v5, v3, vcc 111 I 7 0 0 2 0 0 0x1c 0 6 4 127 0 0 # global_store_dword v[6:7], v4, off 112 T 1 113 I 4 0 0x01 # s_endpgm op 0x01