1 # RUN: llvm-mc -triple=hexagon -disassemble < %s | FileCheck %s 2 # Hexagon Programmer's Reference Manual 11.8 ST 3 4 # Store doubleword 5 0x9e 0xf5 0xd1 0x3b 6 # CHECK: memd(r17 + r21<<#3) = r31:30 7 0x28 0xd4 0xc0 0x48 8 # CHECK: memd(#320) = r21:20 9 0x02 0x40 0x00 0x00 0x28 0xd4 0xc0 0x48 10 # CHECK: memd(##168) = r21:20 11 0x15 0xd4 0xd1 0xa1 12 # CHECK: memd(r17+#168) = r21:20 13 0x02 0xf4 0xd1 0xa9 14 # CHECK: memd(r17 ++ I:circ(m1)) = r21:20 15 0x28 0xf4 0xd1 0xa9 16 # CHECK: memd(r17 ++ #40:circ(m1)) = r21:20 17 0x28 0xd4 0xd1 0xab 18 # CHECK: memd(r17++#40) = r21:20 19 0x00 0x40 0x00 0x00 0xd5 0xfe 0xd1 0xad 20 # CHECK: memd(r17<<#3 + ##21) = r31:30 21 0x00 0xf4 0xd1 0xad 22 # CHECK: memd(r17++m1) = r21:20 23 0x00 0xf4 0xd1 0xaf 24 # CHECK: memd(r17 ++ m1:brev) = r21:20 25 26 # Store doubleword conditionally 27 0xfe 0xf5 0xd1 0x34 28 # CHECK: if (p3) memd(r17+r21<<#3) = r31:30 29 0xfe 0xf5 0xd1 0x35 30 # CHECK: if (!p3) memd(r17+r21<<#3) = r31:30 31 0x03 0x40 0x45 0x85 0xfe 0xf5 0xd1 0x36 32 # CHECK: p3 = r5 33 # CHECK-NEXT: if (p3.new) memd(r17+r21<<#3) = r31:30 34 0x03 0x40 0x45 0x85 0xfe 0xf5 0xd1 0x37 35 # CHECK: p3 = r5 36 # CHECK-NEXT: if (!p3.new) memd(r17+r21<<#3) = r31:30 37 0xab 0xde 0xd1 0x40 38 # CHECK: if (p3) memd(r17+#168) = r31:30 39 0xab 0xde 0xd1 0x44 40 # CHECK: if (!p3) memd(r17+#168) = r31:30 41 0x03 0x40 0x45 0x85 0xab 0xde 0xd1 0x42 42 # CHECK: p3 = r5 43 # CHECK-NEXT: if (p3.new) memd(r17+#168) = r31:30 44 0x03 0x40 0x45 0x85 0xab 0xde 0xd1 0x46 45 # CHECK: p3 = r5 46 # CHECK-NEXT: if (!p3.new) memd(r17+#168) = r31:30 47 0x2b 0xf4 0xd1 0xab 48 # CHECK: if (p3) memd(r17++#40) = r21:20 49 0x2f 0xf4 0xd1 0xab 50 # CHECK: if (!p3) memd(r17++#40) = r21:20 51 0x03 0x40 0x45 0x85 0xab 0xf4 0xd1 0xab 52 # CHECK: p3 = r5 53 # CHECK-NEXT: if (p3.new) memd(r17++#40) = r21:20 54 0x03 0x40 0x45 0x85 0xaf 0xf4 0xd1 0xab 55 # CHECK: p3 = r5 56 # CHECK-NEXT: if (!p3.new) memd(r17++#40) = r21:20 57 0x02 0x40 0x00 0x00 0xc3 0xd4 0xc2 0xaf 58 # CHECK: if (p3) memd(##168) = r21:20 59 0x02 0x40 0x00 0x00 0xc7 0xd4 0xc2 0xaf 60 # CHECK: if (!p3) memd(##168) = r21:20 61 0x03 0x40 0x45 0x85 0x02 0x40 0x00 0x00 0xc3 0xf4 0xc2 0xaf 62 # CHECK: p3 = r5 63 # CHECK-NEXT: if (p3.new) memd(##168) = r21:20 64 0x03 0x40 0x45 0x85 0x02 0x40 0x00 0x00 0xc7 0xf4 0xc2 0xaf 65 # CHECK: p3 = r5 66 # CHECK-NEXT: if (!p3.new) memd(##168) = r21:20 67 68 # Store byte 69 0x9f 0xf5 0x11 0x3b 70 # CHECK: memb(r17 + r21<<#3) = r31 71 0x9f 0xca 0x11 0x3c 72 # CHECK: memb(r17+#21)=#31 73 0x15 0xd5 0x00 0x48 74 # CHECK: memb(#21) = r21 75 0x00 0x40 0x00 0x00 0x15 0xd5 0x00 0x48 76 # CHECK: memb(##21) = r21 77 0x15 0xd5 0x11 0xa1 78 # CHECK: memb(r17+#21) = r21 79 0x02 0xf5 0x11 0xa9 80 # CHECK: memb(r17 ++ I:circ(m1)) = r21 81 0x28 0xf5 0x11 0xa9 82 # CHECK: memb(r17 ++ #5:circ(m1)) = r21 83 0x28 0xd5 0x11 0xab 84 # CHECK: memb(r17++#5) = r21 85 0x00 0x40 0x00 0x00 0xd5 0xff 0x11 0xad 86 # CHECK: memb(r17<<#3 + ##21) = r31 87 0x00 0xf5 0x11 0xad 88 # CHECK: memb(r17++m1) = r21 89 0x00 0xf5 0x11 0xaf 90 # CHECK: memb(r17 ++ m1:brev) = r21 91 92 # Store byte conditionally 93 0xff 0xf5 0x11 0x34 94 # CHECK: if (p3) memb(r17+r21<<#3) = r31 95 0xff 0xf5 0x11 0x35 96 # CHECK: if (!p3) memb(r17+r21<<#3) = r31 97 0x03 0x40 0x45 0x85 0xff 0xf5 0x11 0x36 98 # CHECK: p3 = r5 99 # CHECK-NEXT: if (p3.new) memb(r17+r21<<#3) = r31 100 0x03 0x40 0x45 0x85 0xff 0xf5 0x11 0x37 101 # CHECK: p3 = r5 102 # CHECK-NEXT: if (!p3.new) memb(r17+r21<<#3) = r31 103 0xff 0xca 0x11 0x38 104 # CHECK: if (p3) memb(r17+#21)=#31 105 0xff 0xca 0x91 0x38 106 # CHECK: if (!p3) memb(r17+#21)=#31 107 0x03 0x40 0x45 0x85 0xff 0xca 0x11 0x39 108 # CHECK: p3 = r5 109 # CHECK-NEXT: if (p3.new) memb(r17+#21)=#31 110 0x03 0x40 0x45 0x85 0xff 0xca 0x91 0x39 111 # CHECK: p3 = r5 112 # CHECK-NEXT: if (!p3.new) memb(r17+#21)=#31 113 0xab 0xdf 0x11 0x40 114 # CHECK: if (p3) memb(r17+#21) = r31 115 0xab 0xdf 0x11 0x44 116 # CHECK: if (!p3) memb(r17+#21) = r31 117 0x03 0x40 0x45 0x85 0xab 0xdf 0x11 0x42 118 # CHECK: p3 = r5 119 # CHECK-NEXT: if (p3.new) memb(r17+#21) = r31 120 0x03 0x40 0x45 0x85 0xab 0xdf 0x11 0x46 121 # CHECK: p3 = r5 122 # CHECK-NEXT: if (!p3.new) memb(r17+#21) = r31 123 0x2b 0xf5 0x11 0xab 124 # CHECK: if (p3) memb(r17++#5) = r21 125 0x2f 0xf5 0x11 0xab 126 # CHECK: if (!p3) memb(r17++#5) = r21 127 0x03 0x40 0x45 0x85 0xab 0xf5 0x11 0xab 128 # CHECK: p3 = r5 129 # CHECK-NEXT: if (p3.new) memb(r17++#5) = r21 130 0x03 0x40 0x45 0x85 0xaf 0xf5 0x11 0xab 131 # CHECK: p3 = r5 132 # CHECK-NEXT: if (!p3.new) memb(r17++#5) = r21 133 0x00 0x40 0x00 0x00 0xab 0xd5 0x01 0xaf 134 # CHECK: if (p3) memb(##21) = r21 135 0x00 0x40 0x00 0x00 0xaf 0xd5 0x01 0xaf 136 # CHECK: if (!p3) memb(##21) = r21 137 0x03 0x40 0x45 0x85 0x00 0x40 0x00 0x00 0xab 0xf5 0x01 0xaf 138 # CHECK: p3 = r5 139 # CHECK-NEXT: if (p3.new) memb(##21) = r21 140 0x03 0x40 0x45 0x85 0x00 0x40 0x00 0x00 0xaf 0xf5 0x01 0xaf 141 # CHECK: p3 = r5 142 # CHECK-NEXT: if (!p3.new) memb(##21) = r21 143 144 # Store halfword 145 0x9f 0xf5 0x51 0x3b 146 # CHECK: memh(r17 + r21<<#3) = r31 147 0x9f 0xf5 0x71 0x3b 148 # CHECK: memh(r17 + r21<<#3) = r31.h 149 0x95 0xcf 0x31 0x3c 150 # CHECK: memh(r17+#62)=#21 151 0x00 0x40 0x00 0x00 0x2a 0xd5 0x40 0x48 152 # CHECK: memh(##42) = r21 153 0x00 0x40 0x00 0x00 0x2a 0xd5 0x60 0x48 154 # CHECK: memh(##42) = r21.h 155 0x2a 0xd5 0x40 0x48 156 # CHECK: memh(#84) = r21 157 0x2a 0xd5 0x60 0x48 158 # CHECK: memh(#84) = r21.h 159 0x15 0xdf 0x51 0xa1 160 # CHECK: memh(r17+#42) = r31 161 0x15 0xdf 0x71 0xa1 162 # CHECK: memh(r17+#42) = r31.h 163 0x02 0xf5 0x51 0xa9 164 # CHECK: memh(r17 ++ I:circ(m1)) = r21 165 0x28 0xf5 0x51 0xa9 166 # CHECK: memh(r17 ++ #10:circ(m1)) = r21 167 0x02 0xf5 0x71 0xa9 168 # CHECK: memh(r17 ++ I:circ(m1)) = r21.h 169 0x28 0xf5 0x71 0xa9 170 # CHECK: memh(r17 ++ #10:circ(m1)) = r21.h 171 0x28 0xd5 0x51 0xab 172 # CHECK: memh(r17++#10) = r21 173 0x00 0x40 0x00 0x00 0xd5 0xff 0x51 0xad 174 # CHECK: memh(r17<<#3 + ##21) = r31 175 0x28 0xd5 0x71 0xab 176 # CHECK: memh(r17++#10) = r21.h 177 0x00 0x40 0x00 0x00 0xd5 0xff 0x71 0xad 178 # CHECK: memh(r17<<#3 + ##21) = r31.h 179 0x00 0xf5 0x51 0xad 180 # CHECK: memh(r17++m1) = r21 181 0x00 0xf5 0x71 0xad 182 # CHECK: memh(r17++m1) = r21.h 183 0x00 0xf5 0x51 0xaf 184 # CHECK: memh(r17 ++ m1:brev) = r21 185 0x00 0xf5 0x71 0xaf 186 # CHECK: memh(r17 ++ m1:brev) = r21.h 187 188 # Store halfword conditionally 189 0xff 0xf5 0x51 0x34 190 # CHECK: if (p3) memh(r17+r21<<#3) = r31 191 0xff 0xf5 0x71 0x34 192 # CHECK: if (p3) memh(r17+r21<<#3) = r31.h 193 0xff 0xf5 0x51 0x35 194 # CHECK: if (!p3) memh(r17+r21<<#3) = r31 195 0xff 0xf5 0x71 0x35 196 # CHECK: if (!p3) memh(r17+r21<<#3) = r31.h 197 0x03 0x40 0x45 0x85 0xff 0xf5 0x51 0x36 198 # CHECK: p3 = r5 199 # CHECK-NEXT: if (p3.new) memh(r17+r21<<#3) = r31 200 0x03 0x40 0x45 0x85 0xff 0xf5 0x71 0x36 201 # CHECK: p3 = r5 202 # CHECK-NEXT: if (p3.new) memh(r17+r21<<#3) = r31.h 203 0x03 0x40 0x45 0x85 0xff 0xf5 0x51 0x37 204 # CHECK: p3 = r5 205 # CHECK-NEXT: if (!p3.new) memh(r17+r21<<#3) = r31 206 0x03 0x40 0x45 0x85 0xff 0xf5 0x71 0x37 207 # CHECK: p3 = r5 208 # CHECK-NEXT: if (!p3.new) memh(r17+r21<<#3) = r31.h 209 0xf5 0xcf 0x31 0x38 210 # CHECK: if (p3) memh(r17+#62)=#21 211 0xf5 0xcf 0xb1 0x38 212 # CHECK: if (!p3) memh(r17+#62)=#21 213 0x03 0x40 0x45 0x85 0xf5 0xcf 0x31 0x39 214 # CHECK: p3 = r5 215 # CHECK-NEXT: if (p3.new) memh(r17+#62)=#21 216 0x03 0x40 0x45 0x85 0xf5 0xcf 0xb1 0x39 217 # CHECK: p3 = r5 218 # CHECK-NEXT: if (!p3.new) memh(r17+#62)=#21 219 0xfb 0xd5 0x51 0x40 220 # CHECK: if (p3) memh(r17+#62) = r21 221 0xfb 0xd5 0x71 0x40 222 # CHECK: if (p3) memh(r17+#62) = r21.h 223 0xfb 0xd5 0x51 0x44 224 # CHECK: if (!p3) memh(r17+#62) = r21 225 0xfb 0xd5 0x71 0x44 226 # CHECK: if (!p3) memh(r17+#62) = r21.h 227 0x03 0x40 0x45 0x85 0xfb 0xd5 0x51 0x42 228 # CHECK: p3 = r5 229 # CHECK-NEXT: if (p3.new) memh(r17+#62) = r21 230 0x03 0x40 0x45 0x85 0xfb 0xd5 0x71 0x42 231 # CHECK: p3 = r5 232 # CHECK-NEXT: if (p3.new) memh(r17+#62) = r21.h 233 0x03 0x40 0x45 0x85 0xfb 0xd5 0x51 0x46 234 # CHECK: p3 = r5 235 # CHECK-NEXT: if (!p3.new) memh(r17+#62) = r21 236 0x03 0x40 0x45 0x85 0xfb 0xd5 0x71 0x46 237 # CHECK: p3 = r5 238 # CHECK-NEXT: if (!p3.new) memh(r17+#62) = r21.h 239 0x2b 0xf5 0x51 0xab 240 # CHECK: if (p3) memh(r17++#10) = r21 241 0x2f 0xf5 0x51 0xab 242 # CHECK: if (!p3) memh(r17++#10) = r21 243 0x03 0x40 0x45 0x85 0xab 0xf5 0x51 0xab 244 # CHECK: p3 = r5 245 # CHECK-NEXT: if (p3.new) memh(r17++#10) = r21 246 0x03 0x40 0x45 0x85 0xaf 0xf5 0x51 0xab 247 # CHECK: p3 = r5 248 # CHECK-NEXT: if (!p3.new) memh(r17++#10) = r21 249 0x2b 0xf5 0x71 0xab 250 # CHECK: if (p3) memh(r17++#10) = r21.h 251 0x2f 0xf5 0x71 0xab 252 # CHECK: if (!p3) memh(r17++#10) = r21.h 253 0x03 0x40 0x45 0x85 0xab 0xf5 0x71 0xab 254 # CHECK: p3 = r5 255 # CHECK-NEXT: if (p3.new) memh(r17++#10) = r21.h 256 0x03 0x40 0x45 0x85 0xaf 0xf5 0x71 0xab 257 # CHECK: p3 = r5 258 # CHECK-NEXT: if (!p3.new) memh(r17++#10) = r21.h 259 0x00 0x40 0x00 0x00 0xd3 0xd5 0x42 0xaf 260 # CHECK: if (p3) memh(##42) = r21 261 0x00 0x40 0x00 0x00 0xd3 0xd5 0x62 0xaf 262 # CHECK: if (p3) memh(##42) = r21.h 263 0x00 0x40 0x00 0x00 0xd7 0xd5 0x42 0xaf 264 # CHECK: if (!p3) memh(##42) = r21 265 0x00 0x40 0x00 0x00 0xd7 0xd5 0x62 0xaf 266 # CHECK: if (!p3) memh(##42) = r21.h 267 0x03 0x40 0x45 0x85 0x00 0x40 0x00 0x00 0xd3 0xf5 0x42 0xaf 268 # CHECK: p3 = r5 269 # CHECK-NEXT: if (p3.new) memh(##42) = r21 270 0x03 0x40 0x45 0x85 0x00 0x40 0x00 0x00 0xd3 0xf5 0x62 0xaf 271 # CHECK: p3 = r5 272 # CHECK-NEXT: if (p3.new) memh(##42) = r21.h 273 0x03 0x40 0x45 0x85 0x00 0x40 0x00 0x00 0xd7 0xf5 0x42 0xaf 274 # CHECK: p3 = r5 275 # CHECK-NEXT: if (!p3.new) memh(##42) = r21 276 0x03 0x40 0x45 0x85 0x00 0x40 0x00 0x00 0xd7 0xf5 0x62 0xaf 277 # CHECK: p3 = r5 278 # CHECK-NEXT: if (!p3.new) memh(##42) = r21.h 279 280 # Store word 281 0x9f 0xf5 0x91 0x3b 282 # CHECK: memw(r17 + r21<<#3) = r31 283 0x9f 0xca 0x51 0x3c 284 # CHECK: memw(r17{{ *}}+{{ *}}#84)=#31 285 0x15 0xdf 0x80 0x48 286 # CHECK: memw(#84) = r31 287 0x01 0x40 0x00 0x00 0x14 0xd5 0x80 0x48 288 # CHECK: memw(##84) = r21 289 0x9f 0xca 0x51 0x3c 290 # CHECK: memw(r17+#84)=#31 291 0x15 0xdf 0x91 0xa1 292 # CHECK: memw(r17+#84) = r31 293 0x02 0xf5 0x91 0xa9 294 # CHECK: memw(r17 ++ I:circ(m1)) = r21 295 0x28 0xf5 0x91 0xa9 296 # CHECK: memw(r17 ++ #20:circ(m1)) = r21 297 0x28 0xd5 0x91 0xab 298 # CHECK: memw(r17++#20) = r21 299 0x00 0x40 0x00 0x00 0xd5 0xff 0x91 0xad 300 # CHECK: memw(r17<<#3 + ##21) = r31 301 0x00 0xf5 0x91 0xad 302 # CHECK: memw(r17++m1) = r21 303 0x00 0xf5 0x91 0xaf 304 # CHECK: memw(r17 ++ m1:brev) = r21 305 306 # Store word conditionally 307 0xff 0xf5 0x91 0x34 308 # CHECK: if (p3) memw(r17+r21<<#3) = r31 309 0xff 0xf5 0x91 0x35 310 # CHECK: if (!p3) memw(r17+r21<<#3) = r31 311 0x03 0x40 0x45 0x85 0xff 0xf5 0x91 0x36 312 # CHECK: p3 = r5 313 # CHECK-NEXT: if (p3.new) memw(r17+r21<<#3) = r31 314 0x03 0x40 0x45 0x85 0xff 0xf5 0x91 0x37 315 # CHECK: p3 = r5 316 # CHECK-NEXT: if (!p3.new) memw(r17+r21<<#3) = r31 317 0xff 0xca 0x51 0x38 318 # CHECK: if (p3) memw(r17+#84)=#31 319 0xff 0xca 0xd1 0x38 320 # CHECK: if (!p3) memw(r17+#84)=#31 321 0x03 0x40 0x45 0x85 0xff 0xca 0x51 0x39 322 # CHECK: p3 = r5 323 # CHECK-NEXT: if (p3.new) memw(r17+#84)=#31 324 0x03 0x40 0x45 0x85 0xff 0xca 0xd1 0x39 325 # CHECK: p3 = r5 326 # CHECK-NEXT: if (!p3.new) memw(r17+#84)=#31 327 0xab 0xdf 0x91 0x40 328 # CHECK: if (p3) memw(r17+#84) = r31 329 0xab 0xdf 0x91 0x44 330 # CHECK: if (!p3) memw(r17+#84) = r31 331 0x03 0x40 0x45 0x85 0xab 0xdf 0x91 0x42 332 # CHECK: p3 = r5 333 # CHECK-NEXT: if (p3.new) memw(r17+#84) = r31 334 0x03 0x40 0x45 0x85 0xab 0xdf 0x91 0x46 335 # CHECK: p3 = r5 336 # CHECK-NEXT: if (!p3.new) memw(r17+#84) = r31 337 0x2b 0xf5 0x91 0xab 338 # CHECK: if (p3) memw(r17++#20) = r21 339 0x2f 0xf5 0x91 0xab 340 # CHECK: if (!p3) memw(r17++#20) = r21 341 0x03 0x40 0x45 0x85 0xaf 0xf5 0x91 0xab 342 # CHECK: p3 = r5 343 # CHECK-NEXT: if (!p3.new) memw(r17++#20) = r21 344 0x03 0x40 0x45 0x85 0xab 0xf5 0x91 0xab 345 # CHECK: p3 = r5 346 # CHECK-NEXT: if (p3.new) memw(r17++#20) = r21 347 0x01 0x40 0x00 0x00 0xa3 0xd5 0x81 0xaf 348 # CHECK: if (p3) memw(##84) = r21 349 0x01 0x40 0x00 0x00 0xa7 0xd5 0x81 0xaf 350 # CHECK: if (!p3) memw(##84) = r21 351 0x03 0x40 0x45 0x85 0x01 0x40 0x00 0x00 0xa3 0xf5 0x81 0xaf 352 # CHECK: p3 = r5 353 # CHECK-NEXT: if (p3.new) memw(##84) = r21 354 0x03 0x40 0x45 0x85 0x01 0x40 0x00 0x00 0xa7 0xf5 0x81 0xaf 355 # CHECK: p3 = r5 356 # CHECK-NEXT: if (!p3.new) memw(##84) = r21 357 358 # Allocate stack frame 359 0x1f 0xc0 0x9d 0xa0 360 # CHECK: allocframe(#248) 361