1# RUN: llvm-mc -triple=hexagon -disassemble < %s | FileCheck %s 2# Hexagon Programmer's Reference Manual 11.8 ST 3 4# Store doubleword 50x9e 0xf5 0xd1 0x3b 6# CHECK: memd(r17 + r21<<#3) = r31:30 70x28 0xd4 0xc0 0x48 8# CHECK: memd(#320) = r21:20 90x02 0x40 0x00 0x00 0x28 0xd4 0xc0 0x48 10# CHECK: memd(##168) = r21:20 110x15 0xd4 0xd1 0xa1 12# CHECK: memd(r17+#168) = r21:20 130x02 0xf4 0xd1 0xa9 14# CHECK: memd(r17 ++ I:circ(m1)) = r21:20 150x28 0xf4 0xd1 0xa9 16# CHECK: memd(r17 ++ #40:circ(m1)) = r21:20 170x28 0xd4 0xd1 0xab 18# CHECK: memd(r17++#40) = r21:20 190x00 0x40 0x00 0x00 0xd5 0xfe 0xd1 0xad 20# CHECK: memd(r17<<#3 + ##21) = r31:30 210x00 0xf4 0xd1 0xad 22# CHECK: memd(r17++m1) = r21:20 230x00 0xf4 0xd1 0xaf 24# CHECK: memd(r17 ++ m1:brev) = r21:20 25 26# Store doubleword conditionally 270xfe 0xf5 0xd1 0x34 28# CHECK: if (p3) memd(r17+r21<<#3) = r31:30 290xfe 0xf5 0xd1 0x35 30# CHECK: if (!p3) memd(r17+r21<<#3) = r31:30 310x03 0x40 0x45 0x85 0xfe 0xf5 0xd1 0x36 32# CHECK: p3 = r5 33# CHECK-NEXT: if (p3.new) memd(r17+r21<<#3) = r31:30 340x03 0x40 0x45 0x85 0xfe 0xf5 0xd1 0x37 35# CHECK: p3 = r5 36# CHECK-NEXT: if (!p3.new) memd(r17+r21<<#3) = r31:30 370xab 0xde 0xd1 0x40 38# CHECK: if (p3) memd(r17+#168) = r31:30 390xab 0xde 0xd1 0x44 40# CHECK: if (!p3) memd(r17+#168) = r31:30 410x03 0x40 0x45 0x85 0xab 0xde 0xd1 0x42 42# CHECK: p3 = r5 43# CHECK-NEXT: if (p3.new) memd(r17+#168) = r31:30 440x03 0x40 0x45 0x85 0xab 0xde 0xd1 0x46 45# CHECK: p3 = r5 46# CHECK-NEXT: if (!p3.new) memd(r17+#168) = r31:30 470x2b 0xf4 0xd1 0xab 48# CHECK: if (p3) memd(r17++#40) = r21:20 490x2f 0xf4 0xd1 0xab 50# CHECK: if (!p3) memd(r17++#40) = r21:20 510x03 0x40 0x45 0x85 0xab 0xf4 0xd1 0xab 52# CHECK: p3 = r5 53# CHECK-NEXT: if (p3.new) memd(r17++#40) = r21:20 540x03 0x40 0x45 0x85 0xaf 0xf4 0xd1 0xab 55# CHECK: p3 = r5 56# CHECK-NEXT: if (!p3.new) memd(r17++#40) = r21:20 570x02 0x40 0x00 0x00 0xc3 0xd4 0xc2 0xaf 58# CHECK: if (p3) memd(##168) = r21:20 590x02 0x40 0x00 0x00 0xc7 0xd4 0xc2 0xaf 60# CHECK: if (!p3) memd(##168) = r21:20 610x03 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 640x03 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 690x9f 0xf5 0x11 0x3b 70# CHECK: memb(r17 + r21<<#3) = r31 710x9f 0xca 0x11 0x3c 72# CHECK: memb(r17+#21)=#31 730x15 0xd5 0x00 0x48 74# CHECK: memb(#21) = r21 750x00 0x40 0x00 0x00 0x15 0xd5 0x00 0x48 76# CHECK: memb(##21) = r21 770x15 0xd5 0x11 0xa1 78# CHECK: memb(r17+#21) = r21 790x02 0xf5 0x11 0xa9 80# CHECK: memb(r17 ++ I:circ(m1)) = r21 810x28 0xf5 0x11 0xa9 82# CHECK: memb(r17 ++ #5:circ(m1)) = r21 830x28 0xd5 0x11 0xab 84# CHECK: memb(r17++#5) = r21 850x00 0x40 0x00 0x00 0xd5 0xff 0x11 0xad 86# CHECK: memb(r17<<#3 + ##21) = r31 870x00 0xf5 0x11 0xad 88# CHECK: memb(r17++m1) = r21 890x00 0xf5 0x11 0xaf 90# CHECK: memb(r17 ++ m1:brev) = r21 91 92# Store byte conditionally 930xff 0xf5 0x11 0x34 94# CHECK: if (p3) memb(r17+r21<<#3) = r31 950xff 0xf5 0x11 0x35 96# CHECK: if (!p3) memb(r17+r21<<#3) = r31 970x03 0x40 0x45 0x85 0xff 0xf5 0x11 0x36 98# CHECK: p3 = r5 99# CHECK-NEXT: if (p3.new) memb(r17+r21<<#3) = r31 1000x03 0x40 0x45 0x85 0xff 0xf5 0x11 0x37 101# CHECK: p3 = r5 102# CHECK-NEXT: if (!p3.new) memb(r17+r21<<#3) = r31 1030xff 0xca 0x11 0x38 104# CHECK: if (p3) memb(r17+#21)=#31 1050xff 0xca 0x91 0x38 106# CHECK: if (!p3) memb(r17+#21)=#31 1070x03 0x40 0x45 0x85 0xff 0xca 0x11 0x39 108# CHECK: p3 = r5 109# CHECK-NEXT: if (p3.new) memb(r17+#21)=#31 1100x03 0x40 0x45 0x85 0xff 0xca 0x91 0x39 111# CHECK: p3 = r5 112# CHECK-NEXT: if (!p3.new) memb(r17+#21)=#31 1130xab 0xdf 0x11 0x40 114# CHECK: if (p3) memb(r17+#21) = r31 1150xab 0xdf 0x11 0x44 116# CHECK: if (!p3) memb(r17+#21) = r31 1170x03 0x40 0x45 0x85 0xab 0xdf 0x11 0x42 118# CHECK: p3 = r5 119# CHECK-NEXT: if (p3.new) memb(r17+#21) = r31 1200x03 0x40 0x45 0x85 0xab 0xdf 0x11 0x46 121# CHECK: p3 = r5 122# CHECK-NEXT: if (!p3.new) memb(r17+#21) = r31 1230x2b 0xf5 0x11 0xab 124# CHECK: if (p3) memb(r17++#5) = r21 1250x2f 0xf5 0x11 0xab 126# CHECK: if (!p3) memb(r17++#5) = r21 1270x03 0x40 0x45 0x85 0xab 0xf5 0x11 0xab 128# CHECK: p3 = r5 129# CHECK-NEXT: if (p3.new) memb(r17++#5) = r21 1300x03 0x40 0x45 0x85 0xaf 0xf5 0x11 0xab 131# CHECK: p3 = r5 132# CHECK-NEXT: if (!p3.new) memb(r17++#5) = r21 1330x00 0x40 0x00 0x00 0xab 0xd5 0x01 0xaf 134# CHECK: if (p3) memb(##21) = r21 1350x00 0x40 0x00 0x00 0xaf 0xd5 0x01 0xaf 136# CHECK: if (!p3) memb(##21) = r21 1370x03 0x40 0x45 0x85 0x00 0x40 0x00 0x00 0xab 0xf5 0x01 0xaf 138# CHECK: p3 = r5 139# CHECK-NEXT: if (p3.new) memb(##21) = r21 1400x03 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 1450x9f 0xf5 0x51 0x3b 146# CHECK: memh(r17 + r21<<#3) = r31 1470x9f 0xf5 0x71 0x3b 148# CHECK: memh(r17 + r21<<#3) = r31.h 1490x95 0xcf 0x31 0x3c 150# CHECK: memh(r17+#62)=#21 1510x00 0x40 0x00 0x00 0x2a 0xd5 0x40 0x48 152# CHECK: memh(##42) = r21 1530x00 0x40 0x00 0x00 0x2a 0xd5 0x60 0x48 154# CHECK: memh(##42) = r21.h 1550x2a 0xd5 0x40 0x48 156# CHECK: memh(#84) = r21 1570x2a 0xd5 0x60 0x48 158# CHECK: memh(#84) = r21.h 1590x15 0xdf 0x51 0xa1 160# CHECK: memh(r17+#42) = r31 1610x15 0xdf 0x71 0xa1 162# CHECK: memh(r17+#42) = r31.h 1630x02 0xf5 0x51 0xa9 164# CHECK: memh(r17 ++ I:circ(m1)) = r21 1650x28 0xf5 0x51 0xa9 166# CHECK: memh(r17 ++ #10:circ(m1)) = r21 1670x02 0xf5 0x71 0xa9 168# CHECK: memh(r17 ++ I:circ(m1)) = r21.h 1690x28 0xf5 0x71 0xa9 170# CHECK: memh(r17 ++ #10:circ(m1)) = r21.h 1710x28 0xd5 0x51 0xab 172# CHECK: memh(r17++#10) = r21 1730x00 0x40 0x00 0x00 0xd5 0xff 0x51 0xad 174# CHECK: memh(r17<<#3 + ##21) = r31 1750x28 0xd5 0x71 0xab 176# CHECK: memh(r17++#10) = r21.h 1770x00 0x40 0x00 0x00 0xd5 0xff 0x71 0xad 178# CHECK: memh(r17<<#3 + ##21) = r31.h 1790x00 0xf5 0x51 0xad 180# CHECK: memh(r17++m1) = r21 1810x00 0xf5 0x71 0xad 182# CHECK: memh(r17++m1) = r21.h 1830x00 0xf5 0x51 0xaf 184# CHECK: memh(r17 ++ m1:brev) = r21 1850x00 0xf5 0x71 0xaf 186# CHECK: memh(r17 ++ m1:brev) = r21.h 187 188# Store halfword conditionally 1890xff 0xf5 0x51 0x34 190# CHECK: if (p3) memh(r17+r21<<#3) = r31 1910xff 0xf5 0x71 0x34 192# CHECK: if (p3) memh(r17+r21<<#3) = r31.h 1930xff 0xf5 0x51 0x35 194# CHECK: if (!p3) memh(r17+r21<<#3) = r31 1950xff 0xf5 0x71 0x35 196# CHECK: if (!p3) memh(r17+r21<<#3) = r31.h 1970x03 0x40 0x45 0x85 0xff 0xf5 0x51 0x36 198# CHECK: p3 = r5 199# CHECK-NEXT: if (p3.new) memh(r17+r21<<#3) = r31 2000x03 0x40 0x45 0x85 0xff 0xf5 0x71 0x36 201# CHECK: p3 = r5 202# CHECK-NEXT: if (p3.new) memh(r17+r21<<#3) = r31.h 2030x03 0x40 0x45 0x85 0xff 0xf5 0x51 0x37 204# CHECK: p3 = r5 205# CHECK-NEXT: if (!p3.new) memh(r17+r21<<#3) = r31 2060x03 0x40 0x45 0x85 0xff 0xf5 0x71 0x37 207# CHECK: p3 = r5 208# CHECK-NEXT: if (!p3.new) memh(r17+r21<<#3) = r31.h 2090xf5 0xcf 0x31 0x38 210# CHECK: if (p3) memh(r17+#62)=#21 2110xf5 0xcf 0xb1 0x38 212# CHECK: if (!p3) memh(r17+#62)=#21 2130x03 0x40 0x45 0x85 0xf5 0xcf 0x31 0x39 214# CHECK: p3 = r5 215# CHECK-NEXT: if (p3.new) memh(r17+#62)=#21 2160x03 0x40 0x45 0x85 0xf5 0xcf 0xb1 0x39 217# CHECK: p3 = r5 218# CHECK-NEXT: if (!p3.new) memh(r17+#62)=#21 2190xfb 0xd5 0x51 0x40 220# CHECK: if (p3) memh(r17+#62) = r21 2210xfb 0xd5 0x71 0x40 222# CHECK: if (p3) memh(r17+#62) = r21.h 2230xfb 0xd5 0x51 0x44 224# CHECK: if (!p3) memh(r17+#62) = r21 2250xfb 0xd5 0x71 0x44 226# CHECK: if (!p3) memh(r17+#62) = r21.h 2270x03 0x40 0x45 0x85 0xfb 0xd5 0x51 0x42 228# CHECK: p3 = r5 229# CHECK-NEXT: if (p3.new) memh(r17+#62) = r21 2300x03 0x40 0x45 0x85 0xfb 0xd5 0x71 0x42 231# CHECK: p3 = r5 232# CHECK-NEXT: if (p3.new) memh(r17+#62) = r21.h 2330x03 0x40 0x45 0x85 0xfb 0xd5 0x51 0x46 234# CHECK: p3 = r5 235# CHECK-NEXT: if (!p3.new) memh(r17+#62) = r21 2360x03 0x40 0x45 0x85 0xfb 0xd5 0x71 0x46 237# CHECK: p3 = r5 238# CHECK-NEXT: if (!p3.new) memh(r17+#62) = r21.h 2390x2b 0xf5 0x51 0xab 240# CHECK: if (p3) memh(r17++#10) = r21 2410x2f 0xf5 0x51 0xab 242# CHECK: if (!p3) memh(r17++#10) = r21 2430x03 0x40 0x45 0x85 0xab 0xf5 0x51 0xab 244# CHECK: p3 = r5 245# CHECK-NEXT: if (p3.new) memh(r17++#10) = r21 2460x03 0x40 0x45 0x85 0xaf 0xf5 0x51 0xab 247# CHECK: p3 = r5 248# CHECK-NEXT: if (!p3.new) memh(r17++#10) = r21 2490x2b 0xf5 0x71 0xab 250# CHECK: if (p3) memh(r17++#10) = r21.h 2510x2f 0xf5 0x71 0xab 252# CHECK: if (!p3) memh(r17++#10) = r21.h 2530x03 0x40 0x45 0x85 0xab 0xf5 0x71 0xab 254# CHECK: p3 = r5 255# CHECK-NEXT: if (p3.new) memh(r17++#10) = r21.h 2560x03 0x40 0x45 0x85 0xaf 0xf5 0x71 0xab 257# CHECK: p3 = r5 258# CHECK-NEXT: if (!p3.new) memh(r17++#10) = r21.h 2590x00 0x40 0x00 0x00 0xd3 0xd5 0x42 0xaf 260# CHECK: if (p3) memh(##42) = r21 2610x00 0x40 0x00 0x00 0xd3 0xd5 0x62 0xaf 262# CHECK: if (p3) memh(##42) = r21.h 2630x00 0x40 0x00 0x00 0xd7 0xd5 0x42 0xaf 264# CHECK: if (!p3) memh(##42) = r21 2650x00 0x40 0x00 0x00 0xd7 0xd5 0x62 0xaf 266# CHECK: if (!p3) memh(##42) = r21.h 2670x03 0x40 0x45 0x85 0x00 0x40 0x00 0x00 0xd3 0xf5 0x42 0xaf 268# CHECK: p3 = r5 269# CHECK-NEXT: if (p3.new) memh(##42) = r21 2700x03 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 2730x03 0x40 0x45 0x85 0x00 0x40 0x00 0x00 0xd7 0xf5 0x42 0xaf 274# CHECK: p3 = r5 275# CHECK-NEXT: if (!p3.new) memh(##42) = r21 2760x03 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 2810x9f 0xf5 0x91 0x3b 282# CHECK: memw(r17 + r21<<#3) = r31 2830x9f 0xca 0x51 0x3c 284# CHECK: memw(r17{{ *}}+{{ *}}#84)=#31 2850x15 0xdf 0x80 0x48 286# CHECK: memw(#84) = r31 2870x01 0x40 0x00 0x00 0x14 0xd5 0x80 0x48 288# CHECK: memw(##84) = r21 2890x9f 0xca 0x51 0x3c 290# CHECK: memw(r17+#84)=#31 2910x15 0xdf 0x91 0xa1 292# CHECK: memw(r17+#84) = r31 2930x02 0xf5 0x91 0xa9 294# CHECK: memw(r17 ++ I:circ(m1)) = r21 2950x28 0xf5 0x91 0xa9 296# CHECK: memw(r17 ++ #20:circ(m1)) = r21 2970x28 0xd5 0x91 0xab 298# CHECK: memw(r17++#20) = r21 2990x00 0x40 0x00 0x00 0xd5 0xff 0x91 0xad 300# CHECK: memw(r17<<#3 + ##21) = r31 3010x00 0xf5 0x91 0xad 302# CHECK: memw(r17++m1) = r21 3030x00 0xf5 0x91 0xaf 304# CHECK: memw(r17 ++ m1:brev) = r21 305 306# Store word conditionally 3070xff 0xf5 0x91 0x34 308# CHECK: if (p3) memw(r17+r21<<#3) = r31 3090xff 0xf5 0x91 0x35 310# CHECK: if (!p3) memw(r17+r21<<#3) = r31 3110x03 0x40 0x45 0x85 0xff 0xf5 0x91 0x36 312# CHECK: p3 = r5 313# CHECK-NEXT: if (p3.new) memw(r17+r21<<#3) = r31 3140x03 0x40 0x45 0x85 0xff 0xf5 0x91 0x37 315# CHECK: p3 = r5 316# CHECK-NEXT: if (!p3.new) memw(r17+r21<<#3) = r31 3170xff 0xca 0x51 0x38 318# CHECK: if (p3) memw(r17+#84)=#31 3190xff 0xca 0xd1 0x38 320# CHECK: if (!p3) memw(r17+#84)=#31 3210x03 0x40 0x45 0x85 0xff 0xca 0x51 0x39 322# CHECK: p3 = r5 323# CHECK-NEXT: if (p3.new) memw(r17+#84)=#31 3240x03 0x40 0x45 0x85 0xff 0xca 0xd1 0x39 325# CHECK: p3 = r5 326# CHECK-NEXT: if (!p3.new) memw(r17+#84)=#31 3270xab 0xdf 0x91 0x40 328# CHECK: if (p3) memw(r17+#84) = r31 3290xab 0xdf 0x91 0x44 330# CHECK: if (!p3) memw(r17+#84) = r31 3310x03 0x40 0x45 0x85 0xab 0xdf 0x91 0x42 332# CHECK: p3 = r5 333# CHECK-NEXT: if (p3.new) memw(r17+#84) = r31 3340x03 0x40 0x45 0x85 0xab 0xdf 0x91 0x46 335# CHECK: p3 = r5 336# CHECK-NEXT: if (!p3.new) memw(r17+#84) = r31 3370x2b 0xf5 0x91 0xab 338# CHECK: if (p3) memw(r17++#20) = r21 3390x2f 0xf5 0x91 0xab 340# CHECK: if (!p3) memw(r17++#20) = r21 3410x03 0x40 0x45 0x85 0xaf 0xf5 0x91 0xab 342# CHECK: p3 = r5 343# CHECK-NEXT: if (!p3.new) memw(r17++#20) = r21 3440x03 0x40 0x45 0x85 0xab 0xf5 0x91 0xab 345# CHECK: p3 = r5 346# CHECK-NEXT: if (p3.new) memw(r17++#20) = r21 3470x01 0x40 0x00 0x00 0xa3 0xd5 0x81 0xaf 348# CHECK: if (p3) memw(##84) = r21 3490x01 0x40 0x00 0x00 0xa7 0xd5 0x81 0xaf 350# CHECK: if (!p3) memw(##84) = r21 3510x03 0x40 0x45 0x85 0x01 0x40 0x00 0x00 0xa3 0xf5 0x81 0xaf 352# CHECK: p3 = r5 353# CHECK-NEXT: if (p3.new) memw(##84) = r21 3540x03 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 3590x1f 0xc0 0x9d 0xa0 360# CHECK: allocframe(#248) 361