1 # RUN: llvm-mc -arch=amdgcn -mcpu=tonga -disassemble -show-encoding < %s | FileCheck %s -check-prefix=VI 2 3 # VI: flat_load_dword v1, v[3:4] ; encoding: [0x00,0x00,0x50,0xdc,0x03,0x00,0x00,0x01] 4 0x00 0x00 0x50 0xdc 0x03 0x00 0x00 0x01 5 6 # VI: flat_load_dword v1, v[3:4] glc ; encoding: [0x00,0x00,0x51,0xdc,0x03,0x00,0x00,0x01] 7 0x00 0x00 0x51 0xdc 0x03 0x00 0x00 0x01 8 9 # VI: flat_load_dword v1, v[3:4] glc slc ; encoding: [0x00,0x00,0x53,0xdc,0x03,0x00,0x00,0x01] 10 0x00 0x00 0x53 0xdc 0x03 0x00 0x00 0x01 11 12 # VI: flat_load_dword v1, v[3:4] glc tfe ; encoding: [0x00,0x00,0x51,0xdc,0x03,0x00,0x80,0x01] 13 0x00 0x00 0x51 0xdc 0x03 0x00 0x80 0x01 14 15 # VI: flat_load_dword v1, v[3:4] glc slc tfe ; encoding: [0x00,0x00,0x53,0xdc,0x03,0x00,0x80,0x01] 16 0x00 0x00 0x53 0xdc 0x03 0x00 0x80 0x01 17 18 # VI: flat_load_dword v1, v[3:4] slc ; encoding: [0x00,0x00,0x52,0xdc,0x03,0x00,0x00,0x01] 19 0x00 0x00 0x52 0xdc 0x03 0x00 0x00 0x01 20 21 # VI: flat_load_dword v1, v[3:4] slc tfe ; encoding: [0x00,0x00,0x52,0xdc,0x03,0x00,0x80,0x01] 22 0x00 0x00 0x52 0xdc 0x03 0x00 0x80 0x01 23 24 # VI: flat_load_dword v1, v[3:4] tfe ; encoding: [0x00,0x00,0x50,0xdc,0x03,0x00,0x80,0x01] 25 0x00 0x00 0x50 0xdc 0x03 0x00 0x80 0x01 26 27 # VI: flat_atomic_add v1, v[3:4], v5 glc slc ; encoding: [0x00,0x00,0x0b,0xdd,0x03,0x05,0x00,0x01] 28 0x00 0x00 0x0b 0xdd 0x03 0x05 0x00 0x01 29 30 # VI: flat_atomic_add v1, v[3:4], v5 glc tfe ; encoding: [0x00,0x00,0x09,0xdd,0x03,0x05,0x80,0x01] 31 0x00 0x00 0x09 0xdd 0x03 0x05 0x80 0x01 32 33 # VI: flat_atomic_add v1, v[3:4], v5 glc slc tfe ; encoding: [0x00,0x00,0x0b,0xdd,0x03,0x05,0x80,0x01] 34 0x00 0x00 0x0b 0xdd 0x03 0x05 0x80 0x01 35 36 # VI: flat_atomic_add v[3:4], v5 slc ; encoding: [0x00,0x00,0x0a,0xdd,0x03,0x05,0x00,0x00] 37 0x00 0x00 0x0a 0xdd 0x03 0x05 0x00 0x00 38 39 # VI: flat_atomic_add v[3:4], v5 slc tfe ; encoding: [0x00,0x00,0x0a,0xdd,0x03,0x05,0x80,0x00] 40 0x00 0x00 0x0a 0xdd 0x03 0x05 0x80 0x00 41 42 # VI: flat_atomic_add v[3:4], v5 tfe ; encoding: [0x00,0x00,0x08,0xdd,0x03,0x05,0x80,0x00] 43 0x00 0x00 0x08 0xdd 0x03 0x05 0x80 0x00 44 45 # VI: flat_load_ubyte v1, v[3:4] ; encoding: [0x00,0x00,0x40,0xdc,0x03,0x00,0x00,0x01] 46 0x00 0x00 0x40 0xdc 0x03 0x00 0x00 0x01 47 48 # VI: flat_load_sbyte v1, v[3:4] ; encoding: [0x00,0x00,0x44,0xdc,0x03,0x00,0x00,0x01] 49 0x00 0x00 0x44 0xdc 0x03 0x00 0x00 0x01 50 51 # VI: flat_load_ushort v1, v[3:4] ; encoding: [0x00,0x00,0x48,0xdc,0x03,0x00,0x00,0x01] 52 0x00 0x00 0x48 0xdc 0x03 0x00 0x00 0x01 53 54 # VI: flat_load_sshort v1, v[3:4] ; encoding: [0x00,0x00,0x4c,0xdc,0x03,0x00,0x00,0x01] 55 0x00 0x00 0x4c 0xdc 0x03 0x00 0x00 0x01 56 57 # VI: flat_load_dword v1, v[3:4] ; encoding: [0x00,0x00,0x50,0xdc,0x03,0x00,0x00,0x01] 58 0x00 0x00 0x50 0xdc 0x03 0x00 0x00 0x01 59 60 # VI: flat_load_dwordx2 v[1:2], v[3:4] ; encoding: [0x00,0x00,0x54,0xdc,0x03,0x00,0x00,0x01] 61 0x00 0x00 0x54 0xdc 0x03 0x00 0x00 0x01 62 63 # VI: flat_load_dwordx4 v[5:8], v[3:4] ; encoding: [0x00,0x00,0x5c,0xdc,0x03,0x00,0x00,0x05] 64 0x00 0x00 0x5c 0xdc 0x03 0x00 0x00 0x05 65 66 # VI: flat_load_dwordx3 v[5:7], v[3:4] ; encoding: [0x00,0x00,0x58,0xdc,0x03,0x00,0x00,0x05] 67 0x00 0x00 0x58 0xdc 0x03 0x00 0x00 0x05 68 69 # VI: flat_store_dwordx4 v[3:4], v[5:8] ; encoding: [0x00,0x00,0x7c,0xdc,0x03,0x05,0x00,0x00] 70 0x00 0x00 0x7c 0xdc 0x03 0x05 0x00 0x00 71 72 # VI: flat_store_dwordx3 v[3:4], v[5:7] ; encoding: [0x00,0x00,0x78,0xdc,0x03,0x05,0x00,0x00] 73 0x00 0x00 0x78 0xdc 0x03 0x05 0x00 0x00 74 75 # VI: flat_atomic_swap v[3:4], v5 ; encoding: [0x00,0x00,0x00,0xdd,0x03,0x05,0x00,0x00] 76 0x00 0x00 0x00 0xdd 0x03 0x05 0x00 0x00 77 78 # VI: flat_atomic_swap v1, v[3:4], v5 glc ; encoding: [0x00,0x00,0x01,0xdd,0x03,0x05,0x00,0x01] 79 0x00 0x00 0x01 0xdd 0x03 0x05 0x00 0x01 80 81 # VI: flat_atomic_cmpswap v[3:4], v[5:6] ; encoding: [0x00,0x00,0x04,0xdd,0x03,0x05,0x00,0x00] 82 0x00 0x00 0x04 0xdd 0x03 0x05 0x00 0x00 83 84 # VI: flat_atomic_cmpswap v1, v[3:4], v[5:6] glc ; encoding: [0x00,0x00,0x05,0xdd,0x03,0x05,0x00,0x01] 85 0x00 0x00 0x05 0xdd 0x03 0x05 0x00 0x01 86 87 # VI: flat_atomic_add v[3:4], v5 ; encoding: [0x00,0x00,0x08,0xdd,0x03,0x05,0x00,0x00] 88 0x00 0x00 0x08 0xdd 0x03 0x05 0x00 0x00 89 90 # VI: flat_atomic_add v1, v[3:4], v5 glc ; encoding: [0x00,0x00,0x09,0xdd,0x03,0x05,0x00,0x01] 91 0x00 0x00 0x09 0xdd 0x03 0x05 0x00 0x01 92 93 # VI: flat_atomic_sub v[3:4], v5 ; encoding: [0x00,0x00,0x0c,0xdd,0x03,0x05,0x00,0x00] 94 0x00 0x00 0x0c 0xdd 0x03 0x05 0x00 0x00 95 96 # VI: flat_atomic_sub v1, v[3:4], v5 glc ; encoding: [0x00,0x00,0x0d,0xdd,0x03,0x05,0x00,0x01] 97 0x00 0x00 0x0d 0xdd 0x03 0x05 0x00 0x01 98 99 # VI: flat_atomic_smin v[3:4], v5 ; encoding: [0x00,0x00,0x10,0xdd,0x03,0x05,0x00,0x00] 100 0x00 0x00 0x10 0xdd 0x03 0x05 0x00 0x00 101 102 # VI: flat_atomic_smin v1, v[3:4], v5 glc ; encoding: [0x00,0x00,0x11,0xdd,0x03,0x05,0x00,0x01] 103 0x00 0x00 0x11 0xdd 0x03 0x05 0x00 0x01 104 105 # VI: flat_atomic_umin v[3:4], v5 ; encoding: [0x00,0x00,0x14,0xdd,0x03,0x05,0x00,0x00] 106 0x00 0x00 0x14 0xdd 0x03 0x05 0x00 0x00 107 108 # VI: flat_atomic_umin v1, v[3:4], v5 glc ; encoding: [0x00,0x00,0x15,0xdd,0x03,0x05,0x00,0x01] 109 0x00 0x00 0x15 0xdd 0x03 0x05 0x00 0x01 110 111 # VI: flat_atomic_smax v[3:4], v5 ; encoding: [0x00,0x00,0x18,0xdd,0x03,0x05,0x00,0x00] 112 0x00 0x00 0x18 0xdd 0x03 0x05 0x00 0x00 113 114 # VI: flat_atomic_smax v1, v[3:4], v5 glc ; encoding: [0x00,0x00,0x19,0xdd,0x03,0x05,0x00,0x01] 115 0x00 0x00 0x19 0xdd 0x03 0x05 0x00 0x01 116 117 # VI: flat_atomic_umax v[3:4], v5 ; encoding: [0x00,0x00,0x1c,0xdd,0x03,0x05,0x00,0x00] 118 0x00 0x00 0x1c 0xdd 0x03 0x05 0x00 0x00 119 120 # VI: flat_atomic_umax v1, v[3:4], v5 glc ; encoding: [0x00,0x00,0x1d,0xdd,0x03,0x05,0x00,0x01] 121 0x00 0x00 0x1d 0xdd 0x03 0x05 0x00 0x01 122 123 # VI: flat_atomic_and v[3:4], v5 ; encoding: [0x00,0x00,0x20,0xdd,0x03,0x05,0x00,0x00] 124 0x00 0x00 0x20 0xdd 0x03 0x05 0x00 0x00 125 126 # VI: flat_atomic_and v1, v[3:4], v5 glc ; encoding: [0x00,0x00,0x21,0xdd,0x03,0x05,0x00,0x01] 127 0x00 0x00 0x21 0xdd 0x03 0x05 0x00 0x01 128 129 # VI: flat_atomic_or v[3:4], v5 ; encoding: [0x00,0x00,0x24,0xdd,0x03,0x05,0x00,0x00] 130 0x00 0x00 0x24 0xdd 0x03 0x05 0x00 0x00 131 132 # VI: flat_atomic_or v1, v[3:4], v5 glc ; encoding: [0x00,0x00,0x25,0xdd,0x03,0x05,0x00,0x01] 133 0x00 0x00 0x25 0xdd 0x03 0x05 0x00 0x01 134 135 # VI: flat_atomic_xor v[3:4], v5 ; encoding: [0x00,0x00,0x28,0xdd,0x03,0x05,0x00,0x00] 136 0x00 0x00 0x28 0xdd 0x03 0x05 0x00 0x00 137 138 # VI: flat_atomic_xor v1, v[3:4], v5 glc ; encoding: [0x00,0x00,0x29,0xdd,0x03,0x05,0x00,0x01] 139 0x00 0x00 0x29 0xdd 0x03 0x05 0x00 0x01 140 141 # VI: flat_atomic_inc v[3:4], v5 ; encoding: [0x00,0x00,0x2c,0xdd,0x03,0x05,0x00,0x00] 142 0x00 0x00 0x2c 0xdd 0x03 0x05 0x00 0x00 143 144 # VI: flat_atomic_inc v1, v[3:4], v5 glc ; encoding: [0x00,0x00,0x2d,0xdd,0x03,0x05,0x00,0x01] 145 0x00 0x00 0x2d 0xdd 0x03 0x05 0x00 0x01 146 147 # VI: flat_atomic_dec v[3:4], v5 ; encoding: [0x00,0x00,0x30,0xdd,0x03,0x05,0x00,0x00] 148 0x00 0x00 0x30 0xdd 0x03 0x05 0x00 0x00 149 150 # VI: flat_atomic_dec v1, v[3:4], v5 glc ; encoding: [0x00,0x00,0x31,0xdd,0x03,0x05,0x00,0x01] 151 0x00 0x00 0x31 0xdd 0x03 0x05 0x00 0x01 152 153 # VI: flat_atomic_swap_x2 v[3:4], v[5:6] ; encoding: [0x00,0x00,0x80,0xdd,0x03,0x05,0x00,0x00] 154 0x00 0x00 0x80 0xdd 0x03 0x05 0x00 0x00 155 156 # VI: flat_atomic_swap_x2 v[1:2], v[3:4], v[5:6] glc ; encoding: [0x00,0x00,0x81,0xdd,0x03,0x05,0x00,0x01] 157 0x00 0x00 0x81 0xdd 0x03 0x05 0x00 0x01 158 159 # VI: flat_atomic_cmpswap_x2 v[3:4], v[5:8] ; encoding: [0x00,0x00,0x84,0xdd,0x03,0x05,0x00,0x00] 160 0x00 0x00 0x84 0xdd 0x03 0x05 0x00 0x00 161 162 # VI: flat_atomic_cmpswap_x2 v[1:2], v[3:4], v[5:8] glc ; encoding: [0x00,0x00,0x85,0xdd,0x03,0x05,0x00,0x01] 163 0x00 0x00 0x85 0xdd 0x03 0x05 0x00 0x01 164 165 # VI: flat_atomic_add_x2 v[3:4], v[5:6] ; encoding: [0x00,0x00,0x88,0xdd,0x03,0x05,0x00,0x00] 166 0x00 0x00 0x88 0xdd 0x03 0x05 0x00 0x00 167 168 # VI: flat_atomic_add_x2 v[1:2], v[3:4], v[5:6] glc ; encoding: [0x00,0x00,0x89,0xdd,0x03,0x05,0x00,0x01] 169 0x00 0x00 0x89 0xdd 0x03 0x05 0x00 0x01 170 171 # VI: flat_atomic_sub_x2 v[3:4], v[5:6] ; encoding: [0x00,0x00,0x8c,0xdd,0x03,0x05,0x00,0x00] 172 0x00 0x00 0x8c 0xdd 0x03 0x05 0x00 0x00 173 174 # VI: flat_atomic_sub_x2 v[1:2], v[3:4], v[5:6] glc ; encoding: [0x00,0x00,0x8d,0xdd,0x03,0x05,0x00,0x01] 175 0x00 0x00 0x8d 0xdd 0x03 0x05 0x00 0x01 176 177 # VI: flat_atomic_smin_x2 v[3:4], v[5:6] ; encoding: [0x00,0x00,0x90,0xdd,0x03,0x05,0x00,0x00] 178 0x00 0x00 0x90 0xdd 0x03 0x05 0x00 0x00 179 180 # VI: flat_atomic_smin_x2 v[1:2], v[3:4], v[5:6] glc ; encoding: [0x00,0x00,0x91,0xdd,0x03,0x05,0x00,0x01] 181 0x00 0x00 0x91 0xdd 0x03 0x05 0x00 0x01 182 183 # VI: flat_atomic_umin_x2 v[3:4], v[5:6] ; encoding: [0x00,0x00,0x94,0xdd,0x03,0x05,0x00,0x00] 184 0x00 0x00 0x94 0xdd 0x03 0x05 0x00 0x00 185 186 # VI: flat_atomic_umin_x2 v[1:2], v[3:4], v[5:6] glc ; encoding: [0x00,0x00,0x95,0xdd,0x03,0x05,0x00,0x01] 187 0x00 0x00 0x95 0xdd 0x03 0x05 0x00 0x01 188 189 # VI: flat_atomic_smax_x2 v[3:4], v[5:6] ; encoding: [0x00,0x00,0x98,0xdd,0x03,0x05,0x00,0x00] 190 0x00 0x00 0x98 0xdd 0x03 0x05 0x00 0x00 191 192 # VI: flat_atomic_smax_x2 v[1:2], v[3:4], v[5:6] glc ; encoding: [0x00,0x00,0x99,0xdd,0x03,0x05,0x00,0x01] 193 0x00 0x00 0x99 0xdd 0x03 0x05 0x00 0x01 194 195 # VI: flat_atomic_umax_x2 v[3:4], v[5:6] ; encoding: [0x00,0x00,0x9c,0xdd,0x03,0x05,0x00,0x00] 196 0x00 0x00 0x9c 0xdd 0x03 0x05 0x00 0x00 197 198 # VI: flat_atomic_umax_x2 v[1:2], v[3:4], v[5:6] glc ; encoding: [0x00,0x00,0x9d,0xdd,0x03,0x05,0x00,0x01] 199 0x00 0x00 0x9d 0xdd 0x03 0x05 0x00 0x01 200 201 # VI: flat_atomic_and_x2 v[3:4], v[5:6] ; encoding: [0x00,0x00,0xa0,0xdd,0x03,0x05,0x00,0x00] 202 0x00 0x00 0xa0 0xdd 0x03 0x05 0x00 0x00 203 204 # VI: flat_atomic_and_x2 v[1:2], v[3:4], v[5:6] glc ; encoding: [0x00,0x00,0xa1,0xdd,0x03,0x05,0x00,0x01] 205 0x00 0x00 0xa1 0xdd 0x03 0x05 0x00 0x01 206 207 # VI: flat_atomic_or_x2 v[3:4], v[5:6] ; encoding: [0x00,0x00,0xa4,0xdd,0x03,0x05,0x00,0x00] 208 0x00 0x00 0xa4 0xdd 0x03 0x05 0x00 0x00 209 210 # VI: flat_atomic_or_x2 v[1:2], v[3:4], v[5:6] glc ; encoding: [0x00,0x00,0xa5,0xdd,0x03,0x05,0x00,0x01] 211 0x00 0x00 0xa5 0xdd 0x03 0x05 0x00 0x01 212 213 # VI: flat_atomic_xor_x2 v[3:4], v[5:6] ; encoding: [0x00,0x00,0xa8,0xdd,0x03,0x05,0x00,0x00] 214 0x00 0x00 0xa8 0xdd 0x03 0x05 0x00 0x00 215 216 # VI: flat_atomic_xor_x2 v[1:2], v[3:4], v[5:6] glc ; encoding: [0x00,0x00,0xa9,0xdd,0x03,0x05,0x00,0x01] 217 0x00 0x00 0xa9 0xdd 0x03 0x05 0x00 0x01 218 219 # VI: flat_atomic_inc_x2 v[3:4], v[5:6] ; encoding: [0x00,0x00,0xac,0xdd,0x03,0x05,0x00,0x00] 220 0x00 0x00 0xac 0xdd 0x03 0x05 0x00 0x00 221 222 # VI: flat_atomic_inc_x2 v[1:2], v[3:4], v[5:6] glc ; encoding: [0x00,0x00,0xad,0xdd,0x03,0x05,0x00,0x01] 223 0x00 0x00 0xad 0xdd 0x03 0x05 0x00 0x01 224 225 # VI: flat_atomic_dec_x2 v[3:4], v[5:6] ; encoding: [0x00,0x00,0xb0,0xdd,0x03,0x05,0x00,0x00] 226 0x00 0x00 0xb0 0xdd 0x03 0x05 0x00 0x00 227 228 # VI: flat_atomic_dec_x2 v[1:2], v[3:4], v[5:6] glc ; encoding: [0x00,0x00,0xb1,0xdd,0x03,0x05,0x00,0x01] 229 0x00 0x00 0xb1 0xdd 0x03 0x05 0x00 0x01 230